Viewing producer statistics
Summarize
Summary of Viewing Producer Statistics
This content provides guidance on accessing and interpreting detailed information about Stream Connect producers in ServiceNow, specifically their performance metrics and related logs. Stream Connect producers publish messages to Kafka topics, and you can monitor their activities through specific tables that require appropriate permissions.
Show less
Key Features
- Producer Information: Access the Kafka Producers table [syskafkaproducer] for details on each producer, including its type, ID, and the associated topic.
- Producer Statistics: Review the Kafka Producer Statistics table [syskafkaproducerstatistics] for hourly performance data, such as total bytes and messages produced.
- Logging Capabilities: Utilize the Consumer Logs table [sysconsumerlog] to view producer logs, which detail creation time, log level, and message source.
- Debugging Options: Enable detailed logging with the system property glide.ih.kafka.streamconnect.debug, with automatic disabling after 24 hours to manage log size.
Key Outcomes
By utilizing these features, ServiceNow customers can effectively track the performance of their Kafka producers, troubleshoot issues using detailed logs, and ensure optimal message delivery to Kafka topics. Accessing and analyzing producer statistics enables informed decision-making and enhances the integration capabilities within ServiceNow.
View detailed information about a Stream Connect producer and its performance, including the producer type and ID, and the total number of bytes and messages produced to a topic.
Stream Connect producers, including the Kafka Producer step and the ProducerV2 API, publish messages from ServiceNow to a Kafka topic. You can view detailed information and statistics for each producer.
Each producer has a record that stores information about that producer, such as its type and ID. A producer might also have an associated statistics record with information about the producer's performance, including the number of bytes and messages it's produced to a topic.
- Kafka Producers [sys_kafka_producer] table
- Kafka Producer Statistics [sys_kafka_producer_statistics] table
Both tables require the Kafka Admin [kafka_admin] role to view. These tables are read only and the records in them can't be manually created, updated, or deleted.
Stream Connect logs
Producer logs are stored in the Consumer Logs [sys_consumer_log] table. Each log entry shows when it was created; its level, message, and source; and links to any related Alert.
You can enable more detailed logging by adding the system property glide.ih.kafka.stream_connect.debug and setting it to true. To avoid filling up the logs, this property is automatically disabled after 24 hours. If you need detailed logging for longer than 24 hours, you can re-enable the property manually.
Use the glide.ih.kafka.producer.message_bytes_to_log property to specify how many bytes of a message to display in the logs. This property only impacts logging for producers. The default value is 0, meaning no message content is logged.
Kafka Producers table
The Kafka Producers [sys_kafka_producer] table captures producer information per topic. You can view the Kafka Producers table by navigating to .
| Field | Description |
|---|---|
| Number | Unique identifier for the producer. Links to the producer record. |
| Producer Type |
Type and version number for the producer. Each producer type is followed by the version number of the producer. For example, if the producer is the ProducerV2 API, the type listed is SCRIPT_V2. Options are:
|
| Producer Table |
Name of the table producing the record. For example, if the record is produced by a business rule, the table is Business Rule [sys_script]. If it's produced by the Kafka Producer step, it's Action Type [sys_hub_action_type_definition]. |
| Producer ID | Reference to the record that produces the messages. |
| Topic Alias | The topic alias for the topic associated with the producer. A topic alias is a unique topic name that can be connected to any underlying Hermes or Direct Kafka topic. |
| Topic | Reference to the Kafka topic record for the producer. |
| Domain | Name of the domain for the record producing the event. |
| Created | Date the producer was created. Formatted as YYYY-MM-DD hh:mm:ss. |
| Created by | Name of the person that created the producer. |
| Updated | Date the producer was update. Formatted as YYYY-MM-DD hh:mm:ss. |
Kafka Producer Statistics
The Kafka Producer Statistics [sys_kafka_producer_statistics] table captures producer statistics for each producer. Statistics are collected once per hour.
| Field | Description |
|---|---|
| Collection Time | Time the producer statistics were collected. Statistics are collected and reported every hour. |
| Produced bytes | Total number of bytes produced during the collection period. |
| Produced messages | Total number of messages produced during the collection period. |
| Producer | Reference to the producer record. |
| Domain | Name of the domain for the producer. |