Skip to content

Commit

Permalink
[exporter/dynatrace] improve temporality documentation (#13370)
Browse files Browse the repository at this point in the history
* [exporter/dynatrace] improve temporality documentation

* Clarify that cumulative histograms are dropped

* Clarify temporality for all instrument types

* Clarify temporality configuration is on SDK

* Update exporter/dynatraceexporter/README.md

Co-authored-by: Joao Grassi <[email protected]>

Co-authored-by: Joao Grassi <[email protected]>
  • Loading branch information
dyladan and joaopgrassi authored Sep 5, 2022
1 parent 3503509 commit 92994e3
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions exporter/dynatraceexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,31 @@ service:

**Deprecated: Please use [default_dimensions](#default_dimensions-optional) instead**

# Considerations when exporting Cumulative Data Points
# Temporality

When receiving Sum or Histogram metrics with CUMULATIVE temporality, this exporter
performs CUMULATIVE to DELTA conversion. This conversion can lead to missing
or inconsistent data, as described below:
If possible when configuring your SDK, use DELTA temporality for Counter, Asynchronous Counter, and Histogram metrics.
Use CUMULATIVE temporality for UpDownCounter and Asynchronous UpDownCounter metrics.
When using OpenTelemetry SDKs to gather metrics data, setting the
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable to `delta`
should correctly set temporality for all metrics.
You can check the [spec compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#environment-variables)
if you are unsure if the SDK you are using supports this configuration.
You can read more about this and other configurations at
[OpenTelemetry Metrics Exporter - OTLP](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md#additional-configuration).

## First Data Points are dropped
## Considerations when exporting Cumulative Data Points

Due to the conversion, the exporter will drop the first received data point,
as there is no previous data point to compare it to. This can be circumvented
by configuring the OpenTelemetry SDK to export DELTA values.
Histogram metrics with CUMULATIVE temporality are NOT SUPPORTED and will NOT be exported.

When possible, Sum metrics should use DELTA temporality.
When receiving Sum metrics with CUMULATIVE temporality, this exporter performs CUMULATIVE to DELTA conversion.
This conversion can lead to missing or inconsistent data, as described below:

### First Data Points are dropped

Due to the conversion, the exporter will drop the first received data point
after a counter is created or reset as there is no previous data point to compare it to.
This can be circumvented by configuring the OpenTelemetry SDK to export DELTA values.

## Multi-instance collector deployment

Expand Down

0 comments on commit 92994e3

Please sign in to comment.