Skip to content

Conversation

@tony-resendiz
Copy link

Summary

when histograms are processed by the datadog metrics sink a ddsketch is built by interpolating values from the bucket boundaries. this causes some slight inaccuracy in the sketch average. this change sets the sketch average to the histogram's sum / count.

Vector configuration

[log_schema]
level_key = "status"
level = "info"

[api]
enabled = true
address = "0.0.0.0:8787"
playground = false

[sources.opentelemetry]
type = "opentelemetry"
grpc.address = "0.0.0.0:4317"
http.address = "0.0.0.0:4318"

[sinks.datadog_metrics_sink]
type = "datadog_metrics"
inputs = ["opentelemetry.metrics"]
default_api_key = "${DD_API_KEY}"
endpoint = "https://metrics.agent.datadoghq.com"

How did you test this PR?

built new vector binary and tested against the above config.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@tony-resendiz tony-resendiz requested a review from a team as a code owner December 13, 2025 00:21
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


tresendiz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Dec 13, 2025
@tony-resendiz
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@tony-resendiz tony-resendiz changed the title enhancement(ddsketch): averages are calculated from histogram sum & count fields enhancement(metrics): ddsketch averages are calculated from histogram sum & count fields Dec 13, 2025
@tony-resendiz
Copy link
Author

Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the CLA Document and I hereby sign the CLA

tresendiz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

sry tresendiz is my gh user for my company's gh. i linked that public ssh key to my tony-resendiz account but im not able to login/link that email and sign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ddsketch from histogram seems inaccurate

1 participant