@sailfish-ai/recorder 1.9.2-alpha1 → 1.10.1-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { readDebugFlag } from "./env";
3
3
  import { v4 as uuidv4 } from "uuid";
4
4
  import { NetworkRequestEventId, STATIC_EXTENSIONS, xSf3RidHeader, } from "./constants";
5
5
  import { gatherAndCacheDeviceInfo } from "./deviceInfo";
6
+ import { fetchAndSendIp } from "./sendSailfishMessages";
6
7
  import { readGitSha } from "./env";
7
8
  import { initializeErrorInterceptor } from "./errorInterceptor";
8
9
  import { fetchCaptureSettings, fetchFunctionSpanTrackingEnabled, sendDomainsToNotPropagateHeaderTo, startRecordingSession, } from "./graphql";
@@ -823,7 +824,7 @@ function getMapUuidFromWindow() {
823
824
  // Note - we do NOT send serviceIdentifier because
824
825
  // it would be 1 serviceIdentifier per frontend user session,
825
826
  // which is very wasteful
826
- export async function startRecording({ apiKey, backendApi = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo = [], domainsToNotPropagateHeaderTo = [], serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, }) {
827
+ export async function startRecording({ apiKey, backendApi = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo = [], domainsToNotPropagateHeaderTo = [], serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, }) {
827
828
  const effectiveGitSha = gitSha ?? readGitSha();
828
829
  const effectiveServiceIdentifier = serviceIdentifier ?? "";
829
830
  const effectiveServiceVersion = serviceVersion ?? "";
@@ -904,6 +905,9 @@ export async function startRecording({ apiKey, backendApi = "https://api-service
904
905
  g.fetchPatched = true;
905
906
  }
906
907
  gatherAndCacheDeviceInfo();
908
+ if (enableIpTracking) {
909
+ fetchAndSendIp(sessionId);
910
+ }
907
911
  try {
908
912
  const captureSettingsResponse = await fetchCaptureSettings(apiKey, backendApi);
909
913
  const captureSettings = captureSettingsResponse.data?.captureSettingsFromApiKey ||