Skip to content

Commit

Permalink
formatting and handle exceeding the character limit
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Mar 4, 2022
1 parent 517711c commit e029db7
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions specification/metrics/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,13 @@ Prometheus Cumulative metrics do not include the start time of the metric. When

#### Exemplars

[OpenMetrics Exemplars](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars) can be attached to Prometheus Histogram bucket metrics, which SHOULD be converted to exemplars on OpenTelemetry histograms. If present, the timestamp MUST be added to the OpenTelemetry exemplar. The Trace ID and Span ID SHOULD be retrieved from the `trace_id` and `span_id` label keys, respectively. All labels not used for the trace and span ids MUST be added to the OpenTelemetry exemplar as attributes.
[OpenMetrics Exemplars](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars)
can be attached to Prometheus Histogram bucket metrics, which SHOULD be
converted to exemplars on OpenTelemetry histograms. If present, the timestamp
MUST be added to the OpenTelemetry exemplar. The Trace ID and Span ID SHOULD be
retrieved from the `trace_id` and `span_id` label keys, respectively. All
labels not used for the trace and span ids MUST be added to the OpenTelemetry
exemplar as attributes.

#### Resource Attributes

Expand Down Expand Up @@ -1236,7 +1242,19 @@ OpenTelemetry Metric Attributes MUST be converted to [Prometheus labels](https:/

#### Exemplars

[Exemplars](#exemplars) on OpenTelemetry Histograms SHOULD be converted to OpenMetrics exemplars. Exemplars on other OpenTelemetry data points MUST be dropped. For Prometheus push exporters, multiple exemplars are able to be added to each bucket, so all exemplars SHOULD be converted. For Prometheus pull endpoints, only a single exemplar is able to be added to each bucket, so the largest exemplar from each bucket MUST be used, if attaching exemplars. If no exemplars exist on a bucket, the highest exemplar from a lower bucket MUST be used, even though it is a duplicate of another bucket's exemplar. OpenMetrics Exemplars MUST use the `trace_id` and `span_id` keys for the trace and span IDs, respectively. Timestamps MUST be added as timestmaps on the OpenMetrics exemplar, and `filtered_attributes` must be added as labels on the OpenMetrics exemplar.
[Exemplars](#exemplars) on OpenTelemetry Histograms SHOULD be converted to
OpenMetrics exemplars. Exemplars on other OpenTelemetry data points MUST be
dropped. For Prometheus push exporters, multiple exemplars are able to be
added to each bucket, so all exemplars SHOULD be converted. For Prometheus
pull endpoints, only a single exemplar is able to be added to each bucket, so
the largest exemplar from each bucket MUST be used, if attaching exemplars. If
no exemplars exist on a bucket, the highest exemplar from a lower bucket MUST
be used, even though it is a duplicate of another bucket's exemplar.
OpenMetrics Exemplars MUST use the `trace_id` and `span_id` keys for the trace
and span IDs, respectively. Timestamps MUST be added as timestmaps on the
OpenMetrics exemplar, and `filtered_attributes` MUST be added as labels on the
OpenMetrics exemplar unless they would exceed the OpenMetrics
[limit on characters](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars).

#### Resource Attributes

Expand Down

0 comments on commit e029db7

Please sign in to comment.