Skip to content

Commit

Permalink
[test] Replace OT const with OTEL (#4624)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
* Part of #3381 
* This PR adds `otel trace` spans type to span model

## Short description of the changes
- Replace OT const with `otel trace` spans const i.e. `ext.SpanKind..`
with `trace.SpanKind..`

---------

Signed-off-by: Afzal Ansari <[email protected]>
Signed-off-by: Afzal <[email protected]>
Co-authored-by: Afzal <[email protected]>
  • Loading branch information
afzal442 and sbin64 authored Aug 4, 2023
1 parent ab6732b commit 369219c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/query/app/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (handlerOptions) QueryLookbackDuration(queryLookbackDuration time.Duration)
}
}

// Tracer creates a HandlerOption that initializes OpenTracing tracer
// Tracer creates a HandlerOption that passes the tracer to the handler
func (handlerOptions) Tracer(tracer *jtracer.JTracer) HandlerOption {
return func(apiHandler *APIHandler) {
apiHandler.tracer = tracer
Expand Down
7 changes: 4 additions & 3 deletions model/adjuster/span_id_deduper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ package adjuster
import (
"testing"

"github.com/opentracing/opentracing-go/ext"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/otel/trace"

"github.com/jaegertracing/jaeger/model"
)

var (
clientSpanID = model.NewSpanID(1)
anotherSpanID = model.NewSpanID(11)
keySpanKind = "span.kind"
)

func newTrace() *model.Trace {
Expand All @@ -39,7 +40,7 @@ func newTrace() *model.Trace {
SpanID: clientSpanID,
Tags: model.KeyValues{
// span.kind = client
model.String(string(ext.SpanKind), string(ext.SpanKindRPCClientEnum)),
model.String(keySpanKind, trace.SpanKindClient.String()),
},
},
{
Expand All @@ -48,7 +49,7 @@ func newTrace() *model.Trace {
SpanID: clientSpanID, // shared span ID
Tags: model.KeyValues{
// span.kind = server
model.String(string(ext.SpanKind), string(ext.SpanKindRPCServerEnum)),
model.String(keySpanKind, trace.SpanKindServer.String()),
},
},
{
Expand Down

0 comments on commit 369219c

Please sign in to comment.