opengleametry/link

Types

pub type Attribute =
  #(String, String)

An unchanging reference to a span context. You can persist this, and use it after rebooting your application. That is the reason this type is not opaque.

Note: I have not yet seen non-empty attributes or tracestate. I do not know what they entail.

pub type Link {
  Link(
    trace_id: Int,
    span_id: Int,
    attributes: List(#(String, String)),
    tracestate: Tracestate,
  )
}

Constructors

  • Link(
      trace_id: Int,
      span_id: Int,
      attributes: List(#(String, String)),
      tracestate: Tracestate,
    )
pub type Member =
  #(String, String)
pub type Tracestate {
  Tracestate(List(#(String, String)))
}

Constructors

  • Tracestate(List(#(String, String)))

Values

pub fn current() -> Link

Create a link from the current span context

pub fn new(trace_id: Int, span_id: Int) -> Link

Use only for reconstructing a persisted link. It is pointless to pass in some random numbers and pretend it is a real link.

Search Document