@grand-board/otel-cloudflare - v6.11.0
    Preparing search index...

    Function flushToEnv

    • Get OTLP config from environment and flush all collected data

      Convenience function that reads config from env and flushes. If OTLP is not configured, this is a no-op. Never throws.

      Parameters

      • env: Record<string, unknown> | undefined
      • serviceName: string

      Returns Promise<void>

      // At end of SvelteKit handle()
      await flushToEnv(event.platform?.env, 'my-service');