-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(logging): Add some basic logs #295
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
69d3cea
add some basic logs
hubertdeng123 cbdf7ca
use debug logger
hubertdeng123 afaef72
fix typo with down mode log
hubertdeng123 1fc7b42
switch to sentry logger
hubertdeng123 5fbf2ae
also switch dependencies logger to use sentry logger
hubertdeng123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| from sentry_sdk import set_user | ||
| from sentry_sdk import start_transaction | ||
| from sentry_sdk.integrations.argv import ArgvIntegration | ||
| from sentry_sdk.integrations.logging import LoggingIntegration | ||
| from sentry_sdk.types import Event | ||
| from sentry_sdk.types import Hint | ||
|
|
||
|
|
@@ -79,7 +80,11 @@ def before_send_transaction(event: Event, hint: Hint) -> Event: | |
| dsn="https://[email protected]/4507946704961536", | ||
| traces_sample_rate=1.0, | ||
| profiles_sample_rate=1.0, | ||
| integrations=[ArgvIntegration()], | ||
| integrations=[ | ||
| ArgvIntegration(), | ||
| LoggingIntegration(sentry_logs_level=logging.DEBUG), | ||
| ], | ||
| enable_logs=True, | ||
| environment=sentry_environment, | ||
| before_send=before_send_error, | ||
| before_send_transaction=before_send_transaction, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,5 @@ | |
| pyyaml==6.0.2 | ||
| packaging==24.0 | ||
| sentry-devenv==1.9.0 | ||
| sentry-sdk==2.27.0 | ||
| sentry-sdk==2.39.0 | ||
| supervisor==4.2.5 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
sentry logs integrates directly with the
logginglibrary:https://docs.sentry.io/platforms/python/logs/
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.
hmmmm, looks like I'll actually need to instrument the sentry sdk since debug logs only appear when the debug flag is passed in
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.
done