---
title: TracerConfig
seo:
  title: TracerConfig — TypeScript SDK
  description: Configuration options for initializing a Tracer. (TypeScript SDK)
description: Configuration options for initializing a Tracer.
---

Credentials are resolved in order: explicit arguments first, then
environment variables.

## Properties

| Prop | Type | Default | Description |
| - | - | - | - |
| `projectName?` | `string \| undefined` | - | Your Judgment project name. Required for span export. |
| `apiKey?` | `string \| undefined` | - | Judgment API key. Defaults to JUDGMENT_API_KEY env var. |
| `organizationId?` | `string \| undefined` | - | Judgment organization ID. Defaults to JUDGMENT_ORG_ID env var. |
| `apiUrl?` | `string \| undefined` | - | Judgment API URL. Defaults to JUDGMENT_API_URL env var. |
| `environment?` | `string \| undefined` | - | Deployment environment name (e.g. "production"). |
| `setActive?` | `boolean \| undefined` | - | Whether to automatically set this tracer as active. Defaults to true. |
| `serializer?` | `((value: unknown) => string) \| undefined` | - | Custom serialization function for span attribute values. |
| `resourceAttributes?` | `Record<string, string> \| undefined` | - | Additional OpenTelemetry resource attributes. |
| `sampler?` | `Sampler \| undefined` | - | Custom OpenTelemetry sampler. Defaults to the SDK's default. |
| `spanLimits?` | `SpanLimits \| undefined` | - | Custom OpenTelemetry span limits (attribute/event/link caps). |
| `spanProcessors?` | `SpanProcessor[] \| undefined` | - | Additional span processors to register alongside Judgment's own processor. |
