lizhanhui commented on a change in pull request #378:
URL:
https://github.com/apache/rocketmq-client-cpp/pull/378#discussion_r734400631
##########
File path: src/main/cpp/rocketmq/ConsumeStandardMessageService.cpp
##########
@@ -139,33 +141,32 @@ void ConsumeStandardMessageService::consumeTask(const
ProcessQueueWeakPtr& proce
auto span_context =
opencensus::trace::propagation::FromTraceParentHeader(msg.traceContext());
auto span = opencensus::trace::Span::BlankSpan();
+ std::string span_name = consumer->resourceNamespace() + "/" +
msg.getTopic() + " " +
+
MixAll::SPAN_ATTRIBUTE_VALUE_ROCKETMQ_AWAIT_OPERATION;
if (span_context.IsValid()) {
- span =
opencensus::trace::Span::StartSpanWithRemoteParent(MixAll::SPAN_NAME_AWAIT_CONSUMPTION,
span_context,
-
&Samplers::always());
+ SPDLOG_INFO("Valid Valid, context={}", msg.traceContext());
Review comment:
Fix log
##########
File path: src/main/cpp/rocketmq/ConsumeStandardMessageService.cpp
##########
@@ -139,33 +141,32 @@ void ConsumeStandardMessageService::consumeTask(const
ProcessQueueWeakPtr& proce
auto span_context =
opencensus::trace::propagation::FromTraceParentHeader(msg.traceContext());
auto span = opencensus::trace::Span::BlankSpan();
+ std::string span_name = consumer->resourceNamespace() + "/" +
msg.getTopic() + " " +
+
MixAll::SPAN_ATTRIBUTE_VALUE_ROCKETMQ_AWAIT_OPERATION;
if (span_context.IsValid()) {
- span =
opencensus::trace::Span::StartSpanWithRemoteParent(MixAll::SPAN_NAME_AWAIT_CONSUMPTION,
span_context,
-
&Samplers::always());
+ SPDLOG_INFO("Valid Valid, context={}", msg.traceContext());
+ span = opencensus::trace::Span::StartSpanWithRemoteParent(span_name,
span_context, &Samplers::always());
} else {
- span =
opencensus::trace::Span::StartSpan(MixAll::SPAN_NAME_AWAIT_CONSUMPTION,
nullptr, {&Samplers::always()});
+ SPDLOG_INFO("Invalid Invalid, context={}", msg.traceContext());
Review comment:
Same here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]