Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @opentelemetry/instrumentation-http

Index

Type Aliases

Func<T>: ((...args: any[]) => T)

Type Parameters

  • T

Type declaration

    • (...args: any[]): T
    • Parameters

      • Rest ...args: any[]

      Returns T

GetFunction: typeof get
Http: typeof http
HttpCallback: ((res: IncomingMessage) => void)

Type declaration

    • (res: IncomingMessage): void
    • Parameters

      • res: IncomingMessage

      Returns void

HttpCallbackOptional: HttpCallback | undefined
HttpRequestArgs: (HttpCallbackOptional | RequestSignature)[]
Https: typeof https
IgnoreMatcher: string | RegExp | ((url: string) => boolean)
ParsedRequestOptions: http.RequestOptions & Partial<url.UrlWithParsedQuery> | http.RequestOptions
RequestFunction: typeof request
RequestSignature: [http.RequestOptions, HttpCallbackOptional] & HttpCallback

Functions

  • extractHostnameAndPort(requestOptions: Pick<ParsedRequestOptions, "host" | "hostname" | "protocol" | "port">): { hostname: string; port: string | number }
  • getAbsoluteUrl(requestUrl: null | ParsedRequestOptions, headers: IncomingHttpHeaders | OutgoingHttpHeaders, fallbackProtocol?: string): string
  • getIncomingRequestAttributes(request: IncomingMessage, options: { component: string; hookAttributes?: Attributes; serverName?: string }): Attributes
  • getIncomingRequestAttributesOnResponse(request: IncomingMessage, response: ServerResponse): Attributes
  • getOutgoingRequestAttributesOnResponse(response: IncomingMessage): Attributes
  • getRequestInfo(options: string | RequestOptions | URL, extraOptions?: RequestOptions): { method: string; optionsParsed: RequestOptions; origin: string; pathname: string }
  • Makes sure options is an url object return an object with default value and parsed options

    Parameters

    • options: string | RequestOptions | URL

      original options for the request

    • Optional extraOptions: RequestOptions

    Returns { method: string; optionsParsed: RequestOptions; origin: string; pathname: string }

    • method: string
    • optionsParsed: RequestOptions
    • origin: string
    • pathname: string
  • headerCapture(type: "request" | "response", headers: string[]): ((span: Span, getHeader: ((key: string) => undefined | string | number | string[])) => void)
  • Parameters

    • type: "request" | "response"
    • headers: string[]

    Returns ((span: Span, getHeader: ((key: string) => undefined | string | number | string[])) => void)

      • (span: Span, getHeader: ((key: string) => undefined | string | number | string[])): void
      • Parameters

        • span: Span
        • getHeader: ((key: string) => undefined | string | number | string[])
            • (key: string): undefined | string | number | string[]
            • Parameters

              • key: string

              Returns undefined | string | number | string[]

        Returns void

  • isCompressed(headers: IncomingHttpHeaders | OutgoingHttpHeaders): boolean
  • isIgnored(constant: string, list?: IgnoreMatcher[], onException?: ((error: unknown) => void)): boolean
  • isValidOptionsType(options: unknown): boolean
  • satisfiesPattern(constant: string, pattern: IgnoreMatcher): boolean
  • setAttributesFromHttpKind(kind: undefined | string, attributes: Attributes): void
  • setRequestContentLengthAttribute(request: IncomingMessage, attributes: Attributes): void
  • setResponseContentLengthAttribute(response: IncomingMessage, attributes: Attributes): void
  • setSpanWithError(span: Span, error: Err): void

Generated using TypeDoc