Viewing producer statistics

  • Release version: Xanadu
  • Updated December 5, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Viewing producer statistics

    This content describes how ServiceNow customers can view detailed information and performance statistics for Stream Connect producers that publish messages from ServiceNow to Kafka topics. It explains the types of producers, the key data recorded about them, and how their performance metrics such as bytes and messages produced are tracked.

    Show full answer Show less

    Key Features

    • Producer Information Tracking: Each Stream Connect producer has a record capturing its type, ID, and the topic it publishes to.
    • Performance Statistics: Hourly statistics are collected for each producer, including total bytes and message counts produced to Kafka topics.
    • Two Main Tables:
      • Kafka Producers [syskafkaproducer]: Stores producer records per topic, including type, producing table, and domain.
      • Kafka Producer Statistics [syskafkaproducerstatistics]: Stores hourly statistics on produced bytes, messages, and collection time for each producer.
    • Access Control: Viewing these tables requires the Kafka Admin [kafkaadmin] role. The tables are read-only and cannot be modified manually.

    Practical Use for ServiceNow Customers

    • Navigate to All > Integration Hub > Stream Connect > Producers to view producer records and their statistics.
    • Identify producers by type (e.g., Kafka Producer step, ProducerV2 API) and track their message production performance over time.
    • Use the Kafka Producer Statistics table to monitor hourly production metrics and troubleshoot or optimize message publishing workflows.

    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.

    Producer details and statistics are covered in two tables.
    • 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.

    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 All > Integration Hub > Stream Connect > Producers.

    Table 1. Kafka Producers table fields
    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:
    • ACTION: Kafka Producer step.
    • SCRIPT_ACTION: A producer called from within a scripted step in Workflow Studio.
    • SCRIPT: Producer API or ProducerV2 API.
    • SYSTEM: Any server-side execution in the ServiceNow Platform where the system can't identify any record associated with the execution.
    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 Reference to the Kafka topic record for the producer.
    Domain Name of the domain for the record producing the event.

    Kafka Producer Statistics

    The Kafka Producer Statistics [sys_kafka_producer_statistics] table captures producer statistics for each producer. Statistics are collected once per hour.

    Table 2. Kafka Producer Statistics table
    Field Description
    Topic Reference to the topic record for the producer.
    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.
    Domain Name of the domain for the producer.
    You can also view the statistics for a specific producer by selecting the producer's record from the table.
    Figure 1. Sample producer record with statistics
    A producer record showing producer statistics at the bottom.