Bug Description
The tracing setup in kagent-core (tracing/_utils.py) hardcodes gRPC OTLP exporters at import time:
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter
The OTEL_EXPORTER_OTLP_TRACES_PROTOCOL / OTEL_EXPORTER_OTLP_PROTOCOL env vars are never read, so agents cannot use http/protobuf. This blocks integration with OTLP backends that only support HTTP (e.g., Langfuse).
Steps to Reproduce
- Set
otel.tracing.exporter.otlp.protocol: http/protobuf in Helm values
- Confirm agent pods receive
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
- Agent still uses gRPC and fails:
grpc._channel._InactiveRpcError: UNKNOWN:Error received from peer {grpc_status:2, grpc_message:"Received http2 header with status: 464"}
Expected Behavior
The exporter should respect the protocol env var per the OpenTelemetry spec and select proto.http or proto.grpc accordingly.
Fix
PR #1681 addresses this with a minimal, backwards-compatible change.
Environment
- kagent: v0.8.6 (also verified on
main)
- Backend: Langfuse Cloud (HTTP-only OTLP)
Bug Description
The tracing setup in
kagent-core(tracing/_utils.py) hardcodes gRPC OTLP exporters at import time:The
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL/OTEL_EXPORTER_OTLP_PROTOCOLenv vars are never read, so agents cannot usehttp/protobuf. This blocks integration with OTLP backends that only support HTTP (e.g., Langfuse).Steps to Reproduce
otel.tracing.exporter.otlp.protocol: http/protobufin Helm valuesOTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobufExpected Behavior
The exporter should respect the protocol env var per the OpenTelemetry spec and select
proto.httporproto.grpcaccordingly.Fix
PR #1681 addresses this with a minimal, backwards-compatible change.
Environment
main)