Skip to content

Commit

Permalink
Update example in readme for convert_sum_to_gauge and convert_gauge_t…
Browse files Browse the repository at this point in the history
…o_sum (open-telemetry#35022)

**Description:** The feature gate
"processor.transform.ConvertBetweenSumAndGaugeMetricContext" was updated
from Alpha to Beta. This means that it is now enabled by default. The
example in the readme should match with the default behavior which is
that the functions convert_sum_to_gauge and convert_gauge_to_sum must be
used on the "metric" context

**Link to tracking Issue:** open-telemetry#34567

Maybe the Readme should state clearly in which context the functions can
be used?
  • Loading branch information
wildum authored and f7o committed Sep 12, 2024
1 parent 6779d16 commit 3d3674b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/transformprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ transform:
- context: metric
statements:
- set(description, "Sum") where type == "Sum"
- convert_sum_to_gauge() where name == "system.processes.count"
- convert_gauge_to_sum("cumulative", false) where name == "prometheus_metric"
- context: datapoint
statements:
- limit(attributes, 100, ["host.name"])
- truncate_all(attributes, 4096)
- convert_sum_to_gauge() where metric.name == "system.processes.count"
- convert_gauge_to_sum("cumulative", false) where metric.name == "prometheus_metric"
log_statements:
- context: resource
Expand Down

0 comments on commit 3d3674b

Please sign in to comment.