span-methods: Span Object Methods

Description Usage Arguments Value Note Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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.

Note

Developers should implement the otlog method only for their spans - log is a generic method used by R for logarithms. ot::log is an alias for convenience only.

Examples

1
2
3
4
5
6
7
8
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)

ot documentation built on July 8, 2020, 7:34 p.m.

Related to span-methods in ot...