openobserve / openobserve

🚀 10x easier, 🚀 140x lower storage cost, 🚀 high performance, 🚀 petabyte scale - Elasticsearch/Splunk/Datadog alternative for 🚀 (logs, metrics, traces, RUM, Error tracking, Session replay).
https://openobserve.ai
GNU Affero General Public License v3.0
10.16k stars 356 forks source link

[OTLP-Metrics] About data structure processing of metrics #1997

Open GhostBoyBoy opened 7 months ago

GhostBoyBoy commented 7 months ago

Which OpenObserve functionalities are relevant/related to the feature request?

metrics

Description

Question 1: min and max are not processed when Histogram type is processed in the OTLP protocol. For http interfaces, we need to care about the max value. For exemplars, as a json store, it is difficult to parse this structure when configuring monitoring diagrams. Problem 2: Monitoring, logs, and links are closely coordinated. The attribute of the [exemplars] data field of the metric Histogram type in the metric contains [traceId]. Can it be used as a metric label?

Proposed solution

I haven't decided yet

Alternatives considered

none

GhostBoyBoy commented 7 months ago

image

hengfeiyang commented 7 months ago

https://opentelemetry.io/docs/specs/otel/metrics/data-model/#histogram https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/ https://www.timescale.com/blog/prometheus-vs-opentelemetry-metrics-a-complete-guide/

We can see a histogram is created in OpenTelemetry, but one thing we can’t do is include minimum and maximum values (which OpenTelemetry supports, but Prometheus doesn’t).

So, as default we dropped min and max fields because that Prometheus doesn't support it.

But we also can consider add two more new metrics name, like we already have _count, _sum, _bucket for Histgoram data type, we also can add _min and _max streams. We need to discuss if it is valuable.

GhostBoyBoy commented 7 months ago

https://opentelemetry.io/docs/specs/otel/metrics/data-model/#histogram https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/ https://www.timescale.com/blog/prometheus-vs-opentelemetry-metrics-a-complete-guide/

We can see a histogram is created in OpenTelemetry, but one thing we can’t do is include minimum and maximum values (which OpenTelemetry supports, but Prometheus doesn’t).

So, as default we dropped min and max fields because that Prometheus doesn't support it.

But we also can consider add two more new metrics name, like we already have _count, _sum, _bucket for Histgoram data type, we also can add _min and _max streams. We need to discuss if it is valuable.

I agree that we should add _min and _max streams.