File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 22
33This directory contains some examples that should help you get start crates from ` opentelemetry-rust ` .
44
5- ## log -basic
5+ ## logs -basic
66
77This example uses following crates from this repo:
88
@@ -12,6 +12,17 @@ This example uses following crates from this repo:
1212
1313Check 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
1728This example uses following crates from this repo:
Original file line number Diff line number Diff line change 11[package ]
2- name = " logs-enrichment "
2+ name = " logs-advanced "
33version = " 0.1.0"
44edition = " 2021"
55license = " Apache-2.0"
@@ -8,7 +8,7 @@ publish = false
88autobenches = false
99
1010[[bin ]]
11- name = " logs-enrichment "
11+ name = " logs-advanced "
1212path = " src/main.rs"
1313bench = false
1414required-features = [" spec_unstable_logs_enabled" ]
Original file line number Diff line number Diff line change 1- # OpenTelemetry Log Processor Implemenation and Composition - Example
1+ # OpenTelemetry Log Processor Implementation and Composition - Example
22
33This 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
77mostly to serve as a way to show how to compose processors by wrapping them into
88each 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
1111to the log captured by the OpenTelemetry SDK, which correctly ensures that the
1212downstream 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 ` .
2727The default implementation always accepts the event from the wrapped processor, even
2828when it's set up to ignore a specific event. As a consequence, the slow enrichment
2929processor will act on every log record, regardless of whether they are ultimately
File renamed without changes.
You can’t perform that action at this time.
0 commit comments