-
Notifications
You must be signed in to change notification settings - Fork 581
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 span start end end options to gin configuration #5250
Conversation
55ec6c7
to
19fae1d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5250 +/- ##
=====================================
Coverage 61.2% 61.2%
=====================================
Files 185 185
Lines 11207 11216 +9
=====================================
+ Hits 6865 6874 +9
Misses 4142 4142
Partials 200 200
|
85e7f43
to
d598c72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly to #5251 (review)
The user can e.g. change the span kind using https://pkg.go.dev/go.opentelemetry.io/otel/trace#WithSpanKind or create attributes which are not aligned with the semantic conventions and they others may blame that the instrumentation library does not follow semantic conventions.
However, with the difference that func HTML(c *gin.Context, code int, name string, obj interface{}) {
is calling span.RecordError(err)
when c.HTML(code, name, obj)
panics.
Maybe we should just add an option to capture stacktraces instead?
This allows setting span start and end options to the gin configuration, so folks can (for example), enable stack traces to recorded errors.