Skip to content

Commit 757a802

Browse files
SlowEnrichmentLogProcessor -> EnrichmentLogProcessor #3266 (review)
1 parent e23c21b commit 757a802

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/logs-advanced/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
.with_service_name("log-appender-tracing-example")
2020
.build(),
2121
)
22-
.with_log_processor(SlowEnrichmentLogProcessor::new(filtering_processor))
22+
.with_log_processor(EnrichmentLogProcessor::new(filtering_processor))
2323
.build();
2424

2525
// To prevent a telemetry-induced-telemetry loop, OpenTelemetry's own internal
@@ -93,18 +93,18 @@ impl<P: LogProcessor> LogProcessor for FilteringLogProcessor<P> {
9393
}
9494

9595
#[derive(Debug)]
96-
pub struct SlowEnrichmentLogProcessor<P: LogProcessor> {
96+
pub struct EnrichmentLogProcessor<P: LogProcessor> {
9797
/// The wrapped processor that will receive enriched log records
9898
delegate: P,
9999
}
100100

101-
impl<P: LogProcessor> SlowEnrichmentLogProcessor<P> {
102-
pub fn new(delegate: P) -> SlowEnrichmentLogProcessor<P> {
103-
SlowEnrichmentLogProcessor { delegate: delegate }
101+
impl<P: LogProcessor> EnrichmentLogProcessor<P> {
102+
pub fn new(delegate: P) -> EnrichmentLogProcessor<P> {
103+
EnrichmentLogProcessor { delegate: delegate }
104104
}
105105
}
106106

107-
impl<P: LogProcessor> LogProcessor for SlowEnrichmentLogProcessor<P> {
107+
impl<P: LogProcessor> LogProcessor for EnrichmentLogProcessor<P> {
108108
fn emit(&self, data: &mut SdkLogRecord, instrumentation: &InstrumentationScope) {
109109
// Simulate an expensive enrichment step (e.g., fetching from a DB or service)
110110
sleep(Duration::from_secs(1));

0 commit comments

Comments
 (0)