Skip to content

Commit

Permalink
ddtrace/tracer: rename to integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahkm committed Dec 17, 2024
1 parent 565a5b8 commit c3339e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ddtrace/tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func newTracer(opts ...StartOption) *tracer {
if v == "" {
v = "unknown"
}
t.statsd.Incr("datadog.tracer.instrumentations", []string{fmt.Sprintf("instrumentation:%s", name), fmt.Sprintf("instrumentation_version:%s", v)}, 1)
t.statsd.Incr("datadog.tracer.integrations", []string{fmt.Sprintf("integration:%s", name), fmt.Sprintf("integration_version:%s", v)}, 1)
}

t.wg.Add(1)
Expand Down
8 changes: 4 additions & 4 deletions ddtrace/tracer/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ func TestTracerStart(t *testing.T) {
assert.True(conf.Instrumented)

counts := tg.Counts()
assert.Equal(int64(1), counts["datadog.tracer.instrumentations"])
assert.Equal(int64(1), counts["datadog.tracer.integrations"])

calls := tg.IncrCalls()
for _, c := range statsdtest.FilterCallsByName(calls, "datadog.tracer.instrumentations") {
assert.EqualValues(c.GetTags(), []string{"instrumentation:chi", "instrumentation_version:unknown"})
for _, c := range statsdtest.FilterCallsByName(calls, "datadog.tracer.integrations") {
assert.EqualValues(c.GetTags(), []string{"integration:chi", "integration_version:unknown"})
return
}
assert.Fail("expected instrumentation to have appropriate tags")
assert.Fail("expected integration to have appropriate tags")

})
}
Expand Down

0 comments on commit c3339e5

Please sign in to comment.