Skip to content

Commit dfc718a

Browse files
logs-enrichment -> logs-advanced #3266 (review)
1 parent a446807 commit dfc718a

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

examples/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directory contains some examples that should help you get start crates from `opentelemetry-rust`.
44

5-
## log-basic
5+
## logs-basic
66

77
This example uses following crates from this repo:
88

@@ -12,6 +12,17 @@ This example uses following crates from this repo:
1212

1313
Check this example if you want to understand *how to instrument logs using opentelemetry*.
1414

15+
## logs-advanced
16+
17+
This example uses following crates from this repo:
18+
19+
-- opentelemetry(log)
20+
- opentelemetry-appender-tracing
21+
- opentelemetry-stdout
22+
23+
This builds on top of the logs-basic,
24+
and shows how to implement and compose `LogProcessor`s..
25+
1526
## metrics-basic
1627

1728
This example uses following crates from this repo:

examples/logs-enrichment/Cargo.toml renamed to examples/logs-advanced/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "logs-enrichment"
2+
name = "logs-advanced"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
@@ -8,7 +8,7 @@ publish = false
88
autobenches = false
99

1010
[[bin]]
11-
name = "logs-enrichment"
11+
name = "logs-advanced"
1212
path = "src/main.rs"
1313
bench = false
1414
required-features = ["spec_unstable_logs_enabled"]

examples/logs-enrichment/README.md renamed to examples/logs-advanced/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OpenTelemetry Log Processor Implemenation and Composition - Example
1+
# OpenTelemetry Log Processor Implementation and Composition - Example
22

33
This example builds on top of the `logs-basic`, showing how to implement and compose
44
`LogProcessor`s correctly.
@@ -7,7 +7,7 @@ The `FilteringLogProcessor` applies a severity-based filtering. The main purpose
77
mostly to serve as a way to show how to compose processors by wrapping them into
88
each other, in a way akin to the [delegation pattern](https://en.wikipedia.org/wiki/Delegation_pattern).
99

10-
The `SlowEnrichmentProcessor` simulates a (very!) slow processor adding information
10+
The `EnrichmentProcessor` simulates a (very!) slow processor adding information
1111
to the log captured by the OpenTelemetry SDK, which correctly ensures that the
1212
downstream processor's filtering is captured, avoiding unnecessary work.
1313

@@ -23,7 +23,7 @@ Notice:
2323

2424
## Extra credit
2525

26-
Tweak the `SlowEnrichmentProcessor` by removing the implementation of `event_enabled`.
26+
Tweak the `EnrichmentProcessor` by removing the implementation of `event_enabled`.
2727
The default implementation always accepts the event from the wrapped processor, even
2828
when it's set up to ignore a specific event. As a consequence, the slow enrichment
2929
processor will act on every log record, regardless of whether they are ultimately
File renamed without changes.

0 commit comments

Comments
 (0)