Constructor
new SegmentSpec(params)
Name | Type | Description |
---|---|---|
params | SegmentSpecParams | Spec properties to set. |
- Source
Members
inContext :InContextCallback
- Source
internal :boolean
Marks the segment as the boundary point into an instrumented library. If set to true
, and the parent segment is also marked as internal: true
by the same shim, then we will not record this inner activity.
This is useful when instrumenting a library which implements high-order methods which simply call other public method, and you only want to record the method directly called by the user while still instrumenting all endpoints.
- boolean
- Source
name :string
A name for the segment that can be recognized by users.
- string
- Source
opaque :boolean
Indicates if child segments should be recorded or not. When true
, child segments will not be created and traces will omit the details descended from an opaque segment.
- boolean
- Source
parameters :Object.<string, *>
A key-value hash of attributes that a shim can utilize.
- Object.<string, *>
- Source
parent :TraceSegment
The parent segment, if any. Should be set to the currently active segment by default.
- TraceSegment
- Source
recorder :MetricFunction
A metric recorder for the segment. This field is intended to be used by shim implementations. It is not intended that an instrumentation will ever need to specify its own metric recorder.
- MetricFunction
- Source