Skip to content

Commit

Permalink
Remove UUID from attrs sent_to metrics. (#21630) (#21828)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefinneran authored Jun 6, 2024
1 parent 8c9900c commit 7dcb648
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion config/initializers/open_telemetry.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# frozen_string_literal: true

require 'opentelemetry/sdk'
require 'opentelemetry/instrumentation/all'

# rubocop:disable Layout/LineLength

DT_API_URL = ENV["DT_API_URL"]
DT_API_TOKEN = ENV["DT_API_TOKEN"]

Rails.logger.info("DT_API_TOKEN is set to #{DT_API_TOKEN}")

OpenTelemetry::SDK.configure do |config|

Rails.logger.info("OpenTelemetry configuration started")

config.service_name = "caseflow"
config.service_version = "1.0.1"
# automatic instrumentation
Expand All @@ -14,7 +22,7 @@
begin
config.resource = OpenTelemetry::SDK::Resources::Resource.create(Hash[*File.read(name.start_with?("/var") ? name : File.read(name)).split(/[=\n]+/)])
rescue StandardError => error
Rails.logger.error(error.full_message)
Rails.logger.error("OpenTelemetry config error for #{name}: #{error.full_message}")
raise error.full_message
end
end
Expand Down

0 comments on commit 7dcb648

Please sign in to comment.