-
Notifications
You must be signed in to change notification settings - Fork 576
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(otelgin): enhance gin error tracking with span recording #6346
Conversation
Could you test this change? Also, I wonder if we need to keep the |
Side note that otelgin has no owner, so it may be removed soon. |
Okay, will this package still accept new PRs at present? |
It does. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6346 +/- ##
=====================================
Coverage 66.9% 66.9%
=====================================
Files 193 193
Lines 15652 15654 +2
=====================================
+ Hits 10480 10482 +2
Misses 4881 4881
Partials 291 291
|
I think I can give it a try. If I come to maintain it, what do I need to do? |
That's documented in the issue, as well as in https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CONTRIBUTING.md#code-owners. |
Co-authored-by: Damien Mathieu <[email protected]>
It's done. |
I spent some time reading through the requirements. I understand that I may still need to make some contributions before applying. If so, I need some time. |
link: #5252 |
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.
This is starting to look good 😸
…_test.go Co-authored-by: Robert Pająk <[email protected]>
Could you resolve the conflicts? |
…ace-recorderror # Conflicts: # instrumentation/github.com/gin-gonic/gin/otelgin/gintrace_test.go # instrumentation/github.com/gin-gonic/gin/otelgin/test/gintrace_test.go
It's done. |
@dmathieu I could pick up ownership of this module so that it isn't removed, should I just open a PR on the codeowners file? |
Yes, that should be enough (link the otelgin deprecation issue in that PR). |
instrumentation/github.com/gin-gonic/gin/otelgin/test/gintrace_test.go
Outdated
Show resolved
Hide resolved
Could you review this PR if you want to be an code owner? 😉 |
lgtm, my only real thought is I personally always find it convenient to have the error message at least partially included directly on the span instead of only having the span events. Since span events are sometimes (always?) stored in separate table it could becomes an additional step to view the message depending on the platform you use. For example I know a lot of the java instrumentation just adds error: true as an attribute and then creates a span event, and we've had teams complain that the error message has no contextual info |
This is indeed a problem, and it usually depends on what backend tools we are using. Fortunately, when the entire span contains some abnormal events, the tool I am currently using allows me to see the exception information directly in the span interface. Of course, for more detailed information, I still need to switch to view it in Events. —— Back to this PR, due to the OTEL standard specifications, I suggest we still maintain storing exceptions in Events. After all, this project is for the majority of users, and we need to present ourselves as professionally as possible and in accordance with the standards. 😁 |
Yes we need to record the errors as a span event, what I'm getting at is when it comes to:
I do find including the error string to have value |
…_test.go Co-authored-by: Tyler Yahn <[email protected]>
### Added - Added support for providing `endpoint`, `pollingIntervalMs` and `initialSamplingRate` using environment variable `OTEL_TRACES_SAMPLER_ARG` in `go.opentelemetry.io/contrib/samples/jaegerremote`. (#6310) - Added support exporting logs via OTLP over gRPC in `go.opentelemetry.io/contrib/config`. (#6340) - The `go.opentelemetry.io/contrib/bridges/otellogr` module. This module provides an OpenTelemetry logging bridge for `github.com/go-logr/logr`. (#6386) - Added SNS instrumentation in `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`. (#6388) ### Changed - Change the span name to be `GET /path` so it complies with the OTel HTTP semantic conventions in `go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`. (#6365) - Record errors instead of setting the `gin.errors` attribute in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`. (#6346) - The `go.opentelemetry.io/contrib/config` now supports multiple schemas in subdirectories (i.e. `go.opentelemetry.io/contrib/config/v0.3.0`) for easier migration. (#6412) ### Fixed - Fix broken AWS presigned URLs when using instrumentation in `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`. (#5975) - Fixed the value for configuring the OTLP exporter to use `grpc` instead of `grpc/protobuf` in `go.opentelemetry.io/contrib/config`. (#6338) - Allow marshaling types in `go.opentelemetry.io/contrib/config`. (#6347) - Removed the redundant handling of panic from the `HTML` function in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`. (#6373) - The `code.function` attribute emitted by `go.opentelemetry.io/contrib/bridges/otelslog` now stores just the function name instead the package path-qualified function name. The `code.namespace` attribute now stores the package path. (#6415) - The `code.function` attribute emitted by `go.opentelemetry.io/contrib/bridges/otelzap` now stores just the function name instead the package path-qualified function name. The `code.namespace` attribute now stores the package path. (#6423)
No description provided.