Skip to content

Commit

Permalink
chore: remove unused exporter func
Browse files Browse the repository at this point in the history
  • Loading branch information
nilslice committed Sep 22, 2023
1 parent ce92de1 commit 421f66f
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions go/adapter/opentelemetry/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package opentelemetry

import (
"context"
"encoding/binary"
"encoding/hex"
"log"
"time"

Expand Down Expand Up @@ -85,32 +83,6 @@ func NewOTelAdapter(config *OTelConfig) *OTelAdapter {
return adapter
}

func JaegerTraceExporter(traceId string, parentId []byte, name string, start, end time.Time) *trace.Span {
if parentId == nil {
parentId = []byte{}
}

traceIdB, err := hex.DecodeString(traceId)
if err != nil {
panic(err)
}

spanId := observe.NewSpanId().Msb()
spanIdB := make([]byte, 8)
binary.LittleEndian.PutUint64(spanIdB, spanId)

return &trace.Span{
TraceId: traceIdB,
SpanId: spanIdB,
ParentSpanId: parentId,
Name: name,
Kind: 1,
StartTimeUnixNano: uint64(start.UnixNano()),
EndTimeUnixNano: uint64(end.UnixNano()),
// uses empty defaults for remaining fields...
}
}

func (h *OTelAdapter) Start(ctx context.Context) {
h.AdapterBase.Start(ctx, h)
h.Config.client.Start(ctx)
Expand Down

0 comments on commit 421f66f

Please sign in to comment.