Skip to content

feat: Add missing GCP and FaaS attributes#403

Open
ericapisani wants to merge 6 commits into
mainfrom
py-2324-introduce-missing-gcp-conventions
Open

feat: Add missing GCP and FaaS attributes#403
ericapisani wants to merge 6 commits into
mainfrom
py-2324-introduce-missing-gcp-conventions

Conversation

@ericapisani
Copy link
Copy Markdown
Member

Add faas.duration_in_ms, faas.entry_point, faas.identity, and gcp.project.id to the model and regenerate JS and Python attribute files.

These attributes were missing from the conventions despite being used in GCP and FaaS instrumentation. Adding them ensures SDKs have consistent, typed constants to reference rather than relying on raw strings.

Add faas.duration_in_ms, faas.entry_point, faas.identity, and gcp.project.id
to the model and regenerate JS and Python attribute files.
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 28, 2026

PY-2324

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

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


New Features ✨

Docs

  • Add links to deprecated and aliased attributes by Lms24 in #396
  • Add filtering capability by nsdeschenes in #395

Other

  • Add missing GCP and FaaS attributes by ericapisani in #403

Bug Fixes 🐛

  • Change type of sentry.dsc.project_id to string by elramen in #400

Internal Changes 🔧

  • (publish) Automatically add PR numbers to attribute changelogs by Lms24 in #402

🤖 This preview updates automatically when you update the PR.

@ericapisani ericapisani requested a review from a team May 28, 2026 14:38
@ericapisani ericapisani marked this pull request as ready for review May 28, 2026 15:18
@ericapisani ericapisani requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 28, 2026 15:18
Comment thread model/attributes/faas/faas__entry_point.json Outdated
Comment thread model/attributes/faas/faas__identity.json Outdated
Comment thread model/attributes/faas/faas__duration_in_ms.json Outdated
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Reading the slack thread, we should also add the current attributes (sent by the SDK in transaction mode) as deprecated attributes into conventions and mark them as replaced by the new ones. Feel free to do this in a follow-up PR if you prefer!

This allows us to do backwards/forwards coalescing at ingest/query time so that existing dashboards/queries/alerts remain functional.

Comment thread model/attributes/faas/faas__name.json Outdated
Comment thread model/attributes/faas/faas__name.json Outdated
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 39754ca. Configure here.

Comment thread javascript/sentry-conventions/src/attributes.ts Outdated
Comment thread model/attributes/faas/faas__entry_point.json
@ericapisani
Copy link
Copy Markdown
Member Author

@Lms24

Reading the slack thread, we should also add the current attributes (sent by the SDK in transaction mode) as deprecated attributes into conventions and mark them as replaced by the new ones. Feel free to do this in a follow-up PR if you prefer!

Correct me if I'm wrong, but in this case I don't think there's any attributes to mark as deprecated because these values are being sent as part of the extra property on an event in an event_processor rather than being added to spans via the set_data that we usually use.

…m:getsentry/sentry-conventions into py-2324-introduce-missing-gcp-conventions
Comment thread python/src/sentry_conventions/attributes.py Outdated
The source JSON attribute definitions were updated to reflect new OTEL mappings, particularly for FaaS attributes. Regenerate the TypeScript and Python attribute files to match these changes.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@Lms24
Copy link
Copy Markdown
Member

Lms24 commented May 29, 2026

@ericapisani you're right, sorry, I didn't know they weren't sent as data before. So, no need to add and deprecate the old ones.

@@ -0,0 +1,16 @@
{
"key": "gcp.project.id",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I double-checked and we currently send a cloud.project_id attribute in JS that's only applied to GCP. I agree with your reasoning though to scope this attribute to the gcp namespace. Makes much more sense, given the other FAAS providers don't have the same project semantics as GCP.

Once this PR is merged, I'll open a PR to add the attribute from JS and deprecate it in favour of this one.

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.

2 participants