Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : 5 : #include "envoy/config/trace/v3/http_tracer.pb.h" 6 : #include "envoy/http/codes.h" 7 : 8 : namespace Envoy { 9 : namespace Http { 10 : 11 : struct UserAgentContext; 12 : 13 : /** 14 : * Captures http-related structures with cardinality of one per server. 15 : */ 16 : class Context { 17 : public: 18 589 : virtual ~Context() = default; 19 : 20 : /** 21 : * Get the default tracing configuration, i.e. one from the bootstrap config. 22 : * 23 : * Once deprecation window for the tracer provider configuration in the bootstrap config is over, 24 : * this method will no longer be necessary. 25 : * 26 : * @return Tracing. 27 : */ 28 : virtual const envoy::config::trace::v3::Tracing& defaultTracingConfig() PURE; 29 : 30 : virtual CodeStats& codeStats() PURE; 31 : virtual const UserAgentContext& userAgentContext() const PURE; 32 : virtual const Stats::StatName& asyncClientStatPrefix() const PURE; 33 : }; 34 : 35 : using ContextPtr = std::unique_ptr<Context>; 36 : 37 : } // namespace Http 38 : } // namespace Envoy