Skip to content

chore: misc otel internalization/cleanup#2835

Merged
sydney-munro merged 1 commit into
otel-v1-branchfrom
otel-review-cleanup
Dec 5, 2024
Merged

chore: misc otel internalization/cleanup#2835
sydney-munro merged 1 commit into
otel-v1-branchfrom
otel-review-cleanup

Conversation

@BenWhitehead

Copy link
Copy Markdown
Collaborator

No description provided.

@BenWhitehead BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Dec 5, 2024
@BenWhitehead BenWhitehead requested a review from a team December 5, 2024 20:21
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Dec 5, 2024
CreateBucketRequest req = opts.createBucketsRequest().apply(builder).build();
GrpcCallContext merge = Utils.merge(grpcCallContext, Retrying.newCallContext());
try (OpenTelemetryTraceUtil.Scope unused = otelSpan.makeCurrent()) {
try (OpenTelemetryTraceUtil.Scope ignored = otelSpan.makeCurrent()) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

renamed variables to remove warnings from intellij.

this.openTelemetry = storageOptions.getOpenTelemetrySdk();
this.tracer =
openTelemetry.getTracer(LIBRARY_NAME, GaxProperties.getLibraryVersion(this.getClass()));
this.tracer = openTelemetry.getTracer(LIBRARY_NAME, storageOptions.getLibraryVersion());

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Switch to using the logic from storageOptions rather than gax. Our version is more stable to repackaging, and is what is used for headers and such. We will want to keep them in sync.

spanBuilder.setAllAttributes(
Attributes.builder()
.put("gcp.client.version", GaxProperties.getLibraryVersion(this.getClass()))
.put("gcp.client.version", storageOptions.getLibraryVersion())

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ditto

.put("gcp.client.version", storageOptions.getLibraryVersion())
.put("gcp.client.repo", "googleapis/java-storage")
.put("gcp.client.artifact", "com.google.cloud.google-cloud-storage")
.put("gcp.client.artifact", "com.google.cloud:google-cloud-storage")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

use the maven package format

@sydney-munro sydney-munro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of that!

@sydney-munro sydney-munro merged commit 6a2b3ca into otel-v1-branch Dec 5, 2024
@sydney-munro sydney-munro deleted the otel-review-cleanup branch December 5, 2024 20:46
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 googleapis/java-storage API. owlbot:ignore instruct owl-bot to ignore a PR size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants