Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

events: allow monitoring error events #30932

Closed

Commits on Dec 13, 2019

  1. events: allow monitoring error events

    Installing an error listener has a side effect that emitted errors are
    considered as handled. This is quite bad for monitoring/logging tools
    which tend to be interested in errors but don't want to cause side
    effects like swallow an exception.
    
    There are some workarounds in the wild like monkey patching emit or
    remit the error if monitoring tool detects that it is the only listener
    but this is error prone and risky.
    
    This PR allows to install a listener to monitor errors with the side
    effect to consume the error. To avoid conflicts with other events it
    exports a symbol on EventEmitter which owns this special meaning.
    
    Refs: open-telemetry/opentelemetry-js#225
    Flarna committed Dec 13, 2019
    Copy the full SHA
    0a773db View commit details
    Browse the repository at this point in the history
  2. rename symbol

    Flarna committed Dec 13, 2019
    Copy the full SHA
    d156268 View commit details
    Browse the repository at this point in the history
  3. fix review findings

    Flarna committed Dec 13, 2019
    Copy the full SHA
    793205c View commit details
    Browse the repository at this point in the history