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

feat: Take in a module name when creating a span #2811

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

sydney-munro
Copy link
Collaborator

@sydney-munro sydney-munro commented Nov 8, 2024

SpanData{spanContext=ImmutableSpanContext{traceId=c49154a1f7a6a4adb7188e566fcd7d12, spanId=7dd45a835177a216, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=true}, parentSpanContext=ImmutableSpanContext{traceId=00000000000000000000000000000000, spanId=0000000000000000, traceFlags=00, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=false}, resource=Resource{schemaUrl=null, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.42.1"}}, instrumentationScopeInfo=InstrumentationScopeInfo{name=cloud.google.com/java/storage, version=, schemaUrl=null, attributes={}}, name=com.google.cloud.storage.GrpcStorageImpl/create, kind=CLIENT, startEpochNanos=1731105737865150000, endEpochNanos=1731105739962999167, attributes=AttributesMap{data={gcp.client.repo=googleapis/java-storage, gcp.client.service=Storage, gcp.client.version=, gcp.client.artifact=com.google.cloud.google-cloud-storage, rpc.system=grpc}, capacity=128, totalAddedValues=5}, totalAttributeCount=5, events=[], totalRecordedEvents=0, links=[], totalRecordedLinks=0, status=ImmutableStatusData{statusCode=UNSET, description=}, hasEnded=true}

notable change seen here
name=com.google.cloud.storage.GrpcStorageImpl/create

@sydney-munro sydney-munro requested a review from a team as a code owner November 8, 2024 17:20
@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 Nov 8, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Nov 8, 2024
@@ -201,7 +201,8 @@ public void close() throws Exception {

@Override
public Bucket create(BucketInfo bucketInfo, BucketTargetOption... options) {
OpenTelemetryTraceUtil.Span otelSpan = openTelemetryTraceUtil.startSpan("create");
OpenTelemetryTraceUtil.Span otelSpan =
openTelemetryTraceUtil.startSpan("create", this.getClass().getName());
Copy link
Member

Choose a reason for hiding this comment

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

Do you have an example trace with these new spans that you can add to PR description?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

posted a span from one of the tests

@sydney-munro sydney-munro merged commit dc5a734 into otel-v1-branch Nov 8, 2024
17 checks passed
@sydney-munro sydney-munro deleted the http-instrument branch November 8, 2024 22:47
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. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants