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

feat(parser.prometheusremotewrite): v1, atomic native histogram #16493

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Reimirno
Copy link

@Reimirno Reimirno commented Feb 9, 2025

Summary

Split v1/v2 metric parser version for prometheusremotewrite format, emulating that in prometheus format.

V2 is the original, existing behavior.Code is directly lifted from the original plugins/parsers/prometheusremotewrite/parser.go.

This PR implements V1, which emulates the dense behavior of prometheus format v1. It:

  1. converts prom metric name to measurement name
  2. uses a generic key value for value field
  3. converts a prom native histogram into one single telegraf metric, instead of multiple (as in V2)

Note that prometheusremotewrite V1 DOES NOT convert classic histogram/summary into one single telegraf metric as in the case of prometheus V1, because in a remote write request, a classic histogram is already broken up into various sub-metrics (counters/gauges), and they could even be in different remote write batches. However, it does conserves the dense behavior for native histogram.

--

This PR partially inplemented the design in #16120 and partially supercedes PR #16121, as a follow up to resolve this comment and design discussion in slack channel with @srebhan.

A PR for prometheusremotewrite serializer can be found at #16494

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16120

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins labels Feb 9, 2025
@telegraf-tiger
Copy link
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

🥳 This pull request decreases the Telegraf binary size by -1.62 % for linux amd64 (new size: 284.0 MB, nightly size 288.6 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheusremotewrite: End-to-end Prometheus Native Histogram Support
1 participant