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

TSDB: Modeling of delta metrics in elasticsearch #98171

Open
lalit-satapathy opened this issue Aug 3, 2023 · 6 comments
Open

TSDB: Modeling of delta metrics in elasticsearch #98171

lalit-satapathy opened this issue Aug 3, 2023 · 6 comments

Comments

@lalit-satapathy
Copy link

lalit-satapathy commented Aug 3, 2023

Delta metrics are emitted by GCP and needs to be stored in elastic TSDS. The definition of delta metric is "The change in a value during a time interval"

The current proposal is to model the delta metrics as gauge, in the GCP integration metrics.

Suggestion by Felix: I think we should just map GCP DELTA metrics to gauges. I wouldn’t consider this a hack or a short-term solution as I don’t expect this have any negative impact.
Maybe the reason they have different types for delta vs gauge is that the consumers can differ between the two so that they can convert delta metrics into cumulative counters if they need to. But ES has excellent support for both deltas and counters so I don’t think that’s necessary.

Keeping this issue open to track any comments/suggestions for the same and potential future requirements to support delta metrics natively as a time_series_metric directly.

CC: @constanca-m @mlunadia @felixbarny

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Aug 3, 2023
@lalit-satapathy lalit-satapathy changed the title TSDB: Modeling on delta metrics in elasticsearch TSDB: Modeling of delta metrics in elasticsearch Aug 3, 2023
@kingherc kingherc added the :StorageEngine/TSDB You know, for Metrics label Aug 3, 2023
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed needs:triage Requires assignment of a team area label labels Aug 3, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@ruflin
Copy link
Member

ruflin commented Aug 9, 2023

One area where it could be helpful to have knowledge about delta metrics is when building queries. Assuming we know a value is a delta and not a gauge value, we could recommend some aggregations vs others and explain to the user in the UI why one should be used vs the other.

@felixbarny
Copy link
Member

The thing is that a lot of protocols don't have the distinction between gauge vs delta. For example, in OTLP, there's only the Gauge data point type. See also https://opentelemetry.io/docs/specs/otel/metrics/data-model/#opentelemetry-protocol-data-model. So I don't feel like it makes sense to invest in a delta metric type in Elasticsearch if it's only beneficial for GCP metrics and if the only benefits are that we could potentially recommend different aggregations.

@martijnvg
Copy link
Member

@felixbarny If I understand your comment correctly, then a delta gauge isn't really needed now? So we can close this issue?

@felixbarny
Copy link
Member

I think what I said back then wasn't entirely correct. In OpenTelemetry, there's the concept of temporality that describes whether a counter is delta or cumulative.

I agree with Ruflin that you'd perform different default aggregations depending on whether something is a delta counter vs a gauge.

Therefore, I think we shouldn't close this issue and instead work on properly supporting metric temporalities. Having said that, I don't feel like this is very urgent.

@wchaparro wchaparro removed the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 20, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

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

No branches or pull requests

7 participants