Skip to content

Initial cut at supporting refinements in v2 syntax.#1250

Merged
jsuereth merged 23 commits intoopen-telemetry:mainfrom
jsuereth:wip-v2-refinements
Mar 5, 2026
Merged

Initial cut at supporting refinements in v2 syntax.#1250
jsuereth merged 23 commits intoopen-telemetry:mainfrom
jsuereth:wip-v2-refinements

Conversation

@jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Feb 26, 2026

Note: I used gemini-cli to aide in the writing of this PR.

  • Updates refinement to actually be a refinement. This means metric names, notes, etc. will be copied from the refined group vs. needing to be restated.
  • Creates a is_v2 flag to track v2 refinements through V1 so resolution engine will work.
  • Update dependency + resolution to support extends additionally having more things that can be pulled in.

This does NOT do the following:

  • Update lineage any further. That's a BIG todo I plan to address in a different monster PR.
  • Allow complicated "don't inherit" logic for attributes or annotations. You can append-only and override. I expect us to figure out more complicated refinement in non-breaking ways going forward.

"name": "base.entity",
"lineage": {
"provenance": {
"registry_id": "default",
Copy link
Member

Choose a reason for hiding this comment

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

unrelated, I need to clean this one up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah - I need to sort out provenance going forward. I don't think we can declare resolved schema final until it's added, but I think we can add it in a non-breaking way.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 91.42857% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.8%. Comparing base (6aaaa7f) to head (c6751ab).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_resolver/src/dependency.rs 88.3% 15 Missing ⚠️
crates/weaver_resolver/src/registry.rs 88.2% 6 Missing ⚠️
crates/weaver_resolved_schema/src/lib.rs 0.0% 2 Missing ⚠️
crates/weaver_resolver/src/merge.rs 94.1% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1250     +/-   ##
=======================================
+ Coverage   80.4%   80.8%   +0.3%     
=======================================
  Files        110     111      +1     
  Lines       9025    9257    +232     
=======================================
+ Hits        7260    7482    +222     
- Misses      1765    1775     +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jsuereth jsuereth marked this pull request as ready for review March 3, 2026 19:59
@jsuereth jsuereth requested a review from a team as a code owner March 3, 2026 19:59
Copy link
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

Looks great, just a few minor comments


- `attributes`: Contains definitions of semantic attributes which may be applicable to all OpenTelemetry signals.
- `entities`: Contains definitions of entities.
- `entity_refinements`: Contains definitions of entity refinements.
Copy link
Member

Choose a reason for hiding this comment

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

there are also sections underneath to describe format in human-readable form, e.g. https://github.com/jsuereth/weaver/blob/6b909ea304d8d727a2a96a6b12dddb19b97e02de/schemas/semconv-syntax.v2.md#entities-definition

(cached and blessed AI output so that people don't need to AI that for us)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, I fixed that, need to re-push

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huh, the commit is showing up in git locally, but not github - odd

Copy link
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

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

LGTM.
nit: I believe the json schema need to be updated now that you support some merging.

@jsuereth jsuereth enabled auto-merge (squash) March 5, 2026 18:46
@jsuereth jsuereth merged commit 502906d into open-telemetry:main Mar 5, 2026
22 checks passed
@jsuereth jsuereth deleted the wip-v2-refinements branch March 5, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants