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_measure 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 opencensus

opencensus main module.

Data Types

annotation()


      annotation() = #annotation{description = unicode:unicode_binary() | undefined, attributes = opencensus:attributes()}
      

attribute_value()


      attribute_value() = any()
      

attributes()


      attributes() = #{unicode:unicode_binary() => attribute_value()}
      

      link() = #link{type = opencensus:link_type(), trace_id = opencensus:trace_id(), span_id = opencensus:span_id(), attributes = opencensus:attributes()}
      

      link_type() = TYPE_UNSPECIFIED | CHILD_LINKED_SPAN | PARENT_LINKED_SPAN
      

      links() = [link()]
      

message_event()


      message_event() = #message_event{type = opencensus:message_event_type(), id = integer(), uncompressed_size = integer(), compressed_size = integer()}
      

message_event_type()


      message_event_type() = TYPE_UNSPECIFIED | SENT | RECEIVED
      

span()


      span() = #span{name = unicode:unicode_binary(), trace_id = opencensus:trace_id() | undefined, span_id = opencensus:span_id() | undefined, parent_span_id = opencensus:span_id() | undefined, tracestate = opencensus:tracestate() | undefined, trace_options = integer() | undefined, kind = opencensus:span_kind(), start_time = wts:timestamp(), end_time = wts:timestamp() | undefined, attributes = opencensus:attributes(), stack_trace = opencensus:stack_trace() | undefined, links = opencensus:links(), time_events = opencensus:time_events(), status = opencensus:status() | undefined, same_process_as_parent_span = boolean() | undefined, child_span_count = integer() | undefined}
      

span_ctx()


      span_ctx() = #span_ctx{trace_id = opencensus:trace_id() | undefined, span_id = opencensus:span_id() | undefined, trace_options = integer() | undefined, tracestate = opencensus:tracestate() | undefined}
      

span_id()


      span_id() = non_neg_integer()
      

stack_trace()


      stack_trace() = [erlang:stack_item()]
      

status()


      status() = #status{code = integer(), message = unicode:unicode_binary()}
      

tags()


      tags() = oc_tags:tags()
      

time_events()


      time_events() = [{wts:timestamp(), annotation() | message_event()}]
      

trace_id()


      trace_id() = non_neg_integer()
      

tracestate()


      tracestate() = #tracestate{entries = [{unicode:latin1_chardata(), unicode:latin1_chardata()}]}
      

Function Index

generate_span_id/0 Generates a 64 bit random integer to use as a span id.
generate_trace_id/0 Generates a 128 bit random integer to use as a trace id.
http_status_to_trace_status/1 Convert HTTP status code to Trace status code.

Function Details

generate_span_id/0


      generate_span_id() -> span_id()
      

Generates a 64 bit random integer to use as a span id.

generate_trace_id/0


      generate_trace_id() -> trace_id()
      

Generates a 128 bit random integer to use as a trace id.

http_status_to_trace_status/1


      http_status_to_trace_status(S::integer()) -> integer()
      

Convert HTTP status code to Trace status code.