Package @google-cloud/trace-agent (8.0.0)

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.

Returns
Type
Description

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.

Parameter
Name
Description
config
Config

A configuration object.

Returns
Type
Description

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 
  
 type 
  
 Func 
 
Type Parameter
Type
Description
T

PluginTypes.GetHeaderFunction

  export 
  
 type 
  
 GetHeaderFunction 
  
 = 
  
 ( 
 key 
 : 
  
 string 
 ) 
  
 = 
>  
 string 
 [] 
  
 | 
  
 string 
  
 | 
  
 null 
  
 | 
  
 undefined 
 ; 
 

PluginTypes.Patch

  export 
  
 type 
  
 Patch 
 
Type Parameter
Type
Description
T

PluginTypes.Plugin

  export 
  
 type 
  
 Plugin 
  
 = 
  
 Array 
<> 

PluginTypes.SetHeaderFunction

  export 
  
 type 
  
 SetHeaderFunction 
  
 = 
  
 ( 
 key 
 : 
  
 string 
 , 
  
 value 
 : 
  
 string 
 ) 
  
 = 
>  
 void 
 ; 
 
Design a Mobile Site
View Site in Mobile | Classic
Share by: