TracesMetricsApp LogsCustom LogsProfiling


  • To monitor APM data on dashboard, Middleware Host agent needs to be installed, You can refer this demo project to refer use cases of APM.
  • Ruby version >= 3.0.2
    • Check Ruby version
      ruby --version

Ruby APM Setup

Add required gem packages

gem 'opentelemetry-sdk'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
gem 'pyroscope'
gem 'middleware_apm', '~> 1.0.0'

Add code as mentioned below at the initialization of your application

require 'middleware/ruby_gem'

Run your application

OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:9320 \ 
OTEL_SERVICE_NAME="<Your Service Name>" \"<Your Project Name>" \ 
MW_API_KEY=<Your API Key> \