Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fireperf web vitals #8644

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Fireperf web vitals #8644

wants to merge 14 commits into from

Conversation

bryanatkinson
Copy link

  • Add support for capturing web vitals metrics in Firebase performance for Web (Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift)
  • Modifies export to use sendBeacon instead of fetch API, and shifts the upload time to the first time the page is hidden or unloaded.

@bryanatkinson bryanatkinson requested review from jposuna and a team as code owners November 18, 2024 22:18
Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: 22a8ae5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/performance Minor
firebase Minor
@firebase/performance-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 18, 2024

Size Report 1

Affected Products

  • @firebase/performance

    TypeBase (32bf021)Merge (1094997)Diff
    browser29.1 kB30.6 kB+1.51 kB (+5.2%)
    main29.5 kB31.1 kB+1.56 kB (+5.3%)
    module29.1 kB30.6 kB+1.51 kB (+5.2%)
  • bundle

    TypeBase (32bf021)Merge (1094997)Diff
    performance (trace)51.8 kB62.3 kB+10.5 kB (+20.2%)
  • firebase

    TypeBase (32bf021)Merge (1094997)Diff
    firebase-compat.js797 kB808 kB+10.1 kB (+1.3%)
    firebase-performance-compat.js30.8 kB40.9 kB+10.1 kB (+32.7%)
    firebase-performance-standalone-compat.js93.7 kB104 kB+10.3 kB (+11.0%)
    firebase-performance.js35.1 kB45.5 kB+10.4 kB (+29.7%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/khAtsjD51r.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 18, 2024

Size Analysis Report 1

Affected Products

  • @firebase/performance

    • getPerformance

      Size

      TypeBase (32bf021)Merge (1094997)Diff
      size18.0 kB18.9 kB+867 B (+4.8%)
      size-with-ext-deps51.7 kB62.1 kB+10.4 kB (+20.2%)

      Dependency

      TypeBase (32bf021)Merge (1094997)Diff
      functions

      50 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getPerformance
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendEventsToFl
      sendLog
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      transportHandler

      52 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      flushLogs
      flushQueuedEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getPerformance
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendLog
      sendOobTrace
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      transportHandler

      + flushLogs
      + flushQueuedEvents
      + sendOobTrace
      - sendEventsToFl

      variables

      46 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FID_WAIT_TIME_MS
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      settingsServiceInstance
      version
      windowInstance

      54 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      firstInputDelay
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      sentPageLoadTrace
      settingsServiceInstance
      version
      webVitalMetrics
      windowInstance

      + CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      + CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      + INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      + INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      + LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      + LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      + firstInputDelay
      + sentPageLoadTrace
      + webVitalMetrics
      - FID_WAIT_TIME_MS

      External Dependency

      ModuleBase (32bf021)Merge (1094997)Diff
      web-vitals/attribution

      onCLS
      onINP
      onLCP

      + onCLS
      + onINP
      + onLCP

    • initializePerformance

      Size

      TypeBase (32bf021)Merge (1094997)Diff
      size18.2 kB19.0 kB+867 B (+4.8%)
      size-with-ext-deps45.1 kB55.5 kB+10.4 kB (+23.2%)

      Dependency

      TypeBase (32bf021)Merge (1094997)Diff
      functions

      50 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      initializePerformance
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendEventsToFl
      sendLog
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      transportHandler

      52 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      flushLogs
      flushQueuedEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      initializePerformance
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendLog
      sendOobTrace
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      transportHandler

      + flushLogs
      + flushQueuedEvents
      + sendOobTrace
      - sendEventsToFl

      variables

      46 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FID_WAIT_TIME_MS
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      settingsServiceInstance
      version
      windowInstance

      54 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      firstInputDelay
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      sentPageLoadTrace
      settingsServiceInstance
      version
      webVitalMetrics
      windowInstance

      + CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      + CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      + INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      + INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      + LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      + LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      + firstInputDelay
      + sentPageLoadTrace
      + webVitalMetrics
      - FID_WAIT_TIME_MS

      External Dependency

      ModuleBase (32bf021)Merge (1094997)Diff
      web-vitals/attribution

      onCLS
      onINP
      onLCP

      + onCLS
      + onINP
      + onLCP

    • trace

      Size

      TypeBase (32bf021)Merge (1094997)Diff
      size17.9 kB18.8 kB+877 B (+4.9%)
      size-with-ext-deps44.5 kB54.9 kB+10.4 kB (+23.5%)

      Dependency

      TypeBase (32bf021)Merge (1094997)Diff
      functions

      50 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendEventsToFl
      sendLog
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      trace
      transportHandler

      52 dependencies

      addToQueue
      changeInitializationStatus
      configValid
      convertMetricValueToInteger
      createNetworkRequestEntry
      createUserTimingTrace
      dispatchQueueEvents
      flushLogs
      flushQueuedEvents
      getApiKey
      getAppId
      getApplicationInfo
      getAuthTokenPromise
      getConfig
      getDocumentReadyComplete
      getEffectiveConnectionType
      getIid
      getIidPromise
      getInitializationPromise
      getProjectId
      getRemoteConfig
      getServiceWorkerStatus
      getStoredConfig
      getVisibilityState
      initializePerf
      isPerfInitialized
      isValidCustomAttributeName
      isValidCustomAttributeValue
      isValidMetricName
      logNetworkRequest
      logTrace
      mergeStrings
      postToFlEndpoint
      processConfig
      processQueue
      registerPerformance
      sendLog
      sendOobTrace
      sendTraceLog
      serializeNetworkRequest
      serializeTrace
      serializer
      setupApi
      setupNetworkRequests
      setupOobResources
      setupOobTraces
      setupTransportService
      setupUserTimingTraces
      shouldLogAfterSampling
      storeConfig
      trace
      transportHandler

      + flushLogs
      + flushQueuedEvents
      + sendOobTrace
      - sendEventsToFl

      variables

      46 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FID_WAIT_TIME_MS
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      settingsServiceInstance
      version
      windowInstance

      54 dependencies

      ATTRIBUTE_FORMAT_REGEX
      CONFIG_EXPIRY_LOCAL_STORAGE_KEY
      CONFIG_LOCAL_STORAGE_KEY
      COULD_NOT_GET_CONFIG_MSG
      CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      DEFAULT_CONFIGS
      DEFAULT_ENTRY_NAME
      DEFAULT_REMAINING_TRIES
      DEFAULT_SEND_INTERVAL_MS
      ERROR_DESCRIPTION_MAP
      ERROR_FACTORY
      FIRST_CONTENTFUL_PAINT_COUNTER_NAME
      FIRST_INPUT_DELAY_COUNTER_NAME
      FIRST_PAINT_COUNTER_NAME
      FIS_AUTH_PREFIX
      INITIAL_SEND_TIME_DELAY_MS
      INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      MAX_ATTRIBUTE_NAME_LENGTH
      MAX_ATTRIBUTE_VALUE_LENGTH
      MAX_EVENT_COUNT_PER_REQUEST
      MAX_METRIC_NAME_LENGTH
      OOB_TRACE_PAGE_LOAD_PREFIX
      REMOTE_CONFIG_SDK_VERSION
      RESERVED_ATTRIBUTE_PREFIXES
      RESERVED_AUTO_PREFIX
      SDK_VERSION
      SERVICE
      SERVICE_NAME
      TRACE_MEASURE_PREFIX
      TRACE_START_MARK_PREFIX
      TRACE_STOP_MARK_PREFIX
      VisibilityState
      apiInstance
      consoleLogger
      factory
      firstInputDelay
      iid
      initializationPromise
      initializationStatus
      isTransportSetup
      logger
      name
      oobMetrics
      queue
      remainingTries
      sentPageLoadTrace
      settingsServiceInstance
      version
      webVitalMetrics
      windowInstance

      + CUMULATIVE_LAYOUT_SHIFT_ATTRIBUTE_NAME
      + CUMULATIVE_LAYOUT_SHIFT_METRIC_NAME
      + INTERACTION_TO_NEXT_PAINT_ATTRIBUTE_NAME
      + INTERACTION_TO_NEXT_PAINT_METRIC_NAME
      + LARGEST_CONTENTFUL_PAINT_ATTRIBUTE_NAME
      + LARGEST_CONTENTFUL_PAINT_METRIC_NAME
      + firstInputDelay
      + sentPageLoadTrace
      + webVitalMetrics
      - FID_WAIT_TIME_MS

      External Dependency

      ModuleBase (32bf021)Merge (1094997)Diff
      web-vitals/attribution

      onCLS
      onINP
      onLCP

      + onCLS
      + onINP
      + onLCP

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/rszHeAoyqK.html

let getEntriesByTypeStub: SinonStub<[EntryType], PerformanceEntry[]>;
let setupObserverStub: SinonStub<
[EntryType, (entry: PerformanceEntry) => void],
void
>;
let createOobTraceStub: SinonStub<
let createOobTraceStub: SinonSpy<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: createOobTraceStub -> createOobTraceSpy

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

method: 'POST',
body: JSON.stringify(data)
});
return navigator.sendBeacon(flTransportFullUrl, JSON.stringify(data));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a fall back to fetch if sendBeacon fails (eg. payload is > then the ~64KB limit)

(navigator.sendBeacon && navigator.sendBeacon(flTransportFullUrl, JSON.stringify(data))) ||
    fetch(flTransportFullUrl, {
        method: 'POST',
        body: JSON.stringify(data),
        keepalive: true
     }
     );

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bryanatkinson bryanatkinson requested review from a team as code owners January 6, 2025 20:25
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants