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

[WIP] Support remote write v2 #6292

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

SungJin1212
Copy link
Contributor

@SungJin1212 SungJin1212 commented Oct 29, 2024

This PR adds remote write 2.0 ingestion.
It is in WIP and the implementation is based on remote write 2.0 docs.(https://prometheus.io/docs/specs/remote_write_spec_2_0)

Which issue(s) this PR fixes:
Fixes #6116

What I did and what will do (this PR covers)

  • add remote write v2 proto
  • ingest sample, (native) histogram, metadata, and exemplar
  • add response headers to distributor/Ingester response
X-Prometheus-Remote-Write-Samples-Written <count of all successfully written Samples>
X-Prometheus-Remote-Write-Histograms-Written <count of all successfully written Histogram samples>
X-Prometheus-Remote-Write-Exemplars-Written <count of all successfully written Exemplars>
  • add remote write v2 Distributor/Ingester test (porting existing Distributor/Ingester tests to v2)
  • Implement HA tracker
  • Implement relabel
  • add prealloc timeseries like v1

Future works (other PRs cover)

  • [] performance test between v1 and v2

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212 SungJin1212 marked this pull request as draft October 29, 2024 01:11
@SungJin1212 SungJin1212 force-pushed the Add-remote-write-v2 branch 11 times, most recently from 8902cd5 to 46229bf Compare October 29, 2024 12:22
@SungJin1212 SungJin1212 changed the title Support remote write v2 [WIP] Support remote write v2 Oct 30, 2024
@SungJin1212 SungJin1212 force-pushed the Add-remote-write-v2 branch 14 times, most recently from 59b4e99 to 04e1821 Compare November 4, 2024 05:15
@@ -52,6 +54,166 @@ func init() {
}
}

func TestRemoteWriteV1AndV2QueryResultFuzz(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fuzz test is unnecessary for this feature IIUC

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@SungJin1212 SungJin1212 force-pushed the Add-remote-write-v2 branch 2 times, most recently from 320e91b to 0c2c13d Compare November 11, 2024 02:30
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote Write 2.0
2 participants