{"record":{"id":"abe1745b8db3a72a","repo":"pinpoint-apm/pinpoint","slug":"unknown-spansendertype-value","errorCode":null,"errorMessage":"Unknown SpanSenderType: ${value}","messagePattern":"Unknown SpanSenderType: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/grpc/config/SpanSenderType.java","lineNumber":39,"sourceCode":" */\npublic enum SpanSenderType {\n    BATCH,\n    STREAM;\n\n    public static SpanSenderType defaultType() {\n        return BATCH;\n    }\n\n    public static SpanSenderType fromValue(String value) {\n        if (value == null) {\n            return defaultType();\n        }\n        for (SpanSenderType type : values()) {\n            if (type.name().equalsIgnoreCase(value)) {\n                return type;\n            }\n        }\n        throw new IllegalArgumentException(\"Unknown SpanSenderType: \" + value);\n    }\n}","sourceCodeStart":21,"sourceCodeEnd":41,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/grpc/config/SpanSenderType.java#L21-L41","documentation":"SpanSenderType.fromValue resolves a configuration string to a SpanSenderType enum by case-insensitive name matching. If the given value matches none of the enum constants, it throws IllegalArgumentException listing the unknown value. This guards against typos or unsupported sender implementations in agent configuration.","triggerScenarios":"Setting the span sender type profiler config property (e.g. profiler.span.sender.type or equivalent) to a string other than the defined enum names (case-insensitive), then starting the agent — fromValue is invoked during config parsing/initialization.","commonSituations":"Typo in pinpoint.config value (e.g. 'GRPC_HTTP' vs supported names); copying config from another Pinpoint version where the enum constant was renamed/removed; extra whitespace is trimmed via toUpperCase/equalsIgnoreCase but non-matching names like 'grpcv2' fail.","solutions":["Use one of the exact SpanSenderType enum names in the config (case-insensitive), e.g. GRPC.","Print accepted values: check SpanSenderType enum constants in the same Pinpoint version you run.","Remove stale config from an older Pinpoint version if the enum value was renamed or removed.","Update the Pinpoint agent version if the desired sender type only exists in a newer release."],"exampleFix":"// before (config)\nprofiler.span.sender.type=GRPC_STREAMING\n\n// after\nprofiler.span.sender.type=GRPC","handlingStrategy":"validation","validationCode":"String senderType = properties.getProperty(\"profiler.span.sender.type\", \"GRPC\").trim();\nboolean valid = Arrays.stream(SpanSenderType.values())\n        .anyMatch(t -> t.name().equalsIgnoreCase(senderType));\nif (!valid) throw new IllegalStateException(\"Invalid profiler.span.sender.type: \" + senderType);","typeGuard":null,"tryCatchPattern":"try {\n    SpanSenderType type = SpanSenderType.fromValue(configValue);\n} catch (IllegalArgumentException e) {\n    logger.error(\"Bad sender type '{}', falling back to GRPC\", configValue);\n    SpanSenderType type = SpanSenderType.GRPC;\n}","preventionTips":["Copy enum names exactly from SpanSenderType in your agent version (matching is case-insensitive but names must exist).","When upgrading Pinpoint, diff your config keys/values against the new version's defaults.","Validate config at startup with a fail-fast script before deploying agents."],"tags":["java","configuration","enum","startup"],"backgroundTag":"invalid-enum-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}