Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Sentry 2 min read Release mediumAdept

AWS Lambda tracing with the Python SDK

Sentry Python SDK 3.0 connects distributed traces across synchronous Lambda Invoke calls by carrying sentry-trace and baggage values in the invocation's custom client context. It also links SQS and SNS producers to consumers through message attributes. Both are automatic when boto3 is used with the default Boto3Integration, and non-Python callers can set the values manually using the snippets shown. Bedrock Converse and ConverseStream calls now produce GenAI spans with inputs, outputs and token usage.

Related posts

  • Keeping it Bref: Sentry now supports PHP on AWS Lambda

    Sentry mediumAdept

    The new sentry/sentry-bref integration reports PHP errors on AWS Lambda that the Sentry SDK cannot see from inside PHP-FPM, such as timeouts (Bref kills PHP-FPM 1 second before the Lambda deadline) and responses over the 6 MB limit. It hooks into the long-lived Bref runtime around each invocation, boots the Laravel or Symfony app there to reuse its Sentry client, and handles non-HTTP events. For SQS, EventBridge and S3 events it creates one transaction per invocation with an isolated scope per invocation, records cold-start spans (measured in the runtime and passed via /tmp), traces opted-in AWS SDK clients, and links each event to its CloudWatch logs. Timeout reporting only works with Laravel and Symfony, and the cold-start span excludes the time Lambda spends creating the instance before PHP starts.

  • Five things you can do with Sentry’s Agent Tracing

    Sentry mediumAdept

    Sentry's Agent Tracing captures model calls, tool executions and multi-agent handoffs in a single trace, and Sentry Cookbook recipes build workflows on top of that data. One recipe exports production conversations with `sentry agent-conversation list` (CLI 0.44+), maps them to eval records, upserts them into Braintrust, Langfuse, promptfoo or Arize Phoenix, and scores them with deterministic checks plus an LLM judge reserved for subjective quality. Practical traps it calls out: summing tokens from raw `gen_ai.invoke_agent` spans double-counts, the CLI defaults to only 25 conversations over 7 days, and recorded prompts may contain PII. A second recipe runs a daily Claude scheduled task that uses the Sentry MCP server to triage agent failures and file Linear tickets.

  • Building Sentry's Laravel AI Integration

    Sentry mediumAdept

    Sentry's Laravel AI integration, shipped in sentry-laravel 4.27, adds Agent Tracing to Laravel AI agents with no code changes. Because PHP can't easily wrap or patch functions, it hooks Laravel AI's agent and tool lifecycle events, then derives per-LLM Chat spans from Laravel's HTTP client events. Outgoing request URLs are matched against each active invocation's provider URL prefix, and the most recently started invocation wins when several match. Built during a hackweek with Claude, the work also surfaced AI-generated overly defensive PHP that ignored Laravel's typed event shapes.

  • Inside Laravel Nightwatch’s Observability Pipeline: Real-Time Event Processing with Amazon MSK and ClickHouse Cloud

    ClickHouse easyNovice

    Laravel Nightwatch, Laravel's first-party observability platform, ingests telemetry through API Gateway and Lambda into Amazon MSK Express brokers, then streams it into ClickHouse Cloud via ClickPipes, with materialized views pre-aggregating raw JSON. Transactional data such as accounts and billing stays in RDS PostgreSQL, keeping it separate from analytical workloads. MSK sustained over 1 million events per second in load testing, and the launch handled 500 million events on day one with 97 ms average dashboard latency. Sub-second queries at billions of rows rely on time-series partitioning, ClickHouse codecs and compute separation, though the write-up stays high-level and reads partly as vendor marketing.

  • Tracing Notifications

    Slack Engineering mediumAdept

    Slack models every notification as its own distributed trace, using the notification_id as the trace_id and span links back to the sender's message trace, so notification flows can be sampled at 100% while ordinary backend requests stay at 1%. A shared span spec (trigger, notify, sent, received, opened, read in app) gives backend services and iOS, Android, Desktop and web clients one data format with built-in sessionization and SpanID-based dedup. That design depends on SlackTrace decoupling trace context propagation from request context. The traces feed ElasticSearch/Grafana and the data warehouse, cutting customer-experience triage time for notification tickets by 30% and doubling as the source for product funnel analytics.

The quest for software engineering knowledge.

Look:
Layout: