Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface restify

This plugin automatically instruments the restify module.

Hierarchy

  • HttpServer
    • restify

Index

Properties

Optional analytics

analytics: boolean | number | object

Whether to enable App Analytics. Can also be set to a number instead to control the sample rate, or to an key-value pair with span names as keys and booleans or sample rates as values for more granular control.

Optional blacklist

blacklist: string | RegExp | function | (string | RegExp | function)[]

List of URLs that should not be instrumented. Takes precedence over whitelist if a URL matches an entry in both.

default

[]

Optional enabled

enabled: boolean

Whether to enable the plugin.

default

true

Optional headers

headers: string[]

An array of headers to include in the span metadata.

default

[]

Optional hooks

hooks: object

Hooks to run before spans are finished.

Type declaration

  • Optional request?: function

    Hook to execute just before the request span finishes.

      • (span?: opentracing.Span, req?: IncomingMessage, res?: ServerResponse): any
      • Parameters

        • Optional span: opentracing.Span
        • Optional req: IncomingMessage
        • Optional res: ServerResponse

        Returns any

Optional service

service: string

The service name to be used for this plugin.

Optional validateStatus

validateStatus: function

Callback function to determine if there was an error. It should take a status code as its only parameter and return true for success or false for errors.

default

code => code < 500

Type declaration

    • (code: number): boolean
    • Parameters

      • code: number

      Returns boolean

Optional whitelist

whitelist: string | RegExp | function | (string | RegExp | function)[]

List of URLs that should be instrumented.

default

/^.*$/

Generated using TypeDoc