TracesInstrument
Extends
BaseInstrument
Constructors
new TracesInstrument(store, init)
new TracesInstrument(
store
,init
):TracesInstrument
Parameters
• store
: Store
• init
: BaseInstrumentInit
= {}
Returns
Overrides
BaseInstrument.constructor
Source
inspector/lib/instruments/traces.ts:10
Properties
active
active:
boolean
=false
Inherited from
BaseInstrument.active
Source
inspector/lib/instruments/base.ts:6
disabled
disabled:
boolean
=false
Inherited from
BaseInstrument.disabled
Source
inspector/lib/instruments/base.ts:8
name
name:
InspectorInstruments
Inherited from
BaseInstrument.name
Source
inspector/lib/instruments/base.ts:11
store
store:
Store
Inherited from
BaseInstrument.store
Source
inspector/lib/instruments/base.ts:12
tracer
readonly
tracer:Tracer
Source
inspector/lib/instruments/traces.ts:8
Accessors
addAttribute
get
addAttribute(): (span
,name
,value
) =>void
Returns
Function
Parameters
•
span
:TraceSpan
•
name
:string
•
value
:unknown
Returns
void
Source
inspector/lib/instruments/traces.ts:21
addEvent
get
addEvent(): (span
,text
,attributes
?) =>void
Returns
Function
Parameters
•
span
:TraceSpan
•
text
:string
•
attributes?
:Attributes
Returns
void
Source
inspector/lib/instruments/traces.ts:25
endSpan
get
endSpan(): (span
) =>undefined
|TraceSpan
Returns
Function
Parameters
•
span
:TraceSpan
Returns
undefined
|TraceSpan
Source
inspector/lib/instruments/traces.ts:29
startSpan
get
startSpan(): (name
,parent
?) =>TraceSpan
Returns
Function
Parameters
•
name
:string
•
parent?
:TraceSpan
Returns
TraceSpan
Source
inspector/lib/instruments/traces.ts:33
trace
get
trace(): <T
>(name
,fn
,options
?) =>T
|Promise
<T
>
Returns
Function
Type parameters
• T
Parameters
•
name
:string
•
fn
: (ctx
) =>T
|Promise
<T
>•
options?
:TraceOptions
Returns
T
|Promise
<T
>
Source
inspector/lib/instruments/traces.ts:37
Methods
activate()
activate():
boolean
Returns
boolean
Inherited from
BaseInstrument.activate
Source
inspector/lib/instruments/base.ts:34
deactivate()
deactivate():
boolean
Returns
boolean
Inherited from
BaseInstrument.deactivate
Source
inspector/lib/instruments/base.ts:41
getEntryLabel()
getEntryLabel(
value
):string
Parameters
• value
: TraceSpan
Returns
string
Overrides
BaseInstrument.getEntryLabel
Source
inspector/lib/instruments/traces.ts:54
getEntryTime()
getEntryTime(
entry
):number
Parameters
• entry
: TraceSpan
Returns
number
Overrides
BaseInstrument.getEntryTime
Source
inspector/lib/instruments/traces.ts:58
push()
push(
value
,label
,time
):Promise
<void
>
Parameters
• value
: any
• label
: string
= undefined
• time
: number
= undefined
Returns
Promise
<void
>
Inherited from
BaseInstrument.push
Source
inspector/lib/instruments/base.ts:46
putToStore()
putToStore(
time
,label
,value
):Promise
<void
>
Parameters
• time
: number
• label
: string
• value
: string
Returns
Promise
<void
>
Overrides
BaseInstrument.putToStore
Source
inspector/lib/instruments/traces.ts:41
query()
query(
query
):Promise
<StoreQueryResult
>
Parameters
• query
: Query
Returns
Promise
<StoreQueryResult
>
Inherited from
BaseInstrument.query
Source
inspector/lib/instruments/base.ts:58
queryFromStore()
queryFromStore(
query
):Promise
<StoreQueryResult
>
Parameters
• query
: Query
Returns
Promise
<StoreQueryResult
>
Overrides
BaseInstrument.queryFromStore
Source
inspector/lib/instruments/traces.ts:45
serializeValue()
serializeValue(
value
):string
Parameters
• value
: TraceSpan
Returns
string
Overrides
BaseInstrument.serializeValue
Source
inspector/lib/instruments/traces.ts:62
subscribe()
subscribe(
fn
,_options
?): () =>void
Parameters
• fn
: (time
, label
, value
) => void
• \_options?
: unknown
Returns
Function
Returns
void
Inherited from
BaseInstrument.subscribe
Source
inspector/lib/instruments/base.ts:75
Generated using TypeDoc and typedoc-plugin-markdown.