Interfaces
Config
Available configuration options. All fields are optional. See the defaultConfig object defined in this file for default assigned values.
PluginTypes.Intercept
PluginTypes.Monkeypatch
PluginTypes.Propagation
PluginTypes.RootSpan
Represents the root span within a trace.
PluginTypes.RootSpanOptions
An interface that describes the available options for creating root spans.
PluginTypes.Span
Represents a trace span.
PluginTypes.SpanOptions
An interface that describes the available options for creating a span in general.
PluginTypes.TraceAgentExtension
PluginTypes.TraceContext
PluginTypes.Tracer
Functions
get()
export
declare
function
get
()
:
PluginTypes
.
Tracer
;
Get the previously created StackdriverTracer object.
Type | Description |
PluginTypes. Tracer | An object exposing functions for creating custom spans. |
start(config)
export
declare
function
start
(
config
?:
Config
)
:
PluginTypes
.
Tracer
;
Start the Stackdriver Trace Agent with the given configuration (if provided). This function should only be called once, and before any other modules are loaded.
Name | Description |
config | Config
A configuration object. |
Type | Description |
PluginTypes. Tracer | An object exposing functions for creating custom spans. [Introductory video] https://www.youtube.com/watch?v=NCFDqeo7AeY |
Example
trace.start();
Type Aliases
PluginTypes.Func
export
declare
type
Func
Type | Description |
---|---|
T |
PluginTypes.GetHeaderFunction
export
declare
type
GetHeaderFunction
=
(
key
:
string
)
=
>
string
[]
|
string
|
null
|
undefined
;
PluginTypes.Patch
export
declare
type
Patch
Type | Description |
---|---|
T |
PluginTypes.Plugin
export
declare
type
Plugin
=
Array
<>
PluginTypes.SetHeaderFunction
export
declare
type
SetHeaderFunction
=
(
key
:
string
,
value
:
string
)
=
>
void
;