UNPKG

next-axiom

Version:

Send WebVitals from your Next.js project to Axiom.

22 lines (21 loc) 861 B
import { GetServerSidePropsContext, NextApiRequest } from "next"; import { LogEvent } from "../logger"; import { EndpointType } from "../shared"; import type Provider from "./base"; export default class GenericConfig implements Provider { proxyPath: string; shouldSendEdgeReport: boolean; token: string | undefined; dataset: string | undefined; environment: string; axiomUrl: string; region: string | undefined; customEndpoint: string | undefined; isEnvVarsSet(): boolean; getIngestURL(_: EndpointType): string; getLogsEndpoint(): string; getWebVitalsEndpoint(): string; wrapWebVitalsObject(metrics: any[]): any; injectPlatformMetadata(logEvent: LogEvent, source: string): void; getHeaderOrDefault(req: NextApiRequest | GetServerSidePropsContext['req'], headerName: string, defaultValue: any): any; }