Skip to content

feat(slack): Link footer IDs to Sentry traces#309

Open
dcramer wants to merge 1 commit intomainfrom
feature/slack-footer-sentry-link
Open

feat(slack): Link footer IDs to Sentry traces#309
dcramer wants to merge 1 commit intomainfrom
feature/slack-footer-sentry-link

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented May 7, 2026

Link finalized Slack footer conversation IDs to Sentry Explore when Junior telemetry has an active SDK DSN. The footer keeps the same compact context styling, but the ID now opens a project-scoped search for gen_ai.conversation.id in the Sentry project receiving Junior spans.

Footer-owned Link Rendering

The Slack footer helper now derives the Sentry URL directly from the active Sentry SDK client DSN while building the ID item. Delivery call sites keep passing only structured footer diagnostics, so they do not need to know about Sentry URL construction.

Minimal Explore URL

The generated link includes only the conversation search query, DSN project ID, and a 14-day time window. If the SDK cannot expose an organization target, the footer leaves the ID as plain text.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 7, 2026 10:49pm

Request Review

Use the active Sentry SDK DSN to build Explore links for Slack footer conversation IDs. This points reviewers and operators at the telemetry project that receives Junior spans instead of using provider configuration meant for user-facing Sentry queries.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer force-pushed the feature/slack-footer-sentry-link branch from d46c990 to 8965643 Compare May 7, 2026 22:48
@dcramer dcramer marked this pull request as ready for review May 7, 2026 22:50
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 1 potential issue.

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 8965643. Configure here.

return String(value);
}
return typeof value === "string" && value.trim() ? value.trim() : undefined;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same-named function with different semantics risks silent breakage

Low Severity

A private toOptionalString is introduced in footer.ts that shares its name with the exported toOptionalString in coerce.ts, but their behavior diverges: the footer version handles number inputs (converting them via String()) and trims returned strings, while the coerce version only accepts strings and returns them untrimmed. If a maintainer later consolidates by importing from coerce.ts, numeric orgId values from the Sentry SDK would silently become undefined, breaking link generation.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8965643. Configure here.

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.

1 participant