Skip to content

Commit

Permalink
Merge branch 'origin/propagation' into origin/propagators
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao authored Jul 30, 2020
2 parents f614fb9 + 63d8c91 commit 838c94e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ namespace propagators
private:
nostd::span<trace::propagation::HTTPTextFormat> propagators_;
}
}
}
12 changes: 10 additions & 2 deletions api/include/opentelemetry/trace/propagation/http_trace_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ namespace trace
{
namespace propagation
{


static const nostd::string_view kTraceParent = "traceparent";
static const nostd::string_view kTraceState = "tracestate";
static const int kVersionBytes = 2;
static const int kTraceIdBytes = 32;
static const int kParentIdBytes = 16;
static const int kTraceFlagBytes = 2;
static const int kTraceDelimiterBytes = 3;
static const int kHeaderSize = kVersionBytes + kTraceIdBytes + kParentIdBytes + kTraceFlagBytes + kTraceDelimiterBytes;
static const int kTraceStateMaxMembers = 32;
static const int kHeaderElementLengths[4] = {2,32,16,2};
// The HttpTraceContext provides methods to extract and inject
// context into headers of HTTP requests with traces.
// Example:
Expand Down
2 changes: 1 addition & 1 deletion api/test/trace/propagation/http_text_format_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ TEST(HTTPTextFormatTest, TraceStateKeys)
EXPECT_TRUE(trace_state.Get("1a-_*/2b@foo", "bar2"));
EXPECT_TRUE(trace_state.Get("foo", "bar3"));
EXPECT_TRUE(trace_state.Get("foo-_*/bar", "bar4"));
}
}

0 comments on commit 838c94e

Please sign in to comment.