getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
798 stars 315 forks source link

Add cross-reference URLs between Sentry events and CI runs #4324

Open armcknight opened 1 week ago

armcknight commented 1 week ago

Description

Following on https://github.com/getsentry/sentry-cocoa/issues/4321, I discovered a need to have a URL I could click from the Sentry detail page for an e.g. issue to the CI run it came from, and vice-versa.

Sentry -> GitHub Action CI run: If the URL for a CI run could be directly accessed from the yml config variables, or reconstructed from environment info, then we should put that URL in a tag on the scope when running UI tests.

GItHub Action CI run -> Sentry: Likewise, it would be nice if we could somehow construct the Sentry URLs that will be set for the events transmitted in a UI test; we know the project and event IDs, I'm not sure if that's enough info to build the URL that will eventually point to the detail page in the Sentry web app. Then, we could write it to a file in the UI tests, and preserve them as artifacts, so we could click a link in the GItHub Actions UI to get to the event in the Sentry web app.

philipphofmann commented 4 days ago

@armcknight, can you elaborate on why you need the link between Sentry and GH actions? I was talking to @brustolin today, and we both never look at the events in Sentry stemming from CI. For us it's just noise, and we even thought about disabling these events or routing them to a different DSN, so the sentry-cocoa project in sentry-sdks in Sentry only has the manually created events we create while testing the sample app.