open-telemetry / open-telemetry/opentelemetry-python-contrib

Disable system metrics by default in auto-instrumentation?

Open
#2,898 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

The auto-instrumentation currently collects system metrics by default, which creates challenges in containerized environments. When pods are scaled, this behaviour results in unnecessary data duplication, dramatically increasing storage and processing costs without providing additional value. Moreover, in environments where multiple services (either in the same language or different language) run on the same host, having each service report system metrics is redundant and inefficient, especially when dedicated components like the OpenTelemetry Collector are already used to gather host metrics.

I propose disabling system metrics collection by default in OpenTelemetry Python auto-instrumentation. This change would significantly reduce costs, improve scalability in containerized workloads, and align better with best practices in complex, multi-service environments. It would encourage the use of dedicated collectors for system metrics, which is generally considered a more effective approach. Users who require system metrics from their Python services could still enable this feature explicitly, maintaining flexibility while improving the default behaviour.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Python auto-instrumentation entry point that enables system metrics and the tests covering its default configuration. Change the default to disabled while preserving explicit user enablement, then verify both default behavior and opt-in collection.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.