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

Go to the source code of this file.

Data Structures

struct  opentracing_span_context
 Span context interface. More...
 
struct  opentracing_log_field
 Log field to represent key-value pair for a log. More...
 
struct  opentracing_log_record
 Log record can be used to describe events that occur in the lifetime of a span. More...
 
struct  opentracing_span_reference
 
struct  opentracing_finish_span_options
 
struct  opentracing_span
 Span interface. More...
 

Macros

#define OPENTRACINGC_CHILD_OF(span_context)
 
#define OPENTRACINGC_FOLLOWS_FROM(span_context)
 

Typedefs

typedef struct opentracing_span_context opentracing_span_context
 Span context interface. More...
 
typedef struct opentracing_log_field opentracing_log_field
 Log field to represent key-value pair for a log.
 
typedef struct opentracing_log_record opentracing_log_record
 Log record can be used to describe events that occur in the lifetime of a span.
 
typedef enum opentracing_span_reference_type opentracing_span_reference_type
 
typedef struct opentracing_span_reference opentracing_span_reference
 
typedef struct opentracing_finish_span_options opentracing_finish_span_options
 
typedef struct opentracing_span opentracing_span
 Span interface.
 

Enumerations

enum  opentracing_span_reference_type { opentracing_span_reference_child_of = 1, opentracing_span_reference_follows_from = 2 }
 

Macro Definition Documentation

◆ OPENTRACINGC_CHILD_OF

#define OPENTRACINGC_CHILD_OF (   span_context)
Value:
{ \
opentracing_span_reference_child_of, &(span_context) \
}

◆ OPENTRACINGC_FOLLOWS_FROM

#define OPENTRACINGC_FOLLOWS_FROM (   span_context)
Value:
{ \
opentracing_span_reference_follows_from, &(span_context) \
}

Typedef Documentation

◆ opentracing_span_context

Span context interface.

Span context represents span state that must be propagated to descendant spans and across boundaries (e.g. trace I:D, span ID, baggage).

Enumeration Type Documentation

◆ opentracing_span_reference_type

Enumerator
opentracing_span_reference_child_of 

Refers to a parent span that caused and somehow depends upon the new child span.

Often (but not always), the parent span cannot finish until the child span does.

opentracing_span_reference_follows_from 

Refers to a parent span that does not depend in any way on the result of the new child span.

For instance, one might use "follow from" to describe pipeline stages separated by queues, or a fire-and-forget cache insert at the tail end of a web request.

A "follow from" span is part of the same logical trace as the new span: i.e., the new span is somehow caused by the work of its "follow from."

All of the following could be valid timing diagrams for children that "follow from" a parent.

[-Parent Span-]  [-Child Span-]


[-Parent Span--]
 [-Child Span-]


[-Parent Span-]
            [-Child Span-]

See http://opentracing.io/spec/