1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-12-01 23:12:29 +02:00

Add parent context to SpanProcessor.OnStart (#1333)

* Add parent context to SpanProcessor.OnStart

The spec requires doing so. Right now SpanProcessor implementations
aren't doing anything with this argument.

* Update changelog

* Fix typo in test name
This commit is contained in:
Johannes Liebermann
2020-11-16 17:45:49 +01:00
committed by GitHub
parent 63a11144cf
commit 070b657c21
9 changed files with 75 additions and 24 deletions

View File

@@ -34,7 +34,9 @@ type DurationFilter struct {
Max time.Duration
}
func (f DurationFilter) OnStart(sd *export.SpanData) { f.Next.OnStart(sd) }
func (f DurationFilter) OnStart(parent context.Context, sd *export.SpanData) {
f.Next.OnStart(parent, sd)
}
func (f DurationFilter) Shutdown(ctx context.Context) error { return f.Next.Shutdown(ctx) }
func (f DurationFilter) ForceFlush() { f.Next.ForceFlush() }
func (f DurationFilter) OnEnd(sd *export.SpanData) {
@@ -60,7 +62,9 @@ type InstrumentationBlacklist struct {
Blacklist map[string]bool
}
func (f InstrumentationBlacklist) OnStart(sd *export.SpanData) { f.Next.OnStart(sd) }
func (f InstrumentationBlacklist) OnStart(parent context.Context, sd *export.SpanData) {
f.Next.OnStart(parent, sd)
}
func (f InstrumentationBlacklist) Shutdown(ctx context.Context) error { return f.Next.Shutdown(ctx) }
func (f InstrumentationBlacklist) ForceFlush() { f.Next.ForceFlush() }
func (f InstrumentationBlacklist) OnEnd(sd *export.SpanData) {