pinpoint-apm/pinpoint · error · ObjectNameValidationFailedException
ServiceName not provided
Error message
ServiceName not provided
What it means
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.
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
Example fix
// before java -Dpinpoint.applicationName=myApp -jar app.jar // after java -Dpinpoint.applicationName=myApp -Dpinpoint.serviceName=myService -jar app.jar
Defensive patterns
Strategy: validation
Validate before calling
String svcName = System.getProperty("pinpoint.serviceName");
if (svcName == null || svcName.trim().isEmpty() || svcName.length() > 24) {
throw new IllegalArgumentException("-Dpinpoint.serviceName is required in v4 naming mode");
} Try / catch
try {
resolverV4.resolve();
} catch (ObjectNameValidationFailedException e) {
logger.error("Missing required identity property: {}", e.getPropertyType());
} Prevention
- 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
When it happens
Trigger: Agent start in v4 naming mode without -Dpinpoint.serviceName, or with a value failing validateServiceName (length/charset).
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- ApplicationName not provided
- ApplicationName not provided
- Could not resolve placeholder
- customMetricName must consist of
- Failed to create MetricId. metricName
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/02d255d87057288d.
Report an issue: GitHub.
Appendix: source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/name/v4/ObjectNameResolverV4.java:78
final ObjectNameProperty agentName = filter.resolve(AgentProperties::getAgentName, idValidator::validateAgentName);
if (!agentName.hasLengthValue()) {
logger.info("No AgentName(-Dpinpoint.agentName) provided, it's optional!");
} else {
resolveLog(agentName);
}
final ObjectNameProperty applicationName = filter.resolve(AgentProperties::getApplicationName, idValidator::validateApplicationName);
if (!applicationName.hasLengthValue()) {
logger.warn("Failed to resolve ApplicationName(-Dpinpoint.applicationName)");
throw new ObjectNameValidationFailedException(AgentIdType.ApplicationName, "ApplicationName not provided");
} else {
resolveLog(applicationName);
}
final ObjectNameProperty serviceName = filter.resolve(AgentProperties::getServiceName, idValidator::validateServiceName);
if (!serviceName.hasLengthValue()) {
logger.warn("Failed to resolve ServiceName(-Dpinpoint.serviceName)");
throw new ObjectNameValidationFailedException(AgentIdType.ServiceName, "ServiceName not provided");
} else {
resolveLog(serviceName);
}
final ObjectNameProperty apiKey = getApiKey(filter);
if (!apiKey.hasLengthValue()) {
logger.info("Failed to resolve ApiKey(-Dpinpoint.apikey)(Optional)");
// throw new ObjectNameValidationFailedException(AgentIdType.APIKEY, "ApiKey not provided");
} else {
resolveLog(apiKey);
}
String agentNameStr = agentName.getValue();
if (agentNameStr == null) {
agentNameStr = Base64Utils.encode(agentId);
}
return new ObjectNameV4(agentId, agentNameStr, applicationName.getValue(), serviceName.getValue(), apiKey.getValue());
}View on GitHub (pinned to 744c3d3075)