Skip to content

Commit

Permalink
release: 0.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
getsentry-bot committed Mar 2, 2022
1 parent 761e27c commit abedcc8
Show file tree
Hide file tree
Showing 20 changed files with 84 additions and 69 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## 0.25.0

**Breaking Changes**:

Expand Down
4 changes: 2 additions & 2 deletions sentry-actix/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-actix"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -14,7 +14,7 @@ edition = "2018"
[dependencies]
actix-web = { version = "4", default-features = false }
futures-util = { version = "0.3.5", default-features = false }
sentry-core = { version = "0.24.3", path = "../sentry-core", default-features = false, features = ["client"] }
sentry-core = { version = "0.25.0", path = "../sentry-core", default-features = false, features = ["client"] }

[dev-dependencies]
actix-web = { version = "4" }
Expand Down
30 changes: 18 additions & 12 deletions sentry-actix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,26 @@ async fn failing(_req: HttpRequest) -> Result<String, Error> {
Err(io::Error::new(io::ErrorKind::Other, "An error happens here").into())
}

#[actix_web::main]
async fn main() -> io::Result<()> {
let _guard = sentry::init(());
fn main() -> io::Result<()> {
let _guard = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
});
std::env::set_var("RUST_BACKTRACE", "1");

HttpServer::new(|| {
App::new()
.wrap(sentry_actix::Sentry::new())
.service(failing)
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()?;
runtime.block_on(async move {
HttpServer::new(|| {
App::new()
.wrap(sentry_actix::Sentry::new())
.service(failing)
})
.bind("127.0.0.1:3001")?
.run()
.await
})
.bind("127.0.0.1:3001")?
.run()
.await?;

Ok(())
}
```

Expand All @@ -52,6 +57,7 @@ use `SessionMode::Request`.

```rust
let _sentry = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
session_mode: sentry::SessionMode::Request,
auto_session_tracking: true,
..Default::default()
Expand Down
6 changes: 3 additions & 3 deletions sentry-anyhow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-anyhow"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -16,8 +16,8 @@ default = ["backtrace"]
backtrace = ["anyhow/backtrace"]

[dependencies]
sentry-backtrace = { version = "0.24.3", path = "../sentry-backtrace" }
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-backtrace = { version = "0.25.0", path = "../sentry-backtrace" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
anyhow = "1.0.39"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions sentry-backtrace/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-backtrace"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,7 +12,7 @@ Sentry integration and utilities for dealing with stacktraces.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
lazy_static = "1.4.0"
backtrace = "0.3.44"
regex = "1.3.4"
4 changes: 2 additions & 2 deletions sentry-contexts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-contexts"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ build = "build.rs"
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
libc = "0.2.66"
hostname = "0.3.0"

Expand Down
4 changes: 2 additions & 2 deletions sentry-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-core"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -27,7 +27,7 @@ debug-logs = ["log_"]
test = ["client"]

[dependencies]
sentry-types = { version = "0.24.3", path = "../sentry-types" }
sentry-types = { version = "0.25.0", path = "../sentry-types" }
serde = { version = "1.0.104", features = ["derive"] }
lazy_static = "1.4.0"
rand = { version = "0.8.1", optional = true }
Expand Down
14 changes: 7 additions & 7 deletions sentry-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ functionality.
[Sentry]: https://sentry.io/
[`sentry`]: https://crates.io/crates/sentry
[Unified API]: https://develop.sentry.dev/sdk/unified-api/
[`Client`]: https://docs.rs/sentry-core/0.24.3/sentry_core/struct.Client.html
[`Hub`]: https://docs.rs/sentry-core/0.24.3/sentry_core/struct.Hub.html
[`Scope`]: https://docs.rs/sentry-core/0.24.3/sentry_core/struct.Scope.html
[`Integration`]: https://docs.rs/sentry-core/0.24.3/sentry_core/trait.Integration.html
[`Transport`]: https://docs.rs/sentry-core/0.24.3/sentry_core/trait.Transport.html
[`TransportFactory`]: https://docs.rs/sentry-core/0.24.3/sentry_core/trait.TransportFactory.html
[`test`]: https://docs.rs/sentry-core/0.24.3/sentry_core/test/index.html
[`Client`]: https://docs.rs/sentry-core/0.25.0/sentry_core/struct.Client.html
[`Hub`]: https://docs.rs/sentry-core/0.25.0/sentry_core/struct.Hub.html
[`Scope`]: https://docs.rs/sentry-core/0.25.0/sentry_core/struct.Scope.html
[`Integration`]: https://docs.rs/sentry-core/0.25.0/sentry_core/trait.Integration.html
[`Transport`]: https://docs.rs/sentry-core/0.25.0/sentry_core/trait.Transport.html
[`TransportFactory`]: https://docs.rs/sentry-core/0.25.0/sentry_core/trait.TransportFactory.html
[`test`]: https://docs.rs/sentry-core/0.25.0/sentry_core/test/index.html

## Resources

Expand Down
4 changes: 2 additions & 2 deletions sentry-debug-images/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-debug-images"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,6 +12,6 @@ Sentry integration that adds the list of loaded libraries to events.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
lazy_static = "1.4.0"
findshlibs = "=0.10.2"
2 changes: 1 addition & 1 deletion sentry-debug-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let integration = sentry_debug_images::DebugImagesIntegration::new()
.filter(|event| event.level >= Level::Warning);
```

[`Event`]: https://docs.rs/sentry-debug-images/0.24.3/sentry_debug-images/sentry_core::protocol::Event
[`Event`]: https://docs.rs/sentry-debug-images/0.25.0/sentry_debug-images/sentry_core::protocol::Event

## Resources

Expand Down
4 changes: 2 additions & 2 deletions sentry-log/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-log"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,7 +12,7 @@ Sentry integration for log and env_logger crates.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
log = { version = "0.4.8", features = ["std"] }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions sentry-panic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-panic"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,8 +12,8 @@ Sentry integration for capturing panics.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-backtrace = { version = "0.24.3", path = "../sentry-backtrace" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
sentry-backtrace = { version = "0.25.0", path = "../sentry-backtrace" }

[dev-dependencies]
sentry = { path = "../sentry", default-features = false, features = ["test"] }
4 changes: 2 additions & 2 deletions sentry-slog/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-slog"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,7 +12,7 @@ Sentry integration for the slog crate.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core" }
sentry-core = { version = "0.25.0", path = "../sentry-core" }
slog = { version = "2.5.2", features = ["nested-values"] }
serde_json = "1.0.46"

Expand Down
4 changes: 2 additions & 2 deletions sentry-tower/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-tower"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ tower-layer = "0.3"
tower-service = "0.3"
http_ = { package = "http", version = "0.2.6", optional = true }
pin-project = { version = "1.0.10", optional = true }
sentry-core = { version = "0.24.3", path = "../sentry-core", default-features = false, features = ["client"] }
sentry-core = { version = "0.25.0", path = "../sentry-core", default-features = false, features = ["client"] }

[dev-dependencies]
anyhow = "1"
Expand Down
17 changes: 14 additions & 3 deletions sentry-tower/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,25 @@ let service = ServiceBuilder::new()
When using Tonic, the layer can be used directly by the Tonic stack:

```rust
use hello_world::{greeter_server::*, *};
use sentry_tower::NewSentryLayer;
use hello_world::{*, greeter_server::*};

struct GreeterService;

#[tonic::async_trait]
impl Greeter for GreeterService {
async fn say_hello(&self, req: Request<HelloRequest>) -> Result<Response<HelloReply>, Status> {
async fn say_hello(
&self,
req: Request<HelloRequest>,
) -> Result<Response<HelloReply>, Status> {
let HelloRequest { name } = req.into_inner();
if name == "world" {
capture_anyhow(&anyhow!("Trying to greet a planet"));
return Err(Status::invalid_argument("Cannot greet a planet"));
}
Ok(Response::new(HelloReply { message: format!("Hello {}", name) }))
Ok(Response::new(HelloReply {
message: format!("Hello {}", name),
}))
}
}

Expand All @@ -93,6 +98,12 @@ The `http` feature offers another layer which will attach request details
onto captured events, and optionally start a new performance monitoring
transaction based on the incoming HTTP headers.

The created transaction will automatically use the request URI as its name.
This is sometimes not desirable in case the request URI contains unique IDs
or similar. In this case, users should manually override the transaction name
in the request handler using the [`Scope::set_transaction`](https://docs.rs/sentry-tower/0.25.0/sentry_tower/sentry_core::Scope::set_transaction)
method.

When combining both layers, take care of the ordering of both. For example
with [`tower::ServiceBuilder`], always define the `Hub` layer before the `Http`
one, like so:
Expand Down
4 changes: 2 additions & 2 deletions sentry-tracing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-tracing"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -12,7 +12,7 @@ Sentry integration for tracing and tracing-subscriber crates.
edition = "2018"

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core", features = ["client"] }
sentry-core = { version = "0.25.0", path = "../sentry-core", features = ["client"] }
tracing-core = "0.1"
tracing-subscriber = { version = "0.3.1", default-features = false, features = ["std"] }

Expand Down
4 changes: 1 addition & 3 deletions sentry-tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ let layer = sentry_tracing::layer().event_filter(|md| match md.level() {
_ => EventFilter::Ignore,
});

tracing_subscriber::registry()
.with(layer)
.init();
tracing_subscriber::registry().with(layer).init();
```

## Resources
Expand Down
2 changes: 1 addition & 1 deletion sentry-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry-types"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand Down
22 changes: 11 additions & 11 deletions sentry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sentry"
version = "0.24.3"
version = "0.25.0"
authors = ["Sentry <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -48,16 +48,16 @@ ureq = ["ureq_/tls", "httpdate"]
ureq-native-tls = ["ureq_/native-tls", "httpdate"]

[dependencies]
sentry-core = { version = "0.24.3", path = "../sentry-core", features = ["client"] }
sentry-anyhow = { version = "0.24.3", path = "../sentry-anyhow", optional = true }
sentry-backtrace = { version = "0.24.3", path = "../sentry-backtrace", optional = true }
sentry-contexts = { version = "0.24.3", path = "../sentry-contexts", optional = true }
sentry-debug-images = { version = "0.24.3", path = "../sentry-debug-images", optional = true }
sentry-log = { version = "0.24.3", path = "../sentry-log", optional = true }
sentry-panic = { version = "0.24.3", path = "../sentry-panic", optional = true }
sentry-slog = { version = "0.24.3", path = "../sentry-slog", optional = true }
sentry-tower = { version = "0.24.3", path = "../sentry-tower", optional = true }
sentry-tracing = { version = "0.24.3", path = "../sentry-tracing", optional = true }
sentry-core = { version = "0.25.0", path = "../sentry-core", features = ["client"] }
sentry-anyhow = { version = "0.25.0", path = "../sentry-anyhow", optional = true }
sentry-backtrace = { version = "0.25.0", path = "../sentry-backtrace", optional = true }
sentry-contexts = { version = "0.25.0", path = "../sentry-contexts", optional = true }
sentry-debug-images = { version = "0.25.0", path = "../sentry-debug-images", optional = true }
sentry-log = { version = "0.25.0", path = "../sentry-log", optional = true }
sentry-panic = { version = "0.25.0", path = "../sentry-panic", optional = true }
sentry-slog = { version = "0.25.0", path = "../sentry-slog", optional = true }
sentry-tower = { version = "0.25.0", path = "../sentry-tower", optional = true }
sentry-tracing = { version = "0.25.0", path = "../sentry-tracing", optional = true }
log_ = { package = "log", version = "0.4.8", optional = true, features = ["std"] }
reqwest_ = { package = "reqwest", version = "0.11", optional = true, features = ["blocking", "json"], default-features = false }
curl_ = { package = "curl", version = "0.4.25", optional = true }
Expand Down
Loading

0 comments on commit abedcc8

Please sign in to comment.