Skip to content

Commit

Permalink
resolving issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 13, 2020
1 parent 820dd14 commit 7dc1203
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions api/include/opentelemetry/trace/default_span.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ class DefaultSpan : public Span

void AddEvent(nostd::string_view name,
core::SystemTimestamp timestamp,
const KeyValueIterable &attributes) noexcept
{
pass;
}
const KeyValueIterable &attributes) noexcept {}

void AddEvent(nostd::string_view name, const KeyValueIterable &attributes) noexcept
{
Expand Down
12 changes: 6 additions & 6 deletions api/include/opentelemetry/trace/propagation/http_trace_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ class HttpTraceContext : public HTTPTextFormat<T>
static TraceId GenerateTraceIdFromString(nostd::string_view trace_id)
{
const char *trc_id = trace_id.begin();
uint8_t buf[16];
uint8_t buf[kTraceIdBytes/2];
int tmp;
for (int i = 0; i < 32; i++)
for (int i = 0; i < kTraceIdBytes; i++)
{
tmp = CharToInt(*trc_id);
if (tmp < 0)
{
for (int j = 0; j < 16; j++)
for (int j = 0; j < kTraceIdBytes/2; j++)
{
buf[j] = 0;
}
Expand All @@ -124,14 +124,14 @@ class HttpTraceContext : public HTTPTextFormat<T>
static SpanId GenerateSpanIdFromString(nostd::string_view span_id)
{
const char *spn_id = span_id.begin();
uint8_t buf[8];
uint8_t buf[kSpanIdBytes/2];
int tmp;
for (int i = 0; i < 16; i++)
for (int i = 0; i < kSpanIdBytes; i++)
{
tmp = CharToInt(*spn_id);
if (tmp < 0)
{
for (int j = 0; j < 8; j++)
for (int j = 0; j < kSpanIdBytes/2; j++)
{
buf[j] = 0;
}
Expand Down

0 comments on commit 7dc1203

Please sign in to comment.