Skip to content

Commit 75a8c03

Browse files
authored
ref(tracing): use standard code attributes (#899)
1 parent bbd667a commit 75a8c03

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- The `tracing` integration now uses `default` as the default Sentry span op.
1111
- Before this change, the span op would be set based on the `tracing` span name.
1212
- When upgrading, please ensure to adapt any queries, metrics or dashboards to use the new span names/ops.
13+
- ref(tracing): use standard code attributes ([#899](https://github.com/getsentry/sentry-rust/pull/899)) by @lcian
14+
- Logs now carry the attributes `code.module.name`, `code.file.path` and `code.line.number` standardized in OTEL to surface the respective information, in contrast with the previously sent `tracing.module_path`, `tracing.file` and `tracing.line`.
1315
- fix(actix): capture only server errors ([#877](https://github.com/getsentry/sentry-rust/pull/877)) by @lcian
1416
- The Actix integration now properly honors the `capture_server_errors` option (enabled by default), capturing errors returned by middleware only if they are server errors (HTTP status code 5xx).
1517
- Previously, if a middleware were to process the request after the Sentry middleware and return an error, our middleware would always capture it and send it to Sentry, regardless if it was a client, server or some other kind of error.

sentry-tracing/src/converters.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,13 @@ where
344344

345345
let event_meta = event.metadata();
346346
if let Some(module_path) = event_meta.module_path() {
347-
attributes.insert("tracing.module_path".to_owned(), module_path.into());
347+
attributes.insert("code.module.name".to_owned(), module_path.into());
348348
}
349349
if let Some(file) = event_meta.file() {
350-
attributes.insert("tracing.file".to_owned(), file.into());
350+
attributes.insert("code.file.path".to_owned(), file.into());
351351
}
352352
if let Some(line) = event_meta.line() {
353-
attributes.insert("tracing.line".to_owned(), line.into());
353+
attributes.insert("code.line.number".to_owned(), line.into());
354354
}
355355

356356
attributes.insert("sentry.origin".to_owned(), "auto.tracing".into());

0 commit comments

Comments
 (0)