{"record":{"id":"ea85f947bf97e863","repo":"quickwit-oss/quickwit","slug":"unsupported-otlp-protocol-other-supported-val","errorCode":null,"errorMessage":"unsupported OTLP protocol `{other}`, supported values are `{OTLP_PROTOCOL_GRPC}`, `{OTLP_PROTOCOL_HTTP_JSON}`, and `{OTLP_PROTOCOL_HTTP_PROTO}`","messagePattern":"unsupported OTLP protocol `(.+?)`, supported values are `(.+?)`, `(.+?)`, and `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-telemetry-exporters/src/otlp/config.rs","lineNumber":52,"sourceCode":"    HttpJson,\n}\n\nimpl FromStr for OtlpProtocol {\n    type Err = anyhow::Error;\n\n    fn from_str(protocol_str: &str) -> anyhow::Result<Self> {\n        const OTLP_PROTOCOL_GRPC: &str = \"grpc\";\n        const OTLP_PROTOCOL_HTTP_JSON: &str = \"http/json\";\n        const OTLP_PROTOCOL_HTTP_PROTO: &str = \"http/proto\";\n        const OTLP_PROTOCOL_HTTP_PROTOBUF: &str = \"http/protobuf\";\n\n        match protocol_str {\n            OTLP_PROTOCOL_GRPC => Ok(OtlpProtocol::Grpc),\n            OTLP_PROTOCOL_HTTP_JSON => Ok(OtlpProtocol::HttpJson),\n            OTLP_PROTOCOL_HTTP_PROTO | OTLP_PROTOCOL_HTTP_PROTOBUF => {\n                Ok(OtlpProtocol::HttpProtobuf)\n            }\n            other => anyhow::bail!(\n                \"unsupported OTLP protocol `{other}`, supported values are \\\n                 `{OTLP_PROTOCOL_GRPC}`, `{OTLP_PROTOCOL_HTTP_JSON}`, and \\\n                 `{OTLP_PROTOCOL_HTTP_PROTO}`\"\n            ),\n        }\n    }\n}\n\npub(crate) struct OtlpExporterConfig {\n    enabled: bool,\n    default_protocol: String,\n}\n\nimpl OtlpExporterConfig {\n    pub(crate) fn load_from_env() -> Self {\n        OtlpExporterConfig {\n            enabled: get_bool_from_env(QW_ENABLE_OPENTELEMETRY_OTLP_EXPORTER_ENV_KEY, false),\n            default_protocol: get_from_env(","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-telemetry-exporters/src/otlp/config.rs#L34-L70","documentation":"OtlpProtocol implements FromStr and accepts only the literal protocol names `grpc`, `http/protobuf` (plus alias `protobuf`), and `http/json`. Any other string in an OTLP exporter endpoint's `protocol=` parameter makes parsing fail with the list of supported values embedded in the message.","triggerScenarios":"Configuring an OTLP exporter with `otlp/exporter/protocol` set to something like `http-json`, `HTTP`, or `https` instead of the exact accepted values.","commonSituations":"Typos or casing mistakes in telemetry config (e.g. `http_json`), copying OpenTelemetry SDK defaults like `http/protobuf` misspelled, or inventing `https` assuming it is a protocol.","solutions":["Set protocol to exactly one of: `grpc`, `http/json`, or `http/protobuf` (alias `protobuf`).","Lowercase and normalize the value before parsing if it comes from user input or env.","If HTTP is wanted but unsure of payload format, use `http/json` for JSON, `http/protobuf` for protobuf."],"exampleFix":"// before\nprotocol = \"http_json\"\n// after\nprotocol = \"http/json\"","handlingStrategy":"validation","validationCode":"const VALID: [&str; 3] = [\"grpc\", \"http/json\", \"http/protobuf\"];\nif !VALID.contains(&protocol.as_str()) && protocol != \"protobuf\" {\n    panic!(\"protocol must be one of grpc, http/json, http/protobuf\");\n}","typeGuard":null,"tryCatchPattern":"match protocol.parse::<OtlpProtocol>() {\n    Ok(p) => p,\n    Err(e) => { log::error!(\"fix OTLP protocol value: {e}\"); return Err(e); }\n}","preventionTips":["Normalize protocol strings to lowercase before parsing.","Keep an enum/whitelist at the config boundary instead of free-form strings."],"tags":["otlp","config","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}