Skip to content

Commit

Permalink
draft: minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Aditi Ahuja <ahuja.aditi@gmail.com>
  • Loading branch information
metonymic-smokey committed Jun 22, 2022
1 parent d31f573 commit 1292434
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/tracing/jaeger/config_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package jaeger

import (
"fmt"
"net"
"net/url"
"os"
Expand Down Expand Up @@ -162,7 +163,11 @@ func parseTags(sTags string) []opentracing.Tag {
pairs := strings.Split(sTags, ",")
tags := make([]opentracing.Tag, 0)
for _, p := range pairs {
fmt.Printf("\n\n p is: %s", p)
kv := strings.SplitN(p, "=", 2)
if len(kv) < 2 {
continue // to avoid panic
}
k, v := strings.TrimSpace(kv[0]), strings.TrimSpace(kv[1])

if strings.HasPrefix(v, "${") && strings.HasSuffix(v, "}") {
Expand Down
5 changes: 4 additions & 1 deletion pkg/tracing/jaeger/jaeger.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ func NewTracerProvider(ctx context.Context, logger log.Logger, conf []byte) (*tr
}
}

tags := getAttributesFromTags(config)
var tags []attribute.KeyValue
if config.Tags != "" {
tags = getAttributesFromTags(config)
}
samplingFraction := getSamplingFraction(config.SamplerType, config.SamplerParam)
var queueSize tracesdk.BatchSpanProcessorOption
if config.ReporterMaxQueueSize != 0 {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ config:

// Jaeger might give a 404 or 500 before the trace is there. Retry.
if response.StatusCode != http.StatusOK {
t.Logf("\n\n WAITING")
b.Wait()
continue
}
Expand Down

0 comments on commit 1292434

Please sign in to comment.