Skip to content

Conversation

@xuan-cao-swi
Copy link
Contributor

Relates to #1742, #1555

Description

  1. Created two enum type (delta and cumulative) for aggregation_temporality based on OpenTelemetry::Trace::Status to make spec compliance.
  2. Set sum and histogram to have cumulative as default aggregation_temporality (issue 1555). For last_value, it's still delta because I think it's easier to keep the last value as the last value; and for drop, aggregation_temporality won't have any effects since it drops all data.
  3. Updated the test case that reflect the change.

@github-actions
Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions
Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@kaylareopelle
Copy link
Contributor

@xuan-cao-swi - What do you think about changing the conventional commit type to feat! since we're updating the default temporality value for some instruments?

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this back to my attention!


def initialize(aggregation_temporality: :delta)
@aggregation_temporality = aggregation_temporality
@aggregation_temporality = aggregation_temporality == :cumulative ? AggregationTemporality.cumulative : AggregationTemporality.delta
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a future PR, it might be worth reducing some duplication by defining a method within AggregationTemporality that can perform this logic for all applicable aggregations.

@kaylareopelle kaylareopelle merged commit 5ada394 into open-telemetry:main Aug 6, 2025
65 checks passed
@github-project-automation github-project-automation bot moved this from To do to Done in Ruby - Metrics Aug 6, 2025
@kaylareopelle
Copy link
Contributor

@xuan-cao-swi - What do you think about changing the conventional commit type to feat! since we're updating the default temporality value for some instruments?

My bad, forgot this question was out there before I merged, but let me know what you think and I can make adjustments during the release.

@xuan-cao-swi xuan-cao-swi deleted the issues-1742 branch August 8, 2025 15:10
@kaylareopelle kaylareopelle changed the title fix: add kind enum type for aggregation_temporality that only allow two types feat!: add kind enum type for aggregation_temporality that only allow two types Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add :cumulative aggregation_temporality to metrics aggregators

2 participants