-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component #1823
Component #1823
Conversation
Co-authored-by: William Dumont <[email protected]>
Co-authored-by: Piotr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First high level pass of the docs. I'll go through again once the ToDos are added
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for docs.
….queue.md Co-authored-by: Clayton Cornell <[email protected]>
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to add a bit more info on how prometheus.remote.queue
is different from prometheus.remote_write
, and when to use what component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I focused on the user-facing API as this will be harder to change without breaking things.
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/prometheus/prometheus.remote.queue.md
Outdated
Show resolved
Hide resolved
Name | Type | Description | Default | Required | ||
---- | ---- | ----------- | ------- | -------- | ||
`max_signals_to_batch` | `uint` | The maximum number of signals before they are batched to disk. | `10,000` | no | ||
`batch_frequency` | `duration` | How often to batch signals to disk if `max_signals_to_batch` is not reached. | no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use signals
as a name? maybe it should be samples? or is this to encompass histograms samples too? I'm not sure if that's a right name. In current remote_write we call this 'metrics' which makes sense although it's not very precise: https://grafana.com/docs/alloy/next/reference/components/prometheus/prometheus.remote_write/#wal-block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subsequent PR will enable metadata storage, so I wanted it to not be just metrics. Sample is to narrow, open to better names here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 'entries'? that would be a generic name for things inside a queue.
if len(s.endpoints) > 0 { | ||
for _, ep := range s.endpoints { | ||
ep.Stop() | ||
} | ||
s.endpoints = map[string]*endpoint{} | ||
} | ||
err := s.createEndpoints() | ||
if err != nil { | ||
return err | ||
} | ||
for _, ep := range s.endpoints { | ||
ep.Start() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe Update
can signal via channel to Run
that will manage everything in one thread. I found this to be a decent pattern in other components.
….queue.md Co-authored-by: Paulin Todev <[email protected]>
….queue.md Co-authored-by: Piotr <[email protected]>
Most of the feedback has been responded so merging. |
* readme * fix readme * Add filequeue functionality (#1601) * Checkin for file queue * add comment * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * naming and error handling feedback from PR * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/filequeue/filequeue.go Co-authored-by: Piotr <[email protected]> * drop benchmark * rename get to pop --------- Co-authored-by: Piotr <[email protected]> * Adding the serialization features. (#1666) * Adding the serialization features. * Dont test this with race condition since we access vars directly. * Fix test. * Fix typo in file name and return early in DeserializeToSeriesGroup. * Update internal/component/prometheus/remote/queue/serialization/appender.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/serialization/serializer.go Co-authored-by: Piotr <[email protected]> * Rename to indicate that TimeSeries are Put/Get from a pool. * Remove func that was about the same number of lines as inlining. * Update internal/component/prometheus/remote/queue/types/serialization.go Co-authored-by: Piotr <[email protected]> * Update internal/component/prometheus/remote/queue/serialization/serializer.go Co-authored-by: Piotr <[email protected]> * Change benchmark to be more specific. --------- Co-authored-by: Piotr <[email protected]> * Network wal pr (#1717) * Checkin the networking items. * Fix for config updating and tests. * Update internal/component/prometheus/remote/queue/network/loop.go Co-authored-by: William Dumont <[email protected]> * Update internal/component/prometheus/remote/queue/network/loop.go Co-authored-by: Piotr <[email protected]> * pr feedback * pr feedback * simplify stats * PR feedback --------- Co-authored-by: William Dumont <[email protected]> Co-authored-by: Piotr <[email protected]> * Component (#1823) * Checkin the networking items. * Fix for config updating and tests. * Update internal/component/prometheus/remote/queue/network/loop.go Co-authored-by: William Dumont <[email protected]> * Update internal/component/prometheus/remote/queue/network/loop.go Co-authored-by: Piotr <[email protected]> * pr feedback * pr feedback * simplify stats * simplify stats * Initial push. * docs and some renaming * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Changes and testing. * Update docs. * Update docs. * Fix race conditions in unit tests. * Tweaking unit tests. * lower threshold more. * lower threshold more. * Fix deadlock in manager tests. * rollback to previous * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Clayton Cornell <[email protected]> * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Paulin Todev <[email protected]> * Docs PR feedback * Update docs/sources/reference/components/prometheus/prometheus.remote.queue.md Co-authored-by: Piotr <[email protected]> * PR feedback * PR feedback * PR feedback * PR feedback * Fix typo * Fix typo * Fix bug. * Fix docs --------- Co-authored-by: William Dumont <[email protected]> Co-authored-by: Piotr <[email protected]> Co-authored-by: Clayton Cornell <[email protected]> Co-authored-by: Paulin Todev <[email protected]> * Change name to write instead of remote. * Fix issue. * Fix issue. * Dont depend on random sync.pool behavior. * small clarification on changelog. * PR feedback --------- Co-authored-by: Piotr <[email protected]> Co-authored-by: William Dumont <[email protected]> Co-authored-by: Clayton Cornell <[email protected]> Co-authored-by: Paulin Todev <[email protected]>
This is the last PR, aside from the merge to main. This ties everything together and exposes the component. Most of this are very expansive tests. I am likely to change the metrics in subsequent PRs so dont get to in detail about them.
Things to do that I will do after this large merge and create tickets for each.