diff --git a/lib/cjs/generated/telemetry.d.ts b/lib/cjs/generated/telemetry.d.ts index 0b2ab1f5..a043faeb 100644 --- a/lib/cjs/generated/telemetry.d.ts +++ b/lib/cjs/generated/telemetry.d.ts @@ -491,7 +491,7 @@ export type TelemetryUsageEvent = CommonTelemetryProperties & { /** * Schema of features usage common across SDKs */ -export type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | SetViewContext | SetViewContextProperty | SetViewName | GetViewContext | AddAction | AddError | GetGlobalContext | SetGlobalContext | SetGlobalContextProperty | RemoveGlobalContextProperty | ClearGlobalContext | GetUser | SetUser | SetUserProperty | RemoveUserProperty | ClearUser | GetAccount | SetAccount | SetAccountProperty | RemoveAccountProperty | ClearAccount | AddFeatureFlagEvaluation | AddOperationStepVital | GraphQLRequest; +export type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | SetViewContext | SetViewContextProperty | SetViewName | GetViewContext | AddAction | AddError | GetGlobalContext | SetGlobalContext | SetGlobalContextProperty | RemoveGlobalContextProperty | ClearGlobalContext | GetUser | SetUser | SetUserProperty | RemoveUserProperty | ClearUser | GetAccount | SetAccount | SetAccountProperty | RemoveAccountProperty | ClearAccount | AddFeatureFlagEvaluation | AddOperationStepVital | GraphQLRequest | AddViewLoadingTime; /** * Schema of browser specific features usage */ @@ -499,7 +499,7 @@ export type TelemetryBrowserFeaturesUsage = StartSessionReplayRecording | StartD /** * Schema of mobile specific features usage */ -export type TelemetryMobileFeaturesUsage = AddViewLoadingTime | TrackWebView | AndroidNetworkInstrumentation; +export type TelemetryMobileFeaturesUsage = TrackWebView | AndroidNetworkInstrumentation; /** * Schema of common properties of Telemetry events */ @@ -832,6 +832,25 @@ export interface GraphQLRequest { feature: 'graphql-request'; [k: string]: unknown; } +export interface AddViewLoadingTime { + /** + * addViewLoadingTime API + */ + feature: 'addViewLoadingTime'; + /** + * Whether the view is not available + */ + no_view?: boolean; + /** + * Whether the available view is not active + */ + no_active_view?: boolean; + /** + * Whether this call overwrote a previously set loading time + */ + overwritten?: boolean; + [k: string]: unknown; +} export interface StartSessionReplayRecording { /** * startSessionReplayRecording API @@ -892,25 +911,6 @@ export interface StopResource { feature: 'stop-resource'; [k: string]: unknown; } -export interface AddViewLoadingTime { - /** - * addViewLoadingTime API - */ - feature: 'addViewLoadingTime'; - /** - * Whether the view is not available - */ - no_view: boolean; - /** - * Whether the available view is not active - */ - no_active_view: boolean; - /** - * Whether the loading time was overwritten - */ - overwritten: boolean; - [k: string]: unknown; -} export interface TrackWebView { /** * trackWebView API diff --git a/lib/esm/generated/telemetry.d.ts b/lib/esm/generated/telemetry.d.ts index 0b2ab1f5..a043faeb 100644 --- a/lib/esm/generated/telemetry.d.ts +++ b/lib/esm/generated/telemetry.d.ts @@ -491,7 +491,7 @@ export type TelemetryUsageEvent = CommonTelemetryProperties & { /** * Schema of features usage common across SDKs */ -export type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | SetViewContext | SetViewContextProperty | SetViewName | GetViewContext | AddAction | AddError | GetGlobalContext | SetGlobalContext | SetGlobalContextProperty | RemoveGlobalContextProperty | ClearGlobalContext | GetUser | SetUser | SetUserProperty | RemoveUserProperty | ClearUser | GetAccount | SetAccount | SetAccountProperty | RemoveAccountProperty | ClearAccount | AddFeatureFlagEvaluation | AddOperationStepVital | GraphQLRequest; +export type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | SetViewContext | SetViewContextProperty | SetViewName | GetViewContext | AddAction | AddError | GetGlobalContext | SetGlobalContext | SetGlobalContextProperty | RemoveGlobalContextProperty | ClearGlobalContext | GetUser | SetUser | SetUserProperty | RemoveUserProperty | ClearUser | GetAccount | SetAccount | SetAccountProperty | RemoveAccountProperty | ClearAccount | AddFeatureFlagEvaluation | AddOperationStepVital | GraphQLRequest | AddViewLoadingTime; /** * Schema of browser specific features usage */ @@ -499,7 +499,7 @@ export type TelemetryBrowserFeaturesUsage = StartSessionReplayRecording | StartD /** * Schema of mobile specific features usage */ -export type TelemetryMobileFeaturesUsage = AddViewLoadingTime | TrackWebView | AndroidNetworkInstrumentation; +export type TelemetryMobileFeaturesUsage = TrackWebView | AndroidNetworkInstrumentation; /** * Schema of common properties of Telemetry events */ @@ -832,6 +832,25 @@ export interface GraphQLRequest { feature: 'graphql-request'; [k: string]: unknown; } +export interface AddViewLoadingTime { + /** + * addViewLoadingTime API + */ + feature: 'addViewLoadingTime'; + /** + * Whether the view is not available + */ + no_view?: boolean; + /** + * Whether the available view is not active + */ + no_active_view?: boolean; + /** + * Whether this call overwrote a previously set loading time + */ + overwritten?: boolean; + [k: string]: unknown; +} export interface StartSessionReplayRecording { /** * startSessionReplayRecording API @@ -892,25 +911,6 @@ export interface StopResource { feature: 'stop-resource'; [k: string]: unknown; } -export interface AddViewLoadingTime { - /** - * addViewLoadingTime API - */ - feature: 'addViewLoadingTime'; - /** - * Whether the view is not available - */ - no_view: boolean; - /** - * Whether the available view is not active - */ - no_active_view: boolean; - /** - * Whether the loading time was overwritten - */ - overwritten: boolean; - [k: string]: unknown; -} export interface TrackWebView { /** * trackWebView API diff --git a/samples/telemetry-events/usage-add-view-loading-time-browser.json b/samples/telemetry-events/usage-add-view-loading-time-browser.json new file mode 100644 index 00000000..4863b415 --- /dev/null +++ b/samples/telemetry-events/usage-add-view-loading-time-browser.json @@ -0,0 +1,29 @@ +{ + "_dd": { + "format_version": 2 + }, + "type": "telemetry", + "date": 1591284175342, + "service": "browser-sdk", + "source": "browser", + "version": "1.2.3", + "application": { + "id": "ac8218cf-498b-4d33-bd44-151095959547" + }, + "session": { + "id": "cacbf45c-3a05-48ce-b066-d76349460599" + }, + "view": { + "id": "623d50fd-75cf-4025-97d2-e51ff94171f6" + }, + "action": { + "id": "ae3a5d82-cdd1-468d-9bc9-3aa9e54d953c" + }, + "experimental_features": [], + "telemetry": { + "type": "usage", + "usage": { + "feature": "addViewLoadingTime" + } + } +} diff --git a/samples/telemetry-events/usage-add-view-loading-time-mobile.json b/samples/telemetry-events/usage-add-view-loading-time-mobile.json new file mode 100644 index 00000000..5c83e3ff --- /dev/null +++ b/samples/telemetry-events/usage-add-view-loading-time-mobile.json @@ -0,0 +1,31 @@ +{ + "_dd": { + "format_version": 2 + }, + "type": "telemetry", + "date": 1591284175342, + "service": "mobile-sdk", + "source": "ios", + "version": "1.2.3", + "application": { + "id": "ac8218cf-498b-4d33-bd44-151095959547" + }, + "session": { + "id": "cacbf45c-3a05-48ce-b066-d76349460599" + }, + "view": { + "id": "623d50fd-75cf-4025-97d2-e51ff94171f6" + }, + "action": { + "id": "ae3a5d82-cdd1-468d-9bc9-3aa9e54d953c" + }, + "experimental_features": [], + "telemetry": { + "type": "usage", + "usage": { + "feature": "addViewLoadingTime", + "no_view": true, + "overwritten": false + } + } +} diff --git a/schemas/telemetry/usage/common-features-schema.json b/schemas/telemetry/usage/common-features-schema.json index 05d4e98f..a8a677fd 100644 --- a/schemas/telemetry/usage/common-features-schema.json +++ b/schemas/telemetry/usage/common-features-schema.json @@ -311,6 +311,29 @@ "const": "graphql-request" } } + }, + { + "required": ["feature"], + "title": "AddViewLoadingTime", + "properties": { + "feature": { + "type": "string", + "description": "addViewLoadingTime API", + "const": "addViewLoadingTime" + }, + "no_view": { + "type": "boolean", + "description": "Whether the view is not available" + }, + "no_active_view": { + "type": "boolean", + "description": "Whether the available view is not active" + }, + "overwritten": { + "type": "boolean", + "description": "Whether this call overwrote a previously set loading time" + } + } } ] } diff --git a/schemas/telemetry/usage/mobile-features-schema.json b/schemas/telemetry/usage/mobile-features-schema.json index ba0d591b..13133adc 100644 --- a/schemas/telemetry/usage/mobile-features-schema.json +++ b/schemas/telemetry/usage/mobile-features-schema.json @@ -5,29 +5,6 @@ "type": "object", "description": "Schema of mobile specific features usage", "oneOf": [ - { - "required": ["feature", "no_view", "no_active_view", "overwritten"], - "title": "AddViewLoadingTime", - "properties": { - "feature": { - "type": "string", - "description": "addViewLoadingTime API", - "const": "addViewLoadingTime" - }, - "no_view": { - "type": "boolean", - "description": "Whether the view is not available" - }, - "no_active_view": { - "type": "boolean", - "description": "Whether the available view is not active" - }, - "overwritten": { - "type": "boolean", - "description": "Whether the loading time was overwritten" - } - } - }, { "required": ["feature"], "title": "TrackWebView",