1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-23 22:34:47 +02:00

Refactor Tracestate (#1931)

* Refactor TraceState

* Update tracecontext propagator to use new TraceState

* Add TraceStateFromKeyValues to oteltest

* Use oteltest to test TraceState

* Replace IsEmpty with Len for TraceState

* Replace ParseTraceState with ParseTraceStateString

* Clean up naming

* Add immutability test for TraceState

* Add changes to changelog

* Fixes

* Document argument type change in changelog

* Address feedback

Remove circularity of TestTraceStateLen.
This commit is contained in:
Tyler Yahn
2021-05-24 14:53:26 +00:00
committed by GitHub
parent d3b1280863
commit 0eeb8f87e9
16 changed files with 860 additions and 785 deletions

View File

@@ -288,7 +288,7 @@ func TestTraceStatePropagation(t *testing.T) {
prop := propagation.TraceContext{}
stateHeader := "tracestate"
parentHeader := "traceparent"
state, err := trace.TraceStateFromKeyValues(attribute.String("key1", "value1"), attribute.String("key2", "value2"))
state, err := oteltest.TraceStateFromKeyValues(attribute.String("key1", "value1"), attribute.String("key2", "value2"))
if err != nil {
t.Fatalf("Unable to construct expected TraceState: %s", err.Error())
}