Skip to content

Commit 1541cbf

Browse files
committed
release: 0.21.0
1 parent 0b42249 commit 1541cbf

File tree

22 files changed

+122
-126
lines changed

22 files changed

+122
-126
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## Unreleased
3+
## 0.21.0
44

55
**Breaking Changes**:
66

sentry-actix/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-actix"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -12,11 +12,11 @@ Sentry client extension for actix-web 3.
1212
edition = "2018"
1313

1414
[dependencies]
15-
sentry-core = { version = "0.20.1", path = "../sentry-core", default-features = false }
15+
sentry-core = { version = "0.21.0", path = "../sentry-core", default-features = false }
1616
actix-web = { version = "3", default-features = false }
1717
futures-util = "0.3.5"
1818

1919
[dev-dependencies]
20-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
20+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }
2121
actix-rt = "1.1.1"
2222
futures = "0.3"

sentry-actix/README.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ async fn failing(_req: HttpRequest) -> Result<String, Error> {
2828
Err(io::Error::new(io::ErrorKind::Other, "An error happens here").into())
2929
}
3030

31-
#[get("/hello")]
32-
async fn hello_world(_req: HttpRequest) -> Result<String, Error> {
33-
sentry::capture_message("Something is not well", Level::Warning);
34-
Ok("Hello World".into())
35-
}
36-
3731
#[actix_web::main]
3832
async fn main() -> io::Result<()> {
3933
let _guard = sentry::init(());
@@ -43,7 +37,6 @@ async fn main() -> io::Result<()> {
4337
App::new()
4438
.wrap(sentry_actix::Sentry::new())
4539
.service(failing)
46-
.service(hello_world)
4740
})
4841
.bind("127.0.0.1:3001")?
4942
.run()
@@ -53,20 +46,14 @@ async fn main() -> io::Result<()> {
5346
}
5447
```
5548

56-
# Reusing the Hub
49+
## Reusing the Hub
5750

5851
This integration will automatically update the current Hub instance. For example,
5952
the following will capture a message in the current request's Hub:
6053

6154
```rust
62-
use actix_web::{Error, get, HttpRequest};
6355
use sentry::Level;
64-
65-
#[get("/")]
66-
async fn hello_world(_req: HttpRequest) -> Result<String, Error> {
67-
sentry::capture_message("Something is not well", Level::Warning);
68-
Ok("Hello World".into())
69-
}
56+
sentry::capture_message("Something is not well", Level::Warning);
7057
```
7158

7259
## Resources

sentry-anyhow/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-anyhow"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,8 +15,8 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
1919
anyhow = "1.0.30"
2020

2121
[dev-dependencies]
22-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
22+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }

sentry-anyhow/README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ Adds support for capturing Sentry errors from `anyhow::Error`.
1212

1313
```rust
1414
use sentry_anyhow::capture_anyhow;
15-
let result = match function_that_might_fail() {
16-
Ok(result) => result,
17-
Err(err) => {
18-
capture_anyhow(&err);
19-
return Err(err);
20-
}
21-
};
15+
16+
fn function_that_might_fail() -> anyhow::Result<()> {
17+
Err(anyhow::anyhow!("some kind of error"))
18+
}
19+
20+
if let Err(err) = function_that_might_fail() {
21+
capture_anyhow(&err);
22+
}
2223
```
2324

2425
## Resources

sentry-backtrace/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-backtrace"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,7 +15,7 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
1919
lazy_static = "1.4.0"
2020
backtrace = "0.3.44"
2121
regex = "1.3.4"

sentry-contexts/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-contexts"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -16,7 +16,7 @@ edition = "2018"
1616
all-features = true
1717

1818
[dependencies]
19-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
19+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
2020
libc = "0.2.66"
2121
hostname = "0.3.0"
2222
regex = "1.3.4"
@@ -29,4 +29,4 @@ uname = "0.1.1"
2929
rustc_version = "0.2.3"
3030

3131
[dev-dependencies]
32-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
32+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }

sentry-contexts/README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ See the [Contexts Interface] documentation for more info.
1717
## Examples
1818

1919
```rust
20-
let integration = sentry_contexts::ContextIntegration {
21-
add_os: false,
22-
..Default::default()
23-
};
24-
let _sentry = sentry::init(sentry::ClientOptions::default().add_integration(integration));
20+
let integration = sentry_contexts::ContextIntegration::new().add_os(false);
21+
let _sentry = sentry::init(sentry::ClientOptions::new().add_integration(integration));
2522
```
2623

2724
[Contexts Interface]: https://develop.sentry.dev/sdk/event-payloads/contexts/

sentry-core/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-core"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -23,7 +23,7 @@ debug-logs = ["log_"]
2323
test = ["client"]
2424

2525
[dependencies]
26-
sentry-types = { version = "0.20.1", path = "../sentry-types" }
26+
sentry-types = { version = "0.21.0", path = "../sentry-types" }
2727
serde = { version = "1.0.104", features = ["derive"] }
2828
lazy_static = "1.4.0"
2929
im = { version = "15.0.0", optional = true }
@@ -35,7 +35,7 @@ log_ = { package = "log", version = "0.4.8", optional = true, features = ["std"]
3535
# Because we re-export all the public API in `sentry`, we actually run all the
3636
# doctests using the `sentry` crate. This also takes care of the doctest
3737
# limitation documented in https://github.com/rust-lang/rust/issues/45599.
38-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
38+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }
3939
thiserror = "1.0.15"
4040
anyhow = "1.0.30"
4141
failure = "0.1.8"

sentry-core/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ functionality.
4545

4646
[`sentry`]: https://crates.io/crates/sentry
4747
[Unified API]: https://develop.sentry.dev/sdk/unified-api/
48-
[`Client`]: https://docs.rs/sentry-core/0.20.1/sentry_core/struct.Client.html
49-
[`Hub`]: https://docs.rs/sentry-core/0.20.1/sentry_core/struct.Hub.html
50-
[`Scope`]: https://docs.rs/sentry-core/0.20.1/sentry_core/struct.Scope.html
51-
[`Integration`]: https://docs.rs/sentry-core/0.20.1/sentry_core/trait.Integration.html
52-
[`Transport`]: https://docs.rs/sentry-core/0.20.1/sentry_core/trait.Transport.html
53-
[`TransportFactory`]: https://docs.rs/sentry-core/0.20.1/sentry_core/trait.TransportFactory.html
54-
[`test`]: https://docs.rs/sentry-core/0.20.1/sentry_core/test/index.html
48+
[`Client`]: https://docs.rs/sentry-core/0.21.0/sentry_core/struct.Client.html
49+
[`Hub`]: https://docs.rs/sentry-core/0.21.0/sentry_core/struct.Hub.html
50+
[`Scope`]: https://docs.rs/sentry-core/0.21.0/sentry_core/struct.Scope.html
51+
[`Integration`]: https://docs.rs/sentry-core/0.21.0/sentry_core/trait.Integration.html
52+
[`Transport`]: https://docs.rs/sentry-core/0.21.0/sentry_core/trait.Transport.html
53+
[`TransportFactory`]: https://docs.rs/sentry-core/0.21.0/sentry_core/trait.TransportFactory.html
54+
[`test`]: https://docs.rs/sentry-core/0.21.0/sentry_core/test/index.html
5555

5656
## Resources
5757

sentry-debug-images/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-debug-images"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,6 +15,6 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
1919
lazy_static = "1.4.0"
2020
findshlibs = "0.7.0"

sentry-debug-images/README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@
88

99
The Sentry Debug Images Integration.
1010

11-
The `DebugImagesIntegration` adds metadata about the loaded shared libraries
12-
to Sentry `Event`s.
11+
The [`DebugImagesIntegration`] adds metadata about the loaded shared
12+
libraries to Sentry [`Event`]s.
13+
14+
This Integration only works on Unix-like OSs right now. Support for Windows
15+
will be added in the future.
1316

1417
## Configuration
1518

16-
The integration by default attaches this information to all Events, but a
17-
custom filter can be defined as well.
19+
The integration by default attaches this information to all [`Event`]s, but
20+
a custom filter can be defined as well.
1821

1922
```rust
2023
use sentry_core::Level;
21-
let integration = sentry_debug_images::DebugImagesIntegration {
22-
filter: Box::new(|event| event.level >= Level::Warning),
23-
..Default::default()
24-
};
24+
let integration = sentry_debug_images::DebugImagesIntegration::new()
25+
.filter(|event| event.level >= Level::Warning);
2526
```
2627

28+
[`Event`]: https://docs.rs/sentry-debug-images/0.21.0/sentry_debug-images/sentry_core::protocol::Event
29+
2730
## Resources
2831

2932
License: Apache-2.0

sentry-error-chain/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-error-chain"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,9 +15,9 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
19-
sentry-backtrace = { version = "0.20.1", path = "../sentry-backtrace" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
19+
sentry-backtrace = { version = "0.21.0", path = "../sentry-backtrace" }
2020
error-chain = "0.12.1"
2121

2222
[dev-dependencies]
23-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
23+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }

sentry-failure/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-failure"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,10 +15,10 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
19-
sentry-backtrace = { version = "0.20.1", path = "../sentry-backtrace" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
19+
sentry-backtrace = { version = "0.21.0", path = "../sentry-backtrace" }
2020
failure = "0.1.6"
2121

2222
[dev-dependencies]
23-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
24-
sentry-panic = { version = "0.20.1", path = "../sentry-panic" }
23+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }
24+
sentry-panic = { version = "0.21.0", path = "../sentry-panic" }

sentry-log/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-log"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -12,9 +12,9 @@ Sentry integration for log and env_logger crates.
1212
edition = "2018"
1313

1414
[dependencies]
15-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
15+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
1616
log = { version = "0.4.8", features = ["std"] }
1717

1818
[dev-dependencies]
19-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
19+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }
2020
pretty_env_logger = "0.4.0"

sentry-log/README.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,29 @@ anything above `Error` is captured as error event.
1616
## Examples
1717

1818
```rust
19-
let log_integration = sentry_log::LogIntegration::default();
20-
let _sentry = sentry::init(sentry::ClientOptions::default().add_integration(log_integration));
19+
let mut log_builder = pretty_env_logger::formatted_builder();
20+
log_builder.parse_filters("info");
21+
let logger = sentry_log::SentryLogger::with_dest(log_builder.build());
22+
23+
log::set_boxed_logger(Box::new(logger)).unwrap();
24+
log::set_max_level(log::LevelFilter::Info);
25+
26+
let _sentry = sentry::init(());
2127

2228
log::info!("Generates a breadcrumb");
29+
log::error!("Generates an event");
2330
```
2431

25-
Or optionally with env_logger support:
32+
Or one might also set an explicit filter, to customize how to treat log
33+
records:
2634

2735
```rust
28-
let mut log_builder = pretty_env_logger::formatted_builder();
29-
log_builder.parse_filters("info");
30-
let log_integration =
31-
sentry_log::LogIntegration::default().with_env_logger_dest(Some(log_builder.build()));
32-
let _sentry = sentry::init(sentry::ClientOptions::default().add_integration(log_integration));
36+
use sentry_log::LogFilter;
3337

34-
log::error!("Generates an event");
38+
let logger = sentry_log::SentryLogger::new().filter(|md| match md.level() {
39+
log::Level::Error => LogFilter::Event,
40+
_ => LogFilter::Ignore,
41+
});
3542
```
3643

3744
## Resources

sentry-panic/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry-panic"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
authors = ["Sentry <[email protected]>"]
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -15,8 +15,8 @@ edition = "2018"
1515
all-features = true
1616

1717
[dependencies]
18-
sentry-core = { version = "0.20.1", path = "../sentry-core" }
19-
sentry-backtrace = { version = "0.20.1", path = "../sentry-backtrace" }
18+
sentry-core = { version = "0.21.0", path = "../sentry-core" }
19+
sentry-backtrace = { version = "0.21.0", path = "../sentry-backtrace" }
2020

2121
[dev-dependencies]
22-
sentry = { version = "0.20.1", path = "../sentry", default-features = false, features = ["test"] }
22+
sentry = { version = "0.21.0", path = "../sentry", default-features = false, features = ["test"] }

0 commit comments

Comments
 (0)