Skip to content

Commit

Permalink
use DD_VERSION as version for tracer computed stats if available
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanpharvey committed Sep 24, 2024
1 parent b079c6f commit de5aae2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/dd-trace/src/span_stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class SpanStatsProcessor {
url,
env,
tags,
appsec
appsec,
version
} = {}) {
this.exporter = new SpanStatsExporter({
hostname,
Expand All @@ -143,6 +144,7 @@ class SpanStatsProcessor {
this.env = env
this.tags = tags || {}
this.sequence = 0
this.version = version

if (this.enabled) {
this.timer = setInterval(this.onInterval.bind(this), interval * 1e3)
Expand All @@ -157,7 +159,7 @@ class SpanStatsProcessor {
this.exporter.export({
Hostname: this.hostname,
Env: this.env,
Version: version,
Version: this.version || version,
Stats: serialized,
Lang: 'javascript',
TracerVersion: pkg.version,
Expand Down

0 comments on commit de5aae2

Please sign in to comment.