Skip to content

Browser Console intrumentation #30

@drdreo

Description

@drdreo

Is your instrumentation request related to a problem? Please describe

A simple console logger to improve observability is missing in the browser side JavaScript OpenTelemetry ecosystem.
It took a while to navigate the OT packages, just to find out that most of related implementations are for Node specifically.
Adding a simple patch to the global console object and reporting it to the logger sdk does not require much, but could improve the adoption rate of OT as it should not be that tricky to observe console messages.

Every observability tool known to me (Sentry, NewRelic, datadog, co.) ship with such a console logger.

Is it applicable for Node or Browser or both?

Only for the browser / web.

Do you expect this instrumentation to be commonly used?

Yes. Since console instrumentation is one of the first things developers look for when adding observability.

What version of instrumentation are you interested in using?

Versions: 0.42? but i do not fully understand the question

Code Owners

  • Owner 1
  • Owner 2

Additional context

I have already prepared a custom instrumentation and it would be quick to sketch this fully out - https://github.com/drdreo/opentelemetry-js-contrib/blob/4eea6b44d25460f01f7aaebc02cb0d4587aee1da/plugins/web/opentelemetry-instrumentation-console/src/instrumentation.ts#L55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions