Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storage): Instrument existing metadata ops with storage trace package #11107

Merged
merged 20 commits into from
Jan 22, 2025

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Nov 8, 2024

Update: supersedes #11051

  • Adds a development flag GO_STORAGE_DEV_OTEL_TRACING that will be removed upon experimental feature launch
  • Replaces existing metadata ops instrumentation with storage trace package (tracking sheet)
  • Adds emulated trace tests

Copy link

google-cla bot commented Nov 8, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Nov 8, 2024
@cojenco cojenco marked this pull request as ready for review November 8, 2024 23:11
@cojenco cojenco requested review from a team as code owners November 8, 2024 23:11
storage/acl.go Outdated Show resolved Hide resolved
@cojenco
Copy link
Contributor Author

cojenco commented Nov 12, 2024

@BrennaEpp could you PTAL and help check the CLA, thanks!

Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Nice start on this!

storage/acl.go Outdated Show resolved Hide resolved
storage/trace_test.go Outdated Show resolved Hide resolved
storage/trace_test.go Outdated Show resolved Hide resolved
storage/trace_test.go Outdated Show resolved Hide resolved
@cojenco cojenco force-pushed the trace-existing-metadata branch from 53726f1 to f70a8e5 Compare November 16, 2024 00:33
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

one minor nit, otherwise looks good to me at this point.

storage/trace.go Outdated Show resolved Hide resolved
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
Copy link
Contributor

@BrennaEpp BrennaEpp left a comment

Choose a reason for hiding this comment

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

Thanks Cathy!

opts := []option.ClientOption{
option.WithTelemetryDisabled(),
}
multiTransportTest(ctx, t, func(t *testing.T, ctx context.Context, bucket string, prefix string, client *Client) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a transportClientTest instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'd want to use multiTransportTest here to test trace instrumentation on the transport-agnostic layer. Also, we need to configure NewGRPCClient and NewClient by passing in ClientOption, which cannot be done via transportClientTest. See previous discussion

Copy link
Contributor

Choose a reason for hiding this comment

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

transportClientTest has a check to not run if the emulator env var is not set

func transportClientTest(ctx context.Context, t *testing.T, test func(*testing.T, context.Context, string, string, storageClient)) {

We should modify transportClientTest to allow configuration of client opts similar to multiTransportTest. Or add a check to this test specifically so it only runs on the emulator

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this caused this issue #11480

@cojenco cojenco added the automerge Merge the pull request once unit tests and other checks pass. label Jan 22, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 48022ac into googleapis:main Jan 22, 2025
10 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants