Skip to content

Allow attributes to be identifying or descriptive.#735

Merged
jsuereth merged 8 commits intoopen-telemetry:mainfrom
jsuereth:wip-descriptive-attributes
May 15, 2025
Merged

Allow attributes to be identifying or descriptive.#735
jsuereth merged 8 commits intoopen-telemetry:mainfrom
jsuereth:wip-descriptive-attributes

Conversation

@jsuereth
Copy link
Copy Markdown
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.

...

Comment thread crates/weaver_resolver/src/registry.rs Fixed
Comment thread crates/weaver_resolver/src/registry.rs Fixed
Comment thread crates/weaver_resolver/src/registry.rs Fixed
Comment thread crates/weaver_resolver/src/registry.rs Fixed
Copy link
Copy Markdown
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

Comment thread crates/weaver_resolved_schema/src/attribute.rs
Comment thread crates/weaver_resolver/src/registry.rs
@jsuereth jsuereth moved this to In Progress in Entities: Phase 1 May 9, 2025
Comment thread crates/weaver_semconv/src/attribute.rs
@jsuereth jsuereth self-assigned this May 12, 2025
Comment thread crates/weaver_semconv/src/attribute.rs
Comment thread crates/weaver_semconv/src/attribute.rs
@jsuereth jsuereth requested a review from a team as a code owner May 13, 2025 17:29
Comment thread crates/weaver_live_check/src/live_checker.rs Fixed
@jsuereth jsuereth moved this to To consider for the next release in OTel Weaver Project May 14, 2025
@codecov
Copy link
Copy Markdown

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: Phase 1 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.

4 participants