diff --git a/docs/sources/reference/components/prometheus/prometheus.write.queue.md b/docs/sources/reference/components/prometheus/prometheus.write.queue.md index 248d8747cd0..480df7c362c 100644 --- a/docs/sources/reference/components/prometheus/prometheus.write.queue.md +++ b/docs/sources/reference/components/prometheus/prometheus.write.queue.md @@ -15,6 +15,12 @@ title: prometheus.write.queue `prometheus.write.queue` collects metrics sent from other components into a Write-Ahead Log (WAL) and forwards them over the network to a series of user-supplied endpoints. Metrics are sent over the network using the [Prometheus Remote Write protocol][remote_write-spec]. +{{< admonition type="note" >}} +Starting with {{< param "PRODUCT_NAME" >}} v1.14, `prometheus.write.queue` is deprecated. +It will be removed in a future release. +Use `prometheus.remote_write` instead. +{{< /admonition >}} + You can specify multiple `prometheus.write.queue` components by giving them different labels. [remote_write-spec]: https://prometheus.io/docs/specs/remote_write_spec/ diff --git a/internal/component/prometheus/write/queue/component.go b/internal/component/prometheus/write/queue/component.go index 357a6e1fd8b..fd603f3893b 100644 --- a/internal/component/prometheus/write/queue/component.go +++ b/internal/component/prometheus/write/queue/component.go @@ -7,10 +7,12 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/component" - "github.com/grafana/alloy/internal/featuregate" + "github.com/go-kit/log/level" promqueue "github.com/grafana/walqueue/implementations/prometheus" "github.com/prometheus/prometheus/storage" + + "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/featuregate" ) func init() { @@ -26,6 +28,8 @@ func init() { } func NewComponent(opts component.Options, args Arguments) (*Queue, error) { + level.Warn(opts.Logger).Log("msg", "prometheus.write.queue is deprecated and will be removed in a future version. Migrate to prometheus.remote_write to prevent future errors.") + s := &Queue{ opts: opts, args: args,