Share via


PerRequestSpanProcessorConfiguration class

Configuration for PerRequestSpanProcessor. Inherits runtime settings (clusterCategory, isNodeEnvDevelopment) and adds per-request processor guardrails.

This is separated from ObservabilityConfiguration because PerRequestSpanProcessor is used only in specific scenarios and these settings should not be exposed in the common ObservabilityConfiguration.

Extends

Properties

clusterCategory
isDevelopmentEnvironment

Whether the cluster is a development environment (local or dev). Based on clusterCategory.

isNodeEnvDevelopment

Whether NODE_ENV indicates development mode. Returns true when NODE_ENV is 'development' (case-insensitive). This is the standard Node.js way of indicating development mode.

isPerRequestExportEnabled
perRequestFlushGraceMs
perRequestMaxConcurrentExports
perRequestMaxSpansPerTrace
perRequestMaxTraceAgeMs
perRequestMaxTraces

Inherited Methods

parseEnvBoolean(undefined | string)

Parse an environment variable as a boolean. Recognizes 'true', '1', 'yes', 'on' (case-insensitive) as true; all other values as false.

parseEnvInt(undefined | string, number)

Parse an environment variable as an integer, returning fallback if invalid or not set.

Constructor Details

PerRequestSpanProcessorConfiguration(PerRequestSpanProcessorConfigurationOptions)

new PerRequestSpanProcessorConfiguration(overrides?: PerRequestSpanProcessorConfigurationOptions)

Parameters

Property Details

clusterCategory

ClusterCategory clusterCategory

Property Value

isDevelopmentEnvironment

Whether the cluster is a development environment (local or dev). Based on clusterCategory.

boolean isDevelopmentEnvironment

Property Value

boolean

isNodeEnvDevelopment

Whether NODE_ENV indicates development mode. Returns true when NODE_ENV is 'development' (case-insensitive). This is the standard Node.js way of indicating development mode.

boolean isNodeEnvDevelopment

Property Value

boolean

isPerRequestExportEnabled

boolean isPerRequestExportEnabled

Property Value

boolean

perRequestFlushGraceMs

number perRequestFlushGraceMs

Property Value

number

perRequestMaxConcurrentExports

number perRequestMaxConcurrentExports

Property Value

number

perRequestMaxSpansPerTrace

number perRequestMaxSpansPerTrace

Property Value

number

perRequestMaxTraceAgeMs

number perRequestMaxTraceAgeMs

Property Value

number

perRequestMaxTraces

number perRequestMaxTraces

Property Value

number

Inherited Method Details

parseEnvBoolean(undefined | string)

Parse an environment variable as a boolean. Recognizes 'true', '1', 'yes', 'on' (case-insensitive) as true; all other values as false.

static function parseEnvBoolean(envValue: undefined | string): boolean

Parameters

envValue

undefined | string

Returns

boolean

Inherited From RuntimeConfiguration.parseEnvBoolean

parseEnvInt(undefined | string, number)

Parse an environment variable as an integer, returning fallback if invalid or not set.

static function parseEnvInt(envValue: undefined | string, fallback: number): number

Parameters

envValue

undefined | string

fallback

number

Returns

number

Inherited From RuntimeConfiguration.parseEnvInt