{"record":{"id":"02d255d87057288d","repo":"pinpoint-apm/pinpoint","slug":"servicename-not-provided","errorCode":null,"errorMessage":"ServiceName not provided","messagePattern":"ServiceName not provided","errorType":"validation","errorClass":"ObjectNameValidationFailedException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/name/v4/ObjectNameResolverV4.java","lineNumber":78,"sourceCode":"        final ObjectNameProperty agentName = filter.resolve(AgentProperties::getAgentName, idValidator::validateAgentName);\n        if (!agentName.hasLengthValue()) {\n            logger.info(\"No AgentName(-Dpinpoint.agentName) provided, it's optional!\");\n        } else {\n            resolveLog(agentName);\n        }\n\n        final ObjectNameProperty applicationName = filter.resolve(AgentProperties::getApplicationName, idValidator::validateApplicationName);\n        if (!applicationName.hasLengthValue()) {\n            logger.warn(\"Failed to resolve ApplicationName(-Dpinpoint.applicationName)\");\n            throw new ObjectNameValidationFailedException(AgentIdType.ApplicationName, \"ApplicationName not provided\");\n        }  else {\n            resolveLog(applicationName);\n        }\n\n        final ObjectNameProperty serviceName = filter.resolve(AgentProperties::getServiceName, idValidator::validateServiceName);\n        if (!serviceName.hasLengthValue()) {\n            logger.warn(\"Failed to resolve ServiceName(-Dpinpoint.serviceName)\");\n            throw new ObjectNameValidationFailedException(AgentIdType.ServiceName, \"ServiceName not provided\");\n        } else {\n            resolveLog(serviceName);\n        }\n\n        final ObjectNameProperty apiKey = getApiKey(filter);\n        if (!apiKey.hasLengthValue()) {\n            logger.info(\"Failed to resolve ApiKey(-Dpinpoint.apikey)(Optional)\");\n//            throw new ObjectNameValidationFailedException(AgentIdType.APIKEY, \"ApiKey not provided\");\n        } else {\n            resolveLog(apiKey);\n        }\n\n        String agentNameStr = agentName.getValue();\n        if (agentNameStr == null) {\n            agentNameStr = Base64Utils.encode(agentId);\n        }\n        return new ObjectNameV4(agentId, agentNameStr, applicationName.getValue(), serviceName.getValue(), apiKey.getValue());\n    }","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/name/v4/ObjectNameResolverV4.java#L60-L96","documentation":"In v4 naming, serviceName is a required identity property resolved from -Dpinpoint.serviceName and validated by the id validator. If missing or invalid, ObjectNameResolverV4.resolve() throws ObjectNameValidationFailedException because the collector-side grouping requires a service name.","triggerScenarios":"Agent start in v4 naming mode without -Dpinpoint.serviceName, or with a value failing validateServiceName (length/charset).","commonSituations":"Deployments written for v1/v2 naming that only set applicationName; service name left as placeholder/empty in Helm charts; name exceeding max length after renaming a service.","solutions":["Add -Dpinpoint.serviceName=<service> to the JVM arguments","Ensure the value passes the service-name validator (non-empty, allowed length)","Update deployment templates/config to include serviceName when using v4 naming","Catch ObjectNameValidationFailedException at agent bootstrap and log the exact missing property"],"exampleFix":"// before\njava -Dpinpoint.applicationName=myApp -jar app.jar\n// after\njava -Dpinpoint.applicationName=myApp -Dpinpoint.serviceName=myService -jar app.jar","handlingStrategy":"validation","validationCode":"String svcName = System.getProperty(\"pinpoint.serviceName\");\nif (svcName == null || svcName.trim().isEmpty() || svcName.length() > 24) {\n    throw new IllegalArgumentException(\"-Dpinpoint.serviceName is required in v4 naming mode\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    resolverV4.resolve();\n} catch (ObjectNameValidationFailedException e) {\n    logger.error(\"Missing required identity property: {}\", e.getPropertyType());\n}","preventionTips":["Set both applicationName and serviceName together in v4 naming","Update Helm/deployment templates when moving from v1 to v4 naming","Validate serviceName length/charset before rollout","Document required pinpoint flags for service onboarding"],"tags":["agent-config","naming","missing-property"],"backgroundTag":"missing-required-config-field","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"}