Skip to content

Commit

Permalink
fix corner case in storing span tag (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shikugawa authored Jun 17, 2021
1 parent 9d14df6 commit 8b61de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cpp2sky/tracing_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class TracingSpan {
/**
* Get tags.
*/
virtual const std::vector<std::pair<std::string_view, std::string_view>>&
tags() const = 0;
virtual const std::vector<std::pair<std::string, std::string>>& tags()
const = 0;

/**
* Get logs.
Expand Down
4 changes: 2 additions & 2 deletions source/tracing_context_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<std::string_view, std::string_view>>& tags()
const std::vector<std::pair<std::string, std::string>>& tags()
const override {
return tags_;
}
Expand Down Expand Up @@ -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<std::pair<std::string_view, std::string_view>> tags_;
std::vector<std::pair<std::string, std::string>> tags_;
std::vector<skywalking::v3::Log> logs_;
bool skip_analysis_ = false;
bool finished_ = false;
Expand Down

0 comments on commit 8b61de1

Please sign in to comment.