Enable Dynamic Instrumentation for Ruby
Ce produit n'est pas pris en charge par le
site Datadog que vous avez sélectionné. (
).
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
Limited Availability
Dynamic Instrumentation for Ruby is in Limited Availability and may not be available for your organization.
Request access to join the waiting list.
Note: Some limitations apply.
Request AccessDynamic Instrumentation is a feature provided by the Datadog tracing library. If you are already using APM to collect traces for your application, ensure your Agent and tracing library are on the required version. Then, go directly to enabling Dynamic Instrumentation in step 4.
Note: Dynamic Instrumentation is supported only for applications running in production environment (RAILS_ENV, RACK_ENV, etc.).
Installation
- Install or upgrade your Agent to version 7.49.0 or higher.
- If you don’t already have APM enabled, in your Agent configuration, set the
DD_APM_ENABLED environment variable to true and listening to the port 8126/TCP. - Install or upgrade the Ruby tracing library to version 2.9.0 or higher, by following the relevant instructions.
- Run your service with Dynamic Instrumentation enabled by setting the
DD_DYNAMIC_INSTRUMENTATION_ENABLED environment variable to true. Specify DD_SERVICE, DD_ENV, and DD_VERSION Unified Service Tags so you can filter and group your instrumentations and target active clients across these dimensions. - After starting your service with Dynamic Instrumentation enabled, you can start using Dynamic Instrumentation on the APM > Dynamic Instrumentation page.
Configuration
Configure Dynamic Instrumentation using the following environment variables:
| Environment variable | Type | Description |
|---|
DD_DYNAMIC_INSTRUMENTATION_ENABLED | Boolean | Set to true to enable Dynamic Instrumentation. |
DD_SERVICE | String | The service name, for example, web-backend. |
DD_ENV | String | The environment name, for example, production. |
DD_VERSION | String | The version of your service. |
DD_TAGS | String | Tags to apply to produced data. Must be a list of <key>:<value> separated by commas such as: layer:api,team:intake. |
What to do next
See Dynamic Instrumentation for information about adding instrumentations and browsing and indexing the data.
Supported features
Unsupported features
- Dynamic Metrics, Spans, and Span Tags
- Dynamic Log conditions
- Local variable capture for Dynamic Logs attached to a method
- Expression evaluation in Dynamic Log templates
- Instrumenting third-party libraries
Further reading
Documentation, liens et articles supplémentaires utiles: