{"record":{"id":"cf53d7091f1ca689","repo":"pinpoint-apm/pinpoint","slug":"not-found-applicationname","errorCode":null,"errorMessage":"not found applicationName","messagePattern":"not found 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":112,"sourceCode":"    }\n\n    private static String getAgentNameOverride(Map<String, AttributeValue> attributes) {\n        final String agentName = AttributeUtils.getAttributeStringValue(attributes, KEY_AGENT_NAME, null);\n        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;","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceMapperUtils.java#L94-L130","documentation":"OTLP span-to-Pinpoint mapping requires an application name for every incoming span. getApplicationName reads the 'pinpoint.applicationName' (or fallback 'service.name') span attribute; if neither is present it throws IllegalArgumentException because a Pinpoint application name is mandatory to identify the service the trace belongs to.","triggerScenarios":"An OTLP span/span-event is mapped via OtlpTraceMapperUtils.applicationName and its attribute map contains neither KEY_APPLICATION_NAME nor KEY_SERVICE_NAME (both missing or empty after string extraction).","commonSituations":"Instrumented apps exporting via OTLP without configuring their SDK's service.name resource attribute; exporters stripping resource attributes; custom pipelines sending raw spans without Pinpoint metadata.","solutions":["Set the OTel SDK service.name resource attribute (OTEL_SERVICE_NAME env var or service.name in resource config) so it maps to Pinpoint's applicationName","Add the explicit 'pinpoint.applicationName' span/resource attribute in your exporter pipeline","Verify attribute propagation is not dropping resource attributes between collector hops","If you control the mapper call, pre-validate attributes with AttributeUtils.getAttributeStringValue before mapping"],"exampleFix":"// before (OTel SDK config)\n// (no service.name set)\n// after\nexport OTEL_SERVICE_NAME=my-app\n// or in code: SdkTracerProvider.builder().setResource(Resource.getDefault().merge(Resource.builder().put(\"service.name\",\"my-app\").build()))","handlingStrategy":"validation","validationCode":"String name = AttributeUtils.getAttributeStringValue(attributes, KEY_APPLICATION_NAME, null);\nif (name == null) name = AttributeUtils.getAttributeStringValue(attributes, KEY_SERVICE_NAME, null);\nif (name == null) throw new IllegalArgumentException(\"not found applicationName\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always configure OTEL_SERVICE_NAME / service.name resource attribute on exporters","Attach explicit pinpoint.applicationName attribute in managed pipelines","Log attributes on mapping failure to spot stripped resource attributes early"],"tags":["otlp","validation","missing-attribute"],"backgroundTag":"missing-required-argument","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}