pinpoint-apm/pinpoint · error · IllegalArgumentException
invalid applicationName=${applicationName}
Error message
invalid applicationName=${applicationName} What it means
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.
Source
Thrown at otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceMapperUtils.java:116
if (agentName == null) {
return null;
}
if (!IdValidateUtils.validateId(agentName, PinpointConstants.AGENT_NAME_MAX_LEN_V4)) {
throw new IllegalArgumentException("invalid pinpoint.agentName=" + agentName);
}
return agentName;
}
public static String getApplicationName(Map<String, AttributeValue> attributes) {
String applicationName = AttributeUtils.getAttributeStringValue(attributes, KEY_APPLICATION_NAME, null);
if (applicationName == null) {
applicationName = AttributeUtils.getAttributeStringValue(attributes, KEY_SERVICE_NAME, null);
if (applicationName == null) {
throw new IllegalArgumentException("not found applicationName");
}
}
if (!IdValidateUtils.validateId(applicationName, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3)) {
throw new IllegalArgumentException("invalid applicationName=" + applicationName);
}
return applicationName;
}
/**
* Formats an {@link InstrumentationScope} identity for the OPENTELEMETRY_SCOPE annotation:
* {@code "name@version"}, or bare {@code "name"} when the version is absent. Returns
* {@code null} when the scope name is empty (SDK did not populate the scope) so callers
* omit the annotation entirely.
*/
public static @Nullable String formatScope(@Nullable InstrumentationScope scope) {
if (scope == null) {
return null;
}
final String name = scope.getName();
if (name.isEmpty()) {
return null;View on GitHub (pinned to 744c3d3075)
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
Example fix
// before export OTEL_SERVICE_NAME=my_service.prod-eu // invalid chars // after export OTEL_SERVICE_NAME=myServiceProdEu
Defensive patterns
Strategy: validation
Validate before calling
String name = resolveApplicationName(attributes);
if (!IdValidateUtils.validateId(name, PinpointConstants.APPLICATION_NAME_MAX_LEN_V3)) {
throw new IllegalArgumentException("invalid applicationName=" + name);
} Try / catch
try { String app = OtlpTraceMapperUtils.getApplicationName(attrs); ... } catch (IllegalArgumentException e) { log.warn("bad applicationName: {}", e.getMessage()); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- invalid ${sourceKey}=${id}
- sqlUid length must be 16: ${sqlUid.length}
- Resource attribute `service.name` is required to save OTLP m
- Resource attribute `pinpoint.agentId` is required to save OT
- invalid traceId: ${error}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/941027c9f100f5b2.
Report an issue: GitHub.