Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Clean up feedback -> Sentry tags #209

Merged
merged 5 commits into from
Jan 2, 2020
Merged

Conversation

katydecorah
Copy link
Contributor

@katydecorah katydecorah commented Dec 17, 2019

This PR:

  • conditionally sets section and preferredLanguage (this will prevent the tag value of undefined if the values are unset)
  • initialize the docs-feedback Sentry project with the environment (production | staging) so that we can keep our project tidy. (We'll be able to filter by environments in Sentry)
  • allow feedbackSentryDsn to accept boolean (false) to disable sending text feedback to Sentry (this is added with Platform team in mind)

🐌

@katydecorah
Copy link
Contributor Author

@colleenmcginnis I'd like to include this in the next release, if you don't mind 👀

@@ -7,6 +7,12 @@ import Icon from '@mapbox/mr-ui/icon';
import * as Sentry from '@sentry/browser';

const anonymousId = uuidv4(); // creates an anonymousId fallback if user is not logged or we cant get their info
const environment =
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what the resulting environment does in line 48, but maybe it's just that I don't understand how Sentry.init() works. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@colleenmcginnis I can see how it's not clear as it's using shorthand on line 48. We're setting the key environment in the Sentry.init object to the value of environment as declared here. Which could also look like this (but when the value and key are the same, you can set the variable without having a key/value pair):

Sentry.init({
  dsn: this.props.feedbackSentryDsn,
  environment: environment
});

Copy link
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

⭐️

Katy DeCorah added 3 commits January 2, 2020 16:50
* master:
  Collapse grayed lines in code block (#206)
  Add a tag component with themes (#216)
  Add new related page component (#213)
  Rework Notes themes (#202)
  Add "tag" option to second and third level headings (#212)
  Update style of BetaFlag (#207)
  Add IE11 compatibility for the `Search` component (#203)
@katydecorah katydecorah merged commit c585d33 into master Jan 2, 2020
@katydecorah katydecorah deleted the feedback-sentry-polish branch January 2, 2020 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants