Skip to content

Introduce a new Sentry.logger interface #2604

@solnic

Description

@solnic

When config._experiments[:enable_logger] is true, the default Sentry.logger interface should support logging log events.

This is meant to implement the API as described here https://develop.sentry.dev/sdk/telemetry/logs/#public-api

More requirements described here: https://develop.sentry.dev/sdk/telemetry/logs/#implementation

Initial questions:

  • Should we separate an internal logger for logging errors/crashes when things don't work in Sentry SDK? It seems like that's what Sentry.logger is used for now?
  • Should we support multiple logging handlers, ie logging both to std output and via log events? For example should calling Sentry.logger.info("Hello") support sending a log event AND logging to other destinations?
  • How should we set trace_id when it's not provided explicitly?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions