Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddtrace/tracer: add integration tag to spans_started/finished #3023

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1aa93b8
ddtrace/tracer: use ext.Component to report source of new spans
hannahkm Dec 10, 2024
0a51b8a
ddtrace/tracer: apply source to finished spans health metric
hannahkm Dec 10, 2024
7601d35
ddtrace/tracer: check for nil span before checking source
hannahkm Dec 10, 2024
13ecd2c
ddtrace/mocktracer: update mockspan to also hold source
hannahkm Dec 10, 2024
31aa679
contrib: check for correct source on mockspans in tests
hannahkm Dec 10, 2024
819e312
contrib: remove incorrect checks for source
hannahkm Dec 10, 2024
24ad484
ddtrace/tracer: check for appropriate tag in spans_started metric
hannahkm Dec 11, 2024
a8f097d
ddtrace/tracer: test for different values of source
hannahkm Dec 11, 2024
feb73d7
contrib,ddtrace/tracer: rename `source` to `integration`
hannahkm Dec 11, 2024
7fdb0c8
ddtrace/mocktracer: replace missed source with integration
hannahkm Dec 11, 2024
4b609a2
ddtrace/tracer: fix false positives in test
hannahkm Dec 12, 2024
f061f22
ddtrace/tracer: create test for spans_finished integration tag
hannahkm Dec 12, 2024
236cb25
ddtrace/tracer: fix failing smoke tests
hannahkm Dec 12, 2024
090c79c
ddtrace/tracer: use map to keep track of spans started and finished
hannahkm Dec 17, 2024
c7db44d
ddtrace/tracer: fix races when accessing maps
hannahkm Dec 17, 2024
df8f03e
ddtrace/tracer: replace sprintf usage with concat
hannahkm Dec 17, 2024
5cf2e2e
Merge remote-tracking branch 'origin' into apm-rd/span-source-health-…
hannahkm Dec 19, 2024
3eb1f8b
ddtrace/tracer: remove atomics
hannahkm Jan 2, 2025
e44dc19
Merge remote-tracking branch 'origin' into apm-rd/span-source-health-…
hannahkm Jan 2, 2025
e6274d5
ddtrace/tracer: remove duplicate and use FilterCallsByName
hannahkm Jan 2, 2025
8d93180
ddtrace/tracer: reset counts after each health metric report
hannahkm Jan 2, 2025
abf1bed
ddtrace/tracer: test races and benchmark
hannahkm Jan 2, 2025
07857b6
nit: fix typo in checking metric counts
hannahkm Jan 2, 2025
a066261
ddtrace/tracer: nit name fixes
hannahkm Jan 3, 2025
c005d73
ddtrace/tracer: improve testname
hannahkm Jan 3, 2025
cf97626
ddtrace/tracer: convert map to use int64 instead of uint32
hannahkm Jan 3, 2025
f3505c9
ddtrace/tracer: fix missed type change
hannahkm Jan 3, 2025
dbf336c
ddtracer/tracer: check that metric counts revert to 0 after reporting
hannahkm Jan 3, 2025
c5f05f5
ddtrace/tracer: use xsync Map for spansStarted and Finished
hannahkm Jan 3, 2025
32c20f7
internal/exectracetest: go mod tidy
hannahkm Jan 3, 2025
5d56dc5
try using delete instead of clear
hannahkm Jan 6, 2025
f4e7820
use atomic.int64 instead of int64
hannahkm Jan 8, 2025
aca72be
use waitgroups to control goroutines
hannahkm Jan 9, 2025
2e98ead
Merge remote-tracking branch 'origin' into apm-rd/span-source-health-…
hannahkm Jan 9, 2025
fc70dca
Merge remote-tracking branch 'origin' into apm-rd/span-source-health-…
hannahkm Jan 9, 2025
889f6f6
fix flaky attempt: add sleep time
hannahkm Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/99designs/gqlgen/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestOptions(t *testing.T) {
assert.Equal(ext.SpanTypeGraphQL, root.Tag(ext.SpanType))
assert.Equal("99designs/gqlgen", root.Tag(ext.Component))
assert.Nil(root.Tag(ext.EventSampleRate))
assert.Equal(componentName, root.Integration())
},
},
"WithServiceName": {
Expand Down
6 changes: 6 additions & 0 deletions contrib/IBM/sarama.v1/sarama_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func TestConsumer(t *testing.T) {
assert.Equal(t, "queue", s.Tag(ext.SpanType))
assert.Equal(t, "kafka.consume", s.OperationName())
assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand All @@ -162,6 +163,7 @@ func TestConsumer(t *testing.T) {
assert.Equal(t, "queue", s.Tag(ext.SpanType))
assert.Equal(t, "kafka.consume", s.OperationName())
assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -222,6 +224,7 @@ func TestSyncProducer(t *testing.T) {
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, int64(0), s.Tag("offset"))
assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -285,6 +288,7 @@ func TestSyncProducerSendMessages(t *testing.T) {
assert.Equal(t, "kafka.produce", s.OperationName())
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))
}
Expand Down Expand Up @@ -339,6 +343,7 @@ func TestAsyncProducer(t *testing.T) {
assert.Nil(t, s.Tag("offset"))

assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -383,6 +388,7 @@ func TestAsyncProducer(t *testing.T) {
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, int64(0), s.Tag("offset"))
assert.Equal(t, "IBM/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down
6 changes: 6 additions & 0 deletions contrib/Shopify/sarama/sarama_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func TestConsumer(t *testing.T) {
assert.Equal(t, "queue", s.Tag(ext.SpanType))
assert.Equal(t, "kafka.consume", s.OperationName())
assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand All @@ -162,6 +163,7 @@ func TestConsumer(t *testing.T) {
assert.Equal(t, "queue", s.Tag(ext.SpanType))
assert.Equal(t, "kafka.consume", s.OperationName())
assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -222,6 +224,7 @@ func TestSyncProducer(t *testing.T) {
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, int64(0), s.Tag("offset"))
assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -285,6 +288,7 @@ func TestSyncProducerSendMessages(t *testing.T) {
assert.Equal(t, "kafka.produce", s.OperationName())
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))
}
Expand Down Expand Up @@ -339,6 +343,7 @@ func TestAsyncProducer(t *testing.T) {
assert.Nil(t, s.Tag("offset"))

assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down Expand Up @@ -383,6 +388,7 @@ func TestAsyncProducer(t *testing.T) {
assert.Equal(t, int32(0), s.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, int64(0), s.Tag("offset"))
assert.Equal(t, "Shopify/sarama", s.Tag(ext.Component))
assert.Equal(t, componentName, s.Integration())
assert.Equal(t, ext.SpanKindProducer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))

Expand Down
9 changes: 9 additions & 0 deletions contrib/aws/aws-sdk-go-v2/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func TestAppendMiddleware(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -206,6 +207,7 @@ func TestAppendMiddlewareSqsDeleteMessage(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -279,6 +281,7 @@ func TestAppendMiddlewareSqsReceiveMessage(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -409,6 +412,7 @@ func TestAppendMiddlewareS3ListObjects(t *testing.T) {
assert.Equal(t, server.URL+"/MyBucketName", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -503,6 +507,7 @@ func TestAppendMiddlewareSnsPublish(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())

// Check for trace context injection
assert.NotNil(t, tt.publishInput.MessageAttributes)
Expand Down Expand Up @@ -589,6 +594,7 @@ func TestAppendMiddlewareDynamodbGetItem(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -661,6 +667,7 @@ func TestAppendMiddlewareKinesisPutRecord(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -731,6 +738,7 @@ func TestAppendMiddlewareEventBridgePutRule(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down Expand Up @@ -857,6 +865,7 @@ func TestAppendMiddlewareSfnDescribeStateMachine(t *testing.T) {
assert.Equal(t, server.URL+"/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go-v2/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}
}
Expand Down
2 changes: 2 additions & 0 deletions contrib/aws/aws-sdk-go/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func TestAWS(t *testing.T) {
assert.Equal(t, "aws/aws-sdk-go/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.NotNil(t, s.Tag("aws.request_id"))
assert.Equal(t, componentName, s.Integration())
})

t.Run("ec2", func(t *testing.T) {
Expand Down Expand Up @@ -118,6 +119,7 @@ func TestAWS(t *testing.T) {
assert.Equal(t, "http://ec2.us-west-2.amazonaws.com/", s.Tag(ext.HTTPURL))
assert.Equal(t, "aws/aws-sdk-go/aws", s.Tag(ext.Component))
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
assert.Equal(t, componentName, s.Integration())
})
}

Expand Down
2 changes: 2 additions & 0 deletions contrib/bradfitz/gomemcache/memcache/memcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func testMemcache(t *testing.T, addr string) {
"resource name should be set to the memcache command")
assert.Equal(t, "bradfitz/gomemcache/memcache", span.Tag(ext.Component),
"component should be set to gomemcache")
assert.Equal(t, componentName, span.Integration(),
"source should be set to gomemcache")
assert.Equal(t, ext.SpanKindClient, span.Tag(ext.SpanKind),
"span.kind should be set to client")
assert.Equal(t, "memcached", span.Tag(ext.DBSystem),
Expand Down
5 changes: 5 additions & 0 deletions contrib/cloud.google.com/go/pubsub.v1/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func TestPropagation(t *testing.T) {
ext.SpanKind: ext.SpanKindProducer,
ext.MessagingSystem: "googlepubsub",
}, spans[0].Tags())
assert.Equal("cloud.google.com/go/pubsub.v1", spans[0].Integration())

assert.Equal(spans[0].SpanID(), spans[2].ParentID())
assert.Equal(uint64(42), spans[2].TraceID())
Expand All @@ -92,6 +93,7 @@ func TestPropagation(t *testing.T) {
ext.SpanKind: ext.SpanKindConsumer,
ext.MessagingSystem: "googlepubsub",
}, spans[2].Tags())
assert.Equal("cloud.google.com/go/pubsub.v1", spans[2].Integration())
}

func TestPropagationWithServiceName(t *testing.T) {
Expand Down Expand Up @@ -167,6 +169,7 @@ func TestPropagationNoParentSpan(t *testing.T) {
ext.SpanKind: ext.SpanKindProducer,
ext.MessagingSystem: "googlepubsub",
}, spans[0].Tags())
assert.Equal("cloud.google.com/go/pubsub.v1", spans[0].Integration())

assert.Equal(spans[0].SpanID(), spans[1].ParentID())
assert.Equal(traceID, spans[1].TraceID())
Expand All @@ -183,6 +186,7 @@ func TestPropagationNoParentSpan(t *testing.T) {
ext.SpanKind: ext.SpanKindConsumer,
ext.MessagingSystem: "googlepubsub",
}, spans[1].Tags())
assert.Equal("cloud.google.com/go/pubsub.v1", spans[1].Integration())
}

func TestPropagationNoPublisherSpan(t *testing.T) {
Expand Down Expand Up @@ -236,6 +240,7 @@ func TestPropagationNoPublisherSpan(t *testing.T) {
ext.SpanKind: ext.SpanKindConsumer,
ext.MessagingSystem: "googlepubsub",
}, spans[0].Tags())
assert.Equal("cloud.google.com/go/pubsub.v1", spans[0].Integration())
}

func TestNamingSchema(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func TestConsumerChannel(t *testing.T) {
assert.Equal(t, 0.3, s.Tag(ext.EventSampleRate))
assert.EqualValues(t, kafka.Offset(i+1), s.Tag("offset"))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))
}
Expand Down Expand Up @@ -138,6 +139,7 @@ func TestConsumerFunctional(t *testing.T) {
assert.Equal(t, "queue", s0.Tag(ext.SpanType))
assert.Equal(t, int32(0), s0.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s0.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s0.Integration())
assert.Equal(t, ext.SpanKindProducer, s0.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s0.Tag(ext.MessagingSystem))
assert.Equal(t, "127.0.0.1", s0.Tag(ext.KafkaBootstrapServers))
Expand All @@ -150,6 +152,7 @@ func TestConsumerFunctional(t *testing.T) {
assert.Equal(t, "queue", s1.Tag(ext.SpanType))
assert.Equal(t, int32(0), s1.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s1.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka.v2", s1.Integration())
assert.Equal(t, ext.SpanKindConsumer, s1.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s1.Tag(ext.MessagingSystem))
assert.Equal(t, "127.0.0.1", s1.Tag(ext.KafkaBootstrapServers))
Expand Down
3 changes: 3 additions & 0 deletions contrib/confluentinc/confluent-kafka-go/kafka/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func TestConsumerChannel(t *testing.T) {
assert.Equal(t, 0.3, s.Tag(ext.EventSampleRate))
assert.EqualValues(t, kafka.Offset(i+1), s.Tag("offset"))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s.Integration())
assert.Equal(t, ext.SpanKindConsumer, s.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s.Tag(ext.MessagingSystem))
}
Expand Down Expand Up @@ -138,6 +139,7 @@ func TestConsumerFunctional(t *testing.T) {
assert.Equal(t, "queue", s0.Tag(ext.SpanType))
assert.Equal(t, int32(0), s0.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s0.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s0.Integration())
assert.Equal(t, ext.SpanKindProducer, s0.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s0.Tag(ext.MessagingSystem))
assert.Equal(t, "127.0.0.1", s0.Tag(ext.KafkaBootstrapServers))
Expand All @@ -150,6 +152,7 @@ func TestConsumerFunctional(t *testing.T) {
assert.Equal(t, "queue", s1.Tag(ext.SpanType))
assert.Equal(t, int32(0), s1.Tag(ext.MessagingKafkaPartition))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s1.Tag(ext.Component))
assert.Equal(t, "confluentinc/confluent-kafka-go/kafka", s1.Integration())
assert.Equal(t, ext.SpanKindConsumer, s1.Tag(ext.SpanKind))
assert.Equal(t, "kafka", s1.Tag(ext.MessagingSystem))
assert.Equal(t, "127.0.0.1", s1.Tag(ext.KafkaBootstrapServers))
Expand Down
4 changes: 4 additions & 0 deletions contrib/database/sql/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func TestWithSpanTags(t *testing.T) {
}
assert.Equal(t, ext.SpanKindClient, connectSpan.Tag(ext.SpanKind))
assert.Equal(t, "database/sql", connectSpan.Tag(ext.Component))
assert.Equal(t, componentName, connectSpan.Integration())
assert.Equal(t, tt.want.dbSystem, connectSpan.Tag(ext.DBSystem))

span := spans[1]
Expand All @@ -117,6 +118,7 @@ func TestWithSpanTags(t *testing.T) {
}
assert.Equal(t, ext.SpanKindClient, span.Tag(ext.SpanKind))
assert.Equal(t, "database/sql", span.Tag(ext.Component))
assert.Equal(t, componentName, connectSpan.Integration())
assert.Equal(t, tt.want.dbSystem, connectSpan.Tag(ext.DBSystem))
})
}
Expand Down Expand Up @@ -368,6 +370,7 @@ func TestWithCustomTag(t *testing.T) {
}
assert.Equal(t, ext.SpanKindClient, connectSpan.Tag(ext.SpanKind))
assert.Equal(t, "database/sql", connectSpan.Tag(ext.Component))
assert.Equal(t, componentName, connectSpan.Integration())
assert.Equal(t, tt.want.dbSystem, connectSpan.Tag(ext.DBSystem))

span := spans[1]
Expand All @@ -377,6 +380,7 @@ func TestWithCustomTag(t *testing.T) {
}
assert.Equal(t, ext.SpanKindClient, connectSpan.Tag(ext.SpanKind))
assert.Equal(t, "database/sql", connectSpan.Tag(ext.Component))
assert.Equal(t, componentName, connectSpan.Integration())
assert.Equal(t, tt.want.dbSystem, connectSpan.Tag(ext.DBSystem))
})
}
Expand Down
Loading
Loading