import { TelemetryConfig } from './telemetryTypes.js'; export { LogServerExporter, TraceServerExporter, flushTelemetryServerPosts, postToTelemetryServer, setTelemetryServerUrl, telemetryServerUrl } from './tracing/exporter.js'; export { activeInstrumentations, appendSpan, configureInstrumentation, resetInstrumentation, runInNewSpan, setCustomMetadataAttribute, setCustomMetadataAttributes, toDisplayPath } from './tracing/instrumentation.js'; export { InstrumentationLibrarySchema, LinkSchema, PathMetadata, PathMetadataSchema, SpanContextSchema, SpanData, SpanDataSchema, SpanMetadata, SpanMetadataSchema, SpanStatusSchema, TimeEventSchema, TraceData, TraceDataSchema, TraceMetadata, TraceMetadataSchema } from './tracing/types.js'; export { ATTR_PREFIX, GenkitLogRecord, GenkitSpanContext, Instrumentation, InstrumentationNext, InstrumentationSpanInfo, LogRecordingInstrumentation, SPAN_TYPE_ATTR, disableOTelRootSpanDetection, spanMetadataAlsKey } from './tracing/instrumentation-api.js'; export { DirectTelemetryInstrumentation } from './tracing/direct-instrumentation.js'; export { OTelInstrumentation } from './tracing/otel-instrumentation.js'; import '@opentelemetry/sdk-node'; import '@opentelemetry/core'; import '@opentelemetry/sdk-logs'; import '@opentelemetry/sdk-trace-base'; import '@opentelemetry/api'; import './action-2eSGxHx0.js'; import 'json-schema'; import 'zod'; import './context.js'; import './statusTypes.js'; import 'dotprompt'; import 'ajv'; /** * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Ensures telemetry setup has settled before a span is opened: runs the * flag-gated Firebase auto-init and waits for any pending `enableTelemetry` * config. * * The wait matters because plugins like `enableFirebaseTelemetry()` resolve * their config asynchronously (credentials lookup) and are typically called * without `await`. Without it, spans opened before the SDK starts (e.g. the * first request after a cold start) go to the no-op tracer and are dropped. * * Historically this also booted a NodeSDK (`enableTelemetry({})`) when nothing * was configured. That no longer happens: the Developer UI is fed by * `DirectTelemetryInstrumentation`, so collection stays opt-in. * * @hidden */ declare function ensureBasicTelemetryInstrumentation(): Promise; interface TelemetryProvider { enableTelemetry(telemetryConfig: TelemetryConfig | Promise): Promise; flushTracing(): Promise; } declare function setTelemetryProvider(provider: TelemetryProvider): void; /** * Enables tracing and metrics open telemetry configuration. */ declare function enableTelemetry(telemetryConfig: TelemetryConfig | Promise): Promise; /** * Flushes all configured span processors. * * @hidden */ declare function flushTracing(): Promise; /** * Disables Genkit's OTel initialization. This is useful when you want to * control the OTel initialization yourself. * * This function attempts to control Genkit's internal OTel instrumentation behaviour, * since internal implementation details are subject to change at any time consider * this function "unstable" and subject to breaking changes as well. * * @hidden */ declare function disableGenkitOTelInitialization(): void; export { type TelemetryProvider, disableGenkitOTelInitialization, enableTelemetry, ensureBasicTelemetryInstrumentation, flushTracing, setTelemetryProvider };