# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .gateway_otel_config_otel_traces_exporter_config import GatewayOtelConfigOtelTracesExporterConfig


class GatewayOtelConfig(UniversalBaseModel):
    type: typing.Literal["gateway-otel-config"] = pydantic.Field(default="gateway-otel-config")
    """
    +value=gateway-otel-config
    +sort=1
    """

    otel_traces_exporter_config: typing.Optional[GatewayOtelConfigOtelTracesExporterConfig] = pydantic.Field(
        default=None
    )
    """
    Set this configuration to export LLM gateway OTEL traces to an external platform. Note that we only export OTEL traces via this configuration, this does not include OTEL metrics.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
