Skip to content

splunk-apm-java: void io.opentelemetry.sdk.metrics.internal.SdkMeterProviderUtil.registerMetricReaderWithCardinalitySelector(...) java.lang.NoSuchMethodError #351

Description

@aamielsan

Background

We have an AWS Lambda function with a Java runtime and we're using the layer splunk-apm-java layer (i.e. arn:aws:lambda:eu-north-1:254067382080:layer:splunk-apm-java:15).

When we have a dependency that has a transitive dependency to either: io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi or io.opentelemetry:opentelemetry-sdk-extension-autoconfigure and pulls in a version later than 1.43.0, we're seeing this issue:

'void io.opentelemetry.sdk.metrics.internal.SdkMeterProviderUtil.registerMetricReaderWithCardinalitySelector(io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder, io.opentelemetry.sdk.metrics.export.MetricReader, io.opentelemetry.sdk.metrics.internal.export.CardinalityLimitSelector)': java.lang.NoSuchMethodError

Possible cause

The registerMetricReaderWithCardinalitySelector method was removed in this change in open-telemetry/opentelemetry-java and was part of the v1.44.0 release.

After downloading the splunk-apm-java layer locally, it seems to be compiled and is expected to use the v1.43.0 version. Image

Questions

  1. Do you have any plans to update the layer to use the latest versions and publish the updated layers in all supported regions?
  2. I've also noticed in splunk-apm/splunk-apm-java.md that in us-east-2 the version is way higher than the other regions (i.e. arn:aws:lambda:us-east-2:254067382080:layer:splunk-apm-java:186). I'm just curious about why.

Workaround

As a current workaround, we've pinned our direct dependencies on releases that use both opentelemetry-sdk-extension-autoconfigure:1.43.0 and opentelemetry-sdk-extension-autoconfigure-spi:1.43.0 versions. This is not ideal given we want to use the latest features in one of our direct dependencies.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions