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(tracing): Add WithDescription SpanOption #751

Merged

Conversation

natikgadzhi
Copy link
Contributor

@natikgadzhi natikgadzhi commented Nov 27, 2023

Summary

This pull request adds WithDescription span option! Closes #739, thank you to @moneymikeMD for the issue.

Changes

  • Disclaimer: I was just diving into the go SDK codebase, and was looking through the issue list for an easy way in. Please feel free to tell me to gtfo if that pull request is not all that useful.
  • I've added the WithDescription SpanOption that works similar to the existing WithTransactionName and friends.

TODO

  • Unit tests into tracing_test.go. Wait a sec, will do in a couple hours.

/cc @greywolve

@greywolve
Copy link
Contributor

@natikgadzhi thanks for the PR! Just need to fix a linting issue and this should be good. :)

@natikgadzhi
Copy link
Contributor Author

@greywolve I do have to admit, not setting up a formatter in a Go project is kind of embarrasing. Fixed!

@greywolve
Copy link
Contributor

@greywolve I do have to admit, not setting up a formatter in a Go project is kind of embarrasing. Fixed!

Haha no problem, I forget this sometimes too :)

@natikgadzhi
Copy link
Contributor Author

natikgadzhi commented Nov 27, 2023 via email

tracing_test.go Outdated Show resolved Hide resolved
Co-authored-by: Oliver Powell <oliverpowell84@gmail.com>
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (032ecc1) 80.77% compared to head (3cde419) 80.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
+ Coverage   80.77%   80.88%   +0.11%     
==========================================
  Files          47       48       +1     
  Lines        4701     4714      +13     
==========================================
+ Hits         3797     3813      +16     
+ Misses        765      763       -2     
+ Partials      139      138       -1     

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

@greywolve
Copy link
Contributor

Btw, perhaps worth setting up a .vscode/settings.json with custom formatter path to ensure gofmt -s by default?

Not sure everyone uses vscode, but that could be useful for sure.

@cleptric cleptric enabled auto-merge (squash) November 28, 2023 10:50
@cleptric cleptric merged commit fff66d1 into getsentry:master Nov 28, 2023
17 checks passed
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.

Add WithDescription SpanOption
3 participants