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

Support optional sample-weight factors for all metrics Value count fields #73

Closed
jmacd opened this issue Nov 25, 2019 · 0 comments
Closed
Labels
release:after-ga Not required before GA release, and not going to work on before GA spec:metrics

Comments

@jmacd
Copy link
Contributor

jmacd commented Nov 25, 2019

As discussed in #59, there is a question of how to report metrics that have been sampled. Although the metrics API currently does not specify a way to input sampled metrics, certain exporters may wish to perform sampling themselves. Here we propose a solution for representing sampled metrics in the protocol without touching on whether the API should support sampled inputs.

Each of the Int64Value, DoubleValue, SummaryValue, HistogramValue, and HistogramValue.Bucket types would support a new optional double value named weight, which, if omitted, has a default equal to 1.0, meaning that no sampling took place.

For Int64Value and DoubleValue types, there is an implicit count of 1 already, as these represent one measured value. The other types have explicit count fields. In each case, the value of weight is logically multiplied by the count, yielding an adjusted count due to sampling.

Consumers SHOULD use the value of count times weight as the total number of metric events being reported. Consumers MUST interpret count as the actual number of events collected, whereas weight MUST be considered a count multiplier due to sampling in the metrics export pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:after-ga Not required before GA release, and not going to work on before GA spec:metrics
Projects
None yet
Development

No branches or pull requests

2 participants