Learn R Programming

ot (version 0.2.0)

setTags: Span Object Methods

Description

These define the core methods required by the specification for using spans.

Usage

setTags(span, ...)

baggage(span, ...)

baggage(span, ...) <- value

getContext(span, ...)

otlog(span, ..., timestamp = Sys.time())

log(span, ..., timestamp = Sys.time())

finish(span, finishTime = Sys.time())

Arguments

span

a span object

...

defined by implementation

value

the baggage data

timestamp

a POSIXct timestamp for the beginning of a span

finishTime

a POSIXct timestamp for the end of a span

Value

the span, except for getContext which returns the span's parent context and baggage, which returns any baggage objects.

Examples

Run this code
# NOT RUN {
s <- ot::startSpan(ot::getNoOpTracer())
ot::setTags(s, foo=1)
ot::baggage(s) <- list(ctx=1)
ot::getContext(s)
ot::otlog(s, foo=1)
ot::log(s, bar=2)
ot::finish(s)
ot::baggage(s)
# }

Run the code above in your browser using DataLab