Skip to main content
Module

x/blocks/deps.ts>FetchInstrumentation

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Extremely Popular
Go to Latest
class FetchInstrumentation
extends InstrumentationBase<Promise<Response>>
import { FetchInstrumentation } from "https://deno.land/x/blocks@1.48.7/deps.ts";

This class represents a fetch plugin for auto instrumentation

Constructors

new
FetchInstrumentation(config?: FetchInstrumentationConfig)

Properties

private
_addChildSpan

Add cors pre flight child span

private
_addFinalSpanAttributes

Adds more attributes to span just before ending it

private
_addHeaders

Add headers

private
_applyAttributesAfterFetch
private
_clearResources

Clears the resource timings and all resources assigned with spans when FetchPluginConfig.clearTimingResources is set to true (default false)

private
_createSpan

Creates a new span

private
_endSpan

Finish span, add attributes, network events etc.

private
_findResourceAndAddNetworkEvents

Finds appropriate resource and add network events to the span

private
_getConfig
private
_markResourceAsUsed

Marks certain [resource]PerformanceResourceTiming when information from this is used to add events to span. This is done to avoid reusing the same resource again for next span

private
_patchConstructor

Patches the constructor of fetch

private
_prepareSpanData

Prepares a span data - needed later for matching appropriate network resources

private
_tasksCount
private
_usedResources
readonly
component: string
moduleName: string
readonly
version: string

Methods

disable(): void

implements unpatch function

enable(): void

implements enable function

init(): void