Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions include/common/Tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
#include "opentelemetry/trace/span_id.h"
#include "opentelemetry/trace/trace_id.h"

namespace opentelemetry::trace {
OPENTELEMETRY_BEGIN_NAMESPACE
namespace trace {
class Span;
class Tracer;
} // namespace opentelemetry::trace
} // namespace trace
OPENTELEMETRY_END_NAMESPACE

#define TRACE_SERVICE_SEGCORE "segcore"

Expand Down
6 changes: 6 additions & 0 deletions test/TracerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ TEST(Tracer, Span) {
delete[] ctx->spanID;
}

TEST(Tracer, AutoSpanParentConstructorUsesHeaderDeclaredSpanType) {
std::shared_ptr<milvus::tracer::trace::Span> parent;
AutoSpan span("header_abi_parent", parent, false);
ASSERT_NE(span.GetSpan(), nullptr);
}

TEST(Tracer, OwnedTraceSnapshotCopiesBytes) {
uint8_t trace_id[16]{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10};
Expand Down
Loading