Skip to content

Commit

Permalink
[exporter/prometheusremotewriteexporter]chore: log warning about remo…
Browse files Browse the repository at this point in the history
…te_write_queue.num_consumers being a no-op (#34993)

**Description:** This PR documents and adds a warning log if
remote_write_queue.num_consumers is set in the
prometheusremotewriteexporter's config.

Current behavior already doesn't use the configuration for anything,
more information can be found in
open-telemetry/opentelemetry-collector#2949

**Link to tracking Issue:** Related to #34229 (not a fix)

Should we skip changelog here?

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
  • Loading branch information
ArthurSens committed Sep 5, 2024
1 parent 9ad4ae3 commit 52b6807
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/prometheusremotewriteexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following settings can be optionally configured:
- `remote_write_queue`: fine tuning for queueing and sending of the outgoing remote writes.
- `enabled`: enable the sending queue (default: `true`)
- `queue_size`: number of OTLP metrics that can be queued. Ignored if `enabled` is `false` (default: `10000`)
- `num_consumers`: minimum number of workers to use to fan out the outgoing requests. (default: `5`)
- `num_consumers`: minimum number of workers to use to fan out the outgoing requests. (default: `5`) **WARNING:** Currently, num_consumers doesn't have any effect due to incompatibility with Prometheus remote write API. The value will be ignored. Please see https://github.com/open-telemetry/opentelemetry-collector/issues/2949 for more information.
- `resource_to_telemetry_conversion`
- `enabled` (default = false): If `enabled` is `true`, all the resource attributes will be converted to metric labels by default.
- `target_info`: customize `target_info` metric
Expand Down
4 changes: 4 additions & 0 deletions exporter/prometheusremotewriteexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func createMetricsExporter(ctx context.Context, set exporter.Settings,
return nil, errors.New("invalid configuration")
}

if prwCfg.RemoteWriteQueue.NumConsumers != 0 {
set.Logger.Warn("Currently, remote_write_queue.num_consumers doesn't have any effect due to incompatibility with Prometheus remote write API. The value will be ignored. Please see https://github.com/open-telemetry/opentelemetry-collector/issues/2949 for more information.")
}

prwe, err := newPRWExporter(prwCfg, set)
if err != nil {
return nil, err
Expand Down

0 comments on commit 52b6807

Please sign in to comment.