new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

signoz/setup

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

SigNoz setup: install OpenTelemetry packages

To send traces to SigNoz Cloud, install the following packages: @vercel/otel, @opentelemetry/api, and @ai-sdk/otel. Run: npm install @vercel/otel @opentelemetry/api @ai-sdk/otel

SigNoz setup: NextJs 14 and below require instrumentationHook

When using NextJs 14 or below, update next.config.mjs to include the experimental instrumentationHook feature. This is not required for NextJs 15 and above.

SigNoz setup: create instrumentation.ts file

Create an instrumentation.ts file in the root project directory (or src directory if using src folder). The file must register telemetry using registerTelemetry with LegacyOpenTelemetry, and configure OpenTelemetry with registerOTel, specifying the serviceName and OTLPHttpJsonTraceExporter with the SigNoz Cloud URL and ingestion key.

SigNoz instrumentation.ts example

Example instrumentation.ts file that sets up SigNoz tracing: import { registerTelemetry } from 'ai'; import { LegacyOpenTelemetry } from '@ai-sdk/otel'; import { registerOTel, OTLPHttpJsonTraceExporter } from '@vercel/otel'; import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api'; diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR); registerTelemetry(new LegacyOpenTelemetry()); export function register() { registerOTel({ serviceName: '<service_name>', traceExporter: new OTLPHttpJsonTraceExporter({ url: 'https://ingest.<region>.signoz.cloud:443/v1/traces', headers: { 'signoz-ingestion-key': '<your-ingestion-key>' }, }), }); }

SigNoz setup: configuration parameters

When configuring SigNoz in instrumentation.ts, three parameters must be replaced: <service_name> is the name of your service, <region> must match your SigNoz Cloud region (e.g., us, eu, ap1, ap2), and <your-ingestion-key> is your SigNoz ingestion key retrieved from your SigNoz Cloud account.

Give your agent this brain