feat: add support for metric data-point flags#4916
Open
herin049 wants to merge 5 commits intoopen-telemetry:mainfrom
Open
feat: add support for metric data-point flags#4916herin049 wants to merge 5 commits intoopen-telemetry:mainfrom
herin049 wants to merge 5 commits intoopen-telemetry:mainfrom
Conversation
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py
Show resolved
Hide resolved
MikeGoldsmith
approved these changes
Feb 20, 2026
exporter/opentelemetry-exporter-otlp-proto-common/tests/test_metrics_encoder.py
Show resolved
Hide resolved
tammy-baylis-swi
approved these changes
Feb 23, 2026
9 tasks
6f4b5bb to
cee2016
Compare
58033e6 to
479f459
Compare
479f459 to
efbb217
Compare
MikeGoldsmith
approved these changes
Apr 1, 2026
Member
MikeGoldsmith
left a comment
There was a problem hiding this comment.
Looks good - left a couple of minor queries around a comment & changelog
| flags=0, | ||
| min=self._previous_min, | ||
| max=self._previous_max, | ||
| # FIXME: Find the right value for flags |
Member
There was a problem hiding this comment.
Do we need this fixme now we're getting defaults?
Contributor
Author
There was a problem hiding this comment.
Someone has a follow-up PR that addresses this, I'm going to leave the comment for now.
| - The exporter's API is not changed | ||
| - Add parameters for Distros and configurators to configure autoinstrumentation in addition to existing environment variables. | ||
| ([#3864](https://github.com/open-telemetry/opentelemetry-python/pull/3864)) | ||
| - [BREAKING] `opentelemetry-sdk`, `opentelemetry-exporter-otlp-proto-common`: Add support for metric data-point flags |
Member
There was a problem hiding this comment.
This says it's a breaking change, but the PR desc doesn't have the Breaking checkbox.
Is it breaking or just addative?
Contributor
Author
There was a problem hiding this comment.
I technically changed some field orderings in ExponentialHistogramDataPoint for consistency, so it's a very trivial breaking change.
efbb217 to
6291158
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds support for metric data-point flags per the OpenTelemetry metric data model: https://opentelemetry.io/docs/specs/otel/metrics/data-model/#data-point-flags
Fixes #4726
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Relevant unit tests have been added/updated to test the added features.
Does This PR Require a Contrib Repo Change?
Checklist: