diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eb9eba422a8..a92a393b8e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### 💡 Enhancements 💡 - Add `pdata.AttributeMap.RemoveIf`, which is a more performant way to remove multiple keys (#4914) +- Add `pipeline` key with pipeline identifier to processor loggers (#4968) ### 🧰 Bug fixes 🧰 diff --git a/service/internal/builder/pipelines_builder.go b/service/internal/builder/pipelines_builder.go index 3f488bb195ea..699da7ebd932 100644 --- a/service/internal/builder/pipelines_builder.go +++ b/service/internal/builder/pipelines_builder.go @@ -165,7 +165,8 @@ func (pb *pipelinesBuilder) buildPipeline(ctx context.Context, pipelineID config TelemetrySettings: component.TelemetrySettings{ Logger: pb.settings.Logger.With( zap.String(components.ZapKindKey, components.ZapKindProcessor), - zap.String(components.ZapNameKey, procID.String())), + zap.String(components.ZapNameKey, procID.String()), + zap.String(components.ZapKindPipeline, pipelineID.String())), TracerProvider: pb.settings.TracerProvider, MeterProvider: pb.settings.MeterProvider, MetricsLevel: pb.config.Telemetry.Metrics.Level, @@ -218,7 +219,7 @@ func (pb *pipelinesBuilder) buildPipeline(ctx context.Context, pipelineID config } } - pipelineLogger := pb.settings.Logger.With(zap.String(components.ZapNameKey, components.ZapKindPipeline), + pipelineLogger := pb.settings.Logger.With(zap.String(components.ZapKindKey, components.ZapKindPipeline), zap.String(components.ZapNameKey, pipelineID.String())) pipelineLogger.Info("Pipeline was built.")