diff --git a/docs/platforms/javascript/common/agent-tracing/flue.mdx b/docs/platforms/javascript/common/agent-tracing/flue.mdx deleted file mode 100644 index 7265653b0c474f..00000000000000 --- a/docs/platforms/javascript/common/agent-tracing/flue.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: Flue -sidebar_title: Flue -sidebar_order: 28 -description: "Learn how to send Flue agent traces, logs, and errors to Sentry." -supported: - - javascript.node - - javascript.eve - - javascript.cloudflare ---- - -[Flue](https://flueframework.com/) is an open TypeScript framework for building AI agents, made by the Astro team. Flue ships an official Sentry blueprint that installs the Sentry SDK, wires Flue's OpenTelemetry instrumentation into it, and bridges Flue's runtime events to Sentry. You don't need to add Sentry calls to each agent or tool. - -With a valid `SENTRY_DSN`, Flue can send three connected signals to Sentry: - -- **Traces**: When `SENTRY_TRACES_SAMPLE_RATE` is above `0`, Flue sends its `invoke_agent`, `chat`, and `execute_tool` span hierarchy with token usage, following the OpenTelemetry GenAI semantic conventions. Sentry shows these traces in [trace explorer](/product/trace-explorer/), and builds a wider view for debugging your [agents](/product/agents/). -- **Logs**: With `enableLogs: true` in the generated Sentry SDK configuration, every `log.info`, `log.warn`, and `log.error` call from your tools and hooks appears as Sentry Logs. When tracing is enabled, Sentry correlates these logs with the trace. -- **Issues**: The generated bridge captures terminal failures, such as a failed prompt, skill, task, or shell operation, as Sentry error issues. Recovered tool errors remain diagnostic context on the trace when tracing is enabled and don't create issues. - - - - - -The blueprint installs `@sentry/node` for the Node.js target and `@sentry/cloudflare` for the Cloudflare target. Read the [Cloudflare version](/platforms/javascript/guides/cloudflare/agent-tracing/flue/) of this page if you deploy Flue agents to Cloudflare. - - - - - -## Installation - -From your project root, ask your coding agent to run the Sentry blueprint. The agent follows the blueprint to create a `sentry.ts` module next to `app.ts`, import it once, and install `@flue/opentelemetry` together with the Sentry SDK for your target: - -```bash -flue add tooling sentry -``` - -If you start from a regular terminal, pipe the blueprint to your coding agent's CLI, replacing `` with its command: - -```bash -flue add tooling sentry --print | -``` - -## Configuration - -The generated module reads its configuration from environment variables. Only `SENTRY_DSN` is required. - -| Variable | Default | Purpose | -| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | -| `SENTRY_DSN` | | Your project's [DSN](/concepts/key-terms/dsn-explainer/). Without it, all Sentry calls are no-ops. | -| `SENTRY_ENVIRONMENT` | | The deployment environment, such as `production` or `staging`. | -| `SENTRY_RELEASE` | | The release identifier, such as a commit SHA. | -| `SENTRY_TRACES_SAMPLE_RATE` | `0` | A value from `0` to `1`. At `0`, Flue sends errors and logs only. Above `0`, Flue also sends AI traces. | -| `SENTRY_AI_RECORD_INPUTS` | `false` | Set to `true` to include prompts, system instructions, and tool definitions and arguments in spans. | -| `SENTRY_AI_RECORD_OUTPUTS` | `false` | Set to `true` to include model output, tool results, and exception messages and stacks in spans. | - - - -```bash {filename:.env} -SENTRY_DSN="___PUBLIC_DSN___" -SENTRY_TRACES_SAMPLE_RATE=1 -``` - - - - - -Set the DSN as a Worker secret and the remaining values as variables in `wrangler.jsonc`: - -```bash -wrangler secret put SENTRY_DSN -``` - -```json {filename:wrangler.jsonc} -{ - "vars": { - "SENTRY_TRACES_SAMPLE_RATE": "1", - "SENTRY_ENVIRONMENT": "production" - } -} -``` - - - -Set `SENTRY_TRACES_SAMPLE_RATE=1` while you verify the setup. Lower it afterwards if your agent runs at high volume. - -### Record Prompts and Responses - -By default, spans carry timing, token usage, model identifiers, and correlation IDs, but no message or tool content. Set `SENTRY_AI_RECORD_INPUTS` and `SENTRY_AI_RECORD_OUTPUTS` to `true` so the Agent Tracing transcript includes the full conversation, tool arguments, and tool results. The blueprint scrubs keys such as `token`, `secret`, and `password` and truncates each attribute to 16 KiB. - -Review the data your agent handles before you enable these options in production. - -## How It Works - - - -On Node.js, the generated `sentry.ts` calls `Sentry.init` at module scope. Sentry becomes the global OpenTelemetry tracer provider, so the spans from `@flue/opentelemetry` flow to Sentry without extra wiring. The following abridged example shows the core of the generated file. It omits helper definitions and the terminal-failure capture implementation, so use the file generated by the blueprint rather than copying this example: - -```typescript {filename:src/sentry.ts} -import { createOpenTelemetryInstrumentation } from "@flue/opentelemetry"; -import { instrument } from "@flue/runtime"; -import * as Sentry from "@sentry/node"; - -// `clampRate` keeps the value between 0 and 1 and falls back to 0. -const tracesSampleRate = clampRate(process.env.SENTRY_TRACES_SAMPLE_RATE, 0); - -Sentry.init({ - dsn: process.env.SENTRY_DSN, - enabled: Boolean(process.env.SENTRY_DSN), - tracesSampleRate, - traceLifecycle: "stream", - enableLogs: true, - // Flue already emits one `chat` span per model call, so Sentry's - // AI provider integrations are removed to avoid double counting. - integrations: (defaults) => - defaults.filter((i) => !SENTRY_AI_PROVIDER_INTEGRATIONS.has(i.name)), -}); - -if (tracesSampleRate > 0) { - instrument(createOpenTelemetryInstrumentation({ content: contentPolicy() })); -} - -instrument({ - key: Symbol.for("flue.sentry.bridge"), - observe(event) { - if (event.type === "operation" && event.isError) { - // Terminal failures become issues. - } - if (event.type === "log") { - Sentry.logger[event.level](event.message, logAttributes(event)); - } - }, - interceptor: (_operation, _ctx, next) => next(), - async dispose() { - await Sentry.flush(2000); - }, -}); -``` - -Because `Sentry.init` runs after the application starts importing modules, the blueprint does not enable Sentry's HTTP or database auto-instrumentation. If you need those, add the preload setup before your application imports and verify it against the built Flue server. - - - - - -On Cloudflare, each agent conversation runs in its own Durable Object isolate, so the generated `sentry.ts` does not call `Sentry.init`. Instead, it exports a `cloudflare` extension that wraps every generated agent Durable Object with `instrumentDurableObjectWithSentry`. The wrapper initializes the SDK once per isolate from the Worker's bindings. This abridged example omits helper definitions, so use the file generated by the blueprint rather than copying it: - -```typescript {filename:src/sentry.ts} -import { createOpenTelemetryInstrumentation } from "@flue/opentelemetry"; -import { instrument } from "@flue/runtime"; -import { extend } from "@flue/runtime/cloudflare"; -import * as Sentry from "@sentry/cloudflare"; - -// The per-isolate `env` bindings exist only inside the wrapper below, so the -// module-scope `instrument` gate reads `process.env` instead. -const tracesSampleRate = clampRate(process.env.SENTRY_TRACES_SAMPLE_RATE, 0); - -export const cloudflare = extend({ - wrap: (Final) => - Sentry.instrumentDurableObjectWithSentry( - (env: Env) => ({ - dsn: env.SENTRY_DSN, - enabled: Boolean(env.SENTRY_DSN), - environment: env.SENTRY_ENVIRONMENT, - release: env.SENTRY_RELEASE, - tracesSampleRate: clampRate(env.SENTRY_TRACES_SAMPLE_RATE, 0), - traceLifecycle: "stream", - enableLogs: true, - integrations: (defaults) => - defaults.filter((i) => !SENTRY_AI_PROVIDER_INTEGRATIONS.has(i.name)), - }), - Final - ), -}); - -if (tracesSampleRate > 0) { - instrument(createOpenTelemetryInstrumentation({ content: contentPolicy() })); -} -``` - -Each agent module re-exports the extension so the build applies it: - -```typescript {filename:src/agents/support.ts} -export { cloudflare } from "../sentry.ts"; -``` - -The wrapper covers the agent Durable Objects only. It does not instrument the outer Worker or an authored Hono application. Wrap the Worker with [`withSentry`](/platforms/javascript/guides/cloudflare/) if you also need request instrumentation. Don't use `@sentry/node` on Cloudflare. - -The SDK sends traces and issues during the run and flushes logs on a best-effort basis through the platform's event lifecycle. An isolate shutdown can cut off very recently buffered logs. - - - -### Correlation Tags - -Issues, logs, and spans share the `flue.instance.id`, `flue.agent.name`, and `flue.submission.id` attributes. The conversation identifier is `flue.conversation.id` on issues and logs and `gen_ai.conversation.id` on spans. Search for a shared `flue.*` value in Sentry to find every signal from a single agent instance. Filter by `gen_ai.agent.name` to compare token use and latency across a lead agent and its subagents. - -## Verify - -Set `SENTRY_TRACES_SAMPLE_RATE=1` against a non-production project, then: - -1. Prompt a tool-using agent. Open [Agent Tracing](/product/agents/) and confirm one trace with `invoke_agent`, `chat`, and `execute_tool` spans and token usage on the `chat` span. -2. Call `log.info` from a tool. Confirm the line appears in Logs on the same trace. -3. Trigger one terminal failure. Confirm exactly one issue with the original error and stack trace. -4. Confirm that the application still starts without a configured DSN. - - - -Also confirm that a wrapped agent delivers spans, logs, and issues from `workerd`, for example by running `wrangler dev`. - - - -## Troubleshooting - -- **Logs and issues arrive but no traces.** `SENTRY_TRACES_SAMPLE_RATE` defaults to `0`. Set it above `0`. -- **Token and cost values are doubled.** Don't add a second AI tracing integration such as the Vercel AI integration or Anthropic integration. The blueprint removes them on purpose because Flue already emits the model spans. -- **A tool error did not create an issue.** Only terminal operation and submission failures create issues. A recovered tool error stays on the trace as diagnostic context. - -## Supported Versions - -- `@sentry/node` or `@sentry/cloudflare`: `>=10.64.0` -- `@flue/opentelemetry`: the version that matches your Flue project - -## Next Steps - -- [Instrument Flue agents with Sentry](https://sentry.io/cookbook/instrument-flue-agents-with-sentry/): a step-by-step cookbook with screenshots of the result in Sentry. -- [Monitor AI agent spend with dashboards and alerts](https://sentry.io/cookbook/monitor-ai-agent-spend-with-dashboards-and-alerts/): build a dashboard for cost, tokens, models, and conversations. -- [Flue's Sentry tooling page](https://flueframework.com/docs/ecosystem/tooling/sentry/) and [observability guide](https://flueframework.com/docs/guide/observability/): the same setup from the Flue side, and the event model behind it. diff --git a/docs/platforms/javascript/common/agent-tracing/index.mdx b/docs/platforms/javascript/common/agent-tracing/index.mdx index 4ffecb4aadda06..05648e17efbeff 100644 --- a/docs/platforms/javascript/common/agent-tracing/index.mdx +++ b/docs/platforms/javascript/common/agent-tracing/index.mdx @@ -118,6 +118,7 @@ As of SDK version `11.0.0`, Sentry auto-instruments the most popular AI SDKs and }, { to: "/agent-tracing/flue/", + href: "/platforms/javascript/guides/flue/", title: "Flue", icon: "flue", supported: ["javascript.node", "javascript.cloudflare"], diff --git a/docs/platforms/javascript/common/best-practices/index.mdx b/docs/platforms/javascript/common/best-practices/index.mdx index 53e4910a8c3046..2146d985b59a34 100644 --- a/docs/platforms/javascript/common/best-practices/index.mdx +++ b/docs/platforms/javascript/common/best-practices/index.mdx @@ -6,6 +6,7 @@ sidebar_section: configuration notSupported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/best-practices/micro-frontends.mdx b/docs/platforms/javascript/common/best-practices/micro-frontends.mdx index d288edd44641d9..17499824fa1009 100644 --- a/docs/platforms/javascript/common/best-practices/micro-frontends.mdx +++ b/docs/platforms/javascript/common/best-practices/micro-frontends.mdx @@ -5,6 +5,7 @@ description: Learn how to identify the source of errors and route events to diff notSupported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/best-practices/multiple-sentry-instances.mdx b/docs/platforms/javascript/common/best-practices/multiple-sentry-instances.mdx index 4cde6099865e7d..423aa595983eb6 100644 --- a/docs/platforms/javascript/common/best-practices/multiple-sentry-instances.mdx +++ b/docs/platforms/javascript/common/best-practices/multiple-sentry-instances.mdx @@ -5,6 +5,7 @@ description: Learn how to manage several Sentry instances by creating your own c notSupported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/best-practices/offline-caching.mdx b/docs/platforms/javascript/common/best-practices/offline-caching.mdx index e27799bb0edbb4..1f060319adf527 100644 --- a/docs/platforms/javascript/common/best-practices/offline-caching.mdx +++ b/docs/platforms/javascript/common/best-practices/offline-caching.mdx @@ -9,6 +9,7 @@ notSupported: - javascript.wasm - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/best-practices/shared-environments.mdx b/docs/platforms/javascript/common/best-practices/shared-environments.mdx index bb10d6d4fa03ba..d88b26a307d073 100644 --- a/docs/platforms/javascript/common/best-practices/shared-environments.mdx +++ b/docs/platforms/javascript/common/best-practices/shared-environments.mdx @@ -5,6 +5,7 @@ description: Learn how to use Sentry in shared environments (for example in brow notSupported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/async-context.mdx b/docs/platforms/javascript/common/configuration/async-context.mdx index 6ac68d46b8cebf..d1a7f41b38eeef 100644 --- a/docs/platforms/javascript/common/configuration/async-context.mdx +++ b/docs/platforms/javascript/common/configuration/async-context.mdx @@ -5,6 +5,7 @@ description: "Learn more about how to isolate Sentry scope and breadcrumbs acros supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/event-loop-block.mdx b/docs/platforms/javascript/common/configuration/event-loop-block.mdx index c5f7cd0440179d..5b4520c709bb3d 100644 --- a/docs/platforms/javascript/common/configuration/event-loop-block.mdx +++ b/docs/platforms/javascript/common/configuration/event-loop-block.mdx @@ -5,6 +5,7 @@ description: Monitor for blocked event loops in Node.js applications supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/amqplib.mdx b/docs/platforms/javascript/common/configuration/integrations/amqplib.mdx index dc74de0e324dd6..773a4cae20ba01 100644 --- a/docs/platforms/javascript/common/configuration/integrations/amqplib.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/amqplib.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Amqplib. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.astro - javascript.aws-lambda diff --git a/docs/platforms/javascript/common/configuration/integrations/anr.mdx b/docs/platforms/javascript/common/configuration/integrations/anr.mdx index 4805aaa9504dd0..304277454cb215 100644 --- a/docs/platforms/javascript/common/configuration/integrations/anr.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/anr.mdx @@ -4,6 +4,7 @@ description: "Capture events when the event loop is blocked and the application supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/childProcess.mdx b/docs/platforms/javascript/common/configuration/integrations/childProcess.mdx index fc9695bd3fe1c8..c3b8981f71912c 100644 --- a/docs/platforms/javascript/common/configuration/integrations/childProcess.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/childProcess.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for child processes and worker threads (defau supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/dataloader.mdx b/docs/platforms/javascript/common/configuration/integrations/dataloader.mdx index 4b94250dfb48b7..2cc4d95f566fa9 100644 --- a/docs/platforms/javascript/common/configuration/integrations/dataloader.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/dataloader.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Dataloader." supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/event-loop-block.mdx b/docs/platforms/javascript/common/configuration/integrations/event-loop-block.mdx index e048b45bca42cf..69feaeb25bf779 100644 --- a/docs/platforms/javascript/common/configuration/integrations/event-loop-block.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/event-loop-block.mdx @@ -4,6 +4,7 @@ description: "Monitor for blocked event loops in all threads of a Node.js applic supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/fastify.mdx b/docs/platforms/javascript/common/configuration/integrations/fastify.mdx index 41f997c5793943..7c72fa7a2a031b 100644 --- a/docs/platforms/javascript/common/configuration/integrations/fastify.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/fastify.mdx @@ -4,6 +4,7 @@ description: "Adds performance instrumentation for Fastify. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.fastify --- diff --git a/docs/platforms/javascript/common/configuration/integrations/firebase.mdx b/docs/platforms/javascript/common/configuration/integrations/firebase.mdx index 6e381f067960cf..8e2ca3518b892b 100644 --- a/docs/platforms/javascript/common/configuration/integrations/firebase.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/firebase.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Firebase. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.firebase - javascript.gcp-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/fs.mdx b/docs/platforms/javascript/common/configuration/integrations/fs.mdx index 14f143e58904cb..0e685aef010ed7 100644 --- a/docs/platforms/javascript/common/configuration/integrations/fs.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/fs.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for filesystem operations." supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/genericpool.mdx b/docs/platforms/javascript/common/configuration/integrations/genericpool.mdx index f44627c0438e90..584e131259cc5c 100644 --- a/docs/platforms/javascript/common/configuration/integrations/genericpool.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/genericpool.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Generic Pool. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx index 8c4bb846575c06..5a775ea30bf509 100644 --- a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for GraphQL. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/hapi.mdx b/docs/platforms/javascript/common/configuration/integrations/hapi.mdx index f2718375fbe476..b8b947c4cad1be 100644 --- a/docs/platforms/javascript/common/configuration/integrations/hapi.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/hapi.mdx @@ -4,6 +4,7 @@ description: "Adds performance instrumentation for Hapi. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.hapi --- diff --git a/docs/platforms/javascript/common/configuration/integrations/http.mdx b/docs/platforms/javascript/common/configuration/integrations/http.mdx index 5c6fde57a89570..33e6aee8691bd2 100644 --- a/docs/platforms/javascript/common/configuration/integrations/http.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/http.mdx @@ -4,6 +4,7 @@ description: "Capture spans & breadcrumbs for http requests. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/kafka.mdx b/docs/platforms/javascript/common/configuration/integrations/kafka.mdx index 590184741ae4e9..2d5c38de76b6a5 100644 --- a/docs/platforms/javascript/common/configuration/integrations/kafka.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/kafka.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for KafkaJS. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/knex.mdx b/docs/platforms/javascript/common/configuration/integrations/knex.mdx index 2febe5759e235a..78e9499aaf8221 100644 --- a/docs/platforms/javascript/common/configuration/integrations/knex.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/knex.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Knex." supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/koa.mdx b/docs/platforms/javascript/common/configuration/integrations/koa.mdx index 3c0b8788c33bd7..d7c0a84afb6b85 100644 --- a/docs/platforms/javascript/common/configuration/integrations/koa.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/koa.mdx @@ -4,6 +4,7 @@ description: "Adds performance instrumentation for Koa. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.koa --- diff --git a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx index 99c27546e3af7f..b0711352aa74f6 100644 --- a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx @@ -4,6 +4,7 @@ description: "Add local variables to exception frames. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/lrumemoizer.mdx b/docs/platforms/javascript/common/configuration/integrations/lrumemoizer.mdx index a801949e4b7a44..3541eded45ac8b 100644 --- a/docs/platforms/javascript/common/configuration/integrations/lrumemoizer.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/lrumemoizer.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for LRU Memoizer. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.astro - javascript.aws-lambda diff --git a/docs/platforms/javascript/common/configuration/integrations/mongo.mdx b/docs/platforms/javascript/common/configuration/integrations/mongo.mdx index a1bc795ce82e4f..1917f1dc36d928 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mongo.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mongo.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for MongoDB. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/mongoose.mdx b/docs/platforms/javascript/common/configuration/integrations/mongoose.mdx index dead732266b41b..5d50078df58a27 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mongoose.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mongoose.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Mongoose. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/mysql.mdx b/docs/platforms/javascript/common/configuration/integrations/mysql.mdx index 0bc57a91339a4a..9a42d25172ab74 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mysql.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mysql.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for MySQL. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx b/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx index 53423805a9ca49..f16a11a5870b4c 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for MySQL2. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/nest.mdx b/docs/platforms/javascript/common/configuration/integrations/nest.mdx index b9108b6a2e2db8..1af22a579c87e3 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nest.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nest.mdx @@ -4,6 +4,7 @@ description: "Adds performance instrumentation for Nest.js. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.nestjs --- diff --git a/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx b/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx index 8493b9219093b9..a2971eb8b89026 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx @@ -4,6 +4,7 @@ description: "Capture context about the environment and the device that the clie supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx b/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx index 4044765c25c7e7..690aee392eea5d 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx @@ -5,6 +5,7 @@ customCanonicalTag: "/platforms/javascript/guides/nuxt/configuration/integration supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx b/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx index 7d96d68d36db42..830168fbe52eac 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx @@ -4,6 +4,7 @@ description: "Capture profiling data for Node.js applications." supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/noderuntimemetrics.mdx b/docs/platforms/javascript/common/configuration/integrations/noderuntimemetrics.mdx index e0a2edd1a253a0..f9a8117882a634 100644 --- a/docs/platforms/javascript/common/configuration/integrations/noderuntimemetrics.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/noderuntimemetrics.mdx @@ -4,6 +4,7 @@ description: "Collect Node.js runtime health metrics such as memory usage, CPU u supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/pino.mdx b/docs/platforms/javascript/common/configuration/integrations/pino.mdx index d5c02ef49140d7..b0838c6f7a0b8a 100644 --- a/docs/platforms/javascript/common/configuration/integrations/pino.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/pino.mdx @@ -4,6 +4,7 @@ description: "Capture logs and errors from Pino." supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.astro - javascript.aws-lambda diff --git a/docs/platforms/javascript/common/configuration/integrations/postgres.mdx b/docs/platforms/javascript/common/configuration/integrations/postgres.mdx index b6cef3a7e7a74d..e971cbb9cb80b4 100644 --- a/docs/platforms/javascript/common/configuration/integrations/postgres.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/postgres.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Postgres. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/prisma.mdx b/docs/platforms/javascript/common/configuration/integrations/prisma.mdx index e7d6d411d11c02..630778003ec994 100644 --- a/docs/platforms/javascript/common/configuration/integrations/prisma.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/prisma.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Prisma. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/prisma__v8.x.mdx b/docs/platforms/javascript/common/configuration/integrations/prisma__v8.x.mdx index 118be82e733c1a..e0ec7bafc0a99f 100644 --- a/docs/platforms/javascript/common/configuration/integrations/prisma__v8.x.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/prisma__v8.x.mdx @@ -5,6 +5,7 @@ noindex: true # Not indexed because it is a versioned docs page supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/redis.mdx b/docs/platforms/javascript/common/configuration/integrations/redis.mdx index b888ac29848918..b6b853dbf7ef5f 100644 --- a/docs/platforms/javascript/common/configuration/integrations/redis.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/redis.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Redis. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/configuration/integrations/tedious.mdx b/docs/platforms/javascript/common/configuration/integrations/tedious.mdx index d755e4380b25b0..7c532808dcd867 100644 --- a/docs/platforms/javascript/common/configuration/integrations/tedious.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/tedious.mdx @@ -4,6 +4,7 @@ description: "Adds instrumentation for Tedious. (default)" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.astro - javascript.aws-lambda diff --git a/docs/platforms/javascript/common/configuration/transports.mdx b/docs/platforms/javascript/common/configuration/transports.mdx index be8c17b03ceb61..73ea78d047300d 100644 --- a/docs/platforms/javascript/common/configuration/transports.mdx +++ b/docs/platforms/javascript/common/configuration/transports.mdx @@ -9,6 +9,7 @@ notSupported: - javascript.wasm - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/crons/index.mdx b/docs/platforms/javascript/common/crons/index.mdx index 881a07f4bb173d..24bba3e30d8cd4 100644 --- a/docs/platforms/javascript/common/crons/index.mdx +++ b/docs/platforms/javascript/common/crons/index.mdx @@ -14,6 +14,7 @@ supported: - javascript.deno - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/crons/troubleshooting.mdx b/docs/platforms/javascript/common/crons/troubleshooting.mdx index bfed46e4d41083..2a4b12b9dc4f1f 100644 --- a/docs/platforms/javascript/common/crons/troubleshooting.mdx +++ b/docs/platforms/javascript/common/crons/troubleshooting.mdx @@ -13,6 +13,7 @@ supported: - javascript.deno - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/data-management/data-collected/index.mdx b/docs/platforms/javascript/common/data-management/data-collected/index.mdx index 280657b5c519c1..994a9fb318b7cc 100644 --- a/docs/platforms/javascript/common/data-management/data-collected/index.mdx +++ b/docs/platforms/javascript/common/data-management/data-collected/index.mdx @@ -150,7 +150,7 @@ By default, the Sentry SDK sends information about the device and runtime to Sen - + ## Session Replay diff --git a/docs/platforms/javascript/common/enriching-events/request-isolation/index.mdx b/docs/platforms/javascript/common/enriching-events/request-isolation/index.mdx index b0502148775f2c..d91185aeb14f0b 100644 --- a/docs/platforms/javascript/common/enriching-events/request-isolation/index.mdx +++ b/docs/platforms/javascript/common/enriching-events/request-isolation/index.mdx @@ -5,6 +5,7 @@ supported: - javascript.nextjs - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.express - javascript.fastify diff --git a/docs/platforms/javascript/common/feature-flags/index.mdx b/docs/platforms/javascript/common/feature-flags/index.mdx index b1675d674b2653..382ef6708bd978 100644 --- a/docs/platforms/javascript/common/feature-flags/index.mdx +++ b/docs/platforms/javascript/common/feature-flags/index.mdx @@ -6,6 +6,7 @@ sidebar_section: features description: "With Feature Flags, Sentry tracks feature flag evaluations in your application using the Sentry JavaScript SDK, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error." notSupported: - javascript.eve + - javascript.flue - javascript.mastra --- diff --git a/docs/platforms/javascript/common/install/index.mdx b/docs/platforms/javascript/common/install/index.mdx index 464c2e71387d88..473c880e146e82 100644 --- a/docs/platforms/javascript/common/install/index.mdx +++ b/docs/platforms/javascript/common/install/index.mdx @@ -4,6 +4,7 @@ sidebar_order: 1 description: "Review our alternate installation methods." notSupported: - javascript.eve + - javascript.flue - javascript.mastra - javascript.nitro - javascript.nestjs diff --git a/docs/platforms/javascript/common/install/loader.mdx b/docs/platforms/javascript/common/install/loader.mdx index d22a7d614567e3..bdf761f1557773 100644 --- a/docs/platforms/javascript/common/install/loader.mdx +++ b/docs/platforms/javascript/common/install/loader.mdx @@ -24,6 +24,7 @@ notSupported: - javascript.sveltekit - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/install/npm.mdx b/docs/platforms/javascript/common/install/npm.mdx index 6005ae6afc6be8..8e034c8efd434f 100644 --- a/docs/platforms/javascript/common/install/npm.mdx +++ b/docs/platforms/javascript/common/install/npm.mdx @@ -25,6 +25,7 @@ notSupported: - javascript.sveltekit - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/logs/index.mdx b/docs/platforms/javascript/common/logs/index.mdx index e73d8e8531cbad..b87b214a4f7aa5 100644 --- a/docs/platforms/javascript/common/logs/index.mdx +++ b/docs/platforms/javascript/common/logs/index.mdx @@ -209,7 +209,7 @@ Sentry.init({ Everything in Sentry is linked by trace. When you're viewing a log, you can jump to the parent trace to see the full request context. When you're viewing a trace, you can see all logs emitted during that operation. This connection makes it easy to move between high-level performance data and detailed diagnostic logs. - **[Traces](/product/trace-explorer/)** — Logs emitted during an active span automatically include `sentry.trace.parent_span_id`. Click through from any log to see the full trace, or filter logs by trace ID to see everything that happened during a specific request. -- **[Session Replay](/product/session-replay/)** — Logs include `sentry.replay_id` when a replay is active. Jump from a log entry directly to the replay to see what the user was doing when the log was emitted. +- **[Session Replay](/product/session-replay/)** — Logs include `sentry.replay_id` when a replay is active. Jump from a log entry directly to the replay to see what the user was doing when the log was emitted. - **[Errors](/product/issues/)** — Logs capture the journey leading up to a failure. When an error occurs, your logs show what data was processed, which code paths executed, and what state the system was in — context that stack traces alone can't provide. ## Best Practices @@ -228,6 +228,6 @@ Any attributes set via `Sentry.setAttribute()` / `Sentry.setAttributes()` (or di ## Related Features - Tracing — Logs are automatically linked to traces, so you can see logs in the context of the request or operation that produced them. -- Session Replay — Logs are automatically linked to replays, letting you jump from a log entry to see what the user was doing. +- Session Replay — Logs are automatically linked to replays, letting you jump from a log entry to see what the user was doing. - Error Monitoring — Use logs to add diagnostic context that helps you understand what led to an error. - Attributes — Set attributes once and have them automatically included on all your logs. diff --git a/docs/platforms/javascript/common/metrics/index.mdx b/docs/platforms/javascript/common/metrics/index.mdx index bbbadb470aeb45..0ddc271a2964a5 100644 --- a/docs/platforms/javascript/common/metrics/index.mdx +++ b/docs/platforms/javascript/common/metrics/index.mdx @@ -34,7 +34,7 @@ With [Sentry's Application Metrics](/product/metrics/), you can send counters, g ## Integrations - + - `elementTimingIntegration` diff --git a/docs/platforms/javascript/common/migration/v7-to-v8/v8-opentelemetry.mdx b/docs/platforms/javascript/common/migration/v7-to-v8/v8-opentelemetry.mdx index 2f5fad72272a71..eadc108e734239 100644 --- a/docs/platforms/javascript/common/migration/v7-to-v8/v8-opentelemetry.mdx +++ b/docs/platforms/javascript/common/migration/v7-to-v8/v8-opentelemetry.mdx @@ -6,6 +6,7 @@ description: "Learn OpenTelemetry support in SDK 8.x" supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx b/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx index 3e104a021c1635..fc754cb5724871 100644 --- a/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx +++ b/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx @@ -6,6 +6,7 @@ supported: - javascript.nextjs - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/opentelemetry/index.mdx b/docs/platforms/javascript/common/opentelemetry/index.mdx index 71ffbb03384e91..ebda4b2376e235 100644 --- a/docs/platforms/javascript/common/opentelemetry/index.mdx +++ b/docs/platforms/javascript/common/opentelemetry/index.mdx @@ -7,6 +7,7 @@ supported: - javascript.nextjs - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx b/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx index cda9fd03bf032f..5135181735bc83 100644 --- a/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx +++ b/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx @@ -6,6 +6,7 @@ supported: - javascript.nextjs - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/sourcemaps/uploading/hosting-publicly.mdx b/docs/platforms/javascript/common/sourcemaps/uploading/hosting-publicly.mdx index 3a601b12587def..afe798ad3fc6e8 100644 --- a/docs/platforms/javascript/common/sourcemaps/uploading/hosting-publicly.mdx +++ b/docs/platforms/javascript/common/sourcemaps/uploading/hosting-publicly.mdx @@ -5,6 +5,7 @@ sidebar_order: 10 notSupported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/tracing/distributed-tracing/dealing-with-cors-issues/index.mdx b/docs/platforms/javascript/common/tracing/distributed-tracing/dealing-with-cors-issues/index.mdx index c73be7a8d20632..bb03cb1dbbe5fb 100644 --- a/docs/platforms/javascript/common/tracing/distributed-tracing/dealing-with-cors-issues/index.mdx +++ b/docs/platforms/javascript/common/tracing/distributed-tracing/dealing-with-cors-issues/index.mdx @@ -5,6 +5,7 @@ notSupported: - javascript.cordova - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index 4e9a5908067a12..7b28806dd5fd3c 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -95,7 +95,7 @@ You can also manually start spans to instrument specific parts of your code. Thi - Sending Span Metrics: Learn how to capture metrics on your spans - + ## Replay Linking @@ -133,7 +133,7 @@ Instead, neither `tracesSampleRate` nor `tracesSampler` should be defined in you ## Related Features -- Session Replay — Traces appear in the Replay timeline, showing performance data alongside the user's actions. +- Session Replay — Traces appear in the Replay timeline, showing performance data alongside the user's actions. - Logs — Logs emitted during a trace are automatically linked, giving you diagnostic context for each operation. ## Tracing Next Steps diff --git a/docs/platforms/javascript/common/tracing/instrumentation/caches-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/caches-module.mdx index 562350449bb053..f052137143abbb 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/caches-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/caches-module.mdx @@ -5,6 +5,7 @@ description: "Learn how to manually instrument your code to use Sentry's Cache m supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions @@ -51,7 +52,7 @@ If you're using anything other than Sentry's Redis integration, you'll need to m You'll need to create two spans - one indicating that something is being put into the cache, and a second one indicating that something is being fetched from the cache. - + Make sure that there's an active span before you create your cache spans. If you're using a web framework like Express, a span will be created for you automatically. See Tracing for more information. diff --git a/docs/platforms/javascript/common/tracing/instrumentation/queues-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/queues-module.mdx index 38e0c447b9e83e..0a7d7412396d76 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/queues-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/queues-module.mdx @@ -5,6 +5,7 @@ sidebar_order: 20 supported: - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/troubleshooting/supported-browsers.mdx b/docs/platforms/javascript/common/troubleshooting/supported-browsers.mdx index 9e11f1868b6f43..17f2cab7ab5bb2 100644 --- a/docs/platforms/javascript/common/troubleshooting/supported-browsers.mdx +++ b/docs/platforms/javascript/common/troubleshooting/supported-browsers.mdx @@ -6,6 +6,7 @@ notSupported: - javascript.cordova - javascript.node - javascript.eve + - javascript.flue - javascript.mastra - javascript.aws-lambda - javascript.azure-functions diff --git a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx index 6accb538b77bbd..17c1d80e8acee6 100644 --- a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx @@ -5,10 +5,11 @@ description: Learn about general User Feedback configuration fields. og_image: /og-images/platforms-javascript-common-user-feedback-configuration.png notSupported: - javascript.eve + - javascript.flue - javascript.mastra --- - + ## User Feedback Widget diff --git a/docs/platforms/javascript/common/user-feedback/configuration/index__v7.x.mdx b/docs/platforms/javascript/common/user-feedback/configuration/index__v7.x.mdx index 9d0f276ef2091e..94b579bd60acf9 100644 --- a/docs/platforms/javascript/common/user-feedback/configuration/index__v7.x.mdx +++ b/docs/platforms/javascript/common/user-feedback/configuration/index__v7.x.mdx @@ -8,6 +8,7 @@ og_image: >- /og-images/platforms-javascript-common-user-feedback-configuration-index__v7.x.png notSupported: - javascript.eve + - javascript.flue - javascript.mastra --- @@ -17,7 +18,7 @@ In version 7 of our JavaScript SDK, User Feedback was released as a Beta integra - + ## User Feedback Widget diff --git a/docs/platforms/javascript/common/user-feedback/index.mdx b/docs/platforms/javascript/common/user-feedback/index.mdx index d3923369258d48..5e47826327a7a9 100644 --- a/docs/platforms/javascript/common/user-feedback/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/index.mdx @@ -7,6 +7,7 @@ sidebar_section: features og_image: /og-images/platforms-javascript-common-user-feedback.png notSupported: - javascript.eve + - javascript.flue - javascript.mastra --- @@ -18,7 +19,7 @@ The User Feedback feature allows you to collect user feedback from anywhere insi feature. Lower versions may have limited functionality. - + ## User Feedback Widget diff --git a/docs/platforms/javascript/guides/flue/cloudflare.mdx b/docs/platforms/javascript/guides/flue/cloudflare.mdx new file mode 100644 index 00000000000000..dea6cecf8b1727 --- /dev/null +++ b/docs/platforms/javascript/guides/flue/cloudflare.mdx @@ -0,0 +1,150 @@ +--- +title: Cloudflare Quick Start +sidebar_order: 0.5 +description: Learn how to send Flue agent traces, model calls, tool executions, and errors to Sentry from Cloudflare Workers. +--- + +[Flue](https://flueframework.com/) is an open TypeScript framework for building AI agents, made by the Astro team. This guide sets up the Sentry SDK in a Flue app running on Cloudflare Workers so agent turns, model calls, tool executions, and errors flow into [Sentry Agent Tracing](/product/agents/). + + + +Running Flue on Node.js? Follow the [Flue Quick Start](../) instead. + +## Prerequisites + +Before you begin, you need: + +- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/). The project's DSN tells the SDK where to send data. +- A Flue application using `@flue/runtime` version `2.0.0` or later, targeting Cloudflare. +- `@sentry/cloudflare` version `11.0.0-rc.1` or later. + + + +## Install + +Choose the features you want to configure, and this guide will show you how: + + + +Install the Sentry Cloudflare SDK: + +```bash {tabTitle:npm} +npm install @sentry/cloudflare@^11.0.0-rc.1 +``` + +```bash {tabTitle:yarn} +yarn add @sentry/cloudflare@^11.0.0-rc.1 +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/cloudflare@^11.0.0-rc.1 +``` + +## Configure + +Add the Sentry Vite plugin to your Vite config, after Flue's: + +```typescript {filename:vite.config.mts} +import { cloudflare } from "@cloudflare/vite-plugin"; +import { flue, flueWorkerConfig } from "@flue/vite"; +import { sentryCloudflareVitePlugin } from "@sentry/cloudflare/vite"; +import { defineConfig } from "vite"; + +export default defineConfig({ + plugins: [ + flue(), + cloudflare({ config: flueWorkerConfig() }), + sentryCloudflareVitePlugin(), + ], +}); +``` + +The plugin registers the Flue instrumentation for you at build time, so you don't write an `instrument()` call as you do on Node.js. It instruments the other libraries your tools call at the same point, so their spans land in the agent's trace. + +Each Flue agent runs in its own Durable Object, which is a separate isolate from your Worker entry. `Sentry.init()` has to run inside it, so create a module that wraps the generated agent Durable Object: + +```typescript {filename:src/sentry.ts} +import { extend } from "@flue/runtime/cloudflare"; +import * as Sentry from "@sentry/cloudflare"; + +export const cloudflare = extend({ + wrap: (Final) => + Sentry.instrumentDurableObjectWithSentry( + (env: Env) => ({ + dsn: "___PUBLIC_DSN___", + // ___PRODUCT_OPTION_START___ performance + + // Set tracesSampleRate to 1.0 to capture 100% + // of spans for tracing. + // We recommend adjusting this value in production. + tracesSampleRate: 1.0, + // ___PRODUCT_OPTION_END___ performance + }), + Final + ), +}); +``` + +Re-export it as `cloudflare` from each agent module. This is how Flue applies the wrapper — defining it anywhere else has no effect: + +```typescript {filename:src/agents/support.ts} +export { cloudflare } from "../sentry.ts"; +``` + + + +Without this re-export the agent still runs normally and nothing errors, but no `Sentry.init()` ever runs in that isolate, so nothing is captured at all. + + + +Enable Node.js compatibility in your Wrangler config so the SDK can run on Workers: + +```json {filename:wrangler.jsonc} +{ + "compatibility_flags": ["nodejs_compat"] +} +``` + + + +### Privacy Controls + +The SDK will record generative AI inputs and outputs (the prompts your agent sends and the model responses it receives) by default. To turn recording off, set `genAI.inputs` and `genAI.outputs` to `false` in `dataCollection`: + +```typescript {filename:src/sentry.ts} +Sentry.instrumentDurableObjectWithSentry( + (env: Env) => ({ + dsn: "___PUBLIC_DSN___", + dataCollection: { + genAI: { inputs: false, outputs: false }, + }, + }), + Final +); +``` + +See [`dataCollection` documentation](../configuration/options/#dataCollection) for details on privacy control options. + + + + + + + +## Troubleshooting + +- **The agent runs but nothing reaches Sentry.** Confirm each agent module re-exports `cloudflare` from your `src/sentry.ts`. This is the most common cause, and it fails silently. +- **`instrument.server.ts` has no effect.** That convention needs a worker entry named in Wrangler's `main`. Flue supplies its own virtual entry instead, so the file is never picked up. Use the Durable Object wrapper above. +- **Token and cost values are doubled.** Remove the `createOpenTelemetryInstrumentation` call left over from the `flue add tooling sentry` blueprint. + + + + + +## Supported Versions + +- `@sentry/cloudflare`: `>=11.0.0-rc.1` +- `@flue/runtime`: `>=2.0.0 <3.0.0` diff --git a/docs/platforms/javascript/guides/flue/index.mdx b/docs/platforms/javascript/guides/flue/index.mdx new file mode 100644 index 00000000000000..e88516217890ea --- /dev/null +++ b/docs/platforms/javascript/guides/flue/index.mdx @@ -0,0 +1,174 @@ +--- +title: Flue +description: Learn how to send Flue agent traces, model calls, tool executions, and errors to Sentry with the Sentry SDK. +sdk: sentry.javascript.node +fallbackGuide: javascript.node +icon: flue +categories: + - server + - server-only +keywords: + - flue + - ai + - agents + - agent tracing +--- + +[Flue](https://flueframework.com/) is an open TypeScript framework for building AI agents, made by the Astro team. This guide sets up the Sentry SDK in a Flue app so agent turns, model calls, tool executions, and errors flow into [Sentry Agent Tracing](/product/agents/). + + + +Deploying Flue agents to Cloudflare Workers? Follow the [Cloudflare Quick Start](./cloudflare/) instead. + +## Prerequisites + +Before you begin, you need: + +- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/). The project's DSN tells the SDK where to send data. +- A Flue application using `@flue/runtime` version `2.0.0` or later. Flue requires Node.js `22.19` or later. +- `@sentry/node` or `@sentry/cloudflare` version `11.0.0-rc.1` or later. Browser runtimes are not supported. + + + +## Install + +Choose the features you want to configure, and this guide will show you how: + + + +Install the Sentry Node SDK: + + + +```bash {tabTitle:npm} +npm install @sentry/node@^11.0.0-rc.1 +``` + +```bash {tabTitle:yarn} +yarn add @sentry/node@^11.0.0-rc.1 +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/node@^11.0.0-rc.1 +``` + + + + + +```bash {tabTitle:npm} +npm install @sentry/node@^11.0.0-rc.1 @sentry/profiling-node@^11.0.0-rc.1 +``` + +```bash {tabTitle:yarn} +yarn add @sentry/node@^11.0.0-rc.1 @sentry/profiling-node@^11.0.0-rc.1 +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/node@^11.0.0-rc.1 @sentry/profiling-node@^11.0.0-rc.1 +``` + + + +## Configure + +Create a file that calls `Sentry.init()` and registers the Flue instrumentation. Flue is instrumented by registering with it rather than by patching, so this `instrument()` call is what connects the two: + +```typescript {filename:src/instrument.ts} +import { instrument } from "@flue/runtime"; +import * as Sentry from "@sentry/node"; +// ___PRODUCT_OPTION_START___ profiling +import { nodeProfilingIntegration } from "@sentry/profiling-node"; +// ___PRODUCT_OPTION_END___ profiling + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + // ___PRODUCT_OPTION_START___ profiling + + integrations: [ + // Add our Profiling integration + nodeProfilingIntegration(), + ], + // ___PRODUCT_OPTION_END___ profiling + // ___PRODUCT_OPTION_START___ performance + + // Set tracesSampleRate to 1.0 to capture 100% + // of spans for tracing. + // We recommend adjusting this value in production. + tracesSampleRate: 1.0, + // ___PRODUCT_OPTION_END___ performance + // ___PRODUCT_OPTION_START___ profiling + + // Set profileSessionSampleRate to 1.0 to profile every session. + // Learn more at + // https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate + profileSessionSampleRate: 1.0, + // ___PRODUCT_OPTION_END___ profiling +}); + +instrument(Sentry.createFlueInstrumentation()); +``` + +Import it at the top of your app entry, so it runs before your agents take a turn: + +```typescript {filename:src/app.ts} +import "./instrument.ts"; +``` + +Call `instrument()` once, at module scope. On Cloudflare the Vite plugin registers the instrumentation at build time instead; on Node there's no equivalent, so this call is what installs it. + +### Run With the Sentry Loader + +Libraries like database drivers, caches, and `dataloader` are instrumented by a module transform that has to be installed before your app loads them. A Flue build imports your dependencies before `src/instrument.ts` runs, so start the server with the Sentry loader to catch them: + +```json {filename:package.json} +{ + "scripts": { + "dev": "NODE_OPTIONS='--import=@sentry/node/import' vite dev", + "start": "NODE_OPTIONS='--import=@sentry/node/import' node dist/server.mjs" + } +} +``` + +Agent, model, and tool spans arrive without this, as do outgoing HTTP requests. Everything instrumented through the module transform needs it. + + + +### Privacy Controls + +The SDK will record generative AI inputs and outputs (the prompts your agent sends and the model responses it receives) by default. To turn recording off, set `genAI.inputs` and `genAI.outputs` to `false` in `dataCollection`: + +```typescript {filename:src/instrument.ts} +Sentry.init({ + dsn: "___PUBLIC_DSN___", + dataCollection: { + genAI: { inputs: false, outputs: false }, + }, +}); +``` + +See [`dataCollection` documentation](./configuration/options/#dataCollection) for details on privacy control options. + + + + + + + +## Troubleshooting + +- **Token and cost values are doubled.** Remove the `createOpenTelemetryInstrumentation` call left over from the `flue add tooling sentry` blueprint. Flue emits its own model spans through it, so both it and the SDK count the same turn. +- **No AI spans at all.** Confirm `instrument(Sentry.createFlueInstrumentation())` actually runs. Importing `src/instrument.ts` at the top of `src/app.ts` runs it during app startup, before any agent takes a turn. + + + + + +## Supported Versions + +- `@sentry/node`: `>=11.0.0-rc.1` +- `@sentry/cloudflare`: `>=11.0.0-rc.1` +- `@flue/runtime`: `>=2.0.0 <3.0.0` diff --git a/includes/flue/captured-summary.mdx b/includes/flue/captured-summary.mdx new file mode 100644 index 00000000000000..f09194a81d8e40 --- /dev/null +++ b/includes/flue/captured-summary.mdx @@ -0,0 +1,3 @@ +With this setup, Sentry captures errors thrown by your agents and tools, and AI spans for every run (agent turns, model calls, tool executions, token usage, and latency). Manual spans you start inside a tool nest under that tool's span. + +To review what's captured and turn recording of prompts and responses off, see [Privacy Controls](#privacy-controls) below. diff --git a/includes/flue/link-conversations.mdx b/includes/flue/link-conversations.mdx new file mode 100644 index 00000000000000..4222f01a382128 --- /dev/null +++ b/includes/flue/link-conversations.mdx @@ -0,0 +1,5 @@ +### Link Conversations + +Sentry groups a multi-turn chat into a single [Conversation](/product/agents/conversations/) automatically — there's no Sentry-specific setup. Flue already tracks a conversation id per conversation, and the SDK maps it to `gen_ai.conversation.id` on the agent, model, and tool spans of every turn. + +The agent span also carries `gen_ai.agent.name`, so you can tell a lead agent's runs from its subagents'. diff --git a/includes/flue/next-steps.mdx b/includes/flue/next-steps.mdx new file mode 100644 index 00000000000000..f8c8ce95e111fe --- /dev/null +++ b/includes/flue/next-steps.mdx @@ -0,0 +1,6 @@ +## Next Steps + +- [Name your agents](/product/agents/naming/) so you can identify them in the Agents Dashboard. +- [Track AI agent spend with dashboards and alerts](https://sentry.io/cookbook/monitor-ai-agent-spend-with-dashboards-and-alerts/): build a dashboard for cost, tokens, models, and conversations. +- [Flue's observability guide](https://flueframework.com/docs/guide/observability/): the event model behind the spans, from the Flue side. +- Use the appropriate [JavaScript framework guide](/platforms/javascript/) for application monitoring in a separate frontend or service. diff --git a/includes/flue/sdk-setup-alert.mdx b/includes/flue/sdk-setup-alert.mdx new file mode 100644 index 00000000000000..f65ee642d83088 --- /dev/null +++ b/includes/flue/sdk-setup-alert.mdx @@ -0,0 +1,5 @@ + + +This guide covers the Sentry SDK-based setup, which replaces the `flue add tooling sentry` blueprint. If you previously ran the blueprint, remove its `createOpenTelemetryInstrumentation` call — otherwise, you will get duplicate spans. + + diff --git a/includes/flue/verify.mdx b/includes/flue/verify.mdx new file mode 100644 index 00000000000000..25d68015674887 --- /dev/null +++ b/includes/flue/verify.mdx @@ -0,0 +1,9 @@ +## Verify + +Send a message to one of your agents, then open [Agent Tracing](/product/agents/) in Sentry and select the run. The timeline shows the agent turn, the model calls, the tool executions, token usage, and latency, plus any errors your tools threw. + +If no data appears, confirm that: + +- The `dsn` belongs to the Sentry project you're viewing. +- `tracesSampleRate` is greater than `0`. +- Your agent completed at least one turn after you added the setup. diff --git a/includes/flue/what-gets-captured.mdx b/includes/flue/what-gets-captured.mdx new file mode 100644 index 00000000000000..90aeb1922e8a3b --- /dev/null +++ b/includes/flue/what-gets-captured.mdx @@ -0,0 +1,17 @@ + + +Sentry's Flue integration maps Flue's runtime operations to Sentry operations for the Agents dashboards: + +| Flue Operation | Sentry Operation | +| ---------------- | --------------------- | +| Agent submission | `gen_ai.invoke_agent` | +| Model turn | `gen_ai.chat` | +| Tool execution | `gen_ai.execute_tool` | + +Spans are tagged with `sentry.origin: auto.ai.flue` and carry the model, token usage, and finish reasons for the turn. + +A `chat` span also carries `flue.turn.purpose`, which is how you tell a context-compaction turn from a user-facing one. There's no conventional attribute for that distinction. + +A tool that throws is captured as an error and its span is marked failed. Flue catches the throw and hands it back to the model as a tool result, so the error is reported as handled. + + diff --git a/redirects.js b/redirects.js index 643052fa57bfce..ffb1e43a097f4c 100644 --- a/redirects.js +++ b/redirects.js @@ -2448,6 +2448,85 @@ const userDocsRedirects = [ destination: '/platforms/javascript/guides/cloudflare/agent-tracing/workers-ai/:path*', }, + // Flue moved from Agent Tracing to its own guide when the SDK-based setup + // replaced the `flue add tooling sentry` blueprint. + // Map older names directly to the guide to avoid redirect chains. The + // Cloudflare page is listed first so its readers keep landing on it. + { + source: '/platforms/javascript/guides/cloudflare/agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/guides/cloudflare/agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, + // The pre-rename names (ai-agent-monitoring, ai-agent-tracing) need their own + // rules: the generic rename redirects rewrite them onto agent-tracing/flue + // paths, which the rules above redirect again — a 2-hop chain. + { + source: '/platforms/javascript/guides/cloudflare/ai-agent-monitoring/flue.md', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/guides/cloudflare/ai-agent-monitoring/flue/:path*', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/guides/cloudflare/ai-agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/guides/cloudflare/ai-agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/cloudflare/', + }, + { + source: '/platforms/javascript/ai-agent-monitoring/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/ai-agent-monitoring/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/ai-agent-monitoring/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/ai-agent-monitoring/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/ai-agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/ai-agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/ai-agent-tracing/flue.md', + destination: '/platforms/javascript/guides/flue/', + }, + { + source: '/platforms/javascript/guides/:guide/ai-agent-tracing/flue/:path*', + destination: '/platforms/javascript/guides/flue/', + }, // Mastra lifted from the Agent Tracing integration page to a standalone guide. // Map older names directly to the guide to avoid redirect chains. {