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

Add propagator interface and W3C propagator #85

Merged
merged 28 commits into from
Sep 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b4cf5f9
add propagation api.
rghetia Aug 9, 2019
067cb3f
add http propagator interface and w3c propagator implementation.
rghetia Aug 9, 2019
fdaf0f0
remove Extract api from trace.
rghetia Aug 9, 2019
7137e7b
remove Extract interface for tracer.
rghetia Aug 9, 2019
d9c6157
fix copyright.
rghetia Aug 9, 2019
1e2f4ea
fix variable names and comments.
rghetia Aug 9, 2019
8215b36
replace INVALID_SPAN_CONTEXT with EmptySpanContext function.
rghetia Aug 13, 2019
ae02d90
move inject/extract out of trace.
rghetia Aug 13, 2019
ddeb734
fix tag.Map.
rghetia Aug 23, 2019
ba6cda4
make carrier as interface instead of http.Request.
rghetia Aug 24, 2019
0c84304
rename structs and update doc comments..
rghetia Aug 26, 2019
034c2fc
add doc.go
rghetia Aug 26, 2019
2b279af
update doc.
rghetia Aug 27, 2019
8d3cced
add noop propagator.
rghetia Aug 27, 2019
a55726d
add new propagation api with Supplier interface.
rghetia Sep 3, 2019
8fe1085
remove old propagator.
rghetia Sep 4, 2019
db8f60b
rename propagator to TextFormatPropagator.
rghetia Sep 4, 2019
9c3ecb6
rename default tracer/span as pass_through tracer/span.
rghetia Sep 5, 2019
e5e1a93
add test for pass through tracer.
rghetia Sep 5, 2019
ecd6ba7
add missing interface to pass through tracer.
rghetia Sep 5, 2019
2a5fc9e
return SpanContext instead of contex.Context from Extract interface.
rghetia Sep 9, 2019
c8a05ec
fix review comments.
rghetia Sep 18, 2019
d759fec
add more test cases for traceContext extraction.
rghetia Sep 19, 2019
418b0f4
remove tidy temporarily from circle-ci target to avoid build failure.
rghetia Sep 20, 2019
f271dfc
allow header ending in dash '-'.
rghetia Sep 20, 2019
4ca80c3
add inject test for non-zero value other than 01 for traceoption
rghetia Sep 23, 2019
064af5e
add AddLink and Link interface to MockSpan
rghetia Sep 23, 2019
ed41e82
fix running go mod tidy on every build.
rghetia Sep 23, 2019
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
Prev Previous commit
Next Next commit
remove Extract interface for tracer.
rghetia committed Sep 23, 2019
commit 7137e7b1018cd71dc7559814905c0d0af36cf1c2
3 changes: 0 additions & 3 deletions api/trace/api.go
Original file line number Diff line number Diff line change
@@ -47,9 +47,6 @@ type Tracer interface {

// Note: see https://github.com/opentracing/opentracing-go/issues/127
Inject(context.Context, Span, Injector)

// Note: see https://github.com/opentracing/opentracing-go/issues/127
Extract(context.Context, Extractor) (core.SpanContext, tag.Map)
}

type FinishOptions struct {
7 changes: 0 additions & 7 deletions api/trace/noop_trace.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ package trace
import (
"context"

"go.opentelemetry.io/api/tag"

"go.opentelemetry.io/api/core"
)

@@ -55,8 +53,3 @@ func (NoopTracer) Start(ctx context.Context, name string, opts ...SpanOption) (c
// Inject does nothing.
func (NoopTracer) Inject(ctx context.Context, span Span, injector Injector) {
}

// Extract does nothing.
func (noopTracer) Extract(ctx context.Context, extractor Extractor) (core.SpanContext, tag.Map) {
return core.INVALID_SPAN_CONTEXT, nil
}
4 changes: 0 additions & 4 deletions experimental/streaming/sdk/trace.go
Original file line number Diff line number Diff line change
@@ -129,7 +129,3 @@ func (t *tracer) Start(ctx context.Context, name string, opts ...apitrace.SpanOp
func (t *tracer) Inject(ctx context.Context, span apitrace.Span, injector apitrace.Injector) {
injector.Inject(span.SpanContext(), tag.FromContext(ctx))
}

func (t *tracer) Extract(ctx context.Context, extractor apitrace.Extractor) (core.SpanContext, tag.Map) {
return extractor.Extract()
}
6 changes: 0 additions & 6 deletions sdk/trace/tracer.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ package trace
import (
"context"

"go.opentelemetry.io/api/tag"

"go.opentelemetry.io/api/core"
"go.opentelemetry.io/api/tag"
apitrace "go.opentelemetry.io/api/trace"
@@ -108,7 +106,3 @@ func (tr *tracer) WithComponent(component string) apitrace.Tracer {
func (tr *tracer) Inject(ctx context.Context, span apitrace.Span, injector apitrace.Injector) {
injector.Inject(span.SpanContext(), tag.NewEmptyMap())
}

func (tr *tracer) Extract(ctx context.Context, extractor apitrace.Extractor) (core.SpanContext, tag.Map) {
return extractor.Extract()
}