Newer Version Available

This content describes an older version of this product. View Latest

PlatformEventUsageMetric

Contains usage data for event publishing and CometD-client delivery. Usage data is available for the last 24 hours, ending at the last hour, and for historical daily usage. PlatformEventUsageMetric contains separate usage metrics for platform events and change data capture events. This object is available in API version 50.0 and later.

Supported Calls

describeSObjects(), query()

Fields

Field Details
EndDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The end date and time in UTC used for querying usage metrics. The date granularity is hourly.
To get usage data for the last 24 hours, the end date is the current date in UTC. The time is the current time in UTC rounded down to the previous hour. For example, 11:23 is 11:00 and the date format is: 2020-08-04T11:00:00.000Z
To get historical data, the end date in UTC is the end of the date range with hours specified as 0. For example: 2020-08-04T00:00:00.000Z. To query a date range, you can use the > or >= operators.
For the date format to use, see Date Formats and Date Literals in the SOQL and SOSL Reference.
ExternalId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
This field is not in use.
Name
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The name of the metric to get usage for.
Possible values are:
  • CHANGE_EVENTS_DELIVERED—Number of change data capture events delivered to CometD clients
  • CHANGE_EVENTS_PUBLISHED—Number of change data capture events published
  • PLATFORM_EVENTS_DELIVERED—Number of platform events delivered to CometD clients
  • PLATFORM_EVENTS_PUBLISHED—Number of platform events published
StartDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The start date and time in UTC used for querying usage metrics. The date granularity is hourly.
To get usage data for the last 24 hours, the start date is the previous day in UTC. The time is the current time in UTC rounded down to the previous hour. For example, 11:23 is 11:00 and the date format is: 2020-08-03T11:00:00.000Z
To get historical data, the start date is the start of the date range with hours specified as 0. For example: 2020-08-03T00:00:00.000Z. To specify a date range, you can use the > or >= operators.
For the date format to use, see Date Formats and Date Literals in the SOQL and SOSL Reference.
Value
Type
long
Properties
Filter, Group, Nillable, Sort
Description
The usage value for the specified metric and date range.

Usage

For more information, see Monitor Platform Event Publishing and Delivery Usage in the Platform Events Developer Guide.