Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

1.8 KB
Raw Blame

Public API Report File for "@crawlee/otel"

Do not edit this file. It is a report generated by API Extractor.


import { InstrumentationBase } from '@opentelemetry/instrumentation';
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
import type { InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
import type { SpanOptions } from '@opentelemetry/api';
import type { Tracer } from '@opentelemetry/api';
import type { TracerProvider } from '@opentelemetry/api';

// @public
export interface ClassMethodToInstrument {
    className: string;
    methodName: string;
    moduleName: string;
    spanName?: string | ((this: any, ...args: any[]) => string);
    spanOptions?: SpanOptions | ((this: any, ...args: any[]) => SpanOptions);
}

// @public (undocumented)
export class CrawleeInstrumentation extends InstrumentationBase<CrawleeInstrumentationConfig> {
    constructor(config?: CrawleeInstrumentationConfig);
    // (undocumented)
    protected init(): InstrumentationModuleDefinition[];
    setTracerProvider(tracerProvider: TracerProvider): void;
}

// @public (undocumented)
export interface CrawleeInstrumentationConfig extends InstrumentationConfig {
    // (undocumented)
    customInstrumentation?: ClassMethodToInstrument[];
    // (undocumented)
    logInstrumentation?: boolean;
    // (undocumented)
    requestHandlingInstrumentation?: boolean;
}

// @public
export function wrapWithSpan<Args extends unknown[], Return>(fn: (...args: Args) => Return, options?: {
    spanName?: string | ((...args: Args) => string);
    spanOptions?: SpanOptions | ((...args: Args) => SpanOptions);
    tracer?: Tracer;
}): (...args: Args) => Return;

// (No @packageDocumentation comment for this package)