Skip to content

[API] Introduce a new global level api.diag for internal Diagnostic Logging (Part 1) #1877

@MSNev

Description

@MSNev

Introduction of new api.diag global logger as discussed during SIG meetings and linked to #1754

Basic outline

  • Provide a top-level diagnostic logger from the API as api.diag with methods like api.diag.warn, api.diag.debug, etc.
  • diag logger is no-op by default
  • register a default logging implementation by calling api.diag.setLogger(loggingImpl)

Part 1

  • For now we should keep but deprecate direct use of the NoopLogger and ConsoleLogger classes

Part 2

Will include breaking changes

  • Once contrib is changed to use api.diag, these exports will be removed, this will require that they stop using local Logger instances
  • This will also have breaking changes for
    • Configuration definitions that use api.Logger and core.LogLevel
    • Functions that currently get or pass api.Logger instances
    • The type of the environment OTEL_LOG_LEVEL

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions