-
Notifications
You must be signed in to change notification settings - Fork 258
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
Replace Temporality with Kind; Type with ValueType #168
Conversation
FYI in 162 I measured the cost of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (minor nits) except the async bit which unfortunately I fail to understand the implication on the consumer.
@jmacd you had a go mod/sum in the original PR consider to send a quick PR to add them to the repo (independent of any proto changes) |
I sure hope we have resolved the issues and can get these changes merged in 2 weeks. @open-telemetry/specs-metrics-approvers Let's Really Do This. |
This is great. I plan to attend this Thursday's SIG meeting for metrics and would be good to hear latest progress / status on those four pull requests: |
SUMMARY = 6; | ||
// Summary implies that the value is found in | ||
// Metric.summary_data_points[].summary. | ||
SUMMARY = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking ahead to the exemplars changes; in #162 we had SUMMARY_INT64
and SUMMARY_DOUBLE
which lets us determine the data type of exemplars (int or double). But if we only specify double
types for summary, does it make sense to have a SUMMARY_INT64
and SUMMARY_DOUBLE
type for only exemplars or should there be a different enum for raw measurement type? Same thing for histogram
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was on the fence about creating _INT64 and _DOUBLE variations of Histogram and Summary data points. I wouldn't object, but I fear this is more detail than most people want. I draw a distinction between single-value data points (SCALAR, RAW) and multi-value data points (HISTOGRAM, SUMMARY). I think it's more OK to support only floats for multi-value data points, basically, and really not OK to do that for scalars and raw values.
I asked around whether this was a real problem at Google, and in cases it was. If you count your network traffic in bits per second, your router is likely to overflow a 2^50 counter but not a 2^64 counter.
// | ||
// 1. CUMULATIVE GROUPING kinds typically use Histogram data points | ||
// 2. CUMULATIVE is rarely used with Summary data points | ||
enum Kind { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spent time during the weekend trying this new proposal, and found a lot of things that don't make a lot of sense.
See more details here and a proposed different approach of thinking about the data model:
https://docs.google.com/document/d/1UBpke_e_HWl7UV3piNIMAZYw8eNjfGjucdwwsEOqUI4/edit#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't hesitate to comment in the doc or here. Will try to answer all the comments :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments, I read this proposal now at least 5 times and I still don't understand the subtle things and edge cases which makes me feel that this is too complicated and will not be able to use it as a generic protocol.
// may be interpreted differently depending on Structure. For | ||
// example, a Histogram DataPoint may be computed for a Counter | ||
// (ADDING) instrument or a ValueRecorder (GROUPING) instrument, and | ||
// the Sum and Count of the resulting aggregation may be interpreted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how Count relates to "Structure", I see "Count" being related with Temporality not structure.
// by equal Resource and TimeUnixNano values. SNAPSHOT metrics | ||
// MUST NOT have more than one data point per TimeUnixNano, | ||
// Resource, and LabelSet. If the interpreter of this data finds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SNAPSHOT metrics MUST NOT have more than one data point per TimeUnixNano, Resource, and LabelSet.
This is true for every metric correct?
… the aggregation and temporality. This PR takes a more descriptive approach where the Aggregation (the last applied aggregation if any) is clearly defined and Temporality is available only where it makes sense. This can help clearly identify what are the possible values and properties for different types of Aggregations. There are some things that can be considered (TODOs left in the code): * open-telemetry/opentelemetry-specification#725 * Histogram/Summary sum - monotonicity? * Previous aggregation measurements: raw measurements or "derived" measurements (results of another aggregation). * Support for RawMeasurements (recorded via the Sync Instruments) IMPORTANT: * This PR is not equivalent with open-telemetry#168 or open-telemetry#181, this is inspired by these PRs but makes some changes that are not compatible with that PR. * This PR is an incremental update, without any significant semantic changes (except adding the notion of GAUGE), from the current state, more changes will be added in the future to resolve the TODOs. Signed-off-by: Bogdan Drutu <[email protected]>
… the aggregation and temporality. This PR takes a more descriptive approach where the Aggregation (the last applied aggregation if any) is clearly defined and Temporality is available only where it makes sense. This can help clearly identify what are the possible values and properties for different types of Aggregations. There are some things that can be considered (TODOs left in the code): * open-telemetry/opentelemetry-specification#725 * Histogram/Summary sum - monotonicity? * Previous aggregation measurements: raw measurements or "derived" measurements (results of another aggregation). * Support for RawMeasurements (recorded via the Sync Instruments) * Decide if support for INSTANTANEOUS temporality is still needed. IMPORTANT: * This PR is not equivalent with open-telemetry#168 or open-telemetry#181, this is inspired by these PRs but makes some changes that are not compatible with that PR. * This PR is an incremental update, without any significant semantic changes (except adding the notion of GAUGE), from the current state, more changes will be added in the future to resolve the TODOs. Signed-off-by: Bogdan Drutu <[email protected]>
See #182. |
…tails about the aggregation and temporality. (#182) * Change Metric type to be a more detailed structure with details about the aggregation and temporality. This PR takes a more descriptive approach where the Aggregation (the last applied aggregation if any) is clearly defined and Temporality is available only where it makes sense. This can help clearly identify what are the possible values and properties for different types of Aggregations. There are some things that can be considered (TODOs left in the code): * open-telemetry/opentelemetry-specification#725 * Histogram/Summary sum - monotonicity? * Previous aggregation measurements: raw measurements or "derived" measurements (results of another aggregation). * Support for RawMeasurements (recorded via the Sync Instruments) * Decide if support for INSTANTANEOUS temporality is still needed. IMPORTANT: * This PR is not equivalent with #168 or #181, this is inspired by these PRs but makes some changes that are not compatible with that PR. * This PR is an incremental update, without any significant semantic changes (except adding the notion of GAUGE), from the current state, more changes will be added in the future to resolve the TODOs. Signed-off-by: Bogdan Drutu <[email protected]> * Address feedback, added more TODOs and created issues Signed-off-by: Bogdan Drutu <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Aaron Abbott <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Tyler Yahn <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Tyler Yahn <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Tyler Yahn <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Tyler Yahn <[email protected]> * Update opentelemetry/proto/metrics/v1/metrics.proto Co-authored-by: Tyler Yahn <[email protected]> * Fix indentation and comment for Type Signed-off-by: Bogdan Drutu <[email protected]> Co-authored-by: Aaron Abbott <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
I see the closure of #168, #170. #159 is still in draft stage while #171 is merged. Are we close to get #159 and #171 closed this week or next week? |
This is a partial re-do of #162 with only the Kind and ValueType changes and more extensive comments.
Type renamed ValueType
Temporality values (CUMULATIVE, DELTA, INSTANTANEOUS) move into Kind
Structure values (ADDING_MONOTONIC, ADDING, GROUPING) included in Kind
Continuity values (SNAPSHOT, CONTINUOUS) included in Kind
Monotonic becomes a Structure
Part of #125
Resolves #124
Resolves #78