pinpoint-apm/pinpoint · error · IllegalArgumentException

not found applicationName

Error message

not found applicationName

What it means

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.

Solutions

  1. 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
  2. Add the explicit 'pinpoint.applicationName' span/resource attribute in your exporter pipeline
  3. Verify attribute propagation is not dropping resource attributes between collector hops
  4. If you control the mapper call, pre-validate attributes with AttributeUtils.getAttributeStringValue before mapping

Example fix

// before (OTel SDK config)
// (no service.name set)
// after
export OTEL_SERVICE_NAME=my-app
// or in code: SdkTracerProvider.builder().setResource(Resource.getDefault().merge(Resource.builder().put("service.name","my-app").build()))
Defensive patterns

Strategy: validation

Validate before calling

String name = AttributeUtils.getAttributeStringValue(attributes, KEY_APPLICATION_NAME, null);
if (name == null) name = AttributeUtils.getAttributeStringValue(attributes, KEY_SERVICE_NAME, null);
if (name == null) throw new IllegalArgumentException("not found applicationName");

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/cf53d7091f1ca689. Report an issue: GitHub.

Appendix: source

Thrown at otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceMapperUtils.java:112

    }

    private static String getAgentNameOverride(Map<String, AttributeValue> attributes) {
        final String agentName = AttributeUtils.getAttributeStringValue(attributes, KEY_AGENT_NAME, null);
        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;

View on GitHub (pinned to 744c3d3075)