1.0.7 • Published 3 years ago

@mu-ts/xray v1.0.7

Weekly downloads
14
License
ISC
Repository
github
Last release
3 years ago

xray

Syntactical sugar for working with XRAY.

Usage

XRAY.capture.*

For the most part, at the beginning of your handler you just need to tell XRAY what sources to capture from.

/**
 * Registers all AWS services, with XRAY, that get used within the scope of the handler.
 * Registers all HTTPS invocations with XRAY, that occur within the scope of the handler.
 */
XRAY.capture
  .aws(require('aws-sdk'))
  .httpsGlobal(require('https'));

Available capture points.

  • aws(awssdk: typeof AWS)
  • awsClient(service: T)
  • httpsGlobal(mod: T, downstreamXRayEnabled: boolean)
  • https(mod: T, downstreamXRayEnabled: boolean)
  • asyncFunc(name: string, fcn: (subsegment?: Subsegment) => T, parent?: Segment | Subsegment);
  • callbackFunc<S extends any[], T>(name: string, fcn: (...args: S) => T, parent?: Segment | Subsegment)
  • func(name: string, fcn: (subsegment?: Subsegment) => T, parent?: Segment | Subsegment)

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago