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

Expose new usage field for react sessions #663

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.2",
"regenerated": "2022-05-10 15:39:37.911405",
"spec_repo_commit": "f1e731d3"
"regenerated": "2022-05-10 16:07:27.140113",
"spec_repo_commit": "433d5d54"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-05-10 15:39:37.933702",
"spec_repo_commit": "f1e731d3"
"regenerated": "2022-05-10 16:07:27.157155",
"spec_repo_commit": "433d5d54"
}
}
}
24 changes: 24 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14182,16 +14182,25 @@ components:
session_count:
description: Contains the number of browser RUM Lite Sessions.
format: int64
nullable: true
type: integer
session_count_android:
description: Contains the number of mobile RUM Sessions on Android (data
available beginning December 1, 2020).
format: int64
nullable: true
type: integer
session_count_ios:
description: Contains the number of mobile RUM Sessions on iOS (data available
beginning December 1, 2020).
format: int64
nullable: true
type: integer
session_count_reactnative:
description: Contains the number of mobile RUM Sessions on React Native
(data available beginning May 1, 2022).
format: int64
nullable: true
type: integer
type: object
UsageRumSessionsResponse:
Expand Down Expand Up @@ -14604,6 +14613,11 @@ components:
in the current date for all organizations.
format: int64
type: integer
mobile_rum_session_count_reactnative_sum:
description: Shows the sum of all mobile RUM Sessions on React Native over
all hours in the current date for all organizations.
format: int64
type: integer
mobile_rum_session_count_sum:
description: Shows the sum of all mobile RUM Sessions over all hours in
the current date for all organizations
Expand Down Expand Up @@ -14923,6 +14937,11 @@ components:
in the current date for the given org.
format: int64
type: integer
mobile_rum_session_count_reactnative_sum:
description: Shows the sum of all mobile RUM Sessions on React Native over
all hours in the current date for the given org.
format: int64
type: integer
mobile_rum_session_count_sum:
description: Shows the sum of all mobile RUM Sessions over all hours in
the current date for the given org.
Expand Down Expand Up @@ -15277,6 +15296,11 @@ components:
in the current months for all organizations.
format: int64
type: integer
mobile_rum_session_count_reactnative_agg_sum:
description: Shows the sum of all mobile RUM Sessions on React Native over
all hours in the current months for all organizations.
format: int64
type: integer
mobile_rum_units_agg_sum:
description: Shows the sum of all mobile RUM units over all hours in the
current months for all organizations.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2022-05-10T15:31:42.562Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"log": {
"_recordingName": "Usage Metering/Get mobile hourly usage for RUM Sessions returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "d3b2733190725c0f67a111172fed82ad",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json;datetime-format=rfc3339"
}
],
"headersSize": 628,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [
{
"name": "start_hr",
"value": "2022-05-05T15:31:42.562Z"
},
{
"name": "end_hr",
"value": "2022-05-07T15:31:42.562Z"
},
{
"name": "type",
"value": "mobile"
}
],
"url": "https://api.datadoghq.com/api/v1/usage/rum_sessions?start_hr=2022-05-05T15%3A31%3A42.562Z&end_hr=2022-05-07T15%3A31%3A42.562Z&type=mobile"
},
"response": {
"bodySize": 10523,
"content": {
"mimeType": "application/json",
"size": 10523,
"text": "{\"usage\":[{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T15:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T16:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T17:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T18:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T19:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T20:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T21:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T22:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-05T23:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T00:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T01:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T02:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T03:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T04:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T05:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T06:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T07:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T08:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T09:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T10:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T11:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T12:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T13:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T14:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T15:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T16:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T17:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T18:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T19:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T20:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T21:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T22:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-06T23:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T00:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T01:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T02:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T03:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T04:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T05:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T06:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T07:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T08:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T09:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T10:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T11:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T12:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T13:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null},{\"org_name\":\"DD Integration Tests (321813)\",\"public_id\":\"fasjyydbcgwwc2uc\",\"hour\":\"2022-05-07T14:00:00+00:00\",\"session_count_android\":null,\"session_count\":null,\"session_count_ios\":null,\"session_count_reactnative\":null}]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 668,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2022-05-10T15:31:42.577Z",
"time": 842
}
],
"pages": [],
"version": "1.2"
}
}
23 changes: 23 additions & 0 deletions examples/v1/usage-metering/GetUsageRumSessions_3271366243.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Get mobile hourly usage for RUM Sessions returns "OK" response
*/

import { v1 } from "@datadog/datadog-api-client";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

const params: v1.UsageMeteringApiGetUsageRumSessionsRequest = {
startHr: new Date(new Date().getTime() / 1000 + -5 * 86400),
endHr: new Date(new Date().getTime() / 1000 + -3 * 86400),
type: "mobile",
};

apiInstance
.getUsageRumSessions(params)
.then((data: v1.UsageRumSessionsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
9 changes: 9 additions & 0 deletions features/v1/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,15 @@ Feature: Usage Metering
When the request is sent
Then the response status is 200 OK

@team:DataDog/red-zone-revenue-query
Scenario: Get mobile hourly usage for RUM Sessions returns "OK" response
Given new "GetUsageRumSessions" request
And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}"
And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "type" parameter with value "mobile"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/red-zone-revenue-query
Scenario: Get specified daily custom reports returns "Not Found" response
Given operation "GetSpecifiedDailyCustomReports" enabled
Expand Down
4 changes: 2 additions & 2 deletions features/v1/webhooks_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: Webhooks Integration
When the request is sent
Then the response status is 404 Item Not Found

@skip-typescript @skip-terraform-config @team:Datadog/collaboration-integrations
@skip-terraform-config @skip-typescript @team:Datadog/collaboration-integrations
Scenario: Delete a custom variable returns "OK" response
Given there is a valid "webhook_custom_variable" in the system
And new "DeleteWebhooksIntegrationCustomVariable" request
Expand All @@ -59,7 +59,7 @@ Feature: Webhooks Integration
When the request is sent
Then the response status is 404 Item Not Found

@skip-typescript @skip-terraform-config @team:Datadog/collaboration-integrations
@skip-terraform-config @skip-typescript @team:Datadog/collaboration-integrations
Scenario: Delete a webhook returns "OK" response
Given there is a valid "webhook" in the system
And new "DeleteWebhooksIntegration" request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export class UsageRumSessionsHour {
* Contains the number of mobile RUM Sessions on iOS (data available beginning December 1, 2020).
*/
"sessionCountIos"?: number;
/**
* Contains the number of mobile RUM Sessions on React Native (data available beginning May 1, 2022).
*/
"sessionCountReactnative"?: number;

/**
* @ignore
Expand Down Expand Up @@ -81,6 +85,11 @@ export class UsageRumSessionsHour {
type: "number",
format: "int64",
},
sessionCountReactnative: {
baseName: "session_count_reactnative",
type: "number",
format: "int64",
},
};

/**
Expand Down
Loading