opentracing-c
OpenTracing C API
propagation.h
Go to the documentation of this file.
1 #ifndef OPENTRACINGC_PROPAGATION_H
2 #define OPENTRACINGC_PROPAGATION_H
3 
4 #include <opentracing-c/config.h>
5 
6 #include <opentracing-c/common.h>
7 #include <opentracing-c/span.h>
8 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14 
19 
25 
32 
38 
44 
52 
68 
78  struct opentracing_text_map_writer* writer,
79  const char* key,
80  const char* value) OPENTRACINGC_NONNULL(1);
82 
98 
113  struct opentracing_text_map_reader* reader,
114  opentracing_propagation_error_code (*handler)(void* arg,
115  const char* key,
116  const char* value),
117  void* arg) OPENTRACINGC_NONNULL(1, 2);
119 
128 
137 
138 /* Forward declaration. */
139 struct opentracing_tracer;
140 
149 
159  struct opentracing_custom_carrier_reader* reader,
160  const struct opentracing_tracer* tracer,
161  opentracing_span_context** span_context) OPENTRACINGC_NONNULL_ALL;
163 
172 
181  struct opentracing_custom_carrier_writer* writer,
182  const struct opentracing_tracer* tracer,
183  const opentracing_span_context* span_context) OPENTRACINGC_NONNULL_ALL;
185 
186 #ifdef __cplusplus
187 }
188 #endif /* __cplusplus */
189 
190 #endif /* OPENTRACINGC_PROPAGATION_H */
HTTP headers reader.
Definition: propagation.h:133
opentracing_propagation_error_code
Error codes for errors occurring in span context propagation.
Definition: propagation.h:16
opentracing_propagation_error_code(* inject)(struct opentracing_custom_carrier_writer *writer, const struct opentracing_tracer *tracer, const opentracing_span_context *span_context) OPENTRACINGC_NONNULL_ALL
Inject a span context into a custom format.
Definition: propagation.h:180
opentracing_propagation_error_code(* foreach_key)(struct opentracing_text_map_reader *reader, opentracing_propagation_error_code(*handler)(void *arg, const char *key, const char *value), void *arg) OPENTRACINGC_NONNULL(1
Returns text map contents via repeated calls to the handler function.
Definition: propagation.h:112
opentracing_propagation_error_code(* extract)(struct opentracing_custom_carrier_reader *reader, const struct opentracing_tracer *tracer, opentracing_span_context **span_context) OPENTRACINGC_NONNULL_ALL
Extract a span context from a custom format.
Definition: propagation.h:158
opentracing_destructible base
Base class member.
Definition: propagation.h:171
The inject carrier for the opentracing_propagation_format_text_map.
Definition: propagation.h:65
Destructible interface.
Definition: destructible.h:16
Occurs when the carrier passed to extract() is of the expected type but is corrupted.
Definition: propagation.h:43
Occurs when inject() or extract() implementations expect a different type of carrier than they are gi...
Definition: propagation.h:37
Success value.
Definition: propagation.h:18
extract() carrier for a custom format.
Definition: propagation.h:146
opentracing_destructible base
Base class member.
Definition: propagation.h:67
The extract() carrier for the opentracing_propagation_format_text_map with it, the caller can decode ...
Definition: propagation.h:95
Occurs when inject is asked to operate on a span context which it is not prepared to handle (for exam...
Definition: propagation.h:31
inject() carrier for a custom format.
Definition: propagation.h:169
Occurs when a propagation function encounters an unknown exception.
Definition: propagation.h:50
opentracing_text_map_writer base
Base class member.
Definition: propagation.h:126
struct opentracing_http_headers_writer opentracing_http_headers_writer
HTTP headers writer.
Tracer interface.
Definition: tracer.h:61
struct opentracing_text_map_writer opentracing_text_map_writer
The inject carrier for the opentracing_propagation_format_text_map.
HTTP headers writer.
Definition: propagation.h:124
struct opentracing_http_headers_reader opentracing_http_headers_reader
HTTP headers reader.
opentracing_destructible base
Base class member.
Definition: propagation.h:97
struct opentracing_text_map_reader opentracing_text_map_reader
The extract() carrier for the opentracing_propagation_format_text_map with it, the caller can decode ...
Occurs when the carrier passed to extract() is valid and uncorrupted but has insufficient information...
Definition: propagation.h:24
struct opentracing_custom_carrier_writer opentracing_custom_carrier_writer
inject() carrier for a custom format.
Span context interface.
Definition: span.h:20
opentracing_text_map_reader base
Base class member.
Definition: propagation.h:135
opentracing_destructible base
Base class member.
Definition: propagation.h:148
struct opentracing_custom_carrier_reader opentracing_custom_carrier_reader
extract() carrier for a custom format.