/** * @license * Copyright 2025 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. */ import { AnyValueMap } from '@opentelemetry/api-logs'; import { Crashlytics, CrashlyticsOptions } from './public-types'; /** * Returns the app version from the provided Telemetry instance, if available. */ export declare function getAppVersion(crashlyticsOptions: CrashlyticsOptions | undefined): string; /** * Returns the session ID stored in sessionStorage, if available. */ export declare function getSessionId(): string | undefined; /** * Sets attributes that are common across all logs */ export declare function setCommonLogAttributes(crashlytics: Crashlytics, customAttributes: AnyValueMap): void; /** * Generate a new session UUID. We record it in two places: * 1. The client browser's sessionStorage (if available) * 2. In Cloud Logging as its own log entry */ export declare function startNewSession(crashlytics: Crashlytics): void; /** * Registers event listeners to flush logs when the page is hidden. In some cases multiple listeners * may trigger at the same time, but flushing only occurs once per batch. */ export declare function registerListeners(crashlytics: Crashlytics): void; /** * Flushes all enqueued Crashlytics data immediately, instead of waiting for default batching. * * @public * * @param crashlytics - The {@link Crashlytics} instance. * @returns a promise which is resolved when all flushes are complete */ export declare function flush(crashlytics: Crashlytics): Promise;