Skip to content

feature: opentelemetry logs exporter for all logs, not only monitor #5372

@MattiasDC

Description

@MattiasDC

Feature request

I would like it if it was possible to redirect all logs easily to an opentelemetry collector. Currently I only see monitoring related logs in my collector. I'm using these opentelemetry environment variables:

  • OTEL_LOGS_EXPORTER
  • OTEL_PYTHON_LOG_LEVEL
  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_PROTOCOL
  • OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
  • OTEL_PYTHON_LOG_CORRELATION

I run my bentoml command prepended with opentelemetry-instrument, but it seems that bentoml starts subprocesses which are not automatically instrumented.

Motivation

This feature would make it easy to set up opentelemetry log collector for all logs outputted by bentoml directly with otlp

Other

The reason for this seems to come from this code: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/e2ba6d43c0d9906e664da09abe8f5404e9026ec0/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py#L123

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions