/** * OpenTelemetry NodeSDK bootstrap for Photon. * * Zero required dependencies. When `OTEL_EXPORTER_OTLP_ENDPOINT` is set in * the environment AND `@opentelemetry/sdk-node` is installed, the runtime * wires up OTLP exporters for traces, metrics, and logs so every span, * counter, histogram, and log record emitted elsewhere in the codebase * lands in an OTLP-compatible backend (Jaeger, Grafana Tempo, SigNoz, * Honeycomb, DataDog, etc.) without further configuration. * * This is the final piece that makes the instrumentation shipped in * otel.ts / metrics.ts / logs.ts observable in practice. */ import type { PhotonSpan } from './otel.js'; /** * Returns true if the caller has opted into OTel export via the standard * environment variable. The OTel spec treats `OTEL_EXPORTER_OTLP_ENDPOINT` * as the universal switch. */ export declare function isOtelRequested(): boolean; export interface OtelSdkOptions { /** Service name attached to every exported record. Defaults to `photon`. */ serviceName?: string; /** Service version. Defaults to PHOTON_VERSION if available. */ serviceVersion?: string; /** Deployment environment (e.g. "prod", "staging"). */ deploymentEnvironment?: string; } /** * Start the OTel NodeSDK if the env + dependencies are present. * * Idempotent — safe to call multiple times. Returns true if the SDK was * actually started, false if the bootstrap was skipped (env missing, SDK * not installed, or already running). * * Call this as early as possible in process startup, before any photon * code runs, so spans from the very first tool call are captured. */ export declare function initOtelSdk(options?: OtelSdkOptions): Promise; /** * Shut down the SDK and flush exporters. For tests. */ export declare function shutdownOtelSdk(): Promise; /** * Returns true if the SDK has been started in this process. */ export declare function isOtelSdkStarted(): boolean; export type { PhotonSpan }; //# sourceMappingURL=sdk.d.ts.map