Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/cjs/generated/telemetry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,15 @@ 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
*/
export type TelemetryBrowserFeaturesUsage = StartSessionReplayRecording | StartDurationVital | StopDurationVital | AddDurationVital | StartAction | StopAction | StartResource | StopResource;
/**
* Schema of mobile specific features usage
*/
export type TelemetryMobileFeaturesUsage = AddViewLoadingTime | TrackWebView | AndroidNetworkInstrumentation;
export type TelemetryMobileFeaturesUsage = TrackWebView | AndroidNetworkInstrumentation;
/**
* Schema of common properties of Telemetry events
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
42 changes: 21 additions & 21 deletions lib/esm/generated/telemetry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,15 @@ 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
*/
export type TelemetryBrowserFeaturesUsage = StartSessionReplayRecording | StartDurationVital | StopDurationVital | AddDurationVital | StartAction | StopAction | StartResource | StopResource;
/**
* Schema of mobile specific features usage
*/
export type TelemetryMobileFeaturesUsage = AddViewLoadingTime | TrackWebView | AndroidNetworkInstrumentation;
export type TelemetryMobileFeaturesUsage = TrackWebView | AndroidNetworkInstrumentation;
/**
* Schema of common properties of Telemetry events
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
}
23 changes: 23 additions & 0 deletions schemas/telemetry/usage/common-features-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,29 @@
"const": "graphql-request"
}
}
},
{
"required": ["feature"],
"title": "AddViewLoadingTime",
"properties": {
"feature": {
"type": "string",
"description": "addViewLoadingTime API",
"const": "addViewLoadingTime"
Comment thread
mormubis marked this conversation as resolved.
},
"no_view": {
"type": "boolean",
"description": "Whether the view is not available"
},
"no_active_view": {
"type": "boolean",
"description": "Whether the available view is not active"
},
Comment on lines +324 to +331
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Quick alignment check: are these tracking call-site options (what the caller explicitly passed) or runtime state (what the environment looked like at call time)? The browser-sdk guidance says addTelemetryUsage should be for static call-site info only and specifically calls out "whether a view was active" and "whether a value was overwritten" as examples of runtime state that shouldn't go there. If overwrite is an explicit option passed to the API, overwritten is fine — but no_view/no_active_view feel more like environmental state. Worth a quick check with the team to make sure we're aligned.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are mobile-only fields that track environmental state at call time. Indeed, they don't fit the "call-site info only" principle. That said, they already ship in the mobile SDKs and we're just moving them to the common schema for consolidation, while making them optional so the browser SDK can omit them entirely.

I feel changing the mobile behavior would be out of scope here, but let me know 🙇

"overwritten": {
"type": "boolean",
"description": "Whether this call overwrote a previously set loading time"
}
}
}
]
}
23 changes: 0 additions & 23 deletions schemas/telemetry/usage/mobile-features-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading