| 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: KoaModule, api, createMiddlewareFunction: CreateMiddlewareFn)
|
||||||||||||
|
Parameters :
|
| startSpanForRequest | ||||||||||||
startSpanForRequest(api, ctx: KoaContext, getNext: GetNextFn)
|
||||||||||||
|
Parameters :
Returns :
T
|
| createPhantomSpanData | ||||||
createPhantomSpanData(spanType: T)
|
||||||
|
Parameters :
|
| randomSpanId |
randomSpanId()
|
| createStackTrace | ||||||||||||||||
createStackTrace(numFrames: number, skipFrames: number, constructorOpt?: Function)
|
||||||||||||||||
|
Creates a StackFrame object containing a structured stack trace.
Parameters :
Returns :
StackFrame[]
|
| generateTraceContext | ||||||||
generateTraceContext(traceContext: 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: T, ...otherValues: Array)
|
||||||||||||
|
Returns the last parameter that is not null, undefined, or NaN.
Parameters :
Returns :
T
|
| packageNameFromPath | ||||||
packageNameFromPath(importPath: string)
|
||||||
|
Retrieves a package name from the full import path. For example: './node_modules/bar/index/foo.js' => 'bar'
Parameters :
|
| parseContextFromHeader | ||||||||
parseContextFromHeader(str: string)
|
||||||||
|
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: TraceContext)
|
||||||||
|
Serialize the given trace context into a Buffer.
Parameters :
Returns :
Buffer
|
| truncate |
truncate(str: string, length: number)
|
|
Truncates the provided |
| 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: Tracer)
|
|||||||||
|
Parameters :
Returns :
boolean
|
| makeRequestTrace | ||||||||||||
makeRequestTrace(request: Http2SessionRequestFunction, authority, api: Tracer)
|
||||||||||||
|
Parameters :
Returns :
Http2SessionRequestFunction
|
| patchHttp2 | |||||||||
patchHttp2(h2: Http2Module, api: Tracer)
|
|||||||||
|
Parameters :
Returns :
void
|
| patchHttp2Session | ||||||||||||
patchHttp2Session(session, authority, api: Tracer)
|
||||||||||||
|
Parameters :
Returns :
void
|
| unpatchHttp2 | ||||||
unpatchHttp2(h2: Http2Module)
|
||||||
|
Parameters :
|
| extractUrl | |||||||||
extractUrl(options, fallbackProtocol: string)
|
|||||||||
|
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: Tracer)
|
|||||||||
|
Parameters :
|
| makeRequestTrace | ||||||||||||
makeRequestTrace(protocol: string, request: RequestFunction, api: Tracer)
|
||||||||||||
|
Parameters :
Returns :
RequestFunction
|
| patchHttp | |||||||||
patchHttp(http: HttpModule, api: Tracer)
|
|||||||||
|
Parameters :
|
| patchHttps | |||||||||
patchHttps(https: HttpsModule, api: Tracer)
|
|||||||||
|
Parameters :
|
| unpatchHttp | ||||||
unpatchHttp(http: HttpModule)
|
||||||
|
Parameters :
|
| unpatchHttps | ||||||
unpatchHttps(https: HttpsModule)
|
||||||
|
Parameters :
|
| urlToOptions | ||||||
urlToOptions(url: 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: Forceable)
|
||||||||
|
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?: 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?: number)
|
||||||
|
Parameters :
Returns :
LogLevel
|
| patchClient | |||||||||
patchClient(client: ClientModule, api: Tracer)
|
|||||||||
|
Parameters :
|
| patchMetadata | ||||||
patchMetadata(metadata: MetadataModule)
|
||||||
|
Parameters :
|
| patchServer | |||||||||
patchServer(server: ServerModule, api: Tracer)
|
|||||||||
|
Parameters :
|
| unpatchClient | ||||||
unpatchClient(client: ClientModule)
|
||||||
|
Parameters :
|
| unpatchMetadata |
unpatchMetadata()
|
| unpatchServer | ||||||
unpatchServer(server: ServerModule)
|
||||||
|
Parameters :
|
| patchModuleRoot | |||||||||
patchModuleRoot(express: Express4Module, api)
|
|||||||||
|
Parameters :
|
| unpatchModuleRoot | ||||||
unpatchModuleRoot(express: Express4Module)
|
||||||
|
Parameters :
|
| patchRestify | |||||||||
patchRestify(restify: Restify5, api)
|
|||||||||
|
Parameters :
|
| unpatchRestify | ||||||
unpatchRestify(restify: Restify5)
|
||||||
|
Parameters :
|
| populateLabelsFromInputs | |||||||||
populateLabelsFromInputs(span: Span, args: ClientQueryArguments)
|
|||||||||
|
Parameters :
|
| populateLabelsFromOutputs | ||||||||||||
populateLabelsFromOutputs(span: Span, err, res?)
|
||||||||||||
|
Parameters :
|