Skip to content

Commit

Permalink
Unify log message when exporter or receiver is not registered (#1018)
Browse files Browse the repository at this point in the history
Resolves: jaegertracing/jaeger#2252
Related to open-telemetry/opentelemetry-collector#294

Just fixing the log message. The warn level was printing stacktrace what was confusing for users.
  • Loading branch information
pavolloffay authored May 26, 2020
1 parent a80407f commit 14ae217
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions service/builder/exporters_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,7 @@ func (eb *ExportersBuilder) buildExporter(

inputDataTypes := exportersInputDataTypes[config]
if inputDataTypes == nil {
// TODO https://go.opentelemetry.io/collector/issues/294
// Move this validation to config/config.go:validateConfig
// No data types where requested for this exporter. This can only happen
// if there are no pipelines associated with the exporter.
logger.Warn("Exporter is not associated with any pipeline and will not export data.")
logger.Info("Ignoring exporter as it is not used by any pipeline")
return exporter, nil
}

Expand Down
2 changes: 1 addition & 1 deletion service/builder/receivers_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (rb *ReceiversBuilder) Build() (Receivers, error) {
rcv, err := rb.buildReceiver(logger, cfg)
if err != nil {
if err == errUnusedReceiver {
rb.logger.Info("Ignoring receiver as it is not used by any pipeline", zap.String("receiver", cfg.Name()))
logger.Info("Ignoring receiver as it is not used by any pipeline", zap.String("receiver", cfg.Name()))
continue
}
return nil, err
Expand Down

0 comments on commit 14ae217

Please sign in to comment.