Skip to content
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

Propagate metric metadata via remote write #1

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Conversation

gotjosh
Copy link

@gotjosh gotjosh commented Mar 27, 2020

This PR takes a stab at that by using a similar approach to the WAL watcher. We observe the scrapeCache based on a specified period and pull the available metadata to send it to remote storage.

A high-level diagram of the process looks like:

mermaid-diagram-20200213152256

Documentation that explains the thinking behind this design lives in this design doc. The first version of the design doc contained details about other parts not relevant to Prometheus. Highly advise to only analyse the former.

Signed-off-by: gotjosh josue@grafana.com

Similarly to the WAL watcher, its purpose is to observe the scrape manager and pull metadata. Then, send it to a remote storage.

Signed-off-by: gotjosh <josue@grafana.com>
@gotjosh gotjosh requested review from cstyan and rfratto March 27, 2020 10:28
@gotjosh gotjosh changed the title Introduce a metadata watcher Propagate metric metadata via remote write Mar 27, 2020
Copy link

@cstyan cstyan left a comment

Choose a reason for hiding this comment

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

👍 nothing different between this and the prometheus/prometheus PR, lets merge and start running it so we can see if we need to make any changes going forward

Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

👍 let's get this moving along, we can always change things up later on.

@gotjosh gotjosh merged commit 73a8d87 into shared-interner Mar 27, 2020
@gotjosh gotjosh deleted the metadata-rw branch March 27, 2020 17:21
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

awesome job @gotjosh!

I gave the code here a quick scan looking for idiomatic code and didn't try validating correctness to the design doc, since presumably Prometheus maintainers with way more context than me took a close look at everything here. I only found one nit (and one extra silly nit), but you did great work getting this to the state it's in today 👏

config/config.go Show resolved Hide resolved
prompb/remote.proto Show resolved Hide resolved
storage/remote/queue_manager.go Show resolved Hide resolved
gotjosh pushed a commit that referenced this pull request May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants