Skip to content

Commit

Permalink
Add pipeline key with pipeline identifier to component loggers (ope…
Browse files Browse the repository at this point in the history
…n-telemetry#4968)

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
  • Loading branch information
Aneurysm9 authored Mar 8, 2022
1 parent 5e18c4a commit f21243a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 🧰

Expand Down
5 changes: 3 additions & 2 deletions service/internal/builder/pipelines_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.")

Expand Down

0 comments on commit f21243a

Please sign in to comment.