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

When to use error vs exception attributes #2001

Open
lmolkova opened this issue Mar 17, 2025 · 0 comments
Open

When to use error vs exception attributes #2001

lmolkova opened this issue Mar 17, 2025 · 0 comments

Comments

@lmolkova
Copy link
Contributor

We have error and exception namespaces that describe similar things with some caveats:

  • not every error has a corresponding exception (e.g. when downstream service returns 503 and span would have error.type = "503" and no exception thrown
  • not every exception is an error (see OTEP: Recording exceptions as log based events opentelemetry-specification#4333 for some examples)
  • exception is a language/specific concept. E.g. where Java client library would throw, golang or rust would return error, but semantic conventions should be as language-agnostic as possible.

Combining it with evolving guidance on reporting (terminal) exception details on the spans in open-telemetry/opentelemetry-specification#4430 and #1992, we'll have an overlap between exceptions and error attributes on spans and logs.

We need to update error-recording guidance and explain when to populate error, exception or both sets of attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Core SemConv issues
Development

No branches or pull requests

1 participant