open-telemetry/opentelemetry-java

JaegerRemoteSampler inconsistent Implementation

Open

#5,504 opened on Jun 5, 2023

View on GitHub
 (6 comments) (0 reactions) (1 assignee)Java (1,005 forks)auto 404
Feature Requesthelp wanted

Repository metrics

Stars
 (2,433 stars)
PR merge metrics
 (PR metrics pending)

Description

The implementation of SDK Jaeger Remote Sampler Extension is not according to the description of the example of Jaeger Remote Sampler.

{
  "service_strategies": [
    {
      "service": "foobar",
      "type": "ratelimiting",
      "param": 2
    }
  ],
  "default_strategy": {
    "type": "probabilistic",
    "param": 0.2,
    "operation_strategies": [
      {
        "operation": "/metrics",
        "type": "probabilistic",
        "param": 0.0
      }
    ]
  }
}

Having the remote sampling configuration above I would expect service foobar to be rate limited to 2 and all other services to be sampled with probability 0.2. As an exception operation /metrics of all services (including foobar) never gets sampled.

With the current implementation only rate limiting is configured for service foobar which is also applied to /metrics operation.

Also when operation_strategies are configured for a service then the default type of the service is always "probabilistic" even when "ratelimiting" is configured.

I've used the following libraries and versions:

  • io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.26.0-alpha
  • io.opentelemetry:opentelemetry-sdk-extension-jaeger-remote-sampler:1.26.0-alpha

And activated the autoconfiguration with export OTEL_TRACES_SAMPLER=parentbased_jaeger_remote

Contributor guide