Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Latest commit

 

History

History
222 lines (101 loc) · 5.6 KB

opencensus.md

File metadata and controls

222 lines (101 loc) · 5.6 KB

Module opencensus

opencensus main module.

Data Types


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

attribute_value() = any()

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{type = opencensus:message_event_type(), id = integer(), uncompressed_size = integer(), compressed_size = integer()}

message_event_type() = TYPE_UNSPECIFIED | SENT | RECEIVED

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{trace_id = opencensus:trace_id() | undefined, span_id = opencensus:span_id() | undefined, trace_options = integer() | undefined}

span_id() = non_neg_integer()

stack_trace() = [erlang:stack_item()]

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

tags() = oc_tags:tags()

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.