Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sedataai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The console exporter is the fastest way to verify your instrumentation is firing. No backend, no auth, no network — spans print straight to your terminal.

Switch the exporter type

const config: TelemetryConfig = {
  serverName: 'my-server',
  serverVersion: '1.0.0',
  exporterType: 'console',
  // exporterEndpoint, exporterAuth, samplingRate — all optional / ignored
}

instrumentServer(server, config)
When exporterType: 'console':
  • Trace exporter is ConsoleSpanExporter from @opentelemetry/sdk-trace-base.
  • No metric reader is attached — metrics are dropped silently. Use console for trace verification only.
  • Auth and endpoint config are ignored.

What you’ll see

Each span prints as JSON when it ends:
{
  traceId: 'a3b...',
  parentId: undefined,
  name: 'tools/call calculate-bmi',
  id: '...',
  kind: 0,
  timestamp: 1747000000000000,
  duration: 1432,
  attributes: {
    'mcp.method.name': 'tools/call',
    'mcp.tool.name': 'calculate-bmi',
    'mcp.tool.title': 'BMI Calculator',
    'mcp.tool.description': 'Calculate Body Mass Index',
    'mcp.request.id': 'b9c...',
    'mcp.session.id': 'f3a...',
    'client.address': '127.0.0.1',
    'mcp.operation.success': true,
    'mcp.operation.duration': 1
  },
  status: { code: 1 },
  events: [],
  links: []
}
This is the same data the OTLP exporter would ship — just rendered locally.

Use cases

Verify a new tool

Confirm spans appear with the right attributes before pointing at prod.

Debug a custom span

See exactly what your startActiveSpan calls are emitting.

Test redaction

Run with enableArgumentCollection: true + your dataProcessors and inspect the printed attributes.

CI smoke test

Run a sample tool call in CI and grep for expected attributes.

Sample CI assertion

test/smoke.ts
import { spawn } from 'node:child_process'

const proc = spawn('node', ['dist/server.js'], { stdio: 'pipe' })
let stderr = ''
proc.stderr.on('data', (d) => (stderr += d.toString()))

// drive a tool call via your MCP client of choice...

proc.kill('SIGTERM')
proc.on('exit', () => {
  if (!stderr.includes("'mcp.tool.name': 'calculate-bmi'")) {
    process.exit(1)
  }
})

When you’re ready for the real backend

Switch to otlp-http (or remove exporterType entirely — it’s the default):
- exporterType: 'console',
+ exporterEndpoint: 'https://otel.sedata-ai.tech/v1',
+ exporterAuth: { type: 'bearer', token: process.env.SEDATA_TOKEN! },

Next

Authentication

Wire up the live exporter.

Troubleshooting

Common issues and fixes.