Skip to content

Allow attributes to be identifying or descriptive. #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 15, 2025

Conversation

jsuereth
Copy link
Contributor

@jsuereth jsuereth commented May 9, 2025

This is the next phase of open-telemetry/semantic-conventions#2246.

What this does:

  • Add role field to Attribute with options Identifying or Descriptive
  • Adds lineage tracking for role changes

What this does not do:

  • Update yaml schema for model files (Didn't have time to learn this one yet)
  • Add any weaver enforcement of rules around usage. I plan to add this in semconv initially, but not sure how much limits we'll have in weaver.
  • Add any JQ or JINJA helpers for role.

Why role

Why do we call this role? I did some investigation into names and actually thought LLM captured some considerations well, here's (snipped) output:

Why terms like "Type" or "Kind" might be less suitable:

AttributeType: This is commonly used to refer to the data type of the attribute (e.g., string, integer, boolean) (Source 4.2), and using it for this dimension could cause confusion.
AttributeKind: OpenTelemetry already uses "Kind" for spans (e.g., SpanKind with values like SERVER, CLIENT), so using it here might lead to ambiguity.

...

Rationale: "Role" is a widely understood term in data modeling, where attributes play specific roles (e.g., key, descriptor). This name signifies the function or part an attribute plays in defining or characterizing the signal or resource.

...

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.

Made 2 minor comments, otherwise LGTM

@jsuereth jsuereth added this to Entities May 9, 2025
@jsuereth jsuereth moved this to In Progress in Entities May 9, 2025
@jsuereth jsuereth self-assigned this May 12, 2025
@jsuereth jsuereth requested a review from a team as a code owner May 13, 2025 17:29
@jsuereth jsuereth moved this to To consider for the next release in OTel Weaver Project May 14, 2025
Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.7%. Comparing base (6301f33) to head (4493d3d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_semconv/src/attribute.rs 0.0% 2 Missing ⚠️
crates/weaver_resolved_schema/src/lineage.rs 87.5% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #735   +/-   ##
=====================================
  Coverage   76.7%   76.7%           
=====================================
  Files         65      65           
  Lines       5012    5030   +18     
=====================================
+ Hits        3846    3860   +14     
- Misses      1166    1170    +4     

☔ 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 enabled auto-merge (squash) May 15, 2025 00:24
@jsuereth jsuereth merged commit f3d2b51 into open-telemetry:main May 15, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Entities May 15, 2025
@github-project-automation github-project-automation bot moved this from To consider for the next release to Done in OTel Weaver Project May 15, 2025
@jsuereth jsuereth deleted the wip-descriptive-attributes branch May 15, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants