Files
fdd930b5e5 Introduce service.Settings.TelemetryFactory (#13838)
#### Description

The `service.Settings` type now has a `TelemetryFactory` field for
injecting the `telemetry.Factory` to be used for creating a logger and
logger provider, meter provider, and tracer provider. The `otelcol`
package is hard-coded to inject an `otelconftelemetry` factory for now.
In a followup we will make it possible to inject the telemetry through
`otelcol.Factories`.

#### Link to tracking issue

Part of
https://github.com/open-telemetry/opentelemetry-collector/issues/4970

#### Testing

Manually verified that service telemetry configuration still works with
a collector binary.

#### Documentation

N/A

---------

Co-authored-by: Pablo Baeyens <[email protected]>
2025-10-08 09:04:58 +00:00

26 lines
841 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package service // import "go.opentelemetry.io/collector/service"
import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/service/extensions"
"go.opentelemetry.io/collector/service/pipelines"
)
// Config defines the configurable components of the Service.
type Config struct {
// Telemetry is the configuration for collector's own telemetry.
Telemetry component.Config `mapstructure:"telemetry"`
// Extensions are the ordered list of extensions configured for the service.
Extensions extensions.Config `mapstructure:"extensions,omitempty"`
// Pipelines are the set of data pipelines configured for the service.
Pipelines pipelines.Config `mapstructure:"pipelines"`
// prevent unkeyed literal initialization
_ struct{}
}