@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
27 lines (26 loc) • 2.32 kB
TypeScript
import type { Resource } from "@opentelemetry/resources";
import { MeterProvider } from "@opentelemetry/sdk-metrics";
import { type SpanProcessor } from "@opentelemetry/sdk-trace-base";
import type { OtlpConnections } from "../../../../types/index.js";
/**
* @description Tracks the connections the OTLP exporters open, so a flush or shutdown that has run out of its budget can close them instead of leaving a request in flight that holds the process open.
* @returns {OtlpConnections} The agent factory to give the exporters and the function that closes what they opened.
*/
export declare function createOtlpConnections(): OtlpConnections;
/**
* @description Builds a batching span processor that ships spans to an OTLP/HTTP endpoint.
* @param endpoint {string} - OTLP base URL; `/v1/traces` is appended.
* @param budgetMs {number | undefined} - Request timeout in milliseconds, used unless `OTEL_EXPORTER_OTLP_TIMEOUT` or `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` is set; the exporter's default when omitted.
* @param connections {OtlpConnections | undefined} - Tracks the connections the exporter opens so they can be closed when a flush runs out of its budget.
* @returns {SpanProcessor | null} The processor, or `null` (after a warning) when the exporter cannot be created.
*/
export declare function createOtlpSpanProcessor(endpoint: string, budgetMs?: number, connections?: OtlpConnections): SpanProcessor | null;
/**
* @description Builds a meter provider that exports metrics to an OTLP/HTTP endpoint and registers it as the global meter provider.
* @param endpoint {string} - OTLP base URL; `/v1/metrics` is appended.
* @param resource {Resource} - Resource describing the service.
* @param budgetMs {number | undefined} - Request timeout in milliseconds, used unless `OTEL_EXPORTER_OTLP_TIMEOUT` or `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` is set; the exporter's default when omitted.
* @param connections {OtlpConnections | undefined} - Tracks the connections the exporter opens so they can be closed when a flush runs out of its budget.
* @returns {MeterProvider | null} The provider, or `null` (after a warning) when it cannot be created.
*/
export declare function createOtlpMeterProvider(endpoint: string, resource: Resource, budgetMs?: number, connections?: OtlpConnections): MeterProvider | null;