Options
All
  • Public
  • Public/Protected
  • All
Menu

Create and configure a RequestTracker object before sending an HTTP request to track it manually.

param

The URL being requested.

warning

url must not be undefined.

warning

Instrumentation.start({ appKey: <YOUR_APP_KEY>}) must've been called.

Hierarchy

  • RequestTracker

Index

Constructors

constructor

Methods

addServerCorrelationHeaders

  • addServerCorrelationHeaders(): void
  • Enables correlation between your request and server-side processing for the tracked requests.

    Returns void

reportDone

  • reportDone(): void
  • Stops tracking an HTTP request.

    Immediately after receiving a response or an error, set the appropriate properties and call this method to report the outcome of the HTTP request. You should not continue to use this object after calling this method -- if you need to track another request, create another RequestTracker.

    Returns void

setError

  • setError(error: Error): void
  • An error describing the failure to receive a response, if one occurred.

    If the request was successful, this should be left null.

    Parameters

    • error: Error

    Returns void

setRequestHeaders

  • A dictionary representing the keys and values from the client's request header.

    Parameters

    Returns void

setResponseHeaders

  • A dictionary representing the keys and values from the server’s response header.

    If an error occurred and a response was not received, this should be null.

    Parameters

    Returns void

setResponseStatusCode

  • setResponseStatusCode(statusCode: number): void
  • The status code of response, if one was received.

    If a response was received, this should be an an integer. If an error occurred and a response was not received, this should remain null.

    Parameters

    • statusCode: number

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc