Diagnostics SDK

Configuration reference

Every environment variable the Diagnostics SDK reads, with defaults and activation rules.

Configuration reference

The SDK is configured exclusively via environment variables. There is no code-based or file-based configuration. If TICKETMAN_DIAG_ENDPOINT is not set, or is not a valid http(s) URL, the SDK is fully inert.

Boolean values: true, 1 or yes (case-insensitive) enable; anything else disables. Invalid values fall back to the default and are noted in the self-log.

Core

VariableDefaultDescription
TICKETMAN_DIAG_ENDPOINTunset (SDK inert)Full HTTPS URL of the TicketMan ingest endpoint.
TICKETMAN_DIAG_API_KEYemptyAPI key, sent as X-TicketMan-Key.
TICKETMAN_DIAG_ENVIRONMENTDOTNET_ENVIRONMENT or ASPNETCORE_ENVIRONMENT, else ProductionEnvironment name reported with the incident.
TICKETMAN_DIAG_APP_NAMEentry assembly nameApplication name.
TICKETMAN_DIAG_APP_VERSIONassembly informational versionApplication version.
TICKETMAN_DIAG_BUILD_IDemptyCI build identifier.
TICKETMAN_DIAG_GIT_COMMITcommit suffix of the versionGit commit hash.
TICKETMAN_DIAG_TIMEOUT_SECONDS10HTTP timeout per send attempt.
TICKETMAN_DIAG_DEBUGfalseSelf-log internal decisions and errors to stderr and Trace.

Capture options

VariableDefaultDescription
TICKETMAN_DIAG_CAPTURE_USERfalseOpt-in: include user id, username, tenant and roles from claims.
TICKETMAN_DIAG_CAPTURE_REQUEST_BODYfalseOpt-in: include the masked, size-capped HTTP request body.
TICKETMAN_DIAG_MAX_REQUEST_BODY_BYTES16384Request body cap; longer bodies are truncated and flagged.
TICKETMAN_DIAG_HTTP_STATUS_RANGES500-599Status codes or ranges that trigger a report with no exception, e.g. 500-599,429.
TICKETMAN_DIAG_ENABLE_DUMPSfalseCapture a minidump (stacks and modules, no full heap) on fatal crashes. .NET only.
TICKETMAN_DIAG_MAX_ATTACHMENT_SIZE_MB10Attachments larger than this are dropped.
TICKETMAN_DIAG_BREADCRUMB_BUFFER_SIZE100Ring-buffer size for log breadcrumbs. 0 disables breadcrumbs.
TICKETMAN_DIAG_CAPTURE_LOG_LEVELCritical (.NET) / fatal (Node)Minimum log level at which a logged exception is captured as an error report; None/none disables. Set it to Error/error to capture exceptions your code catches and logs, with no code changes.

Delivery and limits

VariableDefaultDescription
TICKETMAN_DIAG_SPOOL_DIR<temp>/ticketman-diagnostics/<app-name>Local spool directory for pending reports. Must be writable.
TICKETMAN_DIAG_SPOOL_MAX_MB50Spool size cap; oldest reports are evicted first.
TICKETMAN_DIAG_RATE_LIMIT10/5mPer-fingerprint client-side limit, N/window with s, m or h.

Masking and claims

VariableDefaultDescription
TICKETMAN_DIAG_MASK_EXTRA_KEYSemptyExtra key names the masker treats as secrets.
TICKETMAN_DIAG_USER_CLAIM_IDsub, oid, nameidentifierClaim type for the user id.
TICKETMAN_DIAG_USER_CLAIM_NAMEpreferred_username, nameClaim type for the username.
TICKETMAN_DIAG_USER_CLAIM_TENANTtidClaim type for the tenant.
TICKETMAN_DIAG_USER_CLAIM_ROLESroles, roleClaim type for roles.

Per-SDK differences

The same variables drive every SDK; only the derived defaults and a few platform-bound options differ:

  • .NET: environment defaults from DOTNET_ENVIRONMENT/ASPNETCORE_ENVIRONMENT; app name and version from assembly metadata; CAPTURE_LOG_LEVEL takes ILogger level names (default Critical); user identity comes from claims via the USER_CLAIM_* variables.
  • Node.js: environment defaults from NODE_ENV; app name and version from the nearest package.json; CAPTURE_LOG_LEVEL takes trace|debug|info|warn|error|fatal|none (default fatal); user identity comes from req.user (the USER_CLAIM_* variables do not apply); TICKETMAN_DIAG_ENABLE_DUMPS is not implemented — minidumps are .NET-only.

Activation rules

  1. If TICKETMAN_DIAG_ENDPOINT is unset or invalid, everything else is ignored and the SDK is inert.
  2. Explicit TICKETMAN_DIAG_* values always win over derived defaults.
  3. Masking cannot be disabled. MASK_EXTRA_KEYS can only add to the built-in list.
  4. Server throttle hints (pause or sample rate) override client behavior until replaced.