opentracing-c
OpenTracing C API
Data Structures | Typedefs | Enumerations
propagation.h File Reference
#include <opentracing-c/config.h>
#include <opentracing-c/common.h>
#include <opentracing-c/span.h>
Include dependency graph for propagation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  opentracing_text_map_writer
 The inject carrier for the opentracing_propagation_format_text_map. More...
 
struct  opentracing_text_map_reader
 The extract() carrier for the opentracing_propagation_format_text_map with it, the caller can decode a propagated span context as entries in a map of strings. More...
 
struct  opentracing_http_headers_writer
 HTTP headers writer. More...
 
struct  opentracing_http_headers_reader
 HTTP headers reader. More...
 
struct  opentracing_custom_carrier_reader
 extract() carrier for a custom format. More...
 
struct  opentracing_custom_carrier_writer
 inject() carrier for a custom format. More...
 

Typedefs

typedef enum opentracing_propagation_error_code opentracing_propagation_error_code
 Error codes for errors occurring in span context propagation. More...
 
typedef struct opentracing_text_map_writer opentracing_text_map_writer
 The inject carrier for the opentracing_propagation_format_text_map. More...
 
typedef 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 a propagated span context as entries in a map of strings. More...
 
typedef struct opentracing_http_headers_writer opentracing_http_headers_writer
 HTTP headers writer.
 
typedef struct opentracing_http_headers_reader opentracing_http_headers_reader
 HTTP headers reader.
 
typedef struct opentracing_custom_carrier_reader opentracing_custom_carrier_reader
 extract() carrier for a custom format. More...
 
typedef struct opentracing_custom_carrier_writer opentracing_custom_carrier_writer
 inject() carrier for a custom format. More...
 

Enumerations

enum  opentracing_propagation_error_code {
  opentracing_propagation_error_code_success = 0, opentracing_propagation_error_code_span_context_not_found = -2, opentracing_propagation_error_code_invalid_span_context = -3, opentracing_propagation_error_code_invalid_carrier = -4,
  opentracing_propagation_error_code_span_context_corrupted = -5, opentracing_propagation_error_code_unknown = -6
}
 Error codes for errors occurring in span context propagation. More...
 

Typedef Documentation

◆ opentracing_custom_carrier_reader

extract() carrier for a custom format.

With it, the caller can decode an opentracing_span_context from entries in a custom protocol.

◆ opentracing_custom_carrier_writer

inject() carrier for a custom format.

With it, the caller can encode an opentracing_span_context for propagation as entries in a custom protocol.

◆ opentracing_propagation_error_code

Error codes for errors occurring in span context propagation.

◆ opentracing_text_map_reader

The extract() carrier for the opentracing_propagation_format_text_map with it, the caller can decode a propagated span context as entries in a map of strings.

Attention
The backing store for the opentracing_text_map_reader may contain data unrelated to span context. As such, inject() and extract() implementations that call the opentracing_text_map_writer and opentracing_text_map_reader interfaces must agree on a prefix or other convention to distinguish their own key:value pairs.

◆ opentracing_text_map_writer

The inject carrier for the opentracing_propagation_format_text_map.

With it, the caller can encode a span context for propagation as entries in a map of strings.

Attention
The backing store for the opentracing_text_map_writer may contain data unrelated to span context. As such, inject() and extract() implementations that call the opentracing_text_map_writer and opentracing_text_map_reader interfaces must agree on a prefix or other convention to distinguish their own key:value pairs.

Enumeration Type Documentation

◆ opentracing_propagation_error_code

Error codes for errors occurring in span context propagation.

Enumerator
opentracing_propagation_error_code_success 

Success value.

opentracing_propagation_error_code_span_context_not_found 

Occurs when the carrier passed to extract() is valid and uncorrupted but has insufficient information to extract a span context.

opentracing_propagation_error_code_invalid_span_context 

Occurs when inject is asked to operate on a span context which it is not prepared to handle (for example, since it was created by a different tracer implementation).

opentracing_propagation_error_code_invalid_carrier 

Occurs when inject() or extract() implementations expect a different type of carrier than they are given.

opentracing_propagation_error_code_span_context_corrupted 

Occurs when the carrier passed to extract() is of the expected type but is corrupted.

opentracing_propagation_error_code_unknown 

Occurs when a propagation function encounters an unknown exception.

This can represent an out-of-memory error, or any other error not covered by the other error codes.