{"record":{"id":"941027c9f100f5b2","repo":"pinpoint-apm/pinpoint","slug":"invalid-applicationname-applicationname","errorCode":null,"errorMessage":"invalid applicationName=${applicationName}","messagePattern":"invalid applicationName=(.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceMapperUtils.java","lineNumber":116,"sourceCode":"        if (agentName == null) {\n            return null;\n        }\n        if (!IdValidateUtils.validateId(agentName, PinpointConstants.AGENT_NAME_MAX_LEN_V4)) {\n            throw new IllegalArgumentException(\"invalid pinpoint.agentName=\" + agentName);\n        }\n        return agentName;\n    }\n\n    public static String getApplicationName(Map<String, AttributeValue> attributes) {\n        String applicationName = AttributeUtils.getAttributeStringValue(attributes, KEY_APPLICATION_NAME, null);\n        if (applicationName == null) {\n            applicationName = AttributeUtils.getAttributeStringValue(attributes, KEY_SERVICE_NAME, null);\n            if (applicationName == null) {\n                throw new IllegalArgumentException(\"not found applicationName\");\n            }\n        }\n        if (!IdValidateUtils.validateId(applicationName, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3)) {\n            throw new IllegalArgumentException(\"invalid applicationName=\" + applicationName);\n        }\n\n        return applicationName;\n    }\n\n    /**\n     * Formats an {@link InstrumentationScope} identity for the OPENTELEMETRY_SCOPE annotation:\n     * {@code \"name@version\"}, or bare {@code \"name\"} when the version is absent. Returns\n     * {@code null} when the scope name is empty (SDK did not populate the scope) so callers\n     * omit the annotation entirely.\n     */\n    public static @Nullable String formatScope(@Nullable InstrumentationScope scope) {\n        if (scope == null) {\n            return null;\n        }\n        final String name = scope.getName();\n        if (name.isEmpty()) {\n            return null;","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceMapperUtils.java#L98-L134","documentation":"After resolving applicationName from 'pinpoint.applicationName' or 'service.name' attributes, getApplicationName validates it with IdValidateUtils against Pinpoint's APPLICATION_NAME_MAX_LEN_V3 (allowed characters/length for v3 IDs). A value that is too long or contains disallowed characters throws this IllegalArgumentException.","triggerScenarios":"The applicationName/service.name attribute value fails IdValidateUtils.validateId(applicationName, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3) — e.g. contains whitespace, special characters, non-alphanumerics, or exceeds the v3 max length.","commonSituations":"service.name set to values with underscores, colons, slashes or uppercase/space (common Docker/K8s image names); long descriptive service names exceeding the 24-char v3 limit; copy-pasted names with trailing spaces.","solutions":["Rename the service to a valid Pinpoint applicationName: only allowed ID chars and within APPLICATION_NAME_MAX_LEN_V3","Set an explicit valid 'pinpoint.applicationName' attribute that overrides non-conforming service.name","Trim whitespace and normalize the value in your exporter before sending","Pre-validate with IdValidateUtils.validateId(name, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3) in your pipeline"],"exampleFix":"// before\nexport OTEL_SERVICE_NAME=my_service.prod-eu  // invalid chars\n// after\nexport OTEL_SERVICE_NAME=myServiceProdEu","handlingStrategy":"validation","validationCode":"String name = resolveApplicationName(attributes);\nif (!IdValidateUtils.validateId(name, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3)) {\n    throw new IllegalArgumentException(\"invalid applicationName=\" + name);\n}","typeGuard":null,"tryCatchPattern":"try { String app = OtlpTraceMapperUtils.getApplicationName(attrs); ... } catch (IllegalArgumentException e) { log.warn(\"bad applicationName: {}\", e.getMessage()); }","preventionTips":["Use only alphanumerics and allowed chars in service.name","Keep applicationName within APPLICATION_NAME_MAX_LEN_V3","Validate names in CI before deploying exporter config"],"tags":["otlp","validation","identifier"],"backgroundTag":"invalid-identifier-format","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}