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() = #link{type = opencensus:link_type(), trace_id = opencensus:trace_id(), span_id = opencensus:span_id(), attributes = opencensus:attributes()}
link_type()
link_type() = TYPE_UNSPECIFIED | CHILD_LINKED_SPAN | PARENT_LINKED_SPAN
links()
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, 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}
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()
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.