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

Go to the source code of this file.

Data Structures

struct  opentracing_tag
 Simple tag representation. More...
 
struct  opentracing_start_span_options
 Options used when calling start_span_with_options(). More...
 
struct  opentracing_tracer
 Tracer interface. More...
 

Typedefs

typedef struct opentracing_tag opentracing_tag
 Simple tag representation. More...
 
typedef struct opentracing_start_span_options opentracing_start_span_options
 Options used when calling start_span_with_options(). More...
 
typedef struct opentracing_tracer opentracing_tracer
 Tracer interface.
 

Functions

OPENTRACINGC_EXPORT opentracing_traceropentracing_global_tracer (void)
 Get the tracer singleton. More...
 
OPENTRACINGC_EXPORT void opentracing_init_global_tracer (opentracing_tracer *tracer) OPENTRACINGC_NONNULL_ALL
 Install a global tracer. More...
 

Typedef Documentation

◆ opentracing_start_span_options

Options used when calling start_span_with_options().

◆ opentracing_tag

Simple tag representation.

Function Documentation

◆ opentracing_global_tracer()

OPENTRACINGC_EXPORT opentracing_tracer* opentracing_global_tracer ( void  )

Get the tracer singleton.

At process start, set to a no-op tracer.

Returns
Global tracer instance.
Attention
Do not modify members.
See also
opentracing_init_global_tracer()

◆ opentracing_init_global_tracer()

OPENTRACINGC_EXPORT void opentracing_init_global_tracer ( opentracing_tracer tracer)

Install a global tracer.

Ideally, only called once. Good candidate for use of pthread_once.

Parameters
tracerNew global tracer instance.
See also
opentracing_global_tracer()