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: Improve OpenTelemetry trace instrumentation #6417

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

cedricziel
Copy link
Contributor

@cedricziel cedricziel commented Jun 22, 2024

This PR enhances the opentelemetry instrumentation for caddy by:

  • creating client spans for reverse proxy request to fix servicegraph calculations
  • injecting, conditionally, a server-timing header to propagate the traceparent down to the caller

@caddyserver caddyserver deleted a comment from ChenYujunjks Jul 23, 2024
@mholt
Copy link
Member

mholt commented Oct 2, 2024

Thanks @hairyhenderson !

@cedricziel Would you be able to fix up the lint errors and make sure the tests pass, then we can get this in the next beta release?

@mholt
Copy link
Member

mholt commented Oct 2, 2024

Thanks for the commit!

Looks like the order of the modified imports needs to be adjusted (for lint) and for tests, there's:

    module_test.go:107: Invalid traceparent: 
--- FAIL: TestTracing_ServeHTTP_Propagation_Without_Initial_Headers (0.00s)

@mohammed90
Copy link
Member

For lint, try golangci-lint run --fix. I think that takes care of most of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants