@@ -539,6 +539,99 @@ ExperimentConfig
539539 experiment_metadata = {" model" : " gpt-4" , " temperature" : 0.7 }
540540 )
541541
542+ OTLPConfig
543+ ----------
544+
545+ .. autoclass :: OTLPConfig
546+ :members:
547+ :undoc-members:
548+ :show-inheritance:
549+
550+ **OTLP (OpenTelemetry Protocol) export configuration parameters. **
551+
552+ **OTLP Fields: **
553+
554+ .. py :attribute :: otlp_enabled
555+ :type: bool
556+ :value: True
557+
558+ Enable OTLP export.
559+
560+ **Environment Variable **: ``HH_OTLP_ENABLED ``
561+
562+ .. py :attribute :: otlp_endpoint
563+ :type: Optional[str]
564+ :value: None
565+
566+ Custom OTLP endpoint URL.
567+
568+ **Environment Variable **: ``HH_OTLP_ENDPOINT ``
569+
570+ .. py :attribute :: otlp_headers
571+ :type: Optional[Dict[str, Any]]
572+ :value: None
573+
574+ OTLP headers in JSON format.
575+
576+ **Environment Variable **: ``HH_OTLP_HEADERS `` (JSON string)
577+
578+ .. py :attribute :: otlp_protocol
579+ :type: str
580+ :value: "http/protobuf"
581+
582+ OTLP protocol format: ``"http/protobuf" `` (default) or ``"http/json" ``.
583+
584+ **Environment Variables **: ``HH_OTLP_PROTOCOL `` or ``OTEL_EXPORTER_OTLP_PROTOCOL ``
585+
586+ .. py :attribute :: batch_size
587+ :type: int
588+ :value: 100
589+
590+ OTLP batch size for performance optimization.
591+
592+ **Environment Variable **: ``HH_BATCH_SIZE ``
593+
594+ .. py :attribute :: flush_interval
595+ :type: float
596+ :value: 5.0
597+
598+ OTLP flush interval in seconds.
599+
600+ **Environment Variable **: ``HH_FLUSH_INTERVAL ``
601+
602+ .. py :attribute :: max_export_batch_size
603+ :type: int
604+ :value: 512
605+
606+ Maximum export batch size.
607+
608+ **Environment Variable **: ``HH_MAX_EXPORT_BATCH_SIZE ``
609+
610+ .. py :attribute :: export_timeout
611+ :type: float
612+ :value: 30.0
613+
614+ Export timeout in seconds.
615+
616+ **Environment Variable **: ``HH_EXPORT_TIMEOUT ``
617+
618+ **Example Usage: **
619+
620+ .. code-block :: python
621+
622+ from honeyhive.config.models import OTLPConfig
623+
624+ # Use JSON format for OTLP export
625+ otlp_config = OTLPConfig(
626+ otlp_protocol = " http/json" ,
627+ batch_size = 200 ,
628+ flush_interval = 1.0
629+ )
630+
631+ # Or via environment variable
632+ # export HH_OTLP_PROTOCOL=http/json
633+ otlp_config = OTLPConfig() # Loads from HH_OTLP_PROTOCOL
634+
542635 Environment Variable Integration
543636================================
544637
@@ -551,6 +644,7 @@ All configuration models support **automatic environment variable loading** usin
551644- **Performance **: ``HH_TIMEOUT ``, ``HH_MAX_CONNECTIONS ``, ``HH_RATE_LIMIT_* ``
552645- **Caching **: ``HH_CACHE_ENABLED ``, ``HH_CACHE_MAX_SIZE ``, ``HH_CACHE_TTL ``
553646- **Experiments **: ``HH_EXPERIMENT_ID ``, ``HH_EXPERIMENT_NAME ``
647+ - **OTLP **: ``HH_OTLP_ENABLED ``, ``HH_OTLP_ENDPOINT ``, ``HH_OTLP_PROTOCOL ``, ``HH_OTLP_HEADERS ``, ``HH_BATCH_SIZE ``, ``HH_FLUSH_INTERVAL ``
554648
555649**Priority Order: **
556650
0 commit comments