Enabling OpenTelemetry for the Ruby storefront
You can use the OpenTelemetry toolkit with Ruby storefronts. Since Ruby is a Next.js application, you enable and interact with it using a different method than the standard Java agent.
Pages Router
The storefront implementation of OpenTelemetry uses pages router request-id tracking. This capability is set using environment variables.
To enable OpenTelemetry for Ruby Next.js stores:
- Set
OTEL_JAVAAGENT_ENABLEDtotrue, or, - Set
NEXTJS_OTEL_ENABLEDto any value other thanfalse.
Additional features
You may use other OpenTelemetry variables as appropriate for your environment. You may need to set some of these environment variables to push traces and spans to any custom endpoints you have configured to receive them.