#4204·gofr

跟踪: 没有针对 Google Cloud 的 IAM 认证的输出器 - OTLP 跟踪输出器与指标不同,被固定为明文

作者: akshat-kumar-singhal创建于 2026年9月13日更新于 2026年9月13日

1. The trace OTLP exporter is pinned to plaintext

pkg/gofr/otel.go:193:

go
opts := []otlptracegrpc.Option{otlptracegrpc.WithInsecure(), otlptracegrpc.WithEndpoint(url)}

WithInsecure() is unconditional, so TRACER_URL can only ever point at a plaintext collector. It cannot be worked around from the environment either: the OTel SDK applies env config first and explicit options afterwards (otlptrace/otlptracegrpc/internal/otlpconfig/options.go:115-131), so OTEL_EXPORTER_OTLP_INSECURE=false loses to the hardcoded option. An https:// endpoint is silently downgraded rather than refused.