-
Notifications
You must be signed in to change notification settings - Fork 63
interceptor/opencensus: record number of received spans #65
Conversation
f299e24
to
8993460
Compare
interceptor/opencensus/opencensus.go
Outdated
|
||
// We MUST Unconditionally record metrics from this reception. |
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.
s/Unconditionally/unconditionally
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.
Thanks, I'll update that.
interceptor/opencensus/opencensus.go
Outdated
@@ -88,20 +90,28 @@ func (oci *OCInterceptor) Export(tes agenttracepb.TraceService_ExportServer) err | |||
return errTraceExportProtocolViolation | |||
} | |||
|
|||
var lastNonNilNode *commonpb.Node | |||
spansMetricsFn := internal.NewReceivedSpansRecorder(context.Background(), "opencensus") |
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.
Use tags from the current context (they include tags emitted by the oc-library-agent-exporter)?
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.
Great reminder, that'd entail changing that to tes.Context()
, thanks.
Probably forgot to push the commit. I cannot see any update. |
f6cb1b9
to
2dc4ade
Compare
@bogdandrutu in deed, PTAL! |
2dc4ade
to
393b819
Compare
81c1aaf
to
e4c1aa3
Compare
Thank you for the review @bogdandrutu! |
Instrument interceptor/opencensus with stats to record the number of received spans. This is accomplished by a helper to process spans that sends over spans even if the number of spans is 0. Also record with tag_key "opencensus_interceptor" whose value is the name of the respective interceptor. The test to ensure that 0 length spans are also added is currently disabled because: * Issue census-instrumentation/opencensus-go#862 is not yet implemented which requests that the OpenCensus-Go stats worker provide a method Flush to flush all data. Without it, metrics will contain stale data from previous tests. Add tests to lock-in this behavior. Also replace grpc.NewServer with a stats enabled server helper call. This enables tracing and metrics for each gRPC server by replacing naked usages of grpc.NewServer with the new helper function: internal.GRPCServerWithObservabilityEnabled Updates #63
e4c1aa3
to
bdb4d3d
Compare
Instrument interceptor/opencensus with stats to record
the number of received spans. This is accomplished by
a helper to process spans that sends over spans even
if the number of spans is 0. Also record with tag_key
"opencensus_interceptor" whose value is the name
of the respective interceptor.
The test to ensure that 0 length spans are also added
is currently disabled because:
is not yet implemented which requests that the OpenCensus-Go
stats worker provide a method Flush to flush all data. Without
it, metrics will contain stale data from previous tests.
Add tests to lock-in this behavior.
Updates #63