Skip to content

Commit d042cad

Browse files
committed
update readme
1 parent cef7064 commit d042cad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/self-diagnostics/README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ This example shows how to setup the custom error handler for self-diagnostics.
44

55
## Custom Error Handling:
66

7-
A custom error handler is implemented to log errors using the `tracing` crate's `error!` macro. These errors are exporter to collector using `opentelemetry-appender-tracing` which uses OTLP log exporter over HTTP/protobuf.
8-
So, any errors generated by the configured OTLP metrics pipeline are exporter through this custom error handler.
7+
A custom error handler is set up to capture and record errors using the `tracing` crate's `error!` macro. These errors are then exported to a collector using the `opentelemetry-appender-tracing` crate, which utilizes the OTLP log exporter over `HTTP/protobuf`. As a result, any errors generated by the configured OTLP metrics pipeline are funneled through this custom error handler for proper recording and export.
98

109
## Filtering logs from external dependencies of OTLP Exporter:
1110

12-
The example configures a tracing filter to restrict logs from external crates (hyper, tonic, and reqwest) used by the OTLP Exporter to the `error` level. This helps prevent an infinite loop of log generation when these crates emit logs that are picked up by the tracing subscriber.
11+
The example configures a tracing `filter` to restrict logs from external crates (`hyper`, `tonic`, and `reqwest`) used by the OTLP Exporter to the `error` level. This helps prevent an infinite loop of log generation when these crates emit logs that are picked up by the tracing subscriber.
1312

1413
## Ensure that the internally generated errors are logged only once:
1514

16-
By using a set to track seen errors, the custom error handler ensures that the same error is not logged multiple times. This is particularly useful for handling scenarios where continuous error logging might occur, such as when the OpenTelemetry collector is not running.
15+
By using a hashset to track seen errors, the custom error handler ensures that the same error is not logged multiple times. This is particularly useful for handling scenarios where continuous error logging might occur, such as when the OpenTelemetry collector is not running.
1716

1817

1918
## Usage

0 commit comments

Comments
 (0)