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

fix(tracing): Restore OTel tracing support #2482

Conversation

hairyhenderson
Copy link
Contributor

Description

In #1503, the code that used to call s.otelService.Init was accidentally removed. This restores that code.

Here's proof of spans once again being sent to a local Alloy/Tempo setup:

image

Note that I have not written a unit test to cover this, as it's quite difficult to do so with how the OTel SDK is configured currently.

I have some ideas on how tracing support can be made more flexible (through use of autoexport primarily, and some other changes). I'll issue a PR for that some other time.

Closes issue(s)

Fixes #2479

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

Copy link

netlify bot commented Oct 8, 2024

Deploy Preview for go-feature-flag-doc-preview canceled.

Name Link
🔨 Latest commit 349be1b
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/6705b61f7b93f0000859e757

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Copy link

sonarcloud bot commented Oct 8, 2024

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.18%. Comparing base (f45f594) to head (349be1b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/relayproxy/api/server.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2482      +/-   ##
==========================================
+ Coverage   85.66%   86.18%   +0.52%     
==========================================
  Files         100      100              
  Lines        3523     3526       +3     
==========================================
+ Hits         3018     3039      +21     
+ Misses        382      360      -22     
- Partials      123      127       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@thomaspoignant thomaspoignant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this PR, I have no idea why I removed it.

I will release a new version containing the fix.

@thomaspoignant thomaspoignant merged commit 012659f into thomaspoignant:main Oct 9, 2024
21 of 22 checks passed
@hairyhenderson hairyhenderson deleted the fix-otel-tracing-support-2479 branch October 9, 2024 13:41
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.

(bug) Tracing no longer working
2 participants