FailedEventPublisher#

class safir.metrics.FailedEventPublisher(application, event_class, backoff_interval, logger)#

Bases: EventPublisher, Generic

Event publisher that logs error messages instead of publishing.

This is used when app metrics initialization has failed due to underlying infrastructure issues, but we don’t want to crash the instrumented app.

Parameters:

Methods Summary

publish(payload)

Don't do anything except log a message once per backoff interval.

Methods Documentation

async publish(payload)#

Don’t do anything except log a message once per backoff interval.

Parameters:

payload (TypeVar(P, bound= EventPayload))

Return type:

EventMetadata