Skip to content

Add tracing and update rdk version#48

Open
benjirewis wants to merge 2 commits intomainfrom
add-tracing
Open

Add tracing and update rdk version#48
benjirewis wants to merge 2 commits intomainfrom
add-tracing

Conversation

@benjirewis
Copy link

@benjirewis benjirewis commented Mar 13, 2026

What

Bumps rdk version to have access to rdk/module/trace package and minimally changes module code to suppor that. Adds spans to background worker code.

Why

We want to gather better timing information about the captureImageInBackground background worker.

Testing

Haven't tested at all.

ctx,
conf.Cloud.AppAddress,
conf.Cloud.Secret,
conf.Cloud.GetCloudCredsDialOpt(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change associated with rdk bump:

grpc.NewAppConn now takes an RPC dial option instead of an ID, but it can be constructed with conf.Cloud.GetCoudCredsDialOpt() (that's what we do in rdk).

return nil, resource.ErrDoUnimplemented
}

func (cc *conditionalCamera) Image(ctx context.Context, mimeType string, extra map[string]interface{}) ([]byte, camera.ImageMetadata, error) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change associated with rdk bump:

Image is no longer a part of the Camera interface, and camera.ImageMetadata is no longer a type. I kept the changes fairly minimal, but tried to account for this. There's more dead code lying around, but I wanted to do something quick.

test.That(t, err.Error(), test.ShouldContainSubstring, "one of window_seconds, window_seconds_after, or window_seconds_before can be negative")
}

func TestImage(t *testing.T) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed tests that assert on/use Image (now gone).

github.com/rhysd/actionlint v1.7.8
go.viam.com/rdk v0.105.1-0.20251213204917-2ff3c7d9ab45
go.opentelemetry.io/otel v1.38.0
go.viam.com/rdk v0.116.0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same "big bump" as in other PR (even bigger here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant