Attach the handler to billing.events when config enables it. DefaultBilling is not modified. With both billing-events-logging and billing.s3.enabled on, events go to the console handler and to S3.
What to do
- Add
BillingS3HandlerInstaller: @Observes StartupEvent; if billing.s3.enabled, Logger.getLogger("billing.events").addHandler(handler).
- Heartbeat guard: a metric/gauge for "events delivered in the last interval"; document an alert for "delivery == 0 while billing traffic > 0".
- CI test asserting the handler is attached to
billing.events when billing.s3.enabled=true.
Acceptance
enabled=true → handler attached and receiving events; enabled=false (default) → not attached, zero overhead. CI assertion passes.
- Requires
billing-events-logging enabled for events to reach the logger.
Attach the handler to
billing.eventswhen config enables it.DefaultBillingis not modified. With bothbilling-events-loggingandbilling.s3.enabledon, events go to the console handler and to S3.What to do
BillingS3HandlerInstaller:@Observes StartupEvent; ifbilling.s3.enabled,Logger.getLogger("billing.events").addHandler(handler).billing.eventswhenbilling.s3.enabled=true.Acceptance
enabled=true→ handler attached and receiving events;enabled=false(default) → not attached, zero overhead. CI assertion passes.billing-events-loggingenabled for events to reach the logger.