Skip to content

Commit

Permalink
Try to fix issue with increment_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinz committed Feb 28, 2024
1 parent 21b2322 commit 30d5510
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions updater/lib/dependabot/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ def record_ecosystem_versions(ecosystem_versions)
sig { params(metric: String, tags: T::Hash[String, String]).void }
def increment_metric(metric, tags:)
::Dependabot::OpenTelemetry.tracer&.in_span("increment_metric", kind: :internal) do |span|
span.set_attribute(::Dependabot::OpenTelemetry::Attributes::JOB_ID, job_id.to_s)
span.set_attribute(::Dependabot::OpenTelemetry::Attributes::METRIC, metric)
span.set_attribute(::Dependabot::OpenTelemetry::Attributes::JOB_ID.to_s, job_id.to_s)
span.set_attribute(::Dependabot::OpenTelemetry::Attributes::METRIC.to_s, metric)
tags.each do |key, value|
span.set_attribute(key, value)
span.set_attribute(key.to_s, value.to_s)
end

api_url = "#{base_url}/update_jobs/#{job_id}/increment_metric"
Expand Down

0 comments on commit 30d5510

Please sign in to comment.