Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
8 changes: 6 additions & 2 deletions internal/component/prometheus/write/queue/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we have talked about deprecation of components in general. Maybe we could add support for that during component registration.

Not required for that in this pr but something we should consider at lest

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up trying this out with a deprecated stability level. I might push it for feedback but I didn't feel great about it. I had to make it an "internal" stability level equivalent to Experimental which I think makes sense just felt a bit awkward.


s := &Queue{
opts: opts,
args: args,
Expand Down
Loading