-
-
Notifications
You must be signed in to change notification settings - Fork 134
obs: add otel tracing #1062
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: main
Are you sure you want to change the base?
obs: add otel tracing #1062
Conversation
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
54b0fc2 to
8ff640a
Compare
phillebaba
left a comment
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.
@artem-tkachuk as we discussed during last weeks community meeting. We should remove the optional build tags and then also the docker compose tests. Keep things slim with adding tracing, and then we can add more features as needed. Once you remove the things that are not needed it will reduce the noise and make it easier to review.
What would be nice is to get to a first point where we are setting up otelhttp so that both trace headers are forwarded by the clients and also registered for requests. Does that sound like a good idea?
main.go
Outdated
| regSrv := &http.Server{ | ||
| Addr: args.RegistryAddr, | ||
| Handler: reg.Handler(log), | ||
| Handler: otelx.WrapHandler("registry", reg.Handler(log)), |
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.
We should aim to use go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp and integrate it into the httpx package.
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.
Also keep in mind that embedding projects may have their own otel config that this will need to play nice with.
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.
HTTP instrumentation now uses otelhttp and lives in httpx (handlers + transport), and OTEL setup skips overriding existing tracer providers/propagators if already configured 15df91f
|
@phillebaba thank you very much for reviewing! Will work on it today and tomorrow now that I have caught up after coming back from KubeCon :) |
bb3575f to
dbe1524
Compare
|
Finished addressing feedback. Remaining items are adding more testing for codecov, providing otel endpoint for k8s itest, cleaning up commits, and updating description. |
|
@phillebaba, could you add a label to the PR since they're now required? |
03fa395 to
9119446
Compare
|
Added more testing to improve codecov coverage, cleaned up commits, and updated the description. Ready for re-review! |
9119446 to
8ef2f67
Compare
2d21aa8 to
f06b549
Compare
Add OpenTelemetry module requirements and refresh integration test module files while keeping golangci-lint import aliasing consistent.
Initialize OTEL tracing with env-backed defaults and provide helper functions for span creation and log enrichment.
Centralize otelhttp wrapping for handlers and transports, then route registry and OCI requests through the new helpers.
Plumb OTEL config from flags into setup and add spans around P2P bootstrap and lookup operations.
Cover override vs. reuse behavior, propagator handling, and sampling defaults for the OTEL setup flow.
Add OTEL chart values and render them into the daemonset args with a guard for empty endpoints, then refresh helm docs.
Align documentation and changelog entries with the OTEL integration behavior and references.
f06b549 to
4b22ae3
Compare
Add OpenTelemetry tracing to Spegel
Summary
httpxusingotelhttpWhy
Provide request‑level tracing for debugging and observability without breaking embedders that already configure OTEL.
Details
httpx.WrapHandlerhttpx.WrapTransportvalues.yamlexposes.Values.spegel.otel.{endpoint,insecure,serviceName,sampler}and flags are wired into the DaemonSet.Test plan
go test ./...golangci-lint run ./...Impact
Screenshots
Follow-up