-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Currently, all tutorials prompt you to init cloudevents client like this:
c, err := cloudevents.NewClient(protocol)
What they're not telling you is that all event errors due to eg malformed event or etc will silently fail instead of at least logging that something is wrong.
To capture those and at least log them, you need to use:
c, err := cloudevents.NewClient(protocol, client.WithObservabilityService(&yourObservabilitySvc{}))
but it's tedious that:
- Default behavior is to silently fail. I was debugging for a whole day to find rootcause of issue. Resorted to debugging library code in the end to figure out what's wrong.
- The library doesn't provide you with a sane observability service implementation that logs event errors in a sensible way
My proposal is to 1) add a LoggingObservabilityService
implementation within the library somewhere and 2) provide that as the default vs. the noOpObservabilityService
which is the default atm.
Metadata
Metadata
Assignees
Labels
No labels