Skip to content

Commit

Permalink
docs: add more prose
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Pianka <[email protected]>
  • Loading branch information
seanpianka committed Aug 17, 2021
1 parent e8e151c commit 94a6926
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<img src="https://i.imgur.com/vefquEK.png" width="350" title="hover text" alt="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};
Expand Down

0 comments on commit 94a6926

Please sign in to comment.