Zap event logger for invocation events
★ 0.0 (0 ratings)30 min0 engineers solved this
Your assignment
This package defines the event types emitted while an application is built and run, such as constructor provision, supply, function invocation, lifecycle hook execution, start, stop and rollback. Each event carries its details (function name, caller, error, stack trace, runtime). The Logger interface receives these events through LogEvent. Two implementations ship with the package: ZapLogger writes structured entries to a go.uber.org/zap logger, and ConsoleLogger writes human-readable lines to an io.Writer. Applications choose one through an option when constructing the app, and the framework emits events to it as the app runs. Invoke events are emitted once the framework has called a user-provided function, and carry the function name, the captured stack trace and any error returned.
What the team is seeing
After upgrading, our operations dashboard filled up with red error alerts even though the service started normally and nothing failed. Support staff reviewing the logs say every routine startup step looks like a failure to them. Nobody can tell which alerts are real problems anymore.
Acceptance checks 1
- Check 1
Discussion is locked — log in and complete this problem to join the discussion and rate your experience.
