{"record":{"id":"1773cb5801d6ea82","repo":"quarkusio/quarkus","slug":"unsupported-otel-protocol","errorCode":null,"errorMessage":"Unsupported OTEL protocol: ","messagePattern":"Unsupported OTEL protocol: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java","lineNumber":182,"sourceCode":"        return new LgtmLoggingFilter();\n    }\n\n    public String getOtlpProtocol() {\n        return config.otlpProtocol();\n    }\n\n    private int getPrivateOtlpPort() {\n        return getPrivateOtlpPort(getOtlpProtocol());\n    }\n\n    public static int getPrivateOtlpPort(String otlpProtocol) {\n        // use ignore-case here; grpc == gRPC\n        if (ContainerConstants.OTEL_GRPC_PROTOCOL.equalsIgnoreCase(otlpProtocol)) {\n            return ContainerConstants.OTEL_GRPC_EXPORTER_PORT;\n        } else if (ContainerConstants.OTEL_HTTP_PROTOCOL.equals(otlpProtocol)) {\n            return ContainerConstants.OTEL_HTTP_EXPORTER_PORT;\n        } else {\n            throw new IllegalArgumentException(\"Unsupported OTEL protocol: \" + otlpProtocol);\n        }\n    }\n\n    private String getPrometheusConfig() {\n        String scraping = config.scrapingInterval() + \"s\";\n        String prometheusConfig = String.format(PROMETHEUS_CONFIG_DEFAULT, scraping);\n        if (config.forceScraping().orElse(scrapingRequired)) {\n            boolean isTest = LaunchMode.current() == LaunchMode.TEST;\n            Config runtimeConfig = ConfigProvider.getConfig();\n            String rootPath = runtimeConfig.getOptionalValue(\"quarkus.management.root-path\", String.class).orElse(\"/q\");\n            String metricsPath = runtimeConfig.getOptionalValue(\"quarkus.management.metrics.path\", String.class)\n                    .orElse(\"/metrics\");\n            String httpPortKey = isTest ? \"quarkus.http.test-port\" : \"quarkus.http.port\";\n            Optional<Integer> optionalValue = runtimeConfig.getOptionalValue(httpPortKey, Integer.class);\n            int httpPort = optionalValue.orElse(isTest ? 8081 : 8080); // when not set use default\n\n            // On Linux, you can’t automatically resolve host.docker.internal,\n            // you need to provide the following run flag when you start the container:","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java#L164-L200","documentation":"LgtmContainer.getPrivateOtlpPort() maps the configured OTLP protocol (grpc or http) to the corresponding exporter port inside the LGTM container. Any protocol value other than 'grpc'/'gRPC' or 'http' is unsupported and throws an IllegalArgumentException.","triggerScenarios":"quarkus.observability (or OTEL) protocol config set to an unrecognized value such as 'http/protobuf', 'https', a typo like 'grp', or empty string that is neither the gRPC nor HTTP constant.","commonSituations":"Copying OTEL exporter protocol values meant for the OTel SDK (e.g. 'http/protobuf') into the dev-service config; case/spacing typos; versions where only grpc and http are supported.","solutions":["Set the OTLP protocol to 'grpc' or 'http' exactly","Trim/lowercase-check the config value (gRPC is matched case-insensitively, http is not)","Remove conflicting OTEL protocol overrides so the default grpc is used"],"exampleFix":"// before\nquarkus.observability.otel.protocol=http/protobuf\n// after\nquarkus.observability.otel.protocol=http","handlingStrategy":"validation","validationCode":"String p = config.protocol();\nif (!\"grpc\".equalsIgnoreCase(p) && !\"http\".equals(p)) throw new IllegalArgumentException(\"Unsupported OTEL protocol: \" + p);","typeGuard":null,"tryCatchPattern":"try { port = container.getPrivateOtlpPort(); } catch (IllegalArgumentException e) { port = ContainerConstants.OTEL_GRPC_EXPORTER_PORT; }","preventionTips":["Only use 'grpc' or 'http' in quarkus.observability/OTEL protocol config","Normalize (trim) config values before use","Check ContainerConstants for supported values"],"tags":["otel","config","devservices"],"backgroundTag":"unsupported-protocol-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}