Skip to content

Conversation

@jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Oct 10, 2025

Ready for review

This modifies the resolved telemetry schema (and template values) to look like the V2 definition schema.

With this PR you can resolve into the new schema via a new flag to check how it looks, e.g.

weaver registry resolve --v2 > test.yaml

Here's a sample of the new layout:

attributes:
  - key: android.app.state
    type:
      ...
signals:
  metrics:
  - name: aspnetcore.authentication.authenticate.duration
    instrument: histogram
    unit: s
    ...
  spans:
  - type: aws.client
    ...
  events:
  - name: app.jank
    ...
  entities:
  - type: android
    ...
refinements:
  metrics:
  - id: ...refinement id...
    ...full metric definition...
  spans:
    - id: ...refinement id...
    ...full span definition...
  events:
    - id: ...refinement id...
    ...full event definition...

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.

left some comments, but looks great overall!


assert!(diff_dir("expected_output/test", "observed_output/test").unwrap());

// TODO - Remove this.
Copy link
Member

Choose a reason for hiding this comment

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

is it ok to remove now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm still using this to test/demo. I was going to remove after we lock-in on the details of the schema.

instrument: metric.instrument,
unit: metric.unit,
attributes,
entity_associations: metric.entity_associations,
Copy link
Member

Choose a reason for hiding this comment

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

not blocking, we can follow-up: we're checking that attributes exist, but not checking it for entities, it seems inconsistent.

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.

Wow, it took me quite some time to go through all of this. Thanks for the massive refactoring of the semconv schema and everything that comes with it!

Sorry for the number of comments. A lot of them are just copy/paste issues or typos. There are probably only a handful that really concern the approach or the decisions made. Apologies in advance if some of these points or answers have already been discussed in the SIG meetings; I haven't been very present in those lately.

/// The type of the entity.
pub r#type: SignalId,

/// List of attributes that belong to this event.
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment would benefit from being updated to match the field below :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies, I was rushing for the demo, I'll clean all these up - Didn't want this to be a full review, more of "check the direction" review.

I think the discussion on Attribute/AttributeRef is the thing to focus on in this review :)

@jsuereth jsuereth force-pushed the wip-v2-resolved-schema branch from 67e6762 to 209883f Compare October 20, 2025 19:25
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

clippy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 81.53153% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.5%. Comparing base (c514c8b) to head (66dcd59).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_forge/src/v2/registry.rs 79.3% 46 Missing ⚠️
crates/weaver_resolved_schema/src/v2/mod.rs 84.4% 26 Missing ⚠️
crates/weaver_resolved_schema/src/v2/registry.rs 0.0% 6 Missing ⚠️
crates/weaver_resolved_schema/src/lib.rs 33.3% 2 Missing ⚠️
crates/weaver_resolved_schema/src/v2/attribute.rs 0.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #980     +/-   ##
=======================================
+ Coverage   78.3%   78.5%   +0.1%     
=======================================
  Files         77      82      +5     
  Lines       6122    6564    +442     
=======================================
+ Hits        4799    5157    +358     
- Misses      1323    1407     +84     

☔ 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.

@jsuereth jsuereth marked this pull request as ready for review November 3, 2025 21:08
@jsuereth jsuereth requested a review from a team as a code owner November 3, 2025 21:08
@lmolkova
Copy link
Member

lmolkova commented Nov 3, 2025

testing this out on semconv and checking against problems identified for v1 in open-telemetry/semantic-conventions#2469

Resolved schema v2 - https://gist.githubusercontent.com/lmolkova/34dc5c0b0f583ca80681af3c9334238d/raw/d5b1ce469f149c1586b277cf3fe0f5772a480b72/semconv_schema_v2_copy.yaml

works fine now !

@lmolkova

This comment was marked as resolved.

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.

I tested weaver registry resolve --v2 and it works. I'm in favor of merging it and following up

@jsuereth jsuereth changed the title [WIP] V2 Resolved Schema V2 Resolved Schema Nov 17, 2025
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.

5 participants