Files
d04fab63ce [service] Move batchprocessor metrics to normal level and update level guidelines (#12525)
#### Description

This PR:
- requires "level: normal" before outputting batch processor metrics (in
addition to one specific metric which was already restricted to "level:
detailed")
- clarifies wording in the telemetry level guidelines and documentation,
and adds said guidelines to the requirements for stable components.

Some rationale for these changes can be found in the tracking issue and
[this
comment](https://github.com/open-telemetry/opentelemetry-collector/issues/7890#issuecomment-2684652956).

#### Link to tracking issue
Resolves #7890

#### To be discussed

Should we add a feature gate for this, in case a user relies on "level:
basic" outputting batch processor metrics? This feels like a niche use
case, so considering the "alpha" stability level of these metrics, I
don't think it's really necessary.

Considering batch processor metrics had already been switched to
"normal" once (#9767), but were turned back to basic at some later point
(not sure when), we might also want to add tests to avoid further
regressions (especially as the handling of telemetry levels is bound to
change further with #11754).

---------

Co-authored-by: Dmitrii Anoshin <[email protected]>
2025-03-04 15:57:23 +00:00

43 lines
1.9 KiB
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Package configtelemetry defines various telemetry level for configuration.
// It enables every component to have access to telemetry level
// to enable metrics only when necessary.
//
// This document provides guidance on which telemetry level to adopt for Collector metrics.
// When adopting a telemetry level, component authors are expected to rely on this guidance to
// justify their choice of telemetry level.
//
// 1. configtelemetry.None
//
// No telemetry data is recorded.
//
// 2. configtelemetry.Basic
//
// Telemetry associated with this level provides essential coverage of the Collector telemetry.
// It should only be used for telemetry generated by the core Collector API.
// Components outside of the core API MUST NOT record telemetry at this level.
//
// 3. configtelemetry.Normal
//
// Telemetry associated with this level provides intermediate coverage of the Collector telemetry.
// It should be the default for component authors.
//
// Normal-level telemetry should have limited cardinality and data volume, though it is acceptable
// for them to scale linearly with the monitored resources.
// For example, there may be a limit of 5 attribute sets or 5 spans generated per request.
//
// Normal-level telemetry should also have a low computational cost: it should not contain values
// requiring significant additional computation compared to the normal flow of processing.
//
// This is the default level recommended when running the Collector.
//
// 4. configtelemetry.Detailed
//
// Telemetry associated with this level provides complete coverage of the collector telemetry.
//
// The signals associated with this level may exhibit high cardinality, high data volume, or high
// computational cost.
package configtelemetry // import "go.opentelemetry.io/collector/config/configtelemetry"