Class LoggerTelemetryPublisher
java.lang.Object
com.azure.spring.cloud.feature.management.telemetry.LoggerTelemetryPublisher
- All Implemented Interfaces:
TelemetryPublisher
Telemetry publisher that logs feature evaluation events using SLF4J. This
class implements the TelemetryPublisher interface and is responsible for
publishing telemetry events related to feature evaluations. It uses SLF4J for
logging the events, which allows for easy integration with various logging
frameworks. It uses MDC (Mapped Diagnostic Context) to add contextual
information to the logs, such as feature name, enabled status, variant name,
and reason for the evaluation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpublish(EvaluationEvent evaluationEvent) Publishes telemetry events related to feature evaluations.
-
Constructor Details
-
LoggerTelemetryPublisher
public LoggerTelemetryPublisher()Constructor for LoggerTelemetryPublisher.
-
-
Method Details
-
publish
Publishes telemetry events related to feature evaluations. It logs the evaluation event using SLF4J, adding contextual information to the logs using MDC.- Specified by:
publishin interfaceTelemetryPublisher- Parameters:
evaluationEvent- The evaluation event to be published.
-