# generated by datamodel-codegen:
#   filename:  schema.json
#   timestamp: 2026-06-23T15:17:37+00:00

from __future__ import annotations

from dataclasses import dataclass
from enum import Enum
from typing import Any, ClassVar, TypeAlias

from opentelemetry.configuration._common import _additional_properties

AlwaysOffSampler: TypeAlias = dict[str, Any] | None


AlwaysOnSampler: TypeAlias = dict[str, Any] | None


@dataclass
class AttributeLimits:
    attribute_value_length_limit: int | None = None
    attribute_count_limit: int | None = None


Value: TypeAlias = list[str]


Value1: TypeAlias = list[bool]


Value2: TypeAlias = list[float]


class AttributeType(Enum):
    string = "string"
    bool = "bool"
    int = "int"
    double = "double"
    string_array = "string_array"
    bool_array = "bool_array"
    int_array = "int_array"
    double_array = "double_array"


B3MultiPropagator: TypeAlias = dict[str, Any] | None


B3Propagator: TypeAlias = dict[str, Any] | None


BaggagePropagator: TypeAlias = dict[str, Any] | None


@dataclass
class Base2ExponentialBucketHistogramAggregation:
    max_scale: int | None = None
    max_size: int | None = None
    record_min_max: bool | None = None


@dataclass
class CardinalityLimits:
    default: int | None = None
    counter: int | None = None
    gauge: int | None = None
    histogram: int | None = None
    observable_counter: int | None = None
    observable_gauge: int | None = None
    observable_up_down_counter: int | None = None
    up_down_counter: int | None = None


ConsoleExporter: TypeAlias = dict[str, Any] | None


DefaultAggregation: TypeAlias = dict[str, Any] | None


Distribution: TypeAlias = dict[str, dict[str, Any]]


DropAggregation: TypeAlias = dict[str, Any] | None


class ExemplarFilter(Enum):
    always_on = "always_on"
    always_off = "always_off"
    trace_based = "trace_based"


ExperimentalComposableAlwaysOffSampler: TypeAlias = dict[str, Any] | None


ExperimentalComposableAlwaysOnSampler: TypeAlias = dict[str, Any] | None


@dataclass
class ExperimentalComposableProbabilitySampler:
    ratio: float | None = None


@dataclass
class ExperimentalComposableRuleBasedSamplerRuleAttributePatterns:
    key: str
    included: list[str] | None = None
    excluded: list[str] | None = None


@dataclass
class ExperimentalComposableRuleBasedSamplerRuleAttributeValues:
    key: str
    values: list[str]


ExperimentalContainerResourceDetector: TypeAlias = dict[str, Any] | None


ExperimentalEventToSpanEventBridgeLogRecordProcessor: TypeAlias = (
    dict[str, Any] | None
)


ExperimentalHostResourceDetector: TypeAlias = dict[str, Any] | None


@dataclass
class ExperimentalHttpClientInstrumentation:
    request_captured_headers: list[str] | None = None
    response_captured_headers: list[str] | None = None
    known_methods: list[str] | None = None


@dataclass
class ExperimentalHttpServerInstrumentation:
    request_captured_headers: list[str] | None = None
    response_captured_headers: list[str] | None = None
    known_methods: list[str] | None = None


ExperimentalLanguageSpecificInstrumentation: TypeAlias = dict[
    str, dict[str, Any]
]


@dataclass
class ExperimentalMeterConfig:
    enabled: bool | None = None


@dataclass
class ExperimentalMeterMatcherAndConfig:
    name: str
    config: ExperimentalMeterConfig


@dataclass
class ExperimentalOtlpFileExporter:
    output_stream: str | None = None


@dataclass
class ExperimentalProbabilitySampler:
    ratio: float | None = None


ExperimentalProcessResourceDetector: TypeAlias = dict[str, Any] | None


class ExperimentalPrometheusTranslationStrategy(Enum):
    underscore_escaping_with_suffixes = "underscore_escaping_with_suffixes"
    underscore_escaping_without_suffixes_development = (
        "underscore_escaping_without_suffixes/development"
    )
    no_utf8_escaping_with_suffixes_development = (
        "no_utf8_escaping_with_suffixes/development"
    )
    no_translation_development = "no_translation/development"


@dataclass
class ExperimentalSemconvConfig:
    version: int | None = None
    experimental: bool | None = None
    dual_emit: bool | None = None


ExperimentalServiceResourceDetector: TypeAlias = dict[str, Any] | None


class ExperimentalSpanParent(Enum):
    none = "none"
    remote = "remote"
    local = "local"


@dataclass
class ExperimentalTracerConfig:
    enabled: bool | None = None


@dataclass
class ExperimentalTracerMatcherAndConfig:
    name: str
    config: ExperimentalTracerConfig


@dataclass
class ExperimentalUrlSanitization:
    sensitive_query_parameters: list[str] | None = None


@dataclass
class ExplicitBucketHistogramAggregation:
    boundaries: list[float] | None = None
    record_min_max: bool | None = None


class ExporterDefaultHistogramAggregation(Enum):
    explicit_bucket_histogram = "explicit_bucket_histogram"
    base2_exponential_bucket_histogram = "base2_exponential_bucket_histogram"


class ExporterTemporalityPreference(Enum):
    cumulative = "cumulative"
    delta = "delta"
    low_memory = "low_memory"


@dataclass
class GrpcTls:
    ca_file: str | None = None
    key_file: str | None = None
    cert_file: str | None = None
    insecure: bool | None = None


@dataclass
class HttpTls:
    ca_file: str | None = None
    key_file: str | None = None
    cert_file: str | None = None


@dataclass
class IncludeExclude:
    included: list[str] | None = None
    excluded: list[str] | None = None


class InstrumentType(Enum):
    counter = "counter"
    gauge = "gauge"
    histogram = "histogram"
    observable_counter = "observable_counter"
    observable_gauge = "observable_gauge"
    observable_up_down_counter = "observable_up_down_counter"
    up_down_counter = "up_down_counter"


LastValueAggregation: TypeAlias = dict[str, Any] | None


@dataclass
class LogRecordLimits:
    attribute_value_length_limit: int | None = None
    attribute_count_limit: int | None = None


@dataclass
class NameStringValuePair:
    name: str
    value: str | None


OpenCensusMetricProducer: TypeAlias = dict[str, Any] | None


@dataclass
class OtlpGrpcExporter:
    endpoint: str | None = None
    tls: GrpcTls | None = None
    headers: list[NameStringValuePair] | None = None
    headers_list: str | None = None
    compression: str | None = None
    timeout: int | None = None


@dataclass
class OtlpGrpcMetricExporter:
    endpoint: str | None = None
    tls: GrpcTls | None = None
    headers: list[NameStringValuePair] | None = None
    headers_list: str | None = None
    compression: str | None = None
    timeout: int | None = None
    temporality_preference: ExporterTemporalityPreference | None = None
    default_histogram_aggregation: (
        ExporterDefaultHistogramAggregation | None
    ) = None


class OtlpHttpEncoding(Enum):
    protobuf = "protobuf"
    json = "json"


@dataclass
class OtlpHttpExporter:
    endpoint: str | None = None
    tls: HttpTls | None = None
    headers: list[NameStringValuePair] | None = None
    headers_list: str | None = None
    compression: str | None = None
    timeout: int | None = None
    encoding: OtlpHttpEncoding | None = None


@dataclass
class OtlpHttpMetricExporter:
    endpoint: str | None = None
    tls: HttpTls | None = None
    headers: list[NameStringValuePair] | None = None
    headers_list: str | None = None
    compression: str | None = None
    timeout: int | None = None
    encoding: OtlpHttpEncoding | None = None
    temporality_preference: ExporterTemporalityPreference | None = None
    default_histogram_aggregation: (
        ExporterDefaultHistogramAggregation | None
    ) = None


RandomIdGenerator: TypeAlias = dict[str, Any] | None


class SeverityNumber(Enum):
    trace = "trace"
    trace2 = "trace2"
    trace3 = "trace3"
    trace4 = "trace4"
    debug = "debug"
    debug2 = "debug2"
    debug3 = "debug3"
    debug4 = "debug4"
    info = "info"
    info2 = "info2"
    info3 = "info3"
    info4 = "info4"
    warn = "warn"
    warn2 = "warn2"
    warn3 = "warn3"
    warn4 = "warn4"
    error = "error"
    error2 = "error2"
    error3 = "error3"
    error4 = "error4"
    fatal = "fatal"
    fatal2 = "fatal2"
    fatal3 = "fatal3"
    fatal4 = "fatal4"


@_additional_properties
@dataclass
class SpanExporter:
    otlp_http: OtlpHttpExporter | None = None
    otlp_grpc: OtlpGrpcExporter | None = None
    otlp_file_development: ExperimentalOtlpFileExporter | None = None
    console: ConsoleExporter | None = None
    additional_properties: ClassVar[dict[str, Any]]


class SpanKind(Enum):
    internal = "internal"
    server = "server"
    client = "client"
    producer = "producer"
    consumer = "consumer"


@dataclass
class SpanLimits:
    attribute_value_length_limit: int | None = None
    attribute_count_limit: int | None = None
    event_count_limit: int | None = None
    link_count_limit: int | None = None
    event_attribute_count_limit: int | None = None
    link_attribute_count_limit: int | None = None


SumAggregation: TypeAlias = dict[str, Any] | None


TraceContextPropagator: TypeAlias = dict[str, Any] | None


@dataclass
class TraceIdRatioBasedSampler:
    ratio: float | None = None


@dataclass
class ViewSelector:
    instrument_name: str | None = None
    instrument_type: InstrumentType | None = None
    unit: str | None = None
    meter_name: str | None = None
    meter_version: str | None = None
    meter_schema_url: str | None = None


@dataclass
class Aggregation:
    default: DefaultAggregation | None = None
    drop: DropAggregation | None = None
    explicit_bucket_histogram: ExplicitBucketHistogramAggregation | None = None
    base2_exponential_bucket_histogram: (
        Base2ExponentialBucketHistogramAggregation | None
    ) = None
    last_value: LastValueAggregation | None = None
    sum: SumAggregation | None = None


@dataclass
class AttributeNameValue:
    name: str
    value: str | float | bool | Value | Value1 | Value2 | None
    type: AttributeType | None = None


@dataclass
class BatchSpanProcessor:
    exporter: SpanExporter
    schedule_delay: int | None = None
    export_timeout: int | None = None
    max_queue_size: int | None = None
    max_export_batch_size: int | None = None


@dataclass
class ConsoleMetricExporter:
    temporality_preference: ExporterTemporalityPreference | None = None
    default_histogram_aggregation: (
        ExporterDefaultHistogramAggregation | None
    ) = None


@dataclass
class ExperimentalCodeInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None


@dataclass
class ExperimentalDbInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None


@dataclass
class ExperimentalGenAiInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None


@dataclass
class ExperimentalHttpInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None
    client: ExperimentalHttpClientInstrumentation | None = None
    server: ExperimentalHttpServerInstrumentation | None = None


@dataclass
class ExperimentalLoggerConfig:
    enabled: bool | None = None
    minimum_severity: SeverityNumber | None = None
    trace_based: bool | None = None


@dataclass
class ExperimentalLoggerMatcherAndConfig:
    name: str
    config: ExperimentalLoggerConfig


@dataclass
class ExperimentalMessagingInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None


@dataclass
class ExperimentalMeterConfigurator:
    default_config: ExperimentalMeterConfig | None = None
    meters: list[ExperimentalMeterMatcherAndConfig] | None = None


@dataclass
class ExperimentalOtlpFileMetricExporter:
    output_stream: str | None = None
    temporality_preference: ExporterTemporalityPreference | None = None
    default_histogram_aggregation: (
        ExporterDefaultHistogramAggregation | None
    ) = None


@dataclass
class ExperimentalPrometheusMetricExporter:
    host: str | None = None
    port: int | None = None
    scope_info_enabled: bool | None = None
    target_info_enabled_development: bool | None = None
    resource_constant_labels: IncludeExclude | None = None
    translation_strategy: ExperimentalPrometheusTranslationStrategy | None = (
        None
    )


@_additional_properties
@dataclass
class ExperimentalResourceDetector:
    container: ExperimentalContainerResourceDetector | None = None
    host: ExperimentalHostResourceDetector | None = None
    process: ExperimentalProcessResourceDetector | None = None
    service: ExperimentalServiceResourceDetector | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class ExperimentalRpcInstrumentation:
    semconv: ExperimentalSemconvConfig | None = None


@dataclass
class ExperimentalSanitization:
    url: ExperimentalUrlSanitization | None = None


@dataclass
class ExperimentalTracerConfigurator:
    default_config: ExperimentalTracerConfig | None = None
    tracers: list[ExperimentalTracerMatcherAndConfig] | None = None


@_additional_properties
@dataclass
class IdGenerator:
    random: RandomIdGenerator | None = None
    additional_properties: ClassVar[dict[str, Any]]


@_additional_properties
@dataclass
class LogRecordExporter:
    otlp_http: OtlpHttpExporter | None = None
    otlp_grpc: OtlpGrpcExporter | None = None
    otlp_file_development: ExperimentalOtlpFileExporter | None = None
    console: ConsoleExporter | None = None
    additional_properties: ClassVar[dict[str, Any]]


@_additional_properties
@dataclass
class MetricProducer:
    opencensus: OpenCensusMetricProducer | None = None
    additional_properties: ClassVar[dict[str, Any]]


@_additional_properties
@dataclass
class PullMetricExporter:
    prometheus_development: ExperimentalPrometheusMetricExporter | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class PullMetricReader:
    exporter: PullMetricExporter
    producers: list[MetricProducer] | None = None
    cardinality_limits: CardinalityLimits | None = None


@_additional_properties
@dataclass
class PushMetricExporter:
    otlp_http: OtlpHttpMetricExporter | None = None
    otlp_grpc: OtlpGrpcMetricExporter | None = None
    otlp_file_development: ExperimentalOtlpFileMetricExporter | None = None
    console: ConsoleMetricExporter | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class SimpleLogRecordProcessor:
    exporter: LogRecordExporter


@dataclass
class SimpleSpanProcessor:
    exporter: SpanExporter


@_additional_properties
@dataclass
class SpanProcessor:
    batch: BatchSpanProcessor | None = None
    simple: SimpleSpanProcessor | None = None
    additional_properties: ClassVar[dict[str, Any]]


@_additional_properties
@dataclass
class TextMapPropagator:
    tracecontext: TraceContextPropagator | None = None
    baggage: BaggagePropagator | None = None
    b3: B3Propagator | None = None
    b3multi: B3MultiPropagator | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class ViewStream:
    name: str | None = None
    description: str | None = None
    aggregation: Aggregation | None = None
    aggregation_cardinality_limit: int | None = None
    attribute_keys: IncludeExclude | None = None


@dataclass
class BatchLogRecordProcessor:
    exporter: LogRecordExporter
    schedule_delay: int | None = None
    export_timeout: int | None = None
    max_queue_size: int | None = None
    max_export_batch_size: int | None = None


@dataclass
class ExperimentalGeneralInstrumentation:
    http: ExperimentalHttpInstrumentation | None = None
    code: ExperimentalCodeInstrumentation | None = None
    db: ExperimentalDbInstrumentation | None = None
    gen_ai: ExperimentalGenAiInstrumentation | None = None
    messaging: ExperimentalMessagingInstrumentation | None = None
    rpc: ExperimentalRpcInstrumentation | None = None
    sanitization: ExperimentalSanitization | None = None
    stability_opt_in_list: str | None = None


@dataclass
class ExperimentalInstrumentation:
    general: ExperimentalGeneralInstrumentation | None = None
    cpp: ExperimentalLanguageSpecificInstrumentation | None = None
    dotnet: ExperimentalLanguageSpecificInstrumentation | None = None
    erlang: ExperimentalLanguageSpecificInstrumentation | None = None
    go: ExperimentalLanguageSpecificInstrumentation | None = None
    java: ExperimentalLanguageSpecificInstrumentation | None = None
    js: ExperimentalLanguageSpecificInstrumentation | None = None
    php: ExperimentalLanguageSpecificInstrumentation | None = None
    python: ExperimentalLanguageSpecificInstrumentation | None = None
    ruby: ExperimentalLanguageSpecificInstrumentation | None = None
    rust: ExperimentalLanguageSpecificInstrumentation | None = None
    swift: ExperimentalLanguageSpecificInstrumentation | None = None


@dataclass
class ExperimentalLoggerConfigurator:
    default_config: ExperimentalLoggerConfig | None = None
    loggers: list[ExperimentalLoggerMatcherAndConfig] | None = None


@dataclass
class ExperimentalResourceDetection:
    attributes: IncludeExclude | None = None
    detectors: list[ExperimentalResourceDetector] | None = None


