Skip to content

Commit

Permalink
add ci-X.Y.Z to the tracer_version if datadog-ci is present and CI mo…
Browse files Browse the repository at this point in the history
…de is enabled
  • Loading branch information
anmarchenko committed Sep 3, 2024
1 parent 9e00232 commit 03af149
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/datadog/core/telemetry/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ def build_payload(event, seq_id)

def application
config = Datadog.configuration

tracer_version = Core::Environment::Identity.gem_datadog_version_semver2
if config.respond_to?(:ci) && config.ci.enabled && defined?(::Datadog::CI::VERSION)
tracer_version = "#{tracer_version}+ci-#{::Datadog::CI::VERSION}"
end

{
env: config.env,
language_name: Core::Environment::Ext::LANG,
Expand All @@ -39,7 +45,7 @@ def application
runtime_version: Core::Environment::Ext::ENGINE_VERSION,
service_name: config.service,
service_version: config.version,
tracer_version: Core::Environment::Identity.gem_datadog_version_semver2
tracer_version: tracer_version
}
end

Expand Down

0 comments on commit 03af149

Please sign in to comment.