Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stacktrace): Add source_link on UI for .NET projects #55107

Closed

Conversation

isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Aug 18, 2023

This PR adds .NET's source_link to the UI so users can directly access the file being referenced in a certain issue.

image

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 18, 2023
@isabellaenriquez isabellaenriquez marked this pull request as ready for review August 18, 2023 23:14
@isabellaenriquez isabellaenriquez changed the title Add stack trace link support for .NET projects feat(stacktrace-link): Add stack trace link support for .NET projects Aug 18, 2023
@isabellaenriquez isabellaenriquez linked an issue Aug 18, 2023 that may be closed by this pull request
@isabellaenriquez isabellaenriquez requested a review from a team August 18, 2023 23:18
@isabellaenriquez isabellaenriquez requested review from a team and removed request for a team August 18, 2023 23:21
@isabellaenriquez isabellaenriquez self-assigned this Aug 18, 2023
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

The Sentry SDK reports platform=csharp. This is for historical reasons. Happens that the SDK is written in C#, but .NET as a platform has different languages, and events from apps written in VB, or F#, also use the .NET SDK (and hence platform=csharp but everything works out fine

@bruno-garcia
Copy link
Member

I imagine it's probably better to merge this after hackweek since it's 5 PM PST?

@isabellaenriquez
Copy link
Member Author

Currently pending: #55407

Comment on lines 354 to 360
{frame.sourceLink && (
<React.Fragment>
<IconFile />
<OpenInLink onClick={onOpenLink} href={frame.sourceLink} openInNewTab>
{t('or open in source')}
</OpenInLink>
</React.Fragment>
Copy link
Member Author

Choose a reason for hiding this comment

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

temp example of using sourceLink when stacktrace linking is enabled but no provider integrations linked yet

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want sourceLink to display always if there is no provider integration (ie. don't bother displaying "Tell us where your code is" as long as there is a source link available)? Or should we still give users the option to link source code (not sure if this is actually fully functional for C#)

@isabellaenriquez
Copy link
Member Author

isabellaenriquez commented Aug 31, 2023

image

Option 1

Provide source link for every file that has it, regardless of whether that file has stack trace linking (which is only enabled for in app files in orgs that have the integration)

Clicking on "Open in source" will take the user to the file linked in source_link, ie. raw githubuser content

@isabellaenriquez
Copy link
Member Author

image

Option 2

Only provide source link as an alternative to the stack trace linking when no provider integration is available yet (thus this would only be available for files that are in app and in orgs with the stack trace link integration)

@@ -52,6 +52,7 @@ const supportedStacktracePlatforms: PlatformKey[] = [
'python',
'ruby',
'elixir',
'csharp',
Copy link
Member

Choose a reason for hiding this comment

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

i think this is no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point!

@isabellaenriquez isabellaenriquez changed the title feat(stacktrace-link): Add stack trace link support for .NET projects feat(stacktrace): Add source_link on UI for .NET projects Sep 5, 2023
@isabellaenriquez isabellaenriquez deleted the isabellaenriquez/dotnet-stacktrace-link branch October 10, 2023 20:14
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add stacktrace link for .net
3 participants