The opentelemetry-sampler-xray
gem contains the AWS X-Ray Remote Sampler for OpenTelemetry.
OpenTelemetry is an open source observability framework, providing a general-purpose API, SDK, and related tools required for the instrumentation of cloud-native software, frameworks, and libraries.
OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools.
This gem can be used with any OpenTelemetry SDK implementation. This can be the official opentelemetry-sdk
gem or any other concrete implementation.
Install the gem using:
gem install opentelemetry-sampler-xray
Or, if you use bundler, include opentelemetry-sampler-xray
in your Gemfile
.
In your application:
OpenTelemetry.tracer_provider.sampler = OpenTelemetry::Sampler::XRay::AwsXRayRemoteSampler.new(
polling_interval: 300, resource: OpenTelemetry::SDK::Resources::Resource.create({
"service.name"=>"my-service-name",
"cloud.platform"=>"aws_ec2"
})
)
The opentelemetry-sampler-xray
gem source is on github, along with related gems including opentelemetry-api
and opentelemetry-sdk
.
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our GitHub Discussions, Slack Channel or attending our weekly meeting. See the meeting calendar for dates and times. For more information on this and other language SIGs, see the OpenTelemetry community page.
The opentelemetry-sampler-xray
gem is distributed under the Apache 2.0 license. See LICENSE for more information.