From 94a6926beba0ab44372c4c304ba854662f2f795e Mon Sep 17 00:00:00 2001 From: Sean Pianka Date: Tue, 17 Aug 2021 03:18:43 -0400 Subject: [PATCH] docs: add more prose Signed-off-by: Sean Pianka --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 18 +++++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b40c959..5011542 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -844,7 +844,7 @@ dependencies = [ [[package]] name = "tracing-layer-slack" -version = "0.3.0" +version = "0.3.1" dependencies = [ "regex", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index 1e0d0c2..7dd43ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-layer-slack" -version = "0.3.0" +version = "0.3.1" edition = "2018" license = "Apache-2.0" description = "Send filtered tracing events to Slack" diff --git a/README.md b/README.md index d3bf920..5b43e73 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,30 @@ tracing-layer-slack = "0.3" ## Examples -### +See the full list of examples in [examples/](./examples). + +### Simple + +In this simple example, a layer is created using Slack configuration in the environment. An orphaned event (one with no parent span) and an event occurring within a span are created in three separate futures, and a number of messages are sent quickly to Slack. #### Slack Messages +This screenshots shows the first three Slack messages sent while running this example. More messages are sent but were truncated from this image. + Screenshot demonstrating the current formatter implementation for events sent as Slack messages #### Code example +Run this example locally using the following commands: +```shell +$ git clone https://github.com/seanpianka/tracing-layer-slack.git +$ cd tracing-layer-slack +$ cargo run --example simple +``` + +You must have Slack configuration exported in the environment. + +##### Source ```rust use regex::Regex; use tracing::{info, warn, instrument};