Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add support for Summary type and value. #110

Merged
merged 3 commits into from
Sep 19, 2018

Conversation

bogdandrutu
Copy link
Contributor

@bogdandrutu bogdandrutu commented Sep 16, 2018

This value better supports dropwizard histograms.

Copy link
Contributor

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM. Can you fix the build failures?

// percentiles directly.
//
// See also: https://prometheus.io/docs/concepts/metric_types/#summary
// A summary value.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe worth repeating here that it's not recommended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.


// The start_timestamp only applies to the count and sum in the SummaryValue.
message SummaryValue {
// The total number of recorded values from the beginning. Optional since
Copy link
Contributor

Choose a reason for hiding this comment

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

from the beginning -> since start_time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

google.protobuf.UInt64Value count = 1;

// The sum of values in the snapshot. Optional since some systems don't
// expose this. If count is zero then this field must be zero or not set
Copy link
Contributor

Choose a reason for hiding this comment

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

How about "This field must be unset if the sum is not available."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.


message Quantile {
// Must be in the interval (0.0, 1.0]
required double quantile = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove "required" this is proto3 ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

}
}

// Values calculated from over a sliding time window.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about "Values calculated over an arbitrary time window."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

// (usually things like request durations and response sizes). While it
// also provides a total count of observations and a sum of all observed
// values, it calculates configurable quantiles over a sliding time window.
// This is not recommended, since cannot be aggregated.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/since cannot/since it cannot/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

// percentiles directly.
//
// See also: https://prometheus.io/docs/concepts/metric_types/#summary
// A summary value. This is not recommended, since cannot be aggregated.
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@@ -91,6 +92,13 @@ message MetricDescriptor {
// Distribution cumulative measurement. The count can only go up, if resets
// then the start_time should also be reset.
CUMULATIVE_DISTRIBUTION = 5;

// Old libraries implemented Histograms as a summary samples observations
Copy link
Contributor

Choose a reason for hiding this comment

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

as a summary samples observations -> as a summary of observations? measurements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@@ -91,6 +92,13 @@ message MetricDescriptor {
// Distribution cumulative measurement. The count can only go up, if resets
// then the start_time should also be reset.
CUMULATIVE_DISTRIBUTION = 5;

// Old libraries implemented Histograms as a summary samples observations
Copy link
Contributor

Choose a reason for hiding this comment

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

Old libraries implemented -> some frameworks implement ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

// also provides a total count of observations and a sum of all observed
// values, it calculates configurable quantiles over a sliding time window.
// This is not recommended, since it cannot be aggregated.
SUMMARY = 7;
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be number 6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants