RuntimeConfiguration class
Base configuration class for Agent365 SDK. Other packages extend this to add their own settings.
Override functions are called on each property access, enabling dynamic resolution from async context (e.g., OpenTelemetry baggage) per-request.
Constructors
| Runtime |
Properties
| cluster |
|
| is |
Whether the cluster is a development environment (local or dev). Based on clusterCategory. |
| is |
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. |
Methods
| parse |
Parse an environment variable as a boolean. Recognizes 'true', '1', 'yes', 'on' (case-insensitive) as true; all other values as false. |
| parse |
Parse an environment variable as an integer, returning fallback if invalid or not set. |
Constructor Details
RuntimeConfiguration(RuntimeConfigurationOptions)
new RuntimeConfiguration(overrides?: RuntimeConfigurationOptions)
Parameters
- overrides
- RuntimeConfigurationOptions
Property Details
clusterCategory
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
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
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