opentracing-c
OpenTracing C API
Data Fields
opentracing_text_map_writer Struct Reference

The inject carrier for the opentracing_propagation_format_text_map. More...

#include <opentracing-c/propagation.h>

Inheritance diagram for opentracing_text_map_writer:
[legend]
Collaboration diagram for opentracing_text_map_writer:
[legend]

Data Fields

opentracing_destructible base
 Base class member. More...
 
opentracing_propagation_error_code(* set )(struct opentracing_text_map_writer *writer, const char *key, const char *value) OPENTRACINGC_NONNULL(1)
 Set a key:value pair to the carrier. More...
 
- Data Fields inherited from opentracing_destructible
void(* destroy )(struct opentracing_destructible *destructible) OPENTRACINGC_NONNULL_ALL
 Destructor to clean up any resources allocated to the instance. More...
 

Detailed Description

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.

Field Documentation

◆ base

opentracing_destructible opentracing_text_map_writer::base

Base class member.

◆ set

opentracing_propagation_error_code(* opentracing_text_map_writer::set) (struct opentracing_text_map_writer *writer, const char *key, const char *value) OPENTRACINGC_NONNULL(1)

Set a key:value pair to the carrier.

Multiple calls to set() for the same key leads to undefined behavior.

Parameters
writerWriter instance.
keyString key.
valueString value.
Returns
opentracing_propagation_error_code indicating success or failure.

The documentation for this struct was generated from the following file: