{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "insights/v1/events/honeybadger-ruby/statistics_emitted.karafka.json",
  "title": "Karafka: statistics_emitted",
  "description": "Kafka broker and consumer statistics from librdkafka.",
  "x-hb": {
    "notifiers": [
      "honeybadger-ruby"
    ],
    "category": "metrics",
    "component": "Karafka"
  },
  "type": "object",
  "properties": {
    "event_type": {
      "type": "string",
      "const": "statistics_emitted.karafka"
    },
    "consumer_group_id": {
      "type": "string",
      "description": "Karafka consumer group identifier.",
      "examples": [
        "example_app_group"
      ]
    },
    "statistics": {
      "type": "object",
      "description": "Raw librdkafka statistics payload. The shape is defined by librdkafka. See https://github.com/confluentinc/librdkafka/blob/master/STATISTICS.md",
      "additionalProperties": true,
      "examples": [
        {
          "client_id": "example_app",
          "type": "consumer",
          "rxmsgs": 12840
        }
      ]
    },
    "request_id": {
      "type": "string",
      "description": "Rails request UUID from the active web request context, if any. Merged globally by the Honeybadger agent.",
      "examples": [
        "0f5e4bb2-3c46-4b1c-91d5-2f4e8a6b9c01"
      ]
    },
    "hostname": {
      "type": "string",
      "description": "Server hostname. Attached to every event by default (events.attach_hostname).",
      "examples": [
        "worker-1.example.com"
      ]
    },
    "environment": {
      "type": "string",
      "description": "Application environment, e.g. \"production\". Attached to every event by default (events.attach_environment).",
      "examples": [
        "production"
      ]
    }
  },
  "required": [
    "event_type",
    "consumer_group_id"
  ]
}
