Modules

oc_reporter oc_reporter_noop oc_reporter_sequential oc_reporter_zipkin oc_sampler oc_sampler_always oc_sampler_never oc_sampler_probability oc_server oc_span oc_span_ctx_binary oc_span_ctx_header oc_stat oc_stat_aggregation oc_stat_aggregation_count oc_stat_aggregation_distribution oc_stat_aggregation_latest oc_stat_aggregation_sum oc_stat_config oc_stat_exporter oc_stat_exporter_prometheus oc_stat_view oc_std_encoder oc_tag_ctx_binary oc_tag_ctx_header oc_tags oc_trace oc_trace_pb oc_transform ocp opencensus opencensus_app opencensus_sup

Module oc_span

Functions for functional manipulation of span data.

Function Index

add_link/2 Add a Link to the list of Links in the span.
add_time_event/2 Add an Annotation or MessageEvent to the list of TimeEvents in a span.
add_time_event/3
annotation/2 Create an Annotation.
finish_span/1 Finish a span, setting the end_time and sending to the reporter.
link/4 Create a Link which can be added to a Span.
message_event/4 Create a MessageEvent.
put_attribute/3 Put an attribute (a key/value pair) in the attribute map of a span.
put_attributes/2 Merge a map of attributes with the current attributes of a span.
set_status/3 Set Status.

Function Details

add_link/2


      add_link(Link, Span) -> Span
      

Add a Link to the list of Links in the span.

add_time_event/2


      add_time_event(TimeEvent, Span) -> Span
      

Add an Annotation or MessageEvent to the list of TimeEvents in a span.

add_time_event/3

add_time_event(Timestamp, TimeEvent, Span) -> any()

annotation/2


      annotation(Description, Attributes) -> Annotation
      

Create an Annotation.

finish_span/1


      finish_span(Span::maybe(opencensus:span())) -> ok
      

Finish a span, setting the end_time and sending to the reporter.

link/4


      link(LinkType, TraceId, SpanId, Attributes) -> Link
      

Create a Link which can be added to a Span.

message_event/4


      message_event(MessageEventType, Id, UncompressedSize, CompressedSize) -> MessageEvent
      

Create a MessageEvent.

put_attribute/3


      put_attribute(Key, Value, Span) -> Span
      

Put an attribute (a key/value pair) in the attribute map of a span. If the attribute already exists it is overwritten with the new value.

put_attributes/2


      put_attributes(Attributes, Span) -> Span
      

Merge a map of attributes with the current attributes of a span. The new values overwrite the old if any keys are the same.

set_status/3


      set_status(Code, Message, Span) -> Span
      

Set Status.