Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/mcp-cloudflare/src/client/instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Sentry.init({
beforeSend: sentryBeforeSend,
environment:
import.meta.env.VITE_SENTRY_ENVIRONMENT ?? import.meta.env.NODE_ENV,
integrations: [Sentry.browserTracingIntegration()],
integrations: [
Sentry.spanStreamingIntegration(),
Sentry.browserTracingIntegration(),
],
});

resolveAttribution();
5 changes: 5 additions & 0 deletions packages/mcp-cloudflare/src/server/sentry.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ export default function getSentryConfig(env: Env): CloudflareOptions {
return {
dsn: env.SENTRY_DSN,
tracesSampleRate: 1,
traceLifecycle: "stream",
Comment thread
cleptric marked this conversation as resolved.
sendDefaultPii: true,
beforeSend: sentryBeforeSend,
initialScope: {
tags: {
"app.server.version": LIB_VERSION,
"app.upstream.host": env.SENTRY_HOST,
},
attributes: {
"app.server.version": LIB_VERSION,
"app.upstream.host": env.SENTRY_HOST,
},
},
...(versionId ? { release: versionId } : {}),
environment:
Expand Down
9 changes: 9 additions & 0 deletions packages/mcp-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ async function main() {
dsn: cfg.sentryDsn,
sendDefaultPii: true,
tracesSampleRate: 1,
traceLifecycle: "stream",
beforeSend: sentryBeforeSend,
initialScope: {
tags: {
Expand All @@ -268,6 +269,14 @@ async function main() {
"app.upstream.host": cfg.sentryHost,
"app.url.full": cfg.mcpUrl,
},
attributes: {
"app.server.version": LIB_VERSION,
"app.transport": "stdio",
"app.server.mode.agent": cli.agent ? "true" : "false",
"app.server.mode.experimental": cli.experimental ? "true" : "false",
"app.upstream.host": cfg.sentryHost,
"app.url.full": cfg.mcpUrl,
},
},
release: process.env.SENTRY_RELEASE,
integrations: [
Expand Down
5 changes: 5 additions & 0 deletions packages/mcp-test-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ program
dsn: sentryDsn,
sendDefaultPii: true,
tracesSampleRate: 1,
traceLifecycle: "stream",
beforeSend: sentryBeforeSend,
initialScope: {
tags: {
"gen_ai.agent.name": "sentry-mcp-agent",
"gen_ai.provider.name": "openai",
},
attributes: {
"gen_ai.agent.name": "sentry-mcp-agent",
"gen_ai.provider.name": "openai",
},
},
release: process.env.SENTRY_RELEASE,
integrations: [
Expand Down
Loading
Loading