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

Add tracing support for gin #600

Closed
wants to merge 10 commits into from
Closed

Add tracing support for gin #600

wants to merge 10 commits into from

Conversation

ringsaturn
Copy link

Fix #593

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Patch coverage: 54.71% and project coverage change: -1.04 ⚠️

Comparison is base (eb22fb5) 80.03% compared to head (dc3d295) 78.99%.

❗ Current head dc3d295 differs from pull request most recent head 945ed83. Consider uploading reports for the commit 945ed83 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
- Coverage   80.03%   78.99%   -1.04%     
==========================================
  Files          38       38              
  Lines        3881     3932      +51     
==========================================
  Hits         3106     3106              
- Misses        669      720      +51     
  Partials      106      106              
Impacted Files Coverage Δ
gin/sentrygin.go 0.00% <0.00%> (ø)
tracing.go 83.88% <87.87%> (-5.38%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, added some comments.

gin/sentrygin.go Outdated Show resolved Hide resolved
gin/sentrygin.go Outdated Show resolved Hide resolved
gin/sentrygin.go Outdated Show resolved Hide resolved
gin/sentrygin.go Outdated
Comment on lines 134 to 135
ctx.Writer.Header().Set(traceHeader, transaction.ToSentryTrace())
ctx.Writer.Header().Set(baggageHeader, transaction.ToBaggage())
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why we need to do this?

Copy link
Author

Choose a reason for hiding this comment

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

I’m not sure whether it’s useful to return trace info in HTTP header, like Sentry’ Python SDK works with Flask&FastAPI.

Is there any spec for this use case?

gin/sentrygin.go Outdated Show resolved Hide resolved
gin/sentrygin.go Outdated Show resolved Hide resolved
gin/sentrygin.go Outdated Show resolved Hide resolved
@cleptric
Copy link
Member

Will also need some tests.

@cleptric
Copy link
Member

cleptric commented Jun 6, 2023

Closing in favour of #644

@cleptric cleptric closed this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants