Skip to content

Commit

Permalink
Do not report status on start
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear committed Nov 29, 2023
1 parent 481bd10 commit 8f96171
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .chloggen/core-exporters-manual-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ change_type: 'enhancement'
component: core exporters

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: This PR adds status reporting to the core exporters (otlp, otlphttp, and debug)
note: This PR adds status reporting to the core exporters (otlp and otlphttp)

# One or more tracking issues or pull requests related to the change
issues: [7682]
Expand Down
10 changes: 0 additions & 10 deletions exporter/internal/common/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func CreateTracesExporter(ctx context.Context, set exporter.CreateSettings, conf
s := newLoggingExporter(exporterLogger, c.Verbosity)
return exporterhelper.NewTracesExporter(ctx, set, config,
s.pushTraces,
exporterhelper.WithStart(newStartFunc(&set.TelemetrySettings)),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithShutdown(otlptext.LoggerSync(exporterLogger)),
Expand All @@ -46,7 +45,6 @@ func CreateMetricsExporter(ctx context.Context, set exporter.CreateSettings, con
s := newLoggingExporter(exporterLogger, c.Verbosity)
return exporterhelper.NewMetricsExporter(ctx, set, config,
s.pushMetrics,
exporterhelper.WithStart(newStartFunc(&set.TelemetrySettings)),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithShutdown(otlptext.LoggerSync(exporterLogger)),
Expand All @@ -58,7 +56,6 @@ func CreateLogsExporter(ctx context.Context, set exporter.CreateSettings, config
s := newLoggingExporter(exporterLogger, c.Verbosity)
return exporterhelper.NewLogsExporter(ctx, set, config,
s.pushLogs,
exporterhelper.WithStart(newStartFunc(&set.TelemetrySettings)),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithShutdown(otlptext.LoggerSync(exporterLogger)),
Expand All @@ -85,10 +82,3 @@ func (c *Common) createLogger(logger *zap.Logger) *zap.Logger {

return zap.New(core)
}

func newStartFunc(telemetry *component.TelemetrySettings) component.StartFunc {
return func(context.Context, component.Host) error {
_ = telemetry.ReportComponentStatus(component.NewStatusEvent(component.StatusOK))
return nil
}
}
2 changes: 1 addition & 1 deletion exporter/otlpexporter/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (e *baseExporter) start(ctx context.Context, host component.Host) (err erro
e.callOptions = []grpc.CallOption{
grpc.WaitForReady(e.config.GRPCClientSettings.WaitForReady),
}
_ = e.settings.ReportComponentStatus(component.NewStatusEvent(component.StatusOK))

return
}

Expand Down
1 change: 0 additions & 1 deletion exporter/otlphttpexporter/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (e *baseExporter) start(_ context.Context, host component.Host) error {
return err
}
e.client = client
_ = e.settings.ReportComponentStatus(component.NewStatusEvent(component.StatusOK))
return nil
}

Expand Down

0 comments on commit 8f96171

Please sign in to comment.