diff --git a/README.md b/README.md index 91cb1a986..8b2935c1c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Developer-first diagnostics for Rust applications -`emit` is a framework for adding diagnostics to your Rust applications with a simple, powerful data model and an expressive syntax inspired by [Message Templates](https://messagetemplates.org). `emit`'s guiding design principle is low ceremony, low cognitive-load. +`emit` is a framework for adding structured diagnostics to your Rust applications with a simple, powerful data model and an expressive syntax inspired by [Message Templates](https://messagetemplates.org). `emit`'s guiding design principle is low ceremony, low cognitive-load. This readme covers just enough to give you an idea of what `emit` is. For a proper treatment, see: @@ -52,3 +52,19 @@ fn greet(user: &str) { ``` ![The output of running the above program](https://github.com/emit-rs/emit/blob/main/asset/emit_term.png?raw=true) + +## Tracing + +`emit` can also produce trace data that's compatible with standard tracing tools, like Zipkin. + +![An example trace produced by `emit` in Zipkin](https://github.com/emit-rs/emit/blob/main/asset/trace-zipkin.png?raw=true) + +See [the guide](https://emit-rs.io/producing-events/tracing.html) for details. + +## Metrics + +`emit` can also produce metric data that's compatible with standard metric tools, like Prometheus. + +![An example metric produced by `emit` in Prometheus](https://github.com/emit-rs/emit/blob/main/asset/metric-prometheus.png?raw=true) + +See [the guide](https://emit-rs.io/producing-events/metrics.html) for details. diff --git a/asset/metric-prometheus.png b/asset/metric-prometheus.png new file mode 100644 index 000000000..ddff87464 Binary files /dev/null and b/asset/metric-prometheus.png differ diff --git a/asset/trace-zipkin.png b/asset/trace-zipkin.png new file mode 100644 index 000000000..49aa7e530 Binary files /dev/null and b/asset/trace-zipkin.png differ diff --git a/book/src/asset/metric-prometheus.png b/book/src/asset/metric-prometheus.png new file mode 100644 index 000000000..ddff87464 Binary files /dev/null and b/book/src/asset/metric-prometheus.png differ diff --git a/book/src/asset/trace-zipkin.png b/book/src/asset/trace-zipkin.png new file mode 100644 index 000000000..49aa7e530 Binary files /dev/null and b/book/src/asset/trace-zipkin.png differ diff --git a/book/src/producing-events/logging.md b/book/src/producing-events/logging.md index 90596d31e..335922589 100644 --- a/book/src/producing-events/logging.md +++ b/book/src/producing-events/logging.md @@ -35,3 +35,9 @@ Event { - [`error!`](https://docs.rs/emit/0.11.0-alpha.21/emit/macro.error.html) for errors that caused the calling operation to fail. See [Levels](./logging/levels.md) for details. + +----- + +![an example log rendered to the console](../asset/term-err.png) + +_An example log produced by `emit` rendered to the console_ diff --git a/book/src/producing-events/logging/properties.md b/book/src/producing-events/logging/properties.md index 720c599e7..249cbf9f8 100644 --- a/book/src/producing-events/logging/properties.md +++ b/book/src/producing-events/logging/properties.md @@ -46,3 +46,5 @@ Event { ``` See [Template syntax and rendering](../../reference/templates.md) for more details. + +Properties aren't limited to strings; they can be arbitrarily complex structured values. See [Value data model](../../reference/events.md#value-data-model) for more details. diff --git a/book/src/producing-events/metrics.md b/book/src/producing-events/metrics.md index 1b5a6a5ec..454439674 100644 --- a/book/src/producing-events/metrics.md +++ b/book/src/producing-events/metrics.md @@ -35,3 +35,9 @@ Event { }, } ``` + +----- + +![an example metric in Prometheus](../asset/metric-prometheus.png) + +_An example metric produced by `emit` in Prometheus_ diff --git a/book/src/producing-events/tracing.md b/book/src/producing-events/tracing.md index 711bded67..2a125d35c 100644 --- a/book/src/producing-events/tracing.md +++ b/book/src/producing-events/tracing.md @@ -58,3 +58,9 @@ wait_a_bit(1200).await; - [`#[error_span]`](https://docs.rs/emit/0.11.0-alpha.21/emit/attr.error_span.html) The level of a span may also depend on its execution. See [Fallible functions](./tracing/fallible-functions.md) and [Manual span completion](./tracing/manual-span-completion.md) for details. + +----- + +![an example trace in Zipkin](../asset/trace-zipkin.png) + +_An example trace produced by `emit` in Zipkin_