Package com.tnsai.observability.errors
Class CompositeErrorReportPublisher
java.lang.Object
com.tnsai.observability.errors.CompositeErrorReportPublisher
- All Implemented Interfaces:
ErrorReportPublisher
Fan-out
ErrorReportPublisher — invokes every wrapped
publisher for each publish(ErrorReport) call. Used by
ErrorReports to combine all SPI-discovered publishers
into a single emission point.
Failure isolation: if one wrapped publisher throws, the
exception is logged at WARN against SELF_LOGGER and the
remaining publishers still get the report. The umbrella publisher
contract requires implementations not to throw, but defensive
isolation here protects against misbehaving consumer-supplied
publishers (Sentry SDK hiccups, network partitions in pluggable
sinks, etc.).
Order matters only for ordering of SLF4J emissions; the downstream sinks see the same report. This class makes no assumptions about ordering semantics.
- Since:
- 0.5.0 (issue #86)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpublish(ErrorReport report) Publish a single error report.Exposed for assertions / introspection — immutable copy.
-
Constructor Details
-
CompositeErrorReportPublisher
-
-
Method Details
-
publish
Description copied from interface:ErrorReportPublisherPublish a single error report. Errors during publication must not propagate to the caller — the caller is already in an error path; an exception here would mask the original failure.- Specified by:
publishin interfaceErrorReportPublisher
-
publishers
Exposed for assertions / introspection — immutable copy.
-