6#include <userver/clients/http/request_tracing_editor.hpp>
7#include <userver/clients/http/response.hpp>
8#include <userver/tracing/span.hpp>
9#include <userver/tracing/span_builder.hpp>
10#include <userver/utils/flags.hpp>
12USERVER_NAMESPACE_BEGIN
14namespace server::http {
28 virtual ~TracingManagerBase() =
default;
36 const server::http::HttpRequest& request,
37 SpanBuilder& span_builder)
const = 0;
41 const Span& span, clients::
http::RequestTracingEditor request)
const = 0;
45 const Span& span, server::http::HttpResponse& response)
const = 0;
81bool TryFillSpanBuilderFromRequest(
Format format,
82 const server::http::HttpRequest& request,
83 SpanBuilder& span_builder);
85void FillRequestWithTracingContext(
Format format,
const tracing::Span& span,
86 clients::
http::RequestTracingEditor request);
88void FillResponseWithTracingContext(
Format format,
const Span& span,
89 server::http::HttpResponse& response);
95 GenericTracingManager() =
delete;
97 GenericTracingManager(utils::Flags<
Format> in_request_response,
98 utils::Flags<
Format> new_request)
99 : in_request_response_{in_request_response}, new_request_{new_request} {}
102 SpanBuilder& span_builder)
const override;
106 clients::
http::RequestTracingEditor request)
const override;
109 const Span& span, server::http::HttpResponse& response)
const override;
112 const utils::Flags<
Format> in_request_response_;
113 const utils::Flags<
Format> new_request_;