# Ruby OpenTelemetry APM

Complete these tasks to properly integrate OpenTelemetry APM in Ruby:

- [Install](https://docs.kloudfuse.com/platform/3.5.0/agent-otel-migrate-ruby/#install)

- [Set Up Instrumentation](https://docs.kloudfuse.com/platform/3.5.0/agent-otel-migrate-ruby/#set-up)

- [Instrumentation Libraries](https://docs.kloudfuse.com/platform/3.5.0/agent-otel-migrate-ruby/#libraries)

- [Examples](https://docs.kloudfuse.com/platform/3.5.0/agent-otel-migrate-ruby/#examples)

## Install

1. Review OpenTelemetry documentation [Getting Started](https://opentelemetry.io/docs/languages/ruby/getting-started/).

2. Run the install command for the Ruby bundle:

```console
   bundle add opentelemetry-sdk opentelemetry-instrumentation-all
   ```

## Set Up Instrumentation

To set up the instrumentation, follow these steps from the see OpenTelemetry’s documentation of [Instrumentation](https://opentelemetry.io/docs/languages/ruby/instrumentation/).

For creating spans using the OpenTelemetry API for Ruby, use the following OpenTelemetry documentation: [Traces](https://opentelemetry.io/docs/languages/ruby/instrumentation/#traces).

## Instrumentation Libraries

OpenTelemetry Ruby supports instrumentation from many libraries, which you can easily install using the instructions in [Configuring all instrumentation libraries](https://opentelemetry.io/docs/languages/ruby/libraries/#configuring-all-instrumentation-libraries).

## Examples

You can use a set of fully-functional, working examples of OpenTelemetry for Ruby from [OpenTelemetry Ruby Examples](https://github.com/open-telemetry/opentelemetry-ruby/tree/main/examples) on GitHub.
