{
    "$id": "http://glue42.com/gd/otel.json",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "IO.Insights Configuration Schema",
    "description": "JSON schema for IO.Insights",
    "type": "object",
    "$comment": "Created after commit f053165852747d0a4ef2650b973ca7c5a5adb151",
    "properties": {
        "enabled": {
            "type": "boolean",
            "description": "Whether library is enabled. If disabled, API is still usable, but methods are no-ops."
        },
        "useSSOAuth": {
            "type": "boolean",
            "description": "If `true`, use io.Connect's SSO login information when making requests to the OTEL collector.",
            "default": false
        },
        "useSSOAuthRawToken": {
            "type": "boolean",
            "description": "Used if io.Connect's SSO login information contains a `token` property. If `true`, the `token` property will be used as-is. If `false`, the `token` property may be prepended with the string \"Bearer \", if it does not contain an Authorization type prefix.",
            "default": false
        },
        "finalExportTimeoutMs": {
            "description": "Interval in milliseconds to wait for any remaining telemetry data to be exported during shutdown of the platform. This is the maximum awaiting interval and the platform may shutdown before it expires if all telemetry data has already been published.",
            "type": "number",
            "default": 0
        },
        "finalExportGracePeriodMs": {
            "description": "Interval in milliseconds to wait for any remaining telemetry data to be published by any apps before proceeding with the platform shutdown.",
            "type": "number",
            "default": 0
        },
        "errorlessMode": {
            "type": "boolean",
            "description": "Enable errorless mode operation.If `true`, the library will swallow all errors, instead of propagating them.",
            "default": false
        },
        "logSettingsOnStartup": {
            "type": "boolean",
            "default": true,
            "description": "If the library should log the settings used to initialize it."
        },
        "failOnInitError": {
            "type": "boolean",
            "description": "If failure to initialize library will throw upstream error."
        },
        "platformVersion": {
            "type": "string",
            "description": "If provided, this value will be added to the metrics and span attributes and to the span filtering context."
        },
        "suppressDoubleInitializationWarnings": {
            "type": "boolean",
            "description": "Suppress double initialization warnings from the OTEL SDK.",
            "default": false
        },
        "serviceName": {
            "type": "string",
            "description": "If provided, this value will be added to the metrics and traces service.name attribute, unless an OTEL service object has been provided to the library with a different setting."
        },
        "serviceId": {
            "type": "string",
            "description": "If provided, this value will be added to the metrics and traces service.instance.id attribute."
        },
        "serviceVersion": {
            "type": "string",
            "description": "If provided, this value will be added to the metrics and traces service.version attribute."
        },
        "userId": {
            "type": "string",
            "description": "If provided, this value will be added to the metrics and traces user.id attribute."
        },
        "headers": {
            "type": "object",
            "additionalProperties": {
                "type": "string"
            },
            "description": "Additional headers to send in HTTP requests, e.g. when using HTTP exporters."
        },
        "additionalAttributes": {
            "type": "object",
            "additionalProperties": {
                "type": [
                    "string",
                    "number",
                    "boolean",
                    "object",
                    "array",
                    "null"
                ]
            },
            "description": "Additional properties to publish as part of each OpenTelemetry signal, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?DefaultValue%`)."
        },
        "additionalResourceAttributes": {
            "type": "object",
            "additionalProperties": {
                "type": [
                    "string",
                    "number",
                    "boolean",
                    "object",
                    "array",
                    "null"
                ]
            },
            "description": "Additional properties to publish as part of the OpenTelemetry resource definition for all OpenTelemetry signals, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?DefaultValue%`)."
        },
        "addResourceAttributesToAttributes":{
            "type":"boolean",
            "description": "Whether to add resource attributes to signal attributes.",
            "default":false
        },
        "traces": {
            "$ref": "#/definitions/TracesSettings"
        },
        "metrics": {
            "$ref": "#/definitions/MetricsSettings"
        },
        "logs": {
            "$ref": "#/definitions/LogsSettings"
        }
    },
    "required": [
        "enabled"
    ],
    "additionalProperties": true,
    "definitions": {
        "TracesSettings": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Whether tracing functionality is enabled. If disabled, API is still usable, but methods are no-ops."
                },
                "useSSOAuth": {
                    "type": "boolean",
                    "description": "If `true`, use io.Connect's SSO login information when making requests to the OTEL collector.",
                    "default": false
                },
                "useSSOAuthRawToken": {
                    "type": "boolean",
                    "description": "Used if io.Connect's SSO login information contains a `token` property. If `true`,the `token` property will be used as-is. If `false`, the `token` property may be prepended with the string \"Bearer \", if it does not contain an Authorization type prefix.",
                    "default": true
                },
                "countMetric": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "default": "insights_trace_count",
                    "description": "Name of span hit counter metric, set to null to disable."
                },
                "durationMetric": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "default": "insights_trace_duration",
                    "description": "Name of span duration histogram metric, set to null to disable."
                },
                "resultMetric": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "default": "insights_trace_result",
                    "description": "Name of span result counter metric, set to null to disable."
                },
                "filters": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/SpanFilter"
                    },
                    "description": "Array of filter entries used to determine whether a particular operation will create a tracing span."
                },
                "useDefaultFilters": {
                    "type": "boolean",
                    "default": true,
                    "description": "If true, use a predefined list of filters for well-known platform traces."
                },
                "defaultFilters": {
                    "type": "array",
                    "description": "This property is for internal use only.",
                    "items": {
                        "$ref": "#/definitions/SpanFilter"
                    }
                },
                "sampling": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/SamplingSettings"
                    },
                    "description": "Array of sampling setting entries used to determine whether a span will be sampled."
                },
                "defaults": {
                    "$ref": "#/definitions/SpanCreationOptions",
                    "description": "Default settings if appropriate entries aren't found in 'filters' and 'sampling' collections."
                },
                "useOTELContextManager": {
                    "type": "boolean",
                    "description": "If true, the library will use the ContextManager provided by the active OTEL SDK to manage and derive propagation information."
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "If an OTEL TraceProvider isn't provided to the library, it will initialize its own. If 'url' is specified, TracerProvider will have an OTLPTraceExporter using this destination URL."
                },
                "clickstream": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "string",
                            "enum": [
                                "nested",
                                "sibling"
                            ]
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/ClickstreamTraceConfig"
                        }
                    ],
                    "default": false,
                    "description": "Whether the clickstream trace will be enabled."
                },
                "userJourney": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "string",
                            "enum": [
                                "nested",
                                "sibling"
                            ]
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/UserJourneyTraceConfig"
                        }
                    ],
                    "default": true,
                    "description": "Whether the user journey trace will be enabled."
                },
                "startupParentSpanTimeoutMs": {
                    "description": "How long after application startup will any traced operations automatically be nested under the application startup trace.",
                    "type": "number"
                },
                "closeTrace": {
                    "description": "If `true`, the application will create a span with the name `interopio.api.application.close` when it's being closed. This functionality requires close handlers to be enabled in the application configuration.",
                    "type": "boolean",
                    "default": false
                },
                "otlpExporterConfig": {
                    "$ref": "#/definitions/OTLPExporterConfig",
                    "description": "Additional OTLP exporter configuration options."
                },
                "tracerProviderConfig": {
                    "$ref": "#/definitions/TracerConfig",
                    "description": "OTEL TracerProvider configuration."
                },
                "batchSpanProcessorConfig": {
                    "$ref": "#/definitions/BufferConfig",
                    "description": "Configuration for the batch span processor buffer settings."
                },
                "autoInstrumentations": {
                    "$ref": "#/definitions/AutoInstrumentationOptions",
                    "description": "Configuration for automatic instrumentation of common browser operations. Enables automatic tracing of document load, user interactions, fetch requests, and XHR calls."
                },
                "parentNameLimit": {
                    "type": "number",
                    "description": "Maximum length for parent operation names in span hierarchies."
                },
                "console": {
                    "type": "boolean",
                    "description": "If true, TracerProvider will have a ConsoleTraceExporter."
                },
                "headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "Additional headers to send in HTTP requests, e.g. when using HTTP exporters."
                },
                "addResourceAttributesToAttributes": {
                    "type": "boolean",
                    "description": "Whether to add resource attributes to span attributes.",
                    "default": false
                },
                "additionalAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional span attributes to publish as part of each span, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                },
                "additionalResourceAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional attributes to publish as part of the OTEL resource definition, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                }
            },
            "required": [
                "enabled"
            ],
            "additionalProperties": true
        },
        "SpanFilter": {
            "type": "object",
            "allOf": [
                {
                    "$ref": "#/definitions/SpanCreationOptions"
                }
            ],
            "properties": {
                "source": {
                    "type": "string",
                    "description": "Specifies the source string used for matching spans. Start string with '#' for case-insensitive regex match."
                },
                "context": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean"
                        ]
                    },
                    "description": "Specifies the filtering context values used for matching spans. Start strings with '#' for case-insensitive regex match."
                }
            }
        },
        "SpanCreationOptions": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the span will be created or will be a no-op."
                },
                "stopPropagationIfSpanIsDisabled": {
                    "type": "boolean",
                    "description": "If a tracing span is disabled by filter, setting this to true will stop the propagation of trace nesting info across it."
                },
                "level": {
                    "type": "string",
                    "enum": [
                        "OFF",
                        "LOWEST",
                        "DIAGNOSTIC",
                        "DEBUG",
                        "INFO",
                        "WARN",
                        "HIGHEST"
                    ],
                    "default": "INFO",
                    "description": "Default span attribute verbosity level."
                },
                "addContextToTrace": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the filtering context will be added as span attributes to the span."
                },
                "autoSetSuccessStatus": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the span's status will be set to OK on completion, if it's still UNSET."
                },
                "sample": {
                    "oneOf": [
                        {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                        },
                        {
                            "type": "boolean"
                        }
                    ],
                    "default": true,
                    "description": "Default sampling setting/probability."
                },
                "disablePropagation": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the span will not inject its propagation info into data transfer objects for span nesting across system boundaries."
                },
                "disableNesting": {
                    "type": "boolean",
                    "description": "Forces the span to create a new trace."
                },
                "log": {
                    "description": "If true, enabled spans will also be published as log entries using the `traceLogger` passed to the builder instance when building the Traces module.",
                    "type": "boolean"
                },
                "logOnDisabledSpans": {
                    "type": "boolean",
                    "description": "If true, disabled spans will also be published as log entries using the `traceLogger` passed to the builder instance when building the Traces module."
                },
                "countMetric": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the span will be counted in the insights_trace_count metric."
                },
                "countMetricOnDisabledSpans": {
                    "type": "boolean",
                    "description": "Whether the span will be counted in the insights_trace_count metric if disabled. See TracesSettings.countMetric."
                },
                "resultMetric": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the span will be counted in the insights_trace_result metric."
                },
                "resultMetricOnDisabledSpans": {
                    "type": "boolean",
                    "description": "Whether the span will be counted in the insights_trace_result metric if disabled. See TracesSettings.resultMetric."
                },
                "durationMetric": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the span will be counted in the insights_trace_duration metric."
                },
                "durationMetricOnDisabledSpans": {
                    "type": "boolean",
                    "description": "Whether the span will be counted in the insights_trace_count metric if disabled. See TracesSettings.durationMetric."
                },
                "canBeRoot": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the span will be able to start a new trace."
                },
                "maxAttributeDepth": {
                    "type": "integer",
                    "default": 3,
                    "minimum": 0,
                    "description": "How deep addData method should recurse into objects when adding attributes to spans."
                },
                "forceChildTracing": {
                    "type": "boolean",
                    "default": false,
                    "description": "If true, any child spans will be forced to be traced, even if their span filter configuration is set to not enabled."
                },
                "minDurationMs": {
                    "type": "number",
                    "minimum": 0,
                    "description": "If specified, spans whose duration is lower than this will not be sampled."
                },
                "overrideDefaultFilters": {
                    "type": "boolean",
                    "description": "If `true`, this filter rule will be matched before any default filters provided by io.Connect. The default filters are usually meant to reduce verbosity by not tracing some internal operations by default, but you can use this property to force them to be traced.If `false`, default filters will be matched before this filtering rule.",
                    "default": false
                },
                "otelSpanOptions": {
                    "$ref": "#/definitions/SpanOptions",
                    "description": "OTEL span options"
                }
            },
            "additionalProperties": true
        },
        "SamplingSettings": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Span name to determine if span will match this sampling setting entry. Start string with '#' for case-insensitive regex match."
                },
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean"
                        ]
                    },
                    "description": "Span attributes that determine if span will match this sampling setting entry. Start strings with '#' for case-insensitive regex match."
                },
                "context": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean"
                        ]
                    },
                    "description": "Context values that determine if span will match this sampling setting entry. Start strings with '#' for case-insensitive regex match."
                },
                "sample": {
                    "oneOf": [
                        {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                        },
                        {
                            "type": "boolean"
                        }
                    ],
                    "description": "Probability that span will be sampled, based on its traceId. If true: will be sampled. If false: will not be sampled. If number between 0 and 1: has this probability of being sampled."
                }
            },
            "required": [
                "sample"
            ],
            "additionalProperties": true
        },
        "AutoInstrumentationOptions": {
            "type": "object",
            "description": "Configuration for automatic instrumentation of common browser operations. Enables automatic tracing of document load, user interactions, fetch requests, and XHR calls.",
            "properties": {
                "documentLoad": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "object",
                            "description": "Configuration for automatic instrumentation of document load events."
                        }
                    ],
                    "description": "Enable or configure automatic tracing of document load events."
                },
                "userInteraction": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "object",
                            "properties": {
                                "throttleIntervalMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "description": "Minimum interval in milliseconds between capturing consecutive user interaction events. Used to throttle high-frequency interactions and reduce span volume."
                                }
                            },
                            "description": "UserInteractionInstrumentationConfig - Configuration for automatic instrumentation of user interactions."
                        }
                    ],
                    "description": "Enable or configure automatic tracing of user interaction events."
                },
                "fetch": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "object",
                            "description": "FetchInstrumentationConfig - Configuration for automatic instrumentation of fetch requests."
                        }
                    ],
                    "description": "Enable or configure automatic tracing of fetch API calls."
                },
                "xhr": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "object",
                            "description": "Configuration for automatic instrumentation of XHR requests."
                        }
                    ],
                    "description": "Enable or configure automatic tracing of XMLHttpRequest calls."
                },
                "ignoreObservabilityUrls": {
                    "type": "boolean",
                    "description": "Whether to ignore URLs used for observability data export (prevents tracing the export requests themselves)."
                }
            }
        },
        "MetricsSettings": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Whether metrics functionality is enabled. If disabled, API is still usable, but methods are no-ops.",
                    "default": false
                },
                "platformMetricsEnabled": {
                    "type": "boolean",
                    "description": "Whether to enable automatic collection of platform-level metrics (CPU, memory, etc.)."
                },
                "useSSOAuth": {
                    "type": "boolean",
                    "description": "If `true`, use io.Connect's SSO login information when making requests to the OTEL collector.",
                    "default": false
                },
                "useSSOAuthRawToken": {
                    "type": "boolean",
                    "description": "Used if io.Connect's SSO login information contains a `token` property. If `true`, the `token` property will be used as-is. If `false`, the `token` property may be prepended with the string \"Bearer \", if it does not contain an Authorization type prefix.",
                    "default": true
                },
                "metrics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/MetricSettings"
                    },
                    "description": "Array of individual metric configurations to collect."
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "The destination URL for exporting metrics via OTLP."
                },
                "publishInterval": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Interval in milliseconds between metric export batches."
                },
                "compression": {
                    "$ref": "#/definitions/CompressionAlgorithm"
                },
                "hostname": {
                    "type": "string",
                    "description": "Hostname to include in exported metrics."
                },
                "keepAlive": {
                    "type": "boolean",
                    "description": "Whether to use HTTP keep-alive connections for metric exports."
                },
                "concurrencyLimit": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Maximum number of concurrent metric export requests."
                },
                "timeoutMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 10000,
                    "description": "Maximum time the OTLP exporter will wait for each batch export."
                },
                "headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "Additional headers to send in HTTP requests."
                },
                "addResourceAttributesToAttributes": {
                    "type": "boolean",
                    "description": "Whether to add resource attributes to metric data point attributes.",
                    "default": false
                },
                "additionalAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional metrics properties to publish as part of each metric, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                },
                "additionalResourceAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional attributes to publish as part of the OTEL resource definition, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                },
                "meter": {
                    "type": "object",
                    "description": "Partial MetricsSettings for meter configuration."
                },
                "filters": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/MetricFilter"
                    },
                    "description": "Array of filter rules to determine which metrics should be collected and exported."
                },
                "useDefaultFilters": {
                    "type": "boolean",
                    "description": "Whether to apply predefined default filters for platform metrics."
                }
            },
            "additionalProperties": true,
            "required": [
                "enabled"
            ]
        },
        "MetricSettings": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean"
                },
                "type": {
                    "$ref": "#/definitions/MetricType"
                },
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "platformVersion": {
                    "type": "string"
                },
                "user": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "buckets": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "baseMetricType": {
                    "type": "string",
                    "enum": [
                        "histogram",
                        "gauge"
                    ]
                },
                "additionalAttributes": {
                    "description": "Additional attributes to add to this metric.",
                    "type": "object",
                    "additionalProperties": true
                }
            },
            "required": [
                "enabled",
                "type",
                "name",
                "description"
            ],
            "additionalProperties": true
        },
        "MetricDefaultFilter": {
            "title": "MetricDefaultFilter",
            "type": "object",
            "properties": {
                "type": {
                    "$ref": "#/definitions/MetricType"
                },
                "enabled": {
                    "type": "boolean"
                },
                "overrideDefaultFilters": {
                    "type": "boolean"
                },
                "attributes": {
                    "type": "object",
                    "properties": {
                        "complexLoad": {
                            "type": "boolean"
                        },
                        "includesFrameCreation": {
                            "type": "boolean"
                        }
                    },
                    "additionalProperties": true
                }
            },
            "required": [
                "enabled"
            ],
            "additionalProperties": true
        },
        "MetricFilter": {
            "allOf": [
                {
                    "$ref": "#/definitions/MetricDefaultFilter"
                },
                {
                    "type": "object",
                    "properties": {
                        "name": {
                            "type": "string"
                        },
                        "type": {
                            "$ref": "#/definitions/MetricType"
                        }
                    },
                    "required": [
                        "name",
                        "type"
                    ],
                    "additionalProperties": true
                }
            ]
        },
        "MetricType": {
            "type": "string",
            "enum": [
                "app_count",
                "app_cpu",
                "app_crash",
                "app_duration",
                "app_duration_soft",
                "app_error",
                "app_memory",
                "app_started",
                "app_startup",
                "app_stopped",
                "layout_startup",
                "workspace_count",
                "workspace_selected",
                "workspace_started",
                "workspace_stopped",
                "workspace_startup_legacy",
                "workspace_startup",
                "workspace_startup_frame",
                "workspace_startup_frame_init",
                "workspace_startup_frame_page_load",
                "workspace_startup_frame_workspace_render",
                "workspace_startup_component",
                "workspace_startup_apps",
                "platform_error",
                "platform_startup",
                "system_cpu",
                "system_memory",
                "custom_gauge",
                "custom_observable_gauge",
                "custom_observable_counter",
                "custom_observable_up_down_counter",
                "custom_counter",
                "custom_histogram",
                "custom_up_down_counter",
                "null"
            ]
        },
        "LogsSettings": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Whether logging functionality is enabled. If disabled, API is still usable, but methods are no-ops.",
                    "default": false
                },
                "useSSOAuth": {
                    "type": "boolean",
                    "description": "If `true`, use io.Connect's SSO login information when making requests to the OTEL collector.",
                    "default": false
                },
                "useSSOAuthRawToken": {
                    "type": "boolean",
                    "description": "Used if io.Connect's SSO login information contains a `token` property. If `true`, the `token` property will be used as-is. If `false`, the `token` property may be prepended with the string \"Bearer \", if it does not contain an Authorization type prefix.",
                    "default": true
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "OTLP logs exporter endpoint URL."
                },
                "keepAlive": {
                    "type": "boolean",
                    "description": "Whether to keep the connection alive when sending logs.",
                    "default": true
                },
                "exporterSettings": {
                    "$ref": "#/definitions/OTLPExporterConfig",
                    "description": "Settings for the OTLP exporter used to send logs."
                },
                "batchSettings": {
                    "$ref": "#/definitions/BufferConfig",
                    "description": "Settings for batching log records before export."
                },
                "providerSettings": {
                    "$ref": "#/definitions/LoggerProviderConfig",
                    "description": "Configuration for the logger provider."
                },
                "maxAttributeDepth": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Maximum length for log attribute object nesting."
                },
                "filters": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/LogFilter"
                    },
                    "description": "Array of filter entries used to determine whether a particular log entry will be emitted, and which attributes will be included. If no matching filter entry is found, the settings from 'defaults' are used."
                },
                "defaults": {
                    "$ref": "#/definitions/LogOptions",
                    "description": "Default settings if appropriate entries aren't found in 'filters' collection."
                },
                "headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "Additional headers to send in HTTP requests, e.g. when using HTTP exporters."
                },
                "addResourceAttributesToAttributes": {
                    "type": "boolean",
                    "description": "Whether to add resource attributes to log entry attributes.",
                    "default": false
                },
                "additionalAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional logs attributes to publish as part of each log entry, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                },
                "additionalResourceAttributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "object",
                            "array",
                            "null"
                        ]
                    },
                    "description": "Additional attributes to publish as part of the OTEL resource definition, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`)."
                }
            },
            "required": [
                "enabled"
            ]
        },
        "LogOptions": {
            "type": "object",
            "properties": {
                "allowedAttributes": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "List of allowed attributes for logging. If specified, any attributes missing from the list will be removed from the log entry before publishing it."
                },
                "hideRegex": {
                    "type": "string",
                    "description": "Regex pattern for hiding sensitive log data. If specified, the log entry will have text matching this regex replaced with asterisks."
                },
                "enabled": {
                    "type": "boolean",
                    "description": "Whether this log option is enabled. If `false`, the log entry will not be published."
                }
            },
            "additionalProperties": true
        },
        "LogFilter": {
            "type": "object",
            "description": "Used to match and control publishing of log entries.",
            "allOf": [
                {
                    "$ref": "#/definitions/LogOptions"
                }
            ],
            "properties": {
                "categoryName": {
                    "type": "string",
                    "description": "Used to match the category of the log entry."
                },
                "severity": {
                    "type": "string",
                    "enum": [
                        "TRACE",
                        "DEBUG",
                        "INFO",
                        "WARN",
                        "ERROR",
                        "FATAL"
                    ],
                    "description": "Used to match the severity of the log entry."
                },
                "bodyRegex": {
                    "type": "string",
                    "description": "Regex pattern used to match the text of the log entry."
                }
            },
            "additionalProperties": true
        },
        "BufferConfig": {
            "type": "object",
            "description": "Interface configuration for a buffer used by batch processors",
            "properties": {
                "maxExportBatchSize": {
                    "type": "number",
                    "minimum": 1,
                    "default": 512,
                    "description": "The maximum batch size of every export. It must be smaller or equal to maxQueueSize."
                },
                "scheduledDelayMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 5000,
                    "description": "The delay interval in milliseconds between two consecutive exports."
                },
                "exportTimeoutMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 30000,
                    "description": "How long the export can run before it is cancelled."
                },
                "maxQueueSize": {
                    "type": "number",
                    "minimum": 1,
                    "default": 2048,
                    "description": "The maximum queue size. After the size is reached spans are dropped."
                }
            },
            "additionalProperties": true
        },
        "LoggerProviderConfig": {
            "type": "object",
            "description": "Configuration for OpenTelemetry Logger Provider",
            "properties": {
                "resource": {
                    "type": "object",
                    "description": "Resource associated with log telemetry"
                },
                "forceFlushTimeoutMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 30000,
                    "description": "How long the forceFlush can run before it is cancelled."
                },
                "logRecordLimits": {
                    "$ref": "#/definitions/LogRecordLimits",
                    "description": "Log record limits configuration"
                }
            },
            "additionalProperties": true
        },
        "LogRecordLimits": {
            "type": "object",
            "description": "Limits configuration for log records",
            "properties": {
                "attributeValueLengthLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum allowed attribute value size"
                },
                "attributeCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Number of attributes per LogRecord"
                }
            },
            "additionalProperties": true
        },
        "OTLPExporterConfig": {
            "type": "object",
            "description": "Base configuration for OTLP exporters",
            "properties": {
                "headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "Additional headers to send with requests"
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "OTLP endpoint URL"
                },
                "concurrencyLimit": {
                    "type": "number",
                    "minimum": 1,
                    "description": "Maximum number of concurrent requests"
                },
                "timeoutMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 10000,
                    "description": "Maximum time the OTLP exporter will wait for each batch export"
                },
                "keepAlive": {
                    "type": "boolean",
                    "description": "Whether to keep HTTP connections alive"
                },
                "compression": {
                    "$ref": "#/definitions/CompressionAlgorithm"
                },
                "httpsAgentOptions": {
                    "type": "object",
                    "description": "Options for the HTTPS agent"
                }
            },
            "additionalProperties": true
        },
        "TracerConfig": {
            "type": "object",
            "description": "Configuration for OpenTelemetry Tracer",
            "properties": {
                "sampler": true,
                "generalLimits": {
                    "$ref": "#/definitions/GeneralLimits",
                    "description": "General limits configuration"
                },
                "spanLimits": {
                    "$ref": "#/definitions/SpanLimits",
                    "description": "Span limits configuration"
                },
                "resource": true,
                "idGenerator": true,
                "forceFlushTimeoutMillis": {
                    "type": "number",
                    "minimum": 0,
                    "default": 30000,
                    "description": "How long the forceFlush can run before it is cancelled"
                },
                "spanProcessors": {
                    "type": "array",
                    "items": true,
                    "description": "List of SpanProcessor for the tracer"
                }
            },
            "additionalProperties": true
        },
        "GeneralLimits": {
            "type": "object",
            "description": "Global configuration limits of trace service",
            "properties": {
                "attributeValueLengthLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum allowed attribute value size"
                },
                "attributeCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Number of attributes per trace"
                }
            },
            "additionalProperties": true
        },
        "SpanLimits": {
            "type": "object",
            "description": "Global configuration of trace service",
            "properties": {
                "attributeValueLengthLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum allowed attribute value size"
                },
                "attributeCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Number of attributes per span"
                },
                "linkCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Number of links per span"
                },
                "eventCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Number of message events per span"
                },
                "attributePerEventCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum number of attributes allowed per span event"
                },
                "attributePerLinkCountLimit": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum number of attributes allowed per span link"
                }
            },
            "additionalProperties": true
        },
        "SpanOptions": {
            "type": "object",
            "description": "Options needed for span creation",
            "properties": {
                "kind": {
                    "title": "SpanKind",
                    "type": "integer",
                    "enum": [
                        0,
                        1,
                        2,
                        3,
                        4
                    ],
                    "tsEnumNames": [
                        "INTERNAL",
                        "SERVER",
                        "CLIENT",
                        "PRODUCER",
                        "CONSUMER"
                    ],
                    "tsConstEnum": false,
                    "description": "Specifies the kind of span in OpenTelemetry traces."
                },
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "number",
                            "boolean",
                            "array"
                        ]
                    },
                    "description": "A span's attributes"
                },
                "links": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "context": {
                                "type": "object",
                                "description": "Span context to link to",
                                "properties": {
                                    "traceId": {
                                        "type": "string",
                                        "description": "32 lowercase hex chars (128-bit) identifying the trace.",
                                        "pattern": "^[0-9a-f]{32}$",
                                        "$comment": "If you want to disallow the all-zeros ID per W3C, add: { \"not\": { \"pattern\": \"^0{32}$\" } }"
                                    },
                                    "spanId": {
                                        "type": "string",
                                        "description": "16 lowercase hex chars (64-bit) identifying the span.",
                                        "pattern": "^[0-9a-f]{16}$",
                                        "$comment": "To disallow all-zeros span ID: add { \"not\": { \"pattern\": \"^0{16}$\" } }"
                                    },
                                    "isRemote": {
                                        "type": "boolean",
                                        "description": "True only if the SpanContext was propagated from a remote parent.",
                                        "default": false
                                    },
                                    "traceFlags": {
                                        "type": "integer",
                                        "description": "1-byte bitmap of trace flags (e.g., least-significant bit is sampling).",
                                        "minimum": 0,
                                        "maximum": 255,
                                        "$comment": "Use bit 0 (LSB) as 'sampled' if following W3C TraceFlags."
                                    },
                                    "traceState": true
                                },
                                "required": [
                                    "traceId",
                                    "spanId",
                                    "traceFlags"
                                ]
                            },
                            "attributes": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": [
                                        "string",
                                        "number",
                                        "boolean",
                                        "array"
                                    ]
                                },
                                "description": "Link attributes"
                            }
                        },
                        "required": [
                            "context"
                        ]
                    },
                    "description": "Links span to other spans"
                },
                "startTime": {
                    "anyOf": [
                        {
                            "type": "array",
                            "items": [
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "number"
                                }
                            ],
                            "minItems": 2,
                            "maxItems": 2,
                            "description": "Tuple of two numbers"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "type": "string",
                            "format": "date-time",
                            "tsType": "Date",
                            "description": "ISO 8601 date-time string (represents Date)"
                        }
                    ],
                    "description": "A manually specified start time for the created Span object"
                },
                "root": {
                    "type": "boolean",
                    "description": "The new span should be a root span (ignore parent from context)"
                }
            },
            "additionalProperties": true
        },
        "CompressionAlgorithm": {
            "title": "CompressionAlgorithm",
            "type": "string",
            "enum": [
                "none",
                "gzip"
            ],
            "tsEnumNames": [
                "NONE",
                "GZIP"
            ],
            "description": "Compression algorithm to use",
            "tsConstEnum": false
        },
        "UserJourneyTraceConfig": {
            "type": "object",
            "description": "Config for User Journey traces",
            "required": [
                "enabled"
            ],
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Whether the User Journey trace will be enabled"
                },
                "structure": {
                    "type": "string",
                    "enum": [
                        "sibling",
                        "nested"
                    ],
                    "description": "Span structure of User Journey traces"
                },
                "descriptiveName": {
                    "type": "boolean",
                    "description": "Whether the User Journey trace span names will include the name of the focused app"
                }
            },
            "additionalProperties": true
        },
        "ClickstreamTraceConfig": {
            "type": "object",
            "description": "Config for Clickstream traces",
            "required": [
                "enabled"
            ],
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Whether the Clickstream traces will be enabled"
                },
                "structure": {
                    "type": "string",
                    "enum": [
                        "sibling",
                        "nested"
                    ],
                    "description": "Span structure of Clickstream traces"
                },
                "descriptiveName": {
                    "type": "boolean",
                    "description": "Whether the Clickstream trace span names will include the name of the target element"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "Events to track in the Clickstream trace"
                }
            },
            "additionalProperties": true
        },
        "Log4JSToOTELAppenderConfig": {
            "type": "object",
            "description": "This interface describes the log4js appender configuration that controls the @interopio/log4js-otel bridge appender.",
            "properties": {
                "layout": {
                    "$ref": "#/definitions/Logs4JSLayout",
                    "description": "log4js layout to use for structuring the log entries. If not specified, uses MessagePassThroughLayout."
                },
                "maxRecordsBeforeOTELActive": {
                    "type": "number",
                    "description": "Maximum number of log records to store in memory before the OTEL SDK has finished initializing. Use -1 for an infinite number.",
                    "default": 10000
                },
                "maxTimeBeforeOTELActiveMs": {
                    "type": "number",
                    "description": "Maximum duration of time to store log entries in memory before the OTEL SDK has finished initializing. Use -1 for an infinite duration.",
                    "default": -1
                },
                "logErrorsInConsole": {
                    "type": "boolean",
                    "description": "Whether errors in the @interopio/log4js-otel bridge appender will be logged to the console.",
                    "default": true
                }
            },
            "required": [],
            "additionalProperties": false
        },
        "Logs4JSLayout": {
            "type": "object",
            "description": "TODO: Description for Logs4JSLayout",
            "properties": {
                "layout": {
                    "type": "object",
                    "description": "Layout configuration (any key-value object).",
                    "additionalProperties": true
                },
                "maxRecordsBeforeOTELActive": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Maximum number of records before OTEL becomes active."
                },
                "maxTimeBeforeOTELActiveMs": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Maximum time in milliseconds before OTEL becomes active."
                },
                "logErrorsInConsole": {
                    "type": "boolean",
                    "description": "If true, errors are logged in the console."
                },
                "rawLayout": {
                    "type": "boolean",
                    "description": "If true, layout output is treated as raw text."
                }
            },
            "required": [],
            "additionalProperties": false
        }
    }
}