Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
go.opentelemetry.io/contrib/samplers/jaegerremote
This package implements Jaeger remote sampler. Remote sampler allows defining sampling configuration for services at the backend, at the granularity of service + endpoint. When using the Jaeger backend, the sampling configuration can come from two sources:
Configuration in the code:
jaegerRemoteSampler := jaegerremote.New(
"your-service-name",
jaegerremote.WithSamplingServerURL("http://{sampling_service_host_name}:5778/sampling"),
jaegerremote.WithSamplingRefreshInterval(10*time.Second),
jaegerremote.WithInitialSampler(trace.TraceIDRatioBased(0.5)),
)
tp := trace.NewTracerProvider(
trace.WithSampler(jaegerRemoteSampler),
...
)
otel.SetTracerProvider(tp)
Sampling server:
http://{agent_host}:5778/sampling
.http://collector_host:14268/api/sampling
.http://{otel_collector_host}:5778/sampling
by configuring an extension.Notes:
OTEL_TRACES_SAMPLER=jaeger_sampler
environment variable is not supported.example/ shows how to host remote sampling strategies using the OpenTelemetry Collector. The Collector uses the Jaeger receiver to host the strategy file. Note you do not need to run Jaeger to make use of the Jaeger remote sampling protocol. However, you do need Jaeger backend if you want to utilize its adaptive sampling engine that auto-calculates remote sampling strategies.
Run the OpenTelemetry Collector using docker-compose:
$ docker-compose up -d
You can fetch the strategy file using curl:
$ curl 'localhost:5778/sampling?service=foo'
$ curl 'localhost:5778/sampling?service=myService'
Run the Go program. This program will start with an initial sampling percentage of 50% and tries to fetch the sampling strategies from the OpenTelemetry Collector. It will print the entire Jaeger remote sampler structure every 10 seconds, this allows you to observe the internal sampler.
$ go run .
Code is generated using the .proto files from jaeger-idl. In case sampling.proto is modified these have to be regenerated.
$ make proto-gen
FAQs
Unknown package
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.