From 8b61de167bf3ce54fd2af371dfbb50cc0f627b73 Mon Sep 17 00:00:00 2001 From: Rei Shimizu Date: Thu, 17 Jun 2021 13:25:25 +0900 Subject: [PATCH] fix corner case in storing span tag (#82) --- cpp2sky/tracing_context.h | 4 ++-- source/tracing_context_impl.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp2sky/tracing_context.h b/cpp2sky/tracing_context.h index c21d58e..7c488ba 100644 --- a/cpp2sky/tracing_context.h +++ b/cpp2sky/tracing_context.h @@ -88,8 +88,8 @@ class TracingSpan { /** * Get tags. */ - virtual const std::vector>& - tags() const = 0; + virtual const std::vector>& tags() + const = 0; /** * Get logs. diff --git a/source/tracing_context_impl.h b/source/tracing_context_impl.h index 5b36490..a2f84f0 100644 --- a/source/tracing_context_impl.h +++ b/source/tracing_context_impl.h @@ -39,7 +39,7 @@ class TracingSpanImpl : public TracingSpan { bool errorStatus() const override { return is_error_; } bool skipAnalysis() const override { return skip_analysis_; } int32_t componentId() const override { return component_id_; } - const std::vector>& tags() + const std::vector>& tags() const override { return tags_; } @@ -102,7 +102,7 @@ class TracingSpanImpl : public TracingSpan { // https://github.com/apache/skywalking/blob/master/docs/en/guides/Component-library-settings.md int32_t component_id_ = 9000; bool is_error_ = false; - std::vector> tags_; + std::vector> tags_; std::vector logs_; bool skip_analysis_ = false; bool finished_ = false;