Upgrade to Pro — share decks privately, control downloads, hide ads and more …

open telemetry w/ Ruby

k.yanagimoto
February 09, 2021

open telemetry w/ Ruby

k.yanagimoto

February 09, 2021
Tweet

More Decks by k.yanagimoto

Other Decks in Technology

Transcript

  1. docker run —rm -d --name jaeger \ -p 5775:5775/udp \

    -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -p 14250:14250 \ -p 9411:9411 \ jaegertracing/all-in-one:1.21 Port meanings: https://www.jaegertracing.io/docs/1.21/getting-started/#all-in-one
  2. con f ig/application.rb require_relative "boot" require "rails/all" require 'opentelemetry/sdk' require

    ‘opentelemetry/exporter/jaeger' # Require the gems listed in Gem f ile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) OpenTelemetry::SDK.con f igure do |c| c.use_all c.add_span_processor( OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new( exporter: OpenTelemetry::Exporter::Jaeger::AgentExporter.new(host: '0.0.0.0', port: 6831) ) ) c.service_name = 'sample-app' c.service_version = '0.0.1' end module RailsSample class Application < Rails::Application # Initialize con f iguration defaults for originally generated Rails version. con f ig.load_defaults 6.1 # Con f iguration for the application, engines, and railties goes here. # # These settings can be overridden in speci f ic environments using the f iles # in con f ig/environments, which are processed later. # f