Ruby
Aspecto's SDK for ruby.
Aspecto::OpenTelemetry
This gem is a distribution of OpenTelemetry pre-configured to use all available instrumentations and export trace data to Aspecto.
Installation
Install the gem using:
Or, if you use bundler, include aspecto-opentelemetry in your Gemfile.
Usage
Rails Applications
Add this code to a new file aspecto.rb
under config/initializers/
:
Ruby Applications
Add this code after your require other gems:
Shutdown
Call this function when your application shuts down
Configuration
You can set configuration via environment variables or via code. Values set in code takes precedence. The only required config options are aspecto_auth
and service_name
.
Configuration Options
Option Name | Environment Variable | Type | Default | Description |
---|---|---|---|---|
|
| UUID string | - | Aspecto's API key for authentication |
|
| string | - | Name of the service which is sending telemetry |
|
| string | Extracted from Rails or Sinatra if used | Deployment environment: |
|
| string |
|
|
|
| float | 1.0 | How many of the traces starting in this service should be sampled. set to number in range [0.0, 1.0] where 0.0 is no sampling, and 1.0 is sample all |
|
| boolean |
| When |
|
| URL | Url | |
|
| boolean |
| Set to |
|
| boolean |
| Set to |
|
| boolean |
| Set to |
Last updated