-
Notifications
You must be signed in to change notification settings - Fork 569
Closed
Description
Add experimental API of the logging functionality to make it possible to see how the API feels and also give the backend folks something that they can use to implement the backend.
Example usage:
def _before_emit_log(record, hint):
if record["severity_text"] in ["fatal", "error"]:
return None
return record
sentry_sdk.init(
dsn=...,
_experiments={
"enable_sentry_logs": True,
"before_emit_log": _before_emit_log,
},
)
from sentry_sdk import _experimental_logger as sentry_logger
sentry_logger.info('Finished sending answer! #chunks={num_chunks}', num_chunks=10)Metadata
Metadata
Assignees
Labels
No labels