-
Notifications
You must be signed in to change notification settings - Fork 822
docstore: Opentelemetry migration of docstore #3550
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
base: master
Are you sure you want to change the base?
Conversation
docstore/docstore.go
Outdated
gcdkotel.MethodKey.String("ActionList.Do"), | ||
gcdkotel.ProviderKey.String(l.coll.tracer.Provider), | ||
} | ||
completedCallsCounter.Add(context.Background(), 1, metric.WithAttributes(attr...)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ctx
?
docstore/docstore.go
Outdated
gcdkotel.ProviderKey.String(l.coll.tracer.Provider), | ||
} | ||
latencyHistogram.Record( | ||
context.Background(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
docstore/query.go
Outdated
gcdkotel.MethodKey.String("Query.Get"), | ||
gcdkotel.ProviderKey.String(q.coll.tracer.Provider), | ||
} | ||
completedCallsCounter.Add(context.Background(), 1, metric.WithAttributes(attr...)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
docstore/docstore.go
Outdated
var startTime time.Time | ||
var span trace.Span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these two be defined in the scope of
if withTracing {}
below. Seems we dont need them outside the scope.
docstore/otel_test.go
Outdated
// Skip span check as span attributes might have changed during migration | ||
// if !providerFound { | ||
// t.Errorf("did not see span with provider=%s", driver) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented code.
docstore/query.go
Outdated
var startTime time.Time | ||
var span trace.Span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move into if withTracing {...}
scope below?
…/go-cloud into otel-migration-docstore
@pramineni01 @jba before this pr is good for review please take a look at #3557. |
Micro PR to migrate monolith : #3539
PR affects :