Skip to content

feat(packages): Expose canonical attribute read chains - #508

Draft
Lms24 wants to merge 4 commits into
mainfrom
lms/feat-attribute-read-chains
Draft

feat(packages): Expose canonical attribute read chains#508
Lms24 wants to merge 4 commits into
mainfrom
lms/feat-attribute-read-chains

Conversation

@Lms24

@Lms24 Lms24 commented Jul 15, 2026

Copy link
Copy Markdown
Member

Expose canonical-first attribute read chains and lightweight lookup helpers in JavaScript and Python.

Fixes #496

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Breaking Changes 🛠

  • (op) Add gen_ai prefix to existing ops and add embeddings, generate_content, and rerank ops by msonnb in #543

New Features ✨

Attributes

  • Add query, deprecated in favor of db.query.text by alexander-alderman-webb in #530
  • Add aws.operation_name, deprecated in favor of rpc.method by alexander-alderman-webb in #536
  • Add db.params, deprecated in favor of db.query.parameter.<key> by alexander-alderman-webb in #529
  • Add code, deprecated in favor of rpc.response.status_code by alexander-alderman-webb in #533
  • Add django.function_name, deprecated in favor of code.function.name by alexander-alderman-webb in #538
  • Add port, deprecated in favor of server.port by alexander-alderman-webb in #532
  • Add redis.command, deprecated in favor of db.operation.name by alexander-alderman-webb in #531
  • Add address, deprecated in favor of server.address by alexander-alderman-webb in #534
  • Add aws_region, deprecated in favor of cloud.region by alexander-alderman-webb in #537
  • Add gcp_region, deprecated in favor of cloud.region by alexander-alderman-webb in #535
  • Add django.middleware_name (deprecated) in favor of middleware.name by alexander-alderman-webb in #520
  • Add starlite.middleware_name (deprecated) in favor of middleware.name by alexander-alderman-webb in #519
  • Add aws.request.url (deprecated) in favor of url.full by sentrivana in #488
  • Add subprocess.pid (deprecated) in favor of process.pid by sentrivana in #487
  • Add litestar.middleware_name (deprecated) in favor of middleware.name by sentrivana in #486
  • Add starlette.middleware_name (deprecated) in favor of middleware.name by sentrivana in #485
  • Add redis.key (deprecated) in favor of db.redis.key by sentrivana in #484
  • Add db.mongodb.collection (deprecated) in favor of db.collection.name by sentrivana in #483
  • Add Kafka messaging attributes by chargome in #474
  • Deprecate rpc.grpc.status_code in favor of rpc.response.status_code by lucas-zimerman in #494
  • Add deprecated messaging.destination_kind by andreiborza in #509
  • Add sentry.segment.name.source attribute by Lms24 in #466
  • Add attribute transformations by constantinius in #465
  • Add stable app vitals attributes by buenaflor in #493
  • Deprecate sentry.frames.* attributes by buenaflor in #500
  • Add missing AI legacy aliases from Relay SpanData by vgrozdanic in #498

Op

  • Add browser resource, timing phase, and UI span operations by msonnb in #547
  • Add object storage span operations by msonnb in #545
  • Add http.client.stream op by msonnb in #544

Other

  • (conventions) Support multiple examples by Lms24 in #505
  • (descriptions) Add http.route description template for http.server span description inference by Lms24 in #518
  • (packages) Expose canonical attribute read chains by Lms24 in #508

Internal Changes 🔧

Attribute

  • Add more examples for valid sentry.kind values by Lms24 in #517
  • Improve db.statement example and add deprecation reason by Lms24 in #501

Attributes

  • Disambiguate http.route and url.template attributes by Lms24 in #521
  • Improve description of sentry.segment.name.source by Lms24 in #511
  • Deprecate sentry.span.source and change backfill status of sentry.source by Lms24 in #510

Deps

  • Bump dompurify from 3.4.11 to 3.4.12 by dependabot in #525
  • Bump fast-uri from 3.1.2 to 3.1.4 by dependabot in #526
  • Bump svgo from 4.0.1 to 4.0.2 by dependabot in #524
  • Bump js-yaml from 4.2.0 to 4.3.0 by dependabot in #516
  • Bump astro from 6.4.7 to 7.1.0 in /docs by dependabot in #514

Other

  • (attrs) Backport attributes and normalizations from Relay by Dav1dde in #497
  • (codeowners) Assign telemetry-experience to gen_ai/ai attributes by vgrozdanic in #506
  • (deps-dev) Bump tar from 7.5.16 to 7.5.19 by dependabot in #515
  • (release) Show version in workflow run title by constantinius in #504

🤖 This preview updates automatically when you update the PR.

@Lms24 Lms24 changed the title feat(attributes): Expose canonical attribute read chains feat(packages): Expose canonical attribute read chains Jul 15, 2026
@Lms24

Lms24 commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1532a46. Configure here.

Lms24 and others added 4 commits July 31, 2026 16:15
Generate stable-first key chains in JavaScript and Python so SDKs can
read legacy attributes without importing the full metadata registry.
Add small lookup helpers while preserving tree-shakeable package paths.

Fixes #496
Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Use a single expression to preserve lookup semantics while reducing the
shipped helper by 13 bytes. Move coverage into a dedicated unit test.

Refs GH-496
Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Add examples and parameter guidance for the JavaScript and Python helpers.
Generate the Python docstring so regeneration preserves the API documentation.

Refs GH-496
Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Cursor <cursoragent@cursor.com>
Clean up three pre-existing type errors in the attribute generator:

- Drop the `_isDeprecated` destructure in `writeToJs`, which did not exist
  on the element type and was never read.
- Widen `convertToPythonLiteral` to accept `AttributeValue[]`. The body
  already recursed over arrays, but the `AttributeJson['example']`
  annotation excluded them, so passing `examples` did not type check.
- Guard the first Python example on `firstExample !== undefined` so the
  indexed access narrows, instead of passing a possibly-`undefined` value
  into a parameter that did not accept it.
- Remove the unused `attributesDir` and `attributeFiles` parameters from
  `generateMetadataDict` and update the call site.

Generated output is byte-identical: re-running `yarn generate` produces no
diff in the JavaScript or Python attribute files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the lms/feat-attribute-read-chains branch from 1532a46 to b91c5b1 Compare July 31, 2026 14:34
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.

Expose deprecation chains from conventions packages

1 participant