Sign in

    moonbit_otel

    otel
    opentelemetry
    tracing
    metrics
    logging
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    7 months ago
    Downloads
    36

    #ryota0624/moonbit_otel

    Moonbit Otel

    https://opentelemetry.io/ に沿った計装を行うためのMoonBit用ライブラリです。

    #support

    TracesMetricsLogs
    In DevelopmentNot YetNot Yet

    JsonHttpClient

    pub(open) trait JsonHttpClient {
    async http_post_json(Self, url : String, body : String, headers : Map[String, String]) -> Result[HttpResponse, HttpError]
    }

    JsonHttpClientProvider

    pub(open) trait JsonHttpClientProvider {
    get_json_client(Self) -> &JsonHttpClient
    }

    ProtobufHttpClient

    pub(open) trait ProtobufHttpClient {
    async http_post_protobuf(Self, url : String, body : Bytes, headers : Map[String, String]) -> Result[HttpResponse, HttpError]
    }

    ProtobufHttpClientProvider

    pub(open) trait ProtobufHttpClientProvider {
    get_protobuf_client(Self) -> &ProtobufHttpClient
    }

    SpanContextExtractable

    pub trait SpanContextExtractable {
    as_span_context(Self) -> SpanContext
    }

    SpanExporter

    pub(open) trait SpanExporter {
    async export_spans(Self, Array[Span]) -> Unit
    async shutdown(Self) -> Unit
    enable_batch_export(self : Self, options? : BatchExporterOptions) -> BatchExporter = _
    }

    SpanProcessor

    pub trait SpanProcessor {
    on_span_start(Self, span : Span) -> Unit
    on_span_end(Self, span : Span) -> Unit
    async shutdown(Self) -> Unit
    async force_flush(Self) -> Unit
    }

    AttributeValue

    pub(all) enum AttributeValue {
    String(String)
    Int(Int)
    Bool(Bool)
    Double(Double)
    }

    Attributes

    pub struct Attributes {
    map : Map[String, AttributeValue]
    }

    Attributes::contains

    fn Attributes::contains(self : Attributes, key : String) -> Bool

    Attributes::copy

    fn Attributes::copy(self : Attributes) -> Attributes

    Attributes::each

    fn Attributes::each(self : Attributes, f : (String, AttributeValue) -> Unit) -> Unit

    Attributes::empty

    fn Attributes::empty() -> Attributes

    Attributes::get

    fn Attributes::get(self : Attributes, key : String) -> AttributeValue?

    Attributes::get_bool

    fn Attributes::get_bool(self : Attributes, key : String) -> Bool?

    Attributes::get_double

    fn Attributes::get_double(self : Attributes, key : String) -> Double?

    Attributes::get_int

    fn Attributes::get_int(self : Attributes, key : String) -> Int?

    Attributes::get_string

    fn Attributes::get_string(self : Attributes, key : String) -> String?

    Attributes::is_empty

    fn Attributes::is_empty(self : Attributes) -> Bool

    Attributes::merge

    fn Attributes::merge(self : Attributes, other : Attributes) -> Attributes

    Attributes::new

    fn Attributes::new() -> Attributes

    Attributes::set

    fn Attributes::set(self : Attributes, key : String, value : AttributeValue) -> Attributes

    Attributes::size

    fn Attributes::size(self : Attributes) -> Int

    Attributes::with_bool

    fn Attributes::with_bool(self : Attributes, key : String, value : Bool) -> Attributes

    Attributes::with_double

    fn Attributes::with_double(self : Attributes, key : String, value : Double) -> Attributes

    Attributes::with_int

    fn Attributes::with_int(self : Attributes, key : String, value : Int) -> Attributes

    Attributes::with_string

    fn Attributes::with_string(self : Attributes, key : String, value : String) -> Attributes

    BatchExporter

    pub struct BatchExporter {
    // private fields
    }

    BatchExporter::new

    fn BatchExporter::new(exporter : &SpanExporter, options? : BatchExporterOptions) -> BatchExporter

    BatchExporter::start

    async fn BatchExporter::start(self : BatchExporter) -> Unit

    BatchExporterOptions

    pub struct BatchExporterOptions {
    max_queue_size : Int
    schedule_delay_millis : Int
    export_timeout_millis : Int
    max_export_batch_size : Int
    set_timeout : async (Int, async () -> Unit noraise) -> Unit
    logger_factory : () -> InternalLogger
    }

    BatchExporterOptions::enable_debug_log

    fn BatchExporterOptions::enable_debug_log(self : BatchExporterOptions, print : (&Show) -> Unit) -> BatchExporterOptions

    BatchExporterOptions::with_export_timeout_millis

    fn BatchExporterOptions::with_export_timeout_millis(self : BatchExporterOptions, millis : Int) -> BatchExporterOptions

    BatchExporterOptions::with_max_export_batch_size

    fn BatchExporterOptions::with_max_export_batch_size(self : BatchExporterOptions, size : Int) -> BatchExporterOptions

    BatchExporterOptions::with_max_queue_size

    fn BatchExporterOptions::with_max_queue_size(self : BatchExporterOptions, size : Int) -> BatchExporterOptions

    BatchExporterOptions::with_schedule_delay_millis

    fn BatchExporterOptions::with_schedule_delay_millis(self : BatchExporterOptions, millis : Int) -> BatchExporterOptions

    BatchExporterOptions::with_set_timeout

    fn BatchExporterOptions::with_set_timeout(self : BatchExporterOptions, set_timeout : async (Int, async () -> Unit noraise) -> Unit) -> BatchExporterOptions

    BatchSpanProcessor

    pub struct BatchSpanProcessor {
    // private fields
    }

    BatchSpanProcessor::new

    BatchSpanProcessor::start

    async fn BatchSpanProcessor::start(self : BatchSpanProcessor) -> Unit

    BatchSpanProcessorOptions

    pub struct BatchSpanProcessorOptions {
    max_queue_size : Int
    schedule_delay_millis : Int
    export_timeout_millis : Int
    max_export_batch_size : Int
    set_timeout : async (Int, async () -> Unit noraise) -> Unit
    logger_factory : () -> InternalLogger
    }

    BatchSpanProcessorOptions::enable_debug_log

    fn BatchSpanProcessorOptions::enable_debug_log(self : BatchSpanProcessorOptions, print : (&Show) -> Unit) -> BatchSpanProcessorOptions

    BatchSpanProcessorOptions::with_export_timeout_millis

    fn BatchSpanProcessorOptions::with_export_timeout_millis(self : BatchSpanProcessorOptions, millis : Int) -> BatchSpanProcessorOptions

    BatchSpanProcessorOptions::with_max_export_batch_size

    fn BatchSpanProcessorOptions::with_max_export_batch_size(self : BatchSpanProcessorOptions, size : Int) -> BatchSpanProcessorOptions

    BatchSpanProcessorOptions::with_max_queue_size

    BatchSpanProcessorOptions::with_schedule_delay_millis

    fn BatchSpanProcessorOptions::with_schedule_delay_millis(self : BatchSpanProcessorOptions, millis : Int) -> BatchSpanProcessorOptions

    BatchSpanProcessorOptions::with_set_timeout

    fn BatchSpanProcessorOptions::with_set_timeout(self : BatchSpanProcessorOptions, set_timeout : async (Int, async () -> Unit noraise) -> Unit) -> BatchSpanProcessorOptions

    Context

    type Context

    Context::contains

    fn Context::contains(self : Context, key : String) -> Bool

    Context::empty

    fn Context::empty() -> Context

    Context::get

    fn Context::get(self : Context, key : String) -> ContextValue?

    Context::get_bool

    fn Context::get_bool(self : Context, key : String) -> Bool?

    Context::get_double

    fn Context::get_double(self : Context, key : String) -> Double?

    Context::get_int

    fn Context::get_int(self : Context, key : String) -> Int?

    Context::get_string

    fn Context::get_string(self : Context, key : String) -> String?

    Context::new

    fn Context::new() -> Context

    Context::size

    fn Context::size(self : Context) -> Int

    Context::with_bool

    fn Context::with_bool(self : Context, key : String, value : Bool) -> Context

    Context::with_double

    fn Context::with_double(self : Context, key : String, value : Double) -> Context

    Context::with_int

    fn Context::with_int(self : Context, key : String, value : Int) -> Context

    Context::with_string

    fn Context::with_string(self : Context, key : String, value : String) -> Context

    ContextValue

    type ContextValue

    impl Eq for ContextValue

    ExportAdapter

    pub(all) enum ExportAdapter {
    HttpJson(HttpJsonSendAdaptor)
    HttpProtobuf(HttpProtobufSendAdaptor)
    Stdout(StdoutSendAdaptor)
    }

    HttpError

    pub(all) enum HttpError {
    NetworkError(String)
    RequestError(String)
    HttpStatusError(Int, String)
    InvalidResponse(String)
    TimeoutError(String)
    SecurityError(String)
    }

    impl Show for HttpError

    HttpError::http_status

    fn HttpError::http_status(status_code : Int, body : String) -> HttpError

    HttpError::invalid_response

    fn HttpError::invalid_response(message : String) -> HttpError

    HttpError::is_retryable

    fn HttpError::is_retryable(self : HttpError) -> Bool

    HttpError::network

    fn HttpError::network(message : String) -> HttpError

    HttpError::request

    fn HttpError::request(message : String) -> HttpError

    HttpError::security

    fn HttpError::security(message : String) -> HttpError

    HttpError::timeout

    fn HttpError::timeout(message : String) -> HttpError

    HttpJsonSendAdaptor

    pub(all) struct HttpJsonSendAdaptor {
    client_provider : &JsonHttpClientProvider
    endpoint : String
    headers : Map[String, String]
    }

    HttpJsonSendAdaptor::new

    fn HttpJsonSendAdaptor::new(client_provider : &JsonHttpClientProvider, endpoint? : String, headers? : Map[String, String]) -> HttpJsonSendAdaptor

    HttpProtobufSendAdaptor

    pub(all) struct HttpProtobufSendAdaptor {
    client_provider : &ProtobufHttpClientProvider
    endpoint : String
    headers : Map[String, String]
    }

    HttpProtobufSendAdaptor::new

    fn HttpProtobufSendAdaptor::new(client_provider : &ProtobufHttpClientProvider, endpoint? : String, headers? : Map[String, String]) -> HttpProtobufSendAdaptor

    HttpRequest

    pub(all) struct HttpRequest {
    url : String
    http_method : String
    headers : Map[String, String]
    body : String
    }

    HttpResponse

    pub(all) struct HttpResponse {
    status_code : Int
    body : String
    error_code : Int?
    }

    InternalLogger

    type InternalLogger

    OTLPExporter

    pub struct OTLPExporter {
    config : OTLPExporterOptions
    // private fields
    }

    OTLPExporter::export_spans

    async fn OTLPExporter::export_spans(self : OTLPExporter, spans : Array[Span]) -> Unit

    OTLPExporter::export_spans_by_json_http_client

    async fn OTLPExporter::export_spans_by_json_http_client(self : OTLPExporter, json_body : String, http_client : &JsonHttpClient, http_adaptor : HttpJsonSendAdaptor, spans : Array[Span]) -> Unit

    OTLPExporter::export_spans_by_protobuf_http_client

    async fn OTLPExporter::export_spans_by_protobuf_http_client(self : OTLPExporter, protobuf_body : Bytes, http_client : &ProtobufHttpClient, http_adaptor : HttpProtobufSendAdaptor, spans : Array[Span]) -> Unit

    OTLPExporter::new

    OTLPExporter::shutdown

    fn OTLPExporter::shutdown(self : OTLPExporter) -> Unit

    OTLPExporterOptions

    pub struct OTLPExporterOptions {
    logger_factory : () -> InternalLogger
    export_adapter : ExportAdapter
    }

    OTLPExporterOptions::default

    fn OTLPExporterOptions::default(export_adapter : ExportAdapter) -> OTLPExporterOptions

    OTLPExporterOptions::enable_debug_log

    fn OTLPExporterOptions::enable_debug_log(self : OTLPExporterOptions, print~ : (&Show) -> Unit) -> OTLPExporterOptions

    OTLPExporterOptions::http_json

    fn OTLPExporterOptions::http_json(client_provider : &JsonHttpClientProvider, endpoint? : String, headers? : Map[String, String]) -> OTLPExporterOptions

    OTLPExporterOptions::http_protobuf

    fn OTLPExporterOptions::http_protobuf(client_provider : &ProtobufHttpClientProvider, endpoint? : String, headers? : Map[String, String]) -> OTLPExporterOptions

    OTLPExporterOptions::stdout

    fn OTLPExporterOptions::stdout(print : (String) -> Unit) -> OTLPExporterOptions

    OtlpResourceSpan

    pub struct OtlpResourceSpan {
    resource : Resource
    scope_spans : Array[OtlpScopeSpan]
    schemaUrl : String?
    }

    OtlpResourceSpans

    pub struct OtlpResourceSpans {
    resource_spans : Array[OtlpResourceSpan]
    }

    OtlpResourceSpans::from_map

    OtlpResourceSpans::from_spans

    fn OtlpResourceSpans::from_spans(spans : Array[Span]) -> OtlpResourceSpans

    OtlpScope

    pub struct OtlpScope {
    name : String
    version : String
    }

    impl ToJson for OtlpScope

    OtlpScopeSpan

    pub struct OtlpScopeSpan {
    scope : OtlpScope
    spans : Array[Span]
    schema_url : String?
    }

    PrettyPrintExporter

    pub struct PrettyPrintExporter {
    print_fn : (String) -> Unit
    }

    PrettyPrintExporter::export_spans

    fn PrettyPrintExporter::export_spans(self : PrettyPrintExporter, spans : Array[Span]) -> Unit

    PrettyPrintExporter::new

    fn PrettyPrintExporter::new(print : (String) -> Unit) -> PrettyPrintExporter

    PrettyPrintExporter::shutdown

    fn PrettyPrintExporter::shutdown(self : PrettyPrintExporter) -> Unit

    Resource

    pub struct Resource {
    attributes : Attributes
    }

    impl Eq for Resource
    impl Hash for Resource
    impl ToJson for Resource

    Resource::contains

    fn Resource::contains(self : Resource, key : String) -> Bool

    Resource::empty

    fn Resource::empty() -> Resource

    Resource::get

    fn Resource::get(self : Resource, key : String) -> AttributeValue?

    Resource::get_bool

    fn Resource::get_bool(self : Resource, key : String) -> Bool?

    Resource::get_double

    fn Resource::get_double(self : Resource, key : String) -> Double?

    Resource::get_int

    fn Resource::get_int(self : Resource, key : String) -> Int?

    Resource::get_string

    fn Resource::get_string(self : Resource, key : String) -> String?

    Resource::merge

    fn Resource::merge(self : Resource, other : Resource) -> Resource

    Resource::new

    fn Resource::new() -> Resource

    Resource::size

    fn Resource::size(self : Resource) -> Int

    Resource::with_bool

    fn Resource::with_bool(self : Resource, key : String, value : Bool) -> Resource

    Resource::with_double

    fn Resource::with_double(self : Resource, key : String, value : Double) -> Resource

    Resource::with_int

    fn Resource::with_int(self : Resource, key : String, value : Int) -> Resource

    Resource::with_string

    fn Resource::with_string(self : Resource, key : String, value : String) -> Resource

    Span

    pub struct Span {
    traceId : TraceID
    spanId : SpanID
    trace_state : TraceState
    parent_span_id : SpanID?
    trace_flags : TraceFlags
    name : String
    kind : SpanKind
    start_time_unix_nano : Int64
    end_time_unix_nano : Int64?
    attributes : Attributes
    dropped_attributes_count : Int
    events : Array[SpanEvent]
    links : Array[SpanLink]
    dropped_events_count : Int
    status : SpanStatus
    resource : Resource
    tracer_identifier : TracerIdentifier
    on_end : (Span) -> Unit?
    }

    Span::add_event

    fn Span::add_event(self : Span, event : SpanEvent) -> Span

    fn Span::add_link(self : Span, linked_context : SpanContext, attributes? : Attributes) -> Span

    Span::context

    fn Span::context(self : Span) -> SpanContext

    Span::duration

    fn Span::duration(self : Span) -> Int64?

    Span::end

    fn Span::end(self : Span, end_time_ns? : Int64) -> Span

    Span::is_ended

    fn Span::is_ended(self : Span) -> Bool

    Span::new

    fn Span::new(context : SpanContext, name : String, kind : SpanKind, start_time : Int64, resource : Resource, tracer_identifier : TracerIdentifier, parent_span_id : SpanID?, on_end? : (Span) -> Unit) -> Span

    Span::set_attribute

    fn Span::set_attribute(self : Span, key : String, value : AttributeValue) -> Span

    Span::set_status

    fn Span::set_status(self : Span, status : SpanStatus) -> Span

    SpanBuilder

    pub struct SpanBuilder {
    // private fields
    }

    SpanBuilder::attribute

    fn SpanBuilder::attribute(self : SpanBuilder, key : String, value : AttributeValue) -> SpanBuilder

    SpanBuilder::attributes

    fn SpanBuilder::attributes(self : SpanBuilder, attributes : Attributes) -> SpanBuilder

    SpanBuilder::kind

    fn SpanBuilder::kind(self : SpanBuilder, kind : SpanKind) -> SpanBuilder

    SpanBuilder::new

    fn SpanBuilder::new(name : String, resource : Resource, tracer_identifier : TracerIdentifier, tracer_options : TracerOptions) -> SpanBuilder

    SpanBuilder::parent

    SpanBuilder::start

    fn SpanBuilder::start(self : SpanBuilder) -> Span

    SpanBuilder::start_time_ns

    fn SpanBuilder::start_time_ns(self : SpanBuilder, start_time : Int64) -> SpanBuilder

    SpanContext

    pub struct SpanContext {
    trace_id : TraceID
    span_id : SpanID
    trace_flags : TraceFlags
    is_remote : Bool
    }

    SpanContext::is_sampled

    fn SpanContext::is_sampled(self : SpanContext) -> Bool

    SpanContext::is_valid

    fn SpanContext::is_valid(self : SpanContext) -> Bool

    SpanContext::new

    fn SpanContext::new(trace_id : TraceID, span_id : SpanID, trace_flags : TraceFlags, is_remote : Bool) -> SpanContext

    SpanEvent

    pub struct SpanEvent {
    name : String
    timestamp : Int64
    attributes : Attributes
    }

    impl ToJson for SpanEvent

    SpanEvent::new

    fn SpanEvent::new(name : String, attributes : Attributes, timestamp? : Int64) -> SpanEvent

    SpanID

    pub struct SpanID {
    value : String
    }

    impl Eq for SpanID
    impl Show for SpanID

    SpanID::is_valid

    fn SpanID::is_valid(self : SpanID) -> Bool

    SpanID::new

    fn SpanID::new(value : String) -> SpanID

    SpanID::to_string

    fn SpanID::to_string(self : SpanID) -> String

    SpanKind

    pub(all) enum SpanKind {
    Unspecified
    Internal
    Server
    Client
    Producer
    Consumer
    }

    impl Eq for SpanKind
    impl Show for SpanKind
    impl ToJson for SpanKind
    pub struct SpanLink {
    trace_id : TraceID
    span_id : SpanID
    trace_state : TraceState
    trace_flags : TraceFlags
    attributes : Attributes
    }

    SpanLink::from_span_context

    fn SpanLink::from_span_context(context : SpanContext, trace_state : TraceState, attributes : Attributes) -> SpanLink

    SpanStatus

    pub(all) enum SpanStatus {
    Unset
    Ok
    Error
    }

    impl Eq for SpanStatus
    impl Show for SpanStatus

    StdoutSendAdaptor

    pub(all) struct StdoutSendAdaptor {
    print : (String) -> Unit
    }

    StdoutSendAdaptor::new

    fn StdoutSendAdaptor::new(print : (String) -> Unit) -> StdoutSendAdaptor

    TraceFlags

    pub struct TraceFlags {
    // private fields
    }

    impl Eq for TraceFlags
    impl Show for TraceFlags

    TraceFlags::is_sampled

    fn TraceFlags::is_sampled(self : TraceFlags) -> Bool

    TraceFlags::sampled

    fn TraceFlags::sampled() -> TraceFlags

    TraceID

    pub struct TraceID {
    value : String
    }

    impl Eq for TraceID
    impl Show for TraceID

    TraceID::is_valid

    fn TraceID::is_valid(self : TraceID) -> Bool

    TraceID::new

    fn TraceID::new(value : String) -> TraceID

    TraceID::to_string

    fn TraceID::to_string(self : TraceID) -> String

    TraceState

    pub struct TraceState {
    // private fields
    }

    impl Eq for TraceState
    impl Show for TraceState

    TraceState::delete

    fn TraceState::delete(self : TraceState, key : String) -> TraceState

    TraceState::get

    fn TraceState::get(self : TraceState, key : String) -> String?

    TraceState::insert

    fn TraceState::insert(self : TraceState, key : String, value : String) -> TraceState

    TraceState::parse

    fn TraceState::parse(value : String) -> TraceState raise

    TraceState::to_http_header

    fn TraceState::to_http_header(self : TraceState) -> String

    TraceState::to_map

    fn TraceState::to_map(self : TraceState) -> Map[String, String]

    Tracer

    pub struct Tracer {
    identifier : TracerIdentifier
    resource : Resource
    options : TracerOptions
    }

    Tracer::name

    fn Tracer::name(self : Tracer) -> String

    Tracer::new

    fn Tracer::new(name : String, version : String, resource : Resource) -> Tracer

    Tracer::span_event

    fn Tracer::span_event(self : Tracer, name : String, attributes? : Attributes, event_time? : Int64?) -> SpanEvent

    Tracer::start_span

    fn Tracer::start_span(self : Tracer, name : String, kind? : SpanKind, parent? : &SpanContextExtractable, attributes? : Attributes) -> Span

    Tracer::version

    fn Tracer::version(self : Tracer) -> String

    Tracer::with_options

    fn Tracer::with_options(name : String, version : String, resource : Resource, options : TracerOptions) -> Tracer

    TracerIdentifier

    pub struct TracerIdentifier {
    name : String
    version : String
    }

    TracerIdentifier::new

    fn TracerIdentifier::new(name : String, version : String) -> TracerIdentifier

    TracerOptions

    pub struct TracerOptions {
    trace_id_generator : () -> TraceID
    span_id_generator : () -> SpanID
    get_current_time_nanos : () -> Int64
    span_on_start : (Span) -> Unit
    span_on_end : (Span) -> Unit
    }

    TracerOptions::default

    TracerOptions::with_current_time_fn

    fn TracerOptions::with_current_time_fn(self : TracerOptions, time_fn : () -> Int64) -> TracerOptions

    TracerOptions::with_span_id_generator

    fn TracerOptions::with_span_id_generator(self : TracerOptions, generator : () -> SpanID) -> TracerOptions

    TracerOptions::with_span_on_end

    fn TracerOptions::with_span_on_end(self : TracerOptions, on_end_fn : (Span) -> Unit) -> TracerOptions

    TracerOptions::with_span_on_start

    fn TracerOptions::with_span_on_start(self : TracerOptions, on_start_fn : (Span) -> Unit) -> TracerOptions

    TracerOptions::with_trace_id_generator

    fn TracerOptions::with_trace_id_generator(self : TracerOptions, generator : () -> TraceID) -> TracerOptions

    TracerProvider

    pub struct TracerProvider {
    tracer_factory : (TracerOptions) -> Tracer
    span_processors : Array[&SpanProcessor]
    options : TracerOptions
    }

    |

    TracerProvider::force_flush

    async fn TracerProvider::force_flush(self : TracerProvider) -> Unit

    TracerProvider::global

    get global TracerProvider

    TracerProvider::new

    fn TracerProvider::new(name : String, version : String, resource : Resource, options? : TracerOptions, processors? : Array[&SpanProcessor]) -> TracerProvider

    TracerProvider::set_global

    fn TracerProvider::set_global(provider : TracerProvider) -> Unit

    set global TracerProvider

    TracerProvider::shutdown

    async fn TracerProvider::shutdown(self : TracerProvider) -> Unit

    TracerProvider::tracer

    fn TracerProvider::tracer(self : TracerProvider) -> Tracer

    get Tracer from TracerProvider

    TracerProvider::with_span_processors

    fn TracerProvider::with_span_processors(self : TracerProvider, processors : Array[&SpanProcessor]) -> TracerProvider

    add_header

    fn add_header(headers : Map[String, String], key : String, value : String) -> Map[String, String]

    char_to_int

    fn char_to_int(c : Char) -> Int?

    current_time_nanos

    fn current_time_nanos() -> Int64

    generate_span_id

    fn generate_span_id(rand :
    Rand
    ) -> SpanID

    generate_trace_id

    fn generate_trace_id(rand :
    Rand
    ) -> TraceID

    hex_to_bytes

    fn hex_to_bytes(hex : String) -> Bytes?

    json_http_client_provider

    fn json_http_client_provider() -> &JsonHttpClientProvider

    make_headers_map

    fn make_headers_map() -> Map[String, String]

    protobuf_http_client_provider

    fn protobuf_http_client_provider() -> &ProtobufHttpClientProvider

    rand_by_current_time

    fn rand_by_current_time() ->
    Rand

    service_instance_id

    let service_instance_id : String

    service_name

    let service_name : String

    service_namespace

    let service_namespace : String

    service_version

    let service_version : String

    spans_to_resource_spans_json

    fn spans_to_resource_spans_json(spans : Array[Span]) -> String

    spans_to_resource_spans_protobuf_bytes

    fn spans_to_resource_spans_protobuf_bytes(spans : Array[Span]) -> Bytes raise

    suspend

    async fn[T, E : Error] suspend(f : ((T) -> Unit, (E) -> Unit) -> Unit) -> T raise E