Skip to content

Commit 81fa79d

Browse files
authored
Merge branch 'master' into lcian/ref/logs-feature-flag
2 parents 47aa235 + d9cdf34 commit 81fa79d

File tree

29 files changed

+162
-84
lines changed

29 files changed

+162
-84
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Changelog
22

3-
## Unreleased
3+
## 0.43.0
44

55
### Breaking changes
66

77
- ref(tracing): rework tracing to Sentry span name/op conversion ([#887](https://github.com/getsentry/sentry-rust/pull/887)) by @lcian
88
- The `tracing` integration now uses the tracing span name as the Sentry span name by default.
9-
- Before this change, the span name would be set based on the `tracing` span target (<module>::<function> when using the `tracing::instrument` macro).
10-
- The `tracing` integration now uses `default` as the default Sentry span op.
9+
- Before this change, the span name would be set based on the `tracing` span target (`<module>::<function>` when using the `tracing::instrument` macro).
10+
- The `tracing` integration now uses `<span target>::<span name>` as the default Sentry span op (i.e. `<module>::<function>` when using `tracing::instrument`).
1111
- Before this change, the span op would be set based on the `tracing` span name.
12+
- Read below to learn how to customize the span name and op.
1213
- When upgrading, please ensure to adapt any queries, metrics or dashboards to use the new span names/ops.
1314
- ref(tracing): use standard code attributes ([#899](https://github.com/getsentry/sentry-rust/pull/899)) by @lcian
1415
- 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`.
@@ -17,6 +18,8 @@
1718
- 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.
1819
- With this change, we capture errors returned by middleware only if those errors can be classified as server errors.
1920
- There is no change in behavior when it comes to errors returned by services, in which case the Sentry middleware only captures server errors exclusively.
21+
- fix: send trace origin correctly ([#906](https://github.com/getsentry/sentry-rust/pull/906)) by @lcian
22+
- `TraceContext` now has an additional field `origin`, used to report which integration created a transaction.
2023

2124
### Behavioral changes
2225

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sentry-actix/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-actix"
3-
version = "0.42.0"
3+
version = "0.43.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "MIT"
66
readme = "README.md"
@@ -20,7 +20,7 @@ release-health = ["sentry-core/release-health"]
2020
actix-web = { version = "4", default-features = false }
2121
bytes = "1.2"
2222
futures-util = { version = "0.3.5", default-features = false }
23-
sentry-core = { version = "0.42.0", path = "../sentry-core", default-features = false, features = [
23+
sentry-core = { version = "0.43.0", path = "../sentry-core", default-features = false, features = [
2424
"client",
2525
] }
2626
actix-http = "3.10"

sentry-actix/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ where
322322

323323
let transaction = hub.start_transaction(ctx);
324324
transaction.set_request(sentry_req.clone());
325-
transaction.set_data("origin", "auto.http.actix".into());
325+
transaction.set_origin("auto.http.actix");
326326
Some(transaction)
327327
} else {
328328
None

sentry-anyhow/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-anyhow"
3-
version = "0.42.0"
3+
version = "0.43.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "MIT"
66
readme = "README.md"
@@ -17,8 +17,8 @@ default = ["backtrace"]
1717
backtrace = []
1818

1919
[dependencies]
20-
sentry-backtrace = { version = "0.42.0", path = "../sentry-backtrace" }
21-
sentry-core = { version = "0.42.0", path = "../sentry-core" }
20+
sentry-backtrace = { version = "0.43.0", path = "../sentry-backtrace" }
21+
sentry-core = { version = "0.43.0", path = "../sentry-core" }
2222
anyhow = "1.0.77"
2323

2424
[dev-dependencies]

sentry-backtrace/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-backtrace"
3-
version = "0.42.0"
3+
version = "0.43.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "MIT"
66
readme = "README.md"
@@ -18,4 +18,4 @@ regex = { version = "1.5.5", default-features = false, features = [
1818
"std",
1919
"unicode-perl",
2020
] }
21-
sentry-core = { version = "0.42.0", path = "../sentry-core" }
21+
sentry-core = { version = "0.43.0", path = "../sentry-core" }

sentry-contexts/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-contexts"
3-
version = "0.42.0"
3+
version = "0.43.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "MIT"
66
readme = "README.md"
@@ -14,7 +14,7 @@ edition = "2021"
1414
rust-version = "1.81"
1515

1616
[dependencies]
17-
sentry-core = { version = "0.42.0", path = "../sentry-core" }
17+
sentry-core = { version = "0.43.0", path = "../sentry-core" }
1818
libc = "0.2.66"
1919
hostname = "0.4"
2020

sentry-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-core"
3-
version = "0.42.0"
3+
version = "0.43.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "MIT"
66
readme = "README.md"
@@ -29,7 +29,7 @@ logs = []
2929
[dependencies]
3030
log = { version = "0.4.8", optional = true, features = ["std"] }
3131
rand = { version = "0.9.0", optional = true }
32-
sentry-types = { version = "0.42.0", path = "../sentry-types" }
32+
sentry-types = { version = "0.43.0", path = "../sentry-types" }
3333
serde = { version = "1.0.104", features = ["derive"] }
3434
serde_json = { version = "1.0.46" }
3535
url = { version = "2.1.1" }

sentry-core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ functionality.
9999
[Sentry]: https://sentry.io/
100100
[`sentry`]: https://crates.io/crates/sentry
101101
[Unified API]: https://develop.sentry.dev/sdk/unified-api/
102-
[`test`]: https://docs.rs/sentry-core/0.42.0/sentry_core/test/index.html
102+
[`test`]: https://docs.rs/sentry-core/0.43.0/sentry_core/test/index.html
103103

104104
## Resources
105105

sentry-core/src/performance.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,12 @@ impl Transaction {
819819
}
820820
}
821821

822+
/// Sets the origin for this transaction, indicating what created it.
823+
pub fn set_origin(&self, origin: &str) {
824+
let mut inner = self.inner.lock().unwrap();
825+
inner.context.origin = Some(origin.to_owned());
826+
}
827+
822828
/// Returns the headers needed for distributed tracing.
823829
/// Use [`crate::Scope::iter_trace_propagation_headers`] to obtain the active
824830
/// trace's distributed tracing headers.

0 commit comments

Comments
 (0)