Sha256: 75749b98f27461a9b26868941a8bb8017c2103fc0bb36ea137280b05ffe8ee02

Contents?: true

Size: 644 Bytes

Versions: 5

Compression:

Stored size: 644 Bytes

Contents

# typed: false
# frozen_string_literal: true

require "opentelemetry/sdk"
require "opentelemetry/semantic_conventions"

if Rails.env.staging? || Rails.env.production?
  OpenTelemetry::SDK.configure do |c|
    c.logger = Rails.logger

    c.use_all

    if productionish?
      c.add_span_processor(
        OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
          OpenTelemetry::Exporter::OTLP::Exporter.new,
        ),
      )
    else
      c.add_span_processor(
        OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessornew(
          OpenTelemetry::SDK::Trace::Export::SpanExporter.new,
        ),
      )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hephaestus-0.1.3 templates/config/initializers/open_telemetry.rb
hephaestus-0.1.2 templates/config/initializers/open_telemetry.rb
hephaestus-0.1.1 templates/config/initializers/open_telemetry.rb
hephaestus-0.0.2 templates/config/initializers/open_telemetry.rb
hephaestus-0.0.1 templates/config/initializers/open_telemetry.rb