/** * @license * Copyright 2026 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 { Provider } from '@firebase/component'; import { Attributes, AttributeValue } from '@opentelemetry/api'; import { AnyValueMap } from '@opentelemetry/api-logs'; import { CrashlyticsOptions } from './public-types'; import { FirebaseOptions } from '@firebase/app-types'; export declare const ATTR_KEY_INSTALLATION_ID = "app.installation.id"; export declare const SESSION_STORAGE_SESSION_ID_KEY = "firebasecrashlytics.sessionid"; export declare const LOG_ATTR_KEY: { APP_VERSION: string; SESSION_ID: string; APP_SCREEN_ID: string; TRACE: string; SPAN_ID: string; INTERRUPTED_BY_TRACE: string; }; export declare const SPAN_ATTR_KEY: { GCP_RESOURCE_NAME: string; SESSION_ID: string; SERVICE_VERSION: string; APP_SCREEN_ID: string; }; type Attribute = Record; /** * A store for Crashlytics specific attributes for telemetry data. */ export declare class AttributesStore { private _projectId; private _appVersion; private _customAttributes; private _sessionId; private _installations; private _iid; private _routePathProvider?; private _region; constructor(firebaseOptions: FirebaseOptions, crashlyticsOptions?: CrashlyticsOptions, installationsProvider?: Provider<'installations-internal'>); /** * Update the options inside the store based on new Crashlytics options. */ updateOptions(options?: CrashlyticsOptions): void; /** * Get the active session id. */ get sessionId(): string | undefined; /** * Set and persist the session id. */ setSessionId(id: string): void; /** * Sets the route path provider, which is used to get the current route path. * @param provider The route path provider. */ setRoutePathProvider(provider: (() => string) | undefined): void; /** * Get the log attributes. * @returns The log attributes. */ getLogAttributes(customAttributes?: Attributes): AnyValueMap; /** * Get the span attributes. * @returns The span attributes. */ getSpanAttributes(): Attributes; /** * Returns an attribute object with installation id. * * @returns an attribute object with installation id, or null if installation id is not available */ getInstallationIdAttribute(): Promise; private getSessionIdFromStorage; } export {};