Interface TracingService

All Known Implementing Classes:
MicrometerTracingService, NoopTracingService

public interface TracingService
Copyright 2025 Tomorrow GmbH @ https://tomorrow.one Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • Field Details

  • Method Details

    • tracingHeadersForOutboxRecord

      Map<String,String> tracingHeadersForOutboxRecord()
      Extracts 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.

    • traceOutboxRecordProcessing

      TracingService.TraceOutboxRecordProcessingResult traceOutboxRecordProcessing(OutboxRecord outboxRecord)
      Extracts the tracing headers (as created via 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.