Skip to content

Commit

Permalink
contrib/go-pg/pg.v10: remove spankind value (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
zarirhamza authored Dec 15, 2022
1 parent a694524 commit 0fab977
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion contrib/go-pg/pg.v10/pg_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (h *queryHook) BeforeQuery(ctx context.Context, qe *pg.QueryEvent) (context
tracer.ResourceName(string(query)),
tracer.ServiceName(h.cfg.serviceName),
tracer.Tag(ext.Component, "go-pg/pg.v10"),
tracer.Tag(ext.SpanKind, ext.SpanKindClient),
}
if !math.IsNaN(h.cfg.analyticsRate) {
opts = append(opts, tracer.Tag(ext.EventSampleRate, h.cfg.analyticsRate))
Expand Down
5 changes: 0 additions & 5 deletions contrib/go-pg/pg.v10/pg_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func TestSelect(t *testing.T) {
assert.Equal("go-pg", spans[0].OperationName())
assert.Equal("http.request", spans[1].OperationName())
assert.Equal("go-pg/pg.v10", spans[0].Tags()[ext.Component])
assert.Equal(ext.SpanKindClient, spans[0].Tags()[ext.SpanKind])

}

func TestServiceName(t *testing.T) {
Expand Down Expand Up @@ -109,7 +107,6 @@ func TestServiceName(t *testing.T) {
assert.Equal("gopg.db", spans[0].Tag(ext.ServiceName))
assert.Equal("fake-http-server", spans[1].Tag(ext.ServiceName))
assert.Equal("go-pg/pg.v10", spans[0].Tags()[ext.Component])
assert.Equal(ext.SpanKindClient, spans[0].Tags()[ext.SpanKind])
})

t.Run("global", func(t *testing.T) {
Expand Down Expand Up @@ -151,7 +148,6 @@ func TestServiceName(t *testing.T) {
assert.Equal("global-service", spans[0].Tag(ext.ServiceName))
assert.Equal("fake-http-server", spans[1].Tag(ext.ServiceName))
assert.Equal("go-pg/pg.v10", spans[0].Tags()[ext.Component])
assert.Equal(ext.SpanKindClient, spans[0].Tags()[ext.SpanKind])
})

t.Run("custom", func(t *testing.T) {
Expand Down Expand Up @@ -190,7 +186,6 @@ func TestServiceName(t *testing.T) {
assert.Equal("my-service-name", spans[0].Tag(ext.ServiceName))
assert.Equal("fake-http-server", spans[1].Tag(ext.ServiceName))
assert.Equal("go-pg/pg.v10", spans[0].Tags()[ext.Component])
assert.Equal(ext.SpanKindClient, spans[0].Tags()[ext.SpanKind])
})
}

Expand Down

0 comments on commit 0fab977

Please sign in to comment.