enable_logs
-
(logs) Don't stop sending auto-collected logs when
enable_logs=Trueby @sentrivana in #7237If you have
enable_logsset toTrue, our logging integrations for the standard library logging module as well as Loguru will auto-collect logs and send them to Sentry as Sentry logs by default, preserving old behavior. Turning automatic collection off for a specific integration can still be achieved using thecapture_sentry_logsintegration option.import sentry_sdk from sentry_sdk.integrations.logging import LoggingIntegration from sentry_sdk.integrations.loguru import LoguruIntegration sentry_sdk.init( enable_logs=True, integrations=[ LoggingIntegration(capture_sentry_logs=True), LoguruIntegration(capture_sentry_logs=False), ], )
Please note that the
enable_logsoption is deprecated and will be removed in the next major release. Thesentry_sdk.logger.XAPI now works regardless of it, and auto-collection can be opted into via thecapture_sentry_logsintegration-level options, which areFalseby default, unless you haveenable_logs=True. We've added this compatibility layer to make the transition to aenable_logs-free world easier.
Bug Fixes 🐛
- (django) Add
failed_request_status_codesby @mgaligniana in #7140 - (anthropic) Gate
gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7207 - (google_genai) Gate streaming
gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7210 - (langchain) Use
gen_ai.tool.definitionsattribute when data collection is enabled by @ericapisani in #7204 - (langgraph,huggingface_hub) Gate
gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7208 - (openai) Gate
gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7205 - (openai_agents) Gate
gen_ai.response.tool_callson outputs, not inputs by @ericapisani in #7209