feat(logs): Add alpha version of Sentry logs#4126
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #4126 +/- ##
==========================================
+ Coverage 79.52% 79.55% +0.02%
==========================================
Files 140 141 +1
Lines 15636 15711 +75
Branches 2652 2671 +19
==========================================
+ Hits 12435 12499 +64
Misses 2369 2369
- Partials 832 843 +11
|
|
Any reason we are not taking the same route as JS with this? |
the import is from |
antonpirker
left a comment
There was a problem hiding this comment.
This looks ok for a first implementation. I added some unit tests to know how it feels to use this new API.
I have added some TODO comments with topics I think we should discuss.
|
I we want to parse variables from f-strings here is how other libs do this:
|
antonpirker
left a comment
There was a problem hiding this comment.
After adding some tests and adding the configuration options also under the _experimental flag, this is good enough for an alpha version!
Logs are coming to sentry!
This commit:
sentry_sdk._experimental_logger.{trace, debug, info, warn, error, fatal}methods_experimentaloptions forbefore_emit_logandenable_sentry_logsThere are no tests (yet), and this still uses the otel_log schema.
Example usage:
Refs #4149