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

Clarify that error.type should be the fully-qualified exception class name (if applicable) when it represents an exception type #387

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ release.
- BREAKING: Rename/replace `(client|server).socket.(address|port)` attributes
with `network.(peer|local).(address|port)`.
([#342](https://github.com/open-telemetry/semantic-conventions/pull/342))
- Clarify that `error.type` should be the fully-qualified exception class name
when it represents an exception type.
([#387](https://github.com/open-telemetry/semantic-conventions/pull/387))

## v1.21.0 (2023-07-13)

Expand Down
3 changes: 2 additions & 1 deletion docs/http/http-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ sections below.
| `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended |

**[1]:** If the request fails with an error before response status code was sent or received,
`error.type` SHOULD be set to exception type or a component-specific low cardinality error code.
`error.type` SHOULD be set to exception type (its fully-qualified class name, if applicable)
or a component-specific low cardinality error code.

If response status code was sent or received and status indicates an error according to [HTTP span status definition](/docs/http/http-spans.md),
`error.type` SHOULD be set to the status code number (represented as a string), an exception type (if thrown) or a component-specific error code.
Expand Down
3 changes: 2 additions & 1 deletion model/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ groups:
examples: ['timeout', 'name_resolution_error', '500']
trask marked this conversation as resolved.
Show resolved Hide resolved
note: |
If the request fails with an error before response status code was sent or received,
`error.type` SHOULD be set to exception type or a component-specific low cardinality error code.
`error.type` SHOULD be set to exception type (its fully-qualified class name, if applicable)
or a component-specific low cardinality error code.
trask marked this conversation as resolved.
Show resolved Hide resolved

If response status code was sent or received and status indicates an error according to [HTTP span status definition](/docs/http/http-spans.md),
`error.type` SHOULD be set to the status code number (represented as a string), an exception type (if thrown) or a component-specific error code.
Expand Down
Loading