Improve span operation name

Signed-off-by: frank chen <frank.chen021@outlook.com>
This commit is contained in:
frank chen 2021-12-04 21:56:52 +08:00
parent 1f9b542ee9
commit 55d50c0b4d

View File

@ -626,7 +626,13 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
} }
{ {
OpenTelemetrySpanHolder span("IInterpreter::execute()"); std::unique_ptr<OpenTelemetrySpanHolder> span;
if (context->query_trace_context.trace_id != UUID())
{
auto raw_interpreter_ptr = interpreter.get();
std::string class_name(abi::__cxa_demangle(typeid(*raw_interpreter_ptr).name(), nullptr, nullptr, nullptr));
span = std::make_unique<OpenTelemetrySpanHolder>(class_name + "::execute()");
}
res = interpreter->execute(); res = interpreter->execute();
} }