New Features ✨
-
New integration: Mistral AI (#4733) by @alexander-alderman-webb
Add the Mistral integration to your
sentry_sdk.initcall:
import sentry_sdk
from sentry_sdk.integrations.mistral import MistralIntegration
sentry_sdk.init(
dsn="...",
traces_sample_rate=1.0,
integrations=[
MistralIntegration(),
]
)-
New option: A fine-grained way to configure what data should be sent from the SDK.
Offers much more flexibility than
send_default_pii, allowing you to specify what
data should be collected. Ifdata_collectionis defined, it takes precedence over
send_default_pii.See https://docs.sentry.io/platforms/python/configuration/options/#data_collection
for the available configuration options.
import sentry_sdk
sentry_sdk.init(
data_collection={
"user_info": False,
"gen_ai": {"inputs": False, "outputs": False},
"graphql": {"document": False, "variables": False},
"database_query_data": False,
"queues": False,
"http_bodies": [],
"cookies": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
"http_headers": {
"request": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
},
"url_query_params": {
"mode": "denylist",
"terms": ["forwarded", "-ip", "remote-", "via", "-user"],
},
}
)Mistral
- Record
gen_ai.output.messagesby @alexander-alderman-webb in #7549 - Record
gen_ai.input.messagesby @alexander-alderman-webb in #7548 - Record
gen_ai.system_instructionsby @alexander-alderman-webb in #7547 - Record request parameters by @alexander-alderman-webb in #7531
- Record token usage by @alexander-alderman-webb in #7529
- Add integration with
Chat.completeandChat.complete_asyncpatches by @alexander-alderman-webb in #7528
Internal Changes 🔧
- (data-collection) Promote
data_collectionfrom_experimentso top-level by @ericapisani in #7560 - Close client on teardown by @alexander-alderman-webb in #7562
- 🤖 Update test matrix with new releases (09/21) by @github-actions in #7546
- Remove
getsentry/testing-ai-sdk-integrationsby @alexander-alderman-webb in #7526