temporalio/temporal · error · unsupportedTraceExporterProtocol

%w: %v=%v

Error message

%w: %v=%v

What it means

Error "%w: %v=%v" thrown in temporalio/temporal.

Source

Thrown at common/telemetry/env.go:46

// SpanExportersFromEnv creates OTEL span exporters from environment variables.
func SpanExportersFromEnv(
	envVars envVarLookup,
) (map[SpanExporterType]otelsdktrace.SpanExporter, error) {
	exporters := map[SpanExporterType]otelsdktrace.SpanExporter{}

	exporterTypes, ok := envVars(OtelTracesExporterTypesEnvKey)
	if !ok {
		return exporters, nil
	}

	for exporterType := range strings.SplitSeq(exporterTypes, ",") {
		switch SpanExporterType(exporterType) {
		case OtelTracesOtlpExporterType:
			// only grpc is supported; fail if user requests a different protocol
			if protocol, exists := envVars(OtelExporterOtlpTracesProtocolEnvKey); exists {
				isSupported := protocol == OtelExporterOtlpTracesGrcpProtocol
				if !isSupported {
					return nil, fmt.Errorf("%w: %v=%v", unsupportedTraceExporterProtocol, OtelExporterOtlpTracesProtocolEnvKey, protocol)
				}
			}

			// other OTEL configuration env variables are picked up automatically by the exporter itself
			exporters[OtelTracesOtlpExporterType] = otlptracegrpc.NewUnstarted()
		case "none":
			// ignored
		default:
			return nil, fmt.Errorf("%w: %v=%v", unsupportedTraceExporter, OtelTracesExporterTypesEnvKey, exporterType)
		}
	}

	return exporters, nil
}

// ResourceServiceName returns the OpenTelemetry tracing service name for a Temporal service.
func ResourceServiceName(
	rsn primitives.ServiceName,

View on GitHub (pinned to bde624efd1)

When it happens

Trigger: Thrown at common/telemetry/env.go:46 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/4b2b56911dd1dee6. Report an issue: GitHub.