Sitelet https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/5213
Skip to content

[Dynamic Control] Phase 5b: Add policy parsers - #5213

Merged
martincostello merged 4 commits into
open-telemetry:mainfrom
stevejgordon:dynamic-control-phase-5-parser
Sep 17, 2026
Merged

martincostello merged 4 commits into
open-telemetry:mainfrom
stevejgordon:dynamic-control-phase-5-parser

Conversation

@stevejgordon

Copy link
Copy Markdown
Contributor

Contributes to: #4742

Changes

Adds an internal JSON parser that decodes a complete JSON policy payload into validated policy models.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@stevejgordon stevejgordon mentioned this pull request Sep 15, 2026
7 of 15 tasks
@github-actions github-actions Bot added the comp:dynamiccontrol Things related to OpenTelemetry.DynamicControl label Sep 15, 2026
@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.42%. Comparing base (13184d8) to head (aab6f78).
⚠️ Report is 22 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5213      +/-   ##
==========================================
+ Coverage   79.25%   79.42%   +0.17%     
==========================================
  Files         500      504       +4     
  Lines       21023    21204     +181     
==========================================
+ Hits        16661    16841     +180     
- Misses       4362     4363       +1     
Flag Coverage Δ
unittests-DynamicControl 98.64% <100.00%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rol/Internal/Providers/JsonKeyValuePolicyParser.cs 100.00% <100.00%> (ø)
...namicControl/Internal/Providers/JsonValueReader.cs 88.46% <100.00%> (+2.74%) ⬆️
...Control/Internal/Providers/PayloadEntryLocation.cs 100.00% <100.00%> (ø)
...rol/Internal/Providers/PolicyPayloadParseResult.cs 100.00% <100.00%> (ø)
...ntrol/Internal/Providers/PolicyPayloadRejection.cs 100.00% <100.00%> (ø)
...amicControl/Internal/Providers/PolicyReadResult.cs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stevejgordon
stevejgordon force-pushed the dynamic-control-phase-5-parser branch from 460600c to 66da402 Compare September 15, 2026 15:46
@stevejgordon
stevejgordon marked this pull request as ready for review September 16, 2026 05:21
@stevejgordon
stevejgordon requested a review from a team as a code owner September 16, 2026 05:21
Comment thread .typos.toml Outdated
Comment thread src/OpenTelemetry.DynamicControl/CHANGELOG.md Outdated
Comment thread src/OpenTelemetry.DynamicControl/CHANGELOG.md Outdated
Comment thread src/OpenTelemetry.DynamicControl/Internal/Providers/JsonKeyValuePolicyParser.cs Outdated
Comment thread src/OpenTelemetry.DynamicControl/Internal/Providers/PolicyPayloadParseResult.cs Outdated
Comment thread src/OpenTelemetry.DynamicControl/Internal/Providers/PolicyPayloadRejection.cs Outdated
Comment thread src/OpenTelemetry.DynamicControl/Internal/Providers/PolicyPayloadRejection.cs Outdated
Comment thread test/OpenTelemetry.DynamicControl.Tests/JsonKeyValuePolicyParserTests.cs Outdated
Comment thread test/OpenTelemetry.DynamicControl.Tests/JsonKeyValuePolicyParserTests.cs Outdated
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-17 14:51 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Comment thread .typos.toml
INSER = "INSER"
SELEC = "SELEC"
UPDAT = "UPDAT"
probabilit = "probabilit"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this intentional typo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's used in JsonKeyValuePolicyParserTests for some of the malformed and escaped tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool - I couldn't immediately see it in a Ctrl+F other than here.

@martincostello
martincostello added this pull request to the merge queue Sep 17, 2026
Merged via the queue into open-telemetry:main with commit 43b3a35 Sep 17, 2026
76 checks passed
@stevejgordon
stevejgordon deleted the dynamic-control-phase-5-parser branch September 17, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:dynamiccontrol Things related to OpenTelemetry.DynamicControl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants