-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add sentry integration #3600
Add sentry integration #3600
Conversation
import sentry_sdk | ||
from sentry_sdk.integrations.flask import FlaskIntegration | ||
|
||
sentry_sdk.init( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dakotabenjamin is NetworkEnvironment available as a ENV VAR to the backend?
To set the environment on sentry, we just need to add environment=foo
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the stack naming convention for that, similar to how we do New Relic? https://github.com/hotosm/tasking-manager/blob/feature/sentry-backend-integration/scripts/aws/cloudformation/tasking-manager.template.js#L394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can. Could we change the env var from NEW_RELIC_ENVIRONMENT
to TM_ENVIRONMENT
? So if we stop using NewRelic, we don't need to change the env var and make the variable name more expressive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NEW_RELIC_ENVIRONMENT
is something used internally by New Relic, so we can't change it.
@dakotabenjamin I also added sentry to the frontend and adjusted the backend sample rate |
f3cdad0
to
538c1cd
Compare
@willemarcel I added the environment variable assignment, and made the generic "TM_ENVIRONMENT" envvar. For production it will show up as "tm4-production". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on aws and was able to get the key to work in Sentry, but it says it's being rate limited. I'm not able to trigger any issues manually either. Everthing else seems to be working, so perhaps we merge into staging and test from there?
0aefb31
to
c4fe889
Compare
* add sentry integration * add sentry integration to frontend + adjust backend sample_rate * Add environment envvar for sentry * Add sentry dsn envvars for deployment Co-authored-by: Dakota Benjamin <[email protected]>
* add sentry integration * add sentry integration to frontend + adjust backend sample_rate * Add environment envvar for sentry * Add sentry dsn envvars for deployment Co-authored-by: Dakota Benjamin <[email protected]>
No description provided.