Skip to content

Conversation

@pawelgrzybek
Copy link
Contributor

@pawelgrzybek pawelgrzybek commented Jan 22, 2026

Astro won't compile if this is not present. It is essential to tell Astro compiler not to minify or manipulate this script to preserve names reference in the buttons onclick handlers.

DESCRIBE YOUR PR

It fixes misleading code snippet that causes Astro builds to fail.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

Astro won't compile if this is not present. It is essential to tell Astro compiler not to minify or manipulate this script to preserve names reference in the buttons onclick handlers.
@vercel
Copy link

vercel bot commented Jan 22, 2026

@pawelgrzybek is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 2, 2026

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

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Feb 3, 2026 7:49pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Feb 3, 2026 7:49pm

Request Review


```html {filename: test.astro}
<script>
<script is:inline>
Copy link
Contributor

Choose a reason for hiding this comment

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

@Lms24 - is this right, or should we refactor this section to point people to use addEventListener instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right @sfanahata this also gave me some issues down the line. I would suggest to change it to good old ids or classes, document.gerElementById or querySelector. I'm happy to do that.

Copy link
Member

@Lms24 Lms24 Feb 3, 2026

Choose a reason for hiding this comment

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

Hey @pawelgrzybek ids sound reasonable to me. Would you be up to make that change? Also thanks for letting us know about is:inline. Tbh, I didn't know about this when writing those docs intially.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That should do, changes made.

@Lms24 better for you that you didn't know about it. It not the best practice as this one inlines script as is, so youre loosing all the optimisations that astro can do for ya (obfuscation, minification etc).

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Last request: There's another code snippet underneath to verify tracing. Could you make the same changes so that we're aligned? Thanks a bunch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thats all done @Lms24

@Lms24 Lms24 changed the title Fix misleading documentation example fix(astro): Fix misleading documentation example Feb 3, 2026
Copy link
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.

Thank you, much appreciated!

@Lms24 Lms24 merged commit 0e33558 into getsentry:master Feb 3, 2026
13 of 14 checks passed
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.

3 participants