builder-next: enable OTLP tracing for history records#45579
builder-next: enable OTLP tracing for history records#45579thaJeztah merged 1 commit intomoby:masterfrom
Conversation
|
I actually just started a branch this passed week to enable tracing on the HTTP API + OTLP exporters. |
|
discussed with @tonistiigi and this should be ready for review |
|
@tonistiigi looks like there's an issue with the vendor check; |
| if strings.HasSuffix(info.FullMethod, "opentelemetry.proto.collector.trace.v1.TraceService/Export") { | ||
| return handler(ctx, req) | ||
| } |
There was a problem hiding this comment.
Why does this particular gRPC request method need to be special-cased to be excluded from tracing? I'd like to see a code comment with the explanation.
Any reason why the special-casing is done with bespoke code rather than otelgrpc.WithInterceptorFilter?
otelgrpc.WithInterceptorFilter(filters.Not(filters.FullMethodName("/opentelemetry.proto.collector.trace.v1.TraceService/Export")))There was a problem hiding this comment.
Just discussed in the maintainers call, and it's to prevent an infinite loop (but Tonis will add a comment describing the details)
There was a problem hiding this comment.
(but maybe newer versions of otel can clean this up; he's looking into it)
(don't shoot the messenger)
This enables picking up OTLP tracing context for the gRPC requests. Also sets up the in-memory recorder that BuildKit History API can use to store the traces associated with specific build in a database after build completes. This doesn't enable Jaeger tracing endpoints from env but this can be easily enabled by adding another import if maintainers want it. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
afae691 to
cfa08f8
Compare
|
This enables picking up OTLP tracing context for the gRPC requests.
Also sets up the in-memory recorder that BuildKit History API can use to store the traces associated with specific build in a database after build completes.
This doesn't enable Jaeger tracing endpoints from env but this can be easily enabled by adding another import if maintainers want it.