New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling

  • v0.119.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Jaeger's Remote Sampling extension

Status
Stabilityalpha
Distributionscontrib
IssuesOpen issues Closed issues
Code Owners@yurishkuro, @frzifus

This extension allows serving sampling strategies following the Jaeger's remote sampling API. This extension can be configured to proxy requests to a backing remote sampling server, which could potentially be a Jaeger Collector down the pipeline, or a static JSON file from the local file system.

By default, two listeners are made available:

  • localhost:5778, following the legacy remote sampling endpoint as defined by Jaeger
  • localhost:14250, following the gRPC remote sampling endpoint, also defined by Jaeger

See our security best practices doc to understand how to set the endpoint in different environments.

Note that the port 14250 will clash with the Jaeger Receiver. When both are used, it's recommended to change this extension to use another port.

Although this extension is derived from Jaeger, it can be used by any clients who can consume this standard, such as the OpenTelemetry Java SDK.

The reload_interval option is used to poll a file when using the file source. It is used to control a local cache for a remote source.

The file source can be used to load files from the local file system or from remote HTTP/S sources. The remote source must be used with a gRPC server that provides a Jaeger remote sampling service.

Configuration

extensions:
  jaegerremotesampling:
    source:
      reload_interval: 30s
      remote:
        endpoint: jaeger-collector:14250
  jaegerremotesampling/1:
    source:
      reload_interval: 1s
      file: /etc/otelcol/sampling_strategies.json
  jaegerremotesampling/2:
    source:
      reload_interval: 1s
      file: http://jaeger.example.com/sampling_strategies.json

A sampling strategy file could look like:

{
  "service_strategies": [
    {
      "service": "foo",
      "type": "probabilistic",
      "param": 0.8,
      "operation_strategies": [
        {
          "operation": "op1",
          "type": "probabilistic",
          "param": 0.2
        },
        {
          "operation": "op2",
          "type": "probabilistic",
          "param": 0.4
        }
      ]
    },
    {
      "service": "bar",
      "type": "ratelimiting",
      "param": 5
    }
  ],
  "default_strategy": {
    "type": "probabilistic",
    "param": 0.5,
    "operation_strategies": [
      {
        "operation": "/health",
        "type": "probabilistic",
        "param": 0.0
      },
      {
        "operation": "/metrics",
        "type": "probabilistic",
        "param": 0.0
      }
    ]
  }
}

Source: https://www.jaegertracing.io/docs/1.28/sampling/#collector-sampling-configuration

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc