-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deviation from semconv exception spec? #1491
Comments
@mothershipper Good catch. From Record Exception
I'm not sure we can keep I prefer we should correct semantic conventions but keep the @MrAlias @Aneurysm9 What do you think? Related issue: #1104 |
I'm on the fence about the method name, but I'm doubtful that My gut feeling is that the terms are relatively interchangeable to developers. For instance, JavaScript doesn't have an To me, the bigger concern with changing the name is that it is part of the public API and renaming would be a breaking change. Would you consider adding |
I don't think a change in method name is required.
Instead, we have errors and provide an analogous It may be a weird aesthetic thing, and I'm happy to be told I'm wrong if there's overwhelming thoughts to the contrary, but I don't feel that renaming |
@Aneurysm9 @XSAM Thank you both for the reviews!
Looking for clarity here -- would you have |
I think I would prefer to leave it as-is, though I can see the argument for using |
For reference the majority of opentelemetry SDKs have a The only ones without: I think the strongest point I can make is that the Rust SDK supports From a trace-visualization perspective, our end-users just want to know why an operation failed, they don't much care if it was an exception or an error. Our users want to see the type, message and source/stack-trace (if applicable) when a failure escapes a span. I don't think the spec currently provides a standard way of doing that outside of the |
I've added an agenda item for the SIG meeting tomorrow to discuss this as I'd like to get input from a broader set of users and approvers. My personal preference at this point is to retain the |
Thanks Anthony! For what it's worth, I don't feel as strongly about the method name as I do about the behavior (producing the |
From the SIG meeting today: we will also want to update the Event name that is created when a panic is recovered from (an re-paniced): opentelemetry-go/sdk/trace/span.go Line 37 in e50a1c8
|
Hi @MrAlias , what is the action item here? Are we going to keep |
@bhautikpip the plan is to go with the strategy describe by @Aneurysm9 above: #1491 (comment) with the addition of ensuring the panic related event that is created is created with the proper name. @mothershipper I have assigned this to you because you had an open issue to address this. Please let me know if you are still able to work on this and update the linked PR with this decided direction. |
@MrAlias Happy to help! My bandwidth is a little tight this week, but I'll be able to get to it either over the weekend or early next week. If I'm lucky I might get to it sooner :) |
@MrAlias @Aneurysm9 @XSAM I've updated and rebased the PR -- seeing some test flakiness in unrelated code (TestExactMerge or something like that IIRC). I squashed the commits after the failure and it's looking like that run will pass, but wanted to flag that if it wasn't already on your radar. |
Based on the included conditional (Go does not use exceptions so it is not required to comply with this recommendation) and the possibility that errors might one day have their own specified method it seems like we might be putting our future selves into a hard position if we create an error with the Additionally, this makes me wonder if we should be exposing a I do think panics can be thought of an exceptions. In most languages they exist as runtime or segfault exceptions. We currently capture a panic by default when a span ends and record an event (something the linked PR was updating to unify the name). It might make sense to add a
The returned
Conversely, I also think we could explicitly not support exceptions as they are not used in the language. |
Added an agenda item to the 2020-03-11 SIG meeting to get feedback. |
Adding to this, panics in Go aren't always errors; they are sometimes used as non-local control flow constructs, like signaled conditions in Common Lisp. In some cases, even |
This seems like a good reason to add the |
@MrAlias I can't see the conversation from slack (not currently part of the CNCF slack), but curious if it would help me understand why OTEL would want differentiate between errors and exceptions with separate events. Was this a discussion at the spec level, or just regarding the golang SDK? I guess I'm feeling like we're hung up on whether or not the language calls it an error or exception and not looking at what the end user is trying to do/see by calling I don't see a benefit to having both an "error" event and "exception" event with a majority of overlapping attributes. Anybody trying to visualize it would likely handle the two events in the same way, assuming they even notice the second event type. |
👋 Hi friends, just a bit confused here on this comment #1491 (comment). So as it stands now is the idea that Go will just not be recording events in a way where type/stacktrace etc will get recognized by anything else in the opentelemetry ecosystem? That feels sub optimal. Exception events are what basically all exporters look for, here's an example of a popular exporter that only looks at |
It is at the specification level.
I agree there is a gap in the specification but overloading the use of the specified This has been an open question at the specification level from the start. It seems like we will likely need to get some guidance here from specification. I'll try and add it to the agenda for next week's specification SIG meeting (cannot add it now unfortunately given the combined nature of the agenda). |
@MrAlias given the discussion at the Spec SIG Tuesday, are we clear to move forward with retaining the |
@Aneurysm9 yes, that is correct 👍 |
Just noticed that the trace implementation doesn't seem to follow the spec for exceptions -- looks like this package uses
error
as the prefix instead ofexception
. Looking at the JS library, they seem to be usingexception
as well, so I'm guessing it's the golang lib that's out of compliance.Are there any plans or motivation to bring this into compliance? I don't know if there's a backwards compatible way of making this change, aside of perhaps recording two events, one with the
error
prefix, one with theexception
prefix. That said, it might be best to just rip the bandaid off, rename the event and attributes and make it a (potentially) breaking change?Happy to contribute these changes if I can get some direction on what you think is the best path forward :)
The text was updated successfully, but these errors were encountered: