| alwaysTrace |
alwaysTrace()
|
|
Returns :
BuiltinTracePolicy
|
| neverTrace |
neverTrace()
|
|
Returns :
BuiltinTracePolicy
|
| createMiddleware | ||||
createMiddleware(api)
|
||||
|
Parameters :
Returns :
connect_3.NextHandleFunction
|
| createMiddleware | ||||
createMiddleware(api)
|
||||
|
Parameters :
Returns :
koa_1.Middleware
|
| createMiddleware2x | ||||
createMiddleware2x(api)
|
||||
|
Parameters :
Returns :
koa_2.Middleware
|
| patchUse | ||||||||
patchUse(koa, api, createMiddlewareFunction)
|
||||||||
|
Parameters :
|
| startSpanForRequest | ||||||||
startSpanForRequest(api, ctx, getNext)
|
||||||||
|
Parameters :
Returns :
T
|
| createPhantomSpanData | ||||
createPhantomSpanData(spanType)
|
||||
|
Parameters :
|
| randomSpanId |
randomSpanId()
|
| createStackTrace | ||||||||||||
createStackTrace(numFrames, skipFrames, constructorOpt?)
|
||||||||||||
|
Creates a StackFrame object containing a structured stack trace.
Parameters :
Returns :
StackFrame[]
|
| generateTraceContext | ||||||
generateTraceContext(traceContext)
|
||||||
|
Generates a trace context header value that can be used to follow the associated request through other Google services.
Parameters :
Returns :
string
|
| lastOf | |||||||||
lastOf(defaultValue, ...otherValues: undefined)
|
|||||||||
|
Returns the last parameter that is not null, undefined, or NaN.
Parameters :
Returns :
T
|
| packageNameFromPath | ||||
packageNameFromPath(importPath)
|
||||
|
Retrieves a package name from the full import path. For example: './node_modules/bar/index/foo.js' => 'bar'
Parameters :
|
| parseContextFromHeader | ||||||
parseContextFromHeader(str)
|
||||||
|
Parse a cookie-style header string to extract traceId, spandId and options ex: '123456/667;o=3' -> {traceId: '123456', spanId: '667', options: '3'} note that we ignore trailing garbage if there is more than one '=' Returns null if traceId or spanId could not be found.
Parameters :
Returns :
TraceContext | null
object with keys. null if there is a problem. |
| serializeTraceContext | ||||||
serializeTraceContext(traceContext)
|
||||||
|
Serialize the given trace context into a Buffer.
Parameters :
Returns :
Buffer
|
| truncate | ||||||
truncate(str, length)
|
||||||
|
Truncates the provided
Parameters :
|
| extractMethodName | ||||
extractMethodName(headers?)
|
||||
|
Parameters :
Returns :
string
|
| extractPath | ||||
extractPath(headers?)
|
||||
|
Parameters :
Returns :
string
|
| extractUrl | ||||||
extractUrl(authority, headers?)
|
||||||
|
Parameters :
Returns :
string
|
| getSpanName | ||||
getSpanName(authority)
|
||||
|
Parameters :
Returns :
string
|
| isTraceAgentRequest | ||||||
isTraceAgentRequest(headers, api)
|
||||||
|
Parameters :
Returns :
boolean
|
| makeRequestTrace | ||||||||
makeRequestTrace(request, authority, api)
|
||||||||
|
Parameters :
Returns :
Http2SessionRequestFunction
|
| patchHttp2 | ||||||
patchHttp2(h2, api)
|
||||||
|
Parameters :
Returns :
void
|
| patchHttp2Session | ||||||||
patchHttp2Session(session, authority, api)
|
||||||||
|
Parameters :
Returns :
void
|
| unpatchHttp2 | ||||
unpatchHttp2(h2)
|
||||
|
Parameters :
|
| extractUrl | ||||||
extractUrl(options, fallbackProtocol)
|
||||||
|
Parameters :
|
| getSpanName | ||||
getSpanName(options)
|
||||
|
Parameters :
|
| hasExpectHeader | ||||||
hasExpectHeader(options)
|
||||||
|
Returns whether the Expect header is on the given options object. Assumes only that the header key is either capitalized, lowercase, or all-caps for simplicity purposes.
Parameters :
Returns :
boolean
|
| isTraceAgentRequest | ||||||
isTraceAgentRequest(options, api)
|
||||||
|
Parameters :
|
| makeRequestTrace | ||||||||
makeRequestTrace(protocol, request, api)
|
||||||||
|
Parameters :
Returns :
RequestFunction
|
| patchHttp | ||||||
patchHttp(http, api)
|
||||||
|
Parameters :
|
| patchHttps | ||||||
patchHttps(https, api)
|
||||||
|
Parameters :
|
| unpatchHttp | ||||
unpatchHttp(http)
|
||||
|
Parameters :
|
| unpatchHttps | ||||
unpatchHttps(https)
|
||||
|
Parameters :
|
| urlToOptions | ||||
urlToOptions(url)
|
||||
|
Transform a url to a request options. From: https://github.com/nodejs/node/blob/v12.16.2/lib/internal/url.js#L1271-L1290
Parameters :
Returns :
httpModule.RequestOptions
|
| get |
get()
|
|
Get the previously created StackdriverTracer object.
Returns :
PluginTypes.Tracer
An object exposing functions for creating custom spans. |
| initConfig | ||||||
initConfig(userConfig)
|
||||||
|
Normalizes the user-provided configuration object by adding default values and overriding with env variables when they are provided.
Parameters :
Returns :
TopLevelConfig
A normalized configuration object. |
| start | ||||||
start(config?)
|
||||||
|
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.
Parameters :
Example :
Returns :
PluginTypes.Tracer
An object exposing functions for creating custom spans. |
| instrument | ||||||||
instrument(api, request, continueCb)
|
||||||||
|
Parameters :
Returns :
T
|
| logLevelToName | ||||
logLevelToName(level?)
|
||||
|
Parameters :
Returns :
LogLevel
|
| patchClient | ||||||
patchClient(client, api)
|
||||||
|
Parameters :
|
| patchMetadata | ||||
patchMetadata(metadata)
|
||||
|
Parameters :
|
| patchServer | ||||||
patchServer(server, api)
|
||||||
|
Parameters :
|
| unpatchClient | ||||
unpatchClient(client)
|
||||
|
Parameters :
|
| unpatchMetadata |
unpatchMetadata()
|
| unpatchServer | ||||
unpatchServer(server)
|
||||
|
Parameters :
|
| patchModuleRoot | ||||||
patchModuleRoot(express, api)
|
||||||
|
Parameters :
|
| unpatchModuleRoot | ||||
unpatchModuleRoot(express)
|
||||
|
Parameters :
|
| patchRestify | ||||||
patchRestify(restify, api)
|
||||||
|
Parameters :
|
| unpatchRestify | ||||
unpatchRestify(restify)
|
||||
|
Parameters :
|
| populateLabelsFromInputs | ||||||
populateLabelsFromInputs(span, args)
|
||||||
|
Parameters :
|
| populateLabelsFromOutputs | ||||||||
populateLabelsFromOutputs(span, err, res?)
|
||||||||
|
Parameters :
|