1
#pragma once
2

            
3
#include "absl/strings/string_view.h"
4

            
5
namespace Envoy {
6
namespace Tracing {
7

            
8
/**
9
 * Utilities for validating W3C tracing-related headers.
10
 * See: https://www.w3.org/TR/trace-context/ and https://www.w3.org/TR/baggage/
11
 */
12

            
13
/**
14
 * Verifies that the given string is a valid traceparent header.
15
 */
16
bool isValidTraceParent(absl::string_view trace_parent);
17

            
18
/**
19
 * Verifies that the given string is a valid tracestate header.
20
 */
21
bool isValidTraceState(absl::string_view trace_state);
22

            
23
/**
24
 * Verifies that the given string is a valid baggage header.
25
 */
26
bool isValidBaggage(absl::string_view baggage);
27

            
28
} // namespace Tracing
29
} // namespace Envoy