@_additional_properties
@dataclass
class LogRecordProcessor:
    batch: BatchLogRecordProcessor | None = None
    simple: SimpleLogRecordProcessor | None = None
    event_to_span_event_bridge_development: (
        ExperimentalEventToSpanEventBridgeLogRecordProcessor | None
    ) = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class PeriodicMetricReader:
    exporter: PushMetricExporter
    interval: int | None = None
    timeout: int | None = None
    max_export_batch_size_development: int | None = None
    producers: list[MetricProducer] | None = None
    cardinality_limits: CardinalityLimits | None = None


@dataclass
class Propagator:
    composite: list[TextMapPropagator] | None = None
    composite_list: str | None = None


@dataclass
class Resource:
    attributes: list[AttributeNameValue] | None = None
    detection_development: ExperimentalResourceDetection | None = None
    schema_url: str | None = None
    attributes_list: str | None = None


@dataclass
class View:
    selector: ViewSelector
    stream: ViewStream


@dataclass
class LoggerProvider:
    processors: list[LogRecordProcessor]
    limits: LogRecordLimits | None = None
    logger_configurator_development: ExperimentalLoggerConfigurator | None = (
        None
    )


@dataclass
class MetricReader:
    periodic: PeriodicMetricReader | None = None
    pull: PullMetricReader | None = None


@dataclass
class MeterProvider:
    readers: list[MetricReader]
    views: list[View] | None = None
    exemplar_filter: ExemplarFilter | None = None
    meter_configurator_development: ExperimentalMeterConfigurator | None = None


@_additional_properties
@dataclass
class OpenTelemetryConfiguration:
    file_format: str
    disabled: bool | None = None
    log_level: SeverityNumber | None = None
    attribute_limits: AttributeLimits | None = None
    logger_provider: LoggerProvider | None = None
    meter_provider: MeterProvider | None = None
    propagator: Propagator | None = None
    tracer_provider: TracerProvider | None = None
    resource: Resource | None = None
    instrumentation_development: ExperimentalInstrumentation | None = None
    distribution: Distribution | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class ExperimentalComposableParentThresholdSampler:
    root: ExperimentalComposableSampler


@dataclass
class ExperimentalComposableRuleBasedSampler:
    rules: list[ExperimentalComposableRuleBasedSamplerRule] | None = None


@dataclass
class ExperimentalComposableRuleBasedSamplerRule:
    """
    A rule for ExperimentalComposableRuleBasedSampler. A rule can have multiple match conditions - the sampler will be applied if all match.
    If no conditions are specified, the rule matches all spans that reach it.

    """

    sampler: ExperimentalComposableSampler
    attribute_values: (
        ExperimentalComposableRuleBasedSamplerRuleAttributeValues | None
    ) = None
    attribute_patterns: (
        ExperimentalComposableRuleBasedSamplerRuleAttributePatterns | None
    ) = None
    span_kinds: list[SpanKind] | None = None
    parent: list[ExperimentalSpanParent] | None = None


@_additional_properties
@dataclass
class ExperimentalComposableSampler:
    always_off: ExperimentalComposableAlwaysOffSampler | None = None
    always_on: ExperimentalComposableAlwaysOnSampler | None = None
    parent_threshold: ExperimentalComposableParentThresholdSampler | None = (
        None
    )
    probability: ExperimentalComposableProbabilitySampler | None = None
    rule_based: ExperimentalComposableRuleBasedSampler | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class ExperimentalJaegerRemoteSampler:
    endpoint: str
    initial_sampler: Sampler
    interval: int | None = None


@dataclass
class ParentBasedSampler:
    root: Sampler | None = None
    remote_parent_sampled: Sampler | None = None
    remote_parent_not_sampled: Sampler | None = None
    local_parent_sampled: Sampler | None = None
    local_parent_not_sampled: Sampler | None = None


@_additional_properties
@dataclass
class Sampler:
    always_off: AlwaysOffSampler | None = None
    always_on: AlwaysOnSampler | None = None
    composite_development: ExperimentalComposableSampler | None = None
    jaeger_remote_development: ExperimentalJaegerRemoteSampler | None = None
    parent_based: ParentBasedSampler | None = None
    probability_development: ExperimentalProbabilitySampler | None = None
    trace_id_ratio_based: TraceIdRatioBasedSampler | None = None
    additional_properties: ClassVar[dict[str, Any]]


@dataclass
class TracerProvider:
    processors: list[SpanProcessor]
    limits: SpanLimits | None = None
    sampler: Sampler | None = None
    id_generator: IdGenerator | None = None
    tracer_configurator_development: ExperimentalTracerConfigurator | None = (
        None
    )
