Skip to content

implementing virtual functions for compatibility #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2021
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
2 changes: 1 addition & 1 deletion ci/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "io_opentracing_cpp",
remote = "https://github.com/opentracing/opentracing-cpp",
commit = "ac50154a7713877f877981c33c3375003b6ebfe1",
commit = "4bb431f7728eaf383a07e86f9754a5b67575dab0",
)

new_local_repository(
Expand Down
2 changes: 1 addition & 1 deletion ci/build_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apt-get install --no-install-recommends --no-install-suggests -y \
git \
ca-certificates

export OPENTRACING_VERSION=1.5.0
export OPENTRACING_VERSION=1.6.0

# Compile for a portable cpu architecture
export CFLAGS="-march=x86-64"
Expand Down
2 changes: 1 addition & 1 deletion ci/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apt-get install --no-install-recommends --no-install-suggests -y \

# Build OpenTracing
cd /
export OPENTRACING_VERSION=1.5.0
export OPENTRACING_VERSION=1.6.0
git clone -b v$OPENTRACING_VERSION https://github.com/opentracing/opentracing-cpp.git
cd opentracing-cpp
mkdir .build && cd .build
Expand Down
11 changes: 11 additions & 0 deletions zipkin_opentracing/src/opentracing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ class OtSpanContext : public ot::SpanContext {
return span_context_.id() != 0 && !span_context_.trace_id().empty();
}

std::unique_ptr<SpanContext> Clone() const noexcept
{
return nullptr;
}

private:
zipkin::SpanContext span_context_;
mutable std::mutex baggage_mutex_;
Expand Down Expand Up @@ -258,6 +263,12 @@ class OtSpan : public ot::Span {
void Log(std::initializer_list<std::pair<string_view, Value>>
fields) noexcept override {}

void Log(SystemTime timestamp, std::initializer_list<std::pair<string_view, Value>>
fields) noexcept override {}

void Log(SystemTime timestamp, const std::vector<std::pair<string_view, Value>>&
fields) noexcept override {}

const ot::SpanContext &context() const noexcept override {
return span_context_;
}
Expand Down