KEMBAR78
chore: misc otel internalization/cleanup by BenWhitehead · Pull Request #2835 · googleapis/java-storage · GitHub
Skip to content

Conversation

@BenWhitehead
Copy link
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 as a code owner 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
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
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
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
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

Copy link
Contributor

@sydney-munro sydney-munro left a comment

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
17 checks passed
@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