Repository navigation
Conversation
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
3e24b18 to
0b609ab
Compare
|
/dashboard route:reviewers |
|
@somuai, this pull request was routed to reviewers. |
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-02 18:41 UTC Review the latest changes. Status above doesn't look right?
|
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
064f424 to
0e7d3ae
Compare
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
0e7d3ae to
f645ba3
Compare
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
Actively maintaining this PR. Merged latest with zero conflicts and verified the test suite (: 19/19 passed) and linting (: all checks passed). Ready for review. /dashboard route:reviewers |
…ties Fixes open-telemetry#5629 MetricReaderStorage creates metric streams for instruments either via matching user-configured views in _handle_view_instrument_match or via the _DEFAULT_VIEW fallback in _get_or_init_view_instrument_match when no views match. Previously, only _handle_view_instrument_match executed conflict checking against existing matches. As a result, when an explicit view renamed an instrument to a name matching an instrument that uses the default-view fallback, the conflict warning was only emitted if the renamed instrument arrived second. If the renamed instrument arrived first, the default-view fallback stream was appended without checking for conflicts, silently exporting duplicate metric identities in violation of the OpenTelemetry specification. Extract _check_conflicts_and_add_match to route both stream-creation paths through conflict scanning, ensuring conflicting metric identities are reliably warned regardless of instrument registration order. Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
Signed-off-by: Soumyajit Ghosh <jobsoumyajit6124@gmail.com>
f2ee8ab to
72a524e
Compare
|
Rebased cleanly onto latest upstream main (9d18554). Integrated with the new self._new_view_instrument_match helper method while preserving all conflict-checking logic for the default-view fallback path. Verified test suite and formatting locally:
Merge conflicts are fully resolved and the branch is clean and mergeable. Ready for maintainer review. /dashboard route:reviewers |
Description
Fixes #5629
MetricReaderStoragecreates metric streams for instruments either via matching user-configured views in_handle_view_instrument_matchor via the_DEFAULT_VIEWfallback in_get_or_init_view_instrument_matchwhen no view matches the instrument.Previously, only
_handle_view_instrument_matchexecuted conflict scanning against existing matches. As a result, when an explicit view renamed an instrument to collide with an instrument taking the fallback path, the duplicate identity warning ("Views ... will cause conflicting metrics identities") was emitted only if the renamed instrument recorded second. If the renamed instrument recorded first, the fallback stream was appended without a conflict check, and two streams with identical identity were exported without warning.Per the OpenTelemetry specification (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#view):
This change extracts
_check_conflicts_and_add_matchto ensure both stream-creation paths (matching views and the_DEFAULT_VIEWfallback) perform conflict scanning against existing matches before appending, guaranteeing consistent, order-independent warning behavior.Type of change
How Has This Been Tested?
test_view_instrument_match_conflict_default_view_order_independencetesting both arrival orders (default view first vs renamed view first). Both orders reliably emit the warning.test_default_view_enabledto assert the conflict warning emitted when a second instrument with a mocked match is recorded.opentelemetry-sdk/tests/metrics/test_metric_reader_storage.py(18/18 passed).ruff check(clean).Does This PR Require a Contrib Repo Change?
Checklist: