userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
span_builder.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <string>
7
#include <string_view>
8
9
#include <
userver/tracing/span.hpp
>
10
#include <userver/utils/impl/source_location.hpp>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
tracing
{
15
17
class
SpanBuilder final {
18
public
:
19
explicit
SpanBuilder(
20
std::string name,
21
const
utils::impl::SourceLocation& location = utils::impl::SourceLocation::Current()
22
);
23
24
void
SetTraceId(std::string_view trace_id);
25
std::string_view GetTraceId()
const
noexcept
;
26
void
SetSpanId(std::string_view span_id);
27
void
SetLink(std::string_view link);
28
void
SetParentSpanId(std::string_view parent_span_id);
29
void
SetParentLink(std::string_view parent_link);
30
31
void
AddTagFrozen(std::string key,
logging::LogExtra::Value
value);
32
void
AddNonInheritableTag(std::string key,
logging::LogExtra::Value
value);
33
34
void
SetLocalLogLevel(
logging::Level
log_level)
noexcept
;
35
37
void
SetSampled
(
bool
sampled)
noexcept
;
38
39
Span
Build() &&;
40
Span
BuildDetachedFromCoroStack() &&;
41
42
private
:
43
std::unique_ptr<Span::Impl, Span::OptionalDeleter> pimpl_;
44
};
45
46
}
// namespace tracing
47
48
USERVER_NAMESPACE_END
userver
tracing
span_builder.hpp
Generated on
for userver by
Doxygen
1.17.0