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(gin): Add transactions to Gin integration #644

Merged
merged 4 commits into from
Jun 7, 2023

Conversation

zetaab
Copy link
Contributor

@zetaab zetaab commented May 29, 2023

add missing transactions for gin

@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 57.40% and project coverage change: +0.37 🎉

Comparison is base (1b0b536) 79.64% compared to head (4d9ac48) 80.02%.

❗ Current head 4d9ac48 differs from pull request most recent head 5d5b4e4. Consider uploading reports for the commit 5d5b4e4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #644      +/-   ##
==========================================
+ Coverage   79.64%   80.02%   +0.37%     
==========================================
  Files          38       38              
  Lines        3896     3944      +48     
==========================================
+ Hits         3103     3156      +53     
+ Misses        683      675       -8     
- Partials      110      113       +3     
Impacted Files Coverage Δ
tracing.go 85.65% <25.80%> (-3.78%) ⬇️
gin/sentrygin.go 72.58% <100.00%> (+72.58%) ⬆️

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

@tonyo
Copy link
Contributor

tonyo commented May 31, 2023

Hey @zetaab , thanks for the changes 👍
Looks good; the only thing: could you add a test or two, to make sure it works as expected?

Could be something like https://github.com/getsentry/sentry-go/blob/master/http/sentryhttp_test.go, but can be even simpler (at least to make sure it doesn't crash).

@zetaab
Copy link
Contributor Author

zetaab commented May 31, 2023

@tonyo yeah I will do those, just take some days :)

@zetaab
Copy link
Contributor Author

zetaab commented Jun 6, 2023

@tonyo sorry for copy pasting the tests, but now its almost similar than in normal http lib. This does not include transaction tests. I will continue with those tomorrow.

@zetaab
Copy link
Contributor Author

zetaab commented Jun 6, 2023

actually it was quite easy to add transaction tests, so those are included now as well

@cleptric
Copy link
Member

cleptric commented Jun 6, 2023

Thanks, we'll take a closer look soon. For now, please revert any dependency bumps as we do not want to raise our base level.
Regarding Gin, you can read up on our Security Policy and why we do not force an upgrade from the SDK.

options...,
)
defer func() {
transaction.Status = sentry.HTTPtoSpanStatus(c.Writer.Status())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added Status and tests for that as well

@tonyo tonyo changed the title add transactions to gin feat(gin): Add transactions to Gin integration Jun 7, 2023
@tonyo
Copy link
Contributor

tonyo commented Jun 7, 2023

Thanks!

@tonyo tonyo merged commit 2aacdfb into getsentry:master Jun 7, 2023
@zetaab zetaab deleted the addtracing branch June 8, 2023 04:50
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.

3 participants