Class NoopTracingService
java.lang.Object
one.tomorrow.transactionaloutbox.tracing.NoopTracingService
- All Implemented Interfaces:
TracingService
A no-op implementation of the
TracingService interface. The MicrometerTracingService
should be preferred if micrometer-tracing is available on the classpath, therefore it's annotated
with @Primary. Alternatively, we could use our own implementation of @ConditionalOnMissingBean
and use this class as the default/fallback implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface one.tomorrow.transactionaloutbox.tracing.TracingService
TracingService.HeadersOnlyTraceOutboxRecordProcessingResult, TracingService.TraceOutboxRecordProcessingResult -
Field Summary
Fields inherited from interface one.tomorrow.transactionaloutbox.tracing.TracingService
INTERNAL_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontraceOutboxRecordProcessing(OutboxRecord outboxRecord) Extracts the tracing headers (as created viaTracingService.tracingHeadersForOutboxRecord()) from the outbox record to create a span for the time spent in the outbox.
A new span is started for the processing and publishing to Kafka, and headers to publish to Kafka are returned.Extracts the tracing headers from the current context and returns them as a map.
-
Constructor Details
-
NoopTracingService
public NoopTracingService()
-
-
Method Details
-
tracingHeadersForOutboxRecord
Description copied from interface:TracingServiceExtracts the tracing headers from the current context and returns them as a map. If tracing is not active, an empty map is returned.This is meant to be used when creating an outbox record, to store the tracing headers with the record.
- Specified by:
tracingHeadersForOutboxRecordin interfaceTracingService
-
traceOutboxRecordProcessing
public TracingService.TraceOutboxRecordProcessingResult traceOutboxRecordProcessing(OutboxRecord outboxRecord) Description copied from interface:TracingServiceExtracts the tracing headers (as created viaTracingService.tracingHeadersForOutboxRecord()) from the outbox record to create a span for the time spent in the outbox.
A new span is started for the processing and publishing to Kafka, and headers to publish to Kafka are returned. The span must be completed once the message is published to Kafka.- Specified by:
traceOutboxRecordProcessingin interfaceTracingService
-