{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "insights/v1/events/honeybadger-ruby/feature_operation.flipper.json",
  "title": "Flipper: feature_operation",
  "description": "A Flipper feature flag check or mutation recorded by Honeybadger.",
  "x-hb": {
    "notifiers": [
      "honeybadger-ruby"
    ],
    "category": "feature_flags",
    "component": "Flipper"
  },
  "type": "object",
  "properties": {
    "event_type": {
      "type": "string",
      "const": "feature_operation.flipper"
    },
    "feature_name": {
      "type": "string",
      "description": "Name of the Flipper feature flag.",
      "examples": [
        "new_dashboard"
      ]
    },
    "operation": {
      "type": "string",
      "description": "Operation performed, e.g. \"enabled?\", \"enable\", \"disable\".",
      "examples": [
        "enabled?"
      ]
    },
    "result": {
      "description": "Result of the operation. Checks return booleans, while mutations can return other values.",
      "examples": [
        true
      ]
    },
    "request_id": {
      "type": "string",
      "description": "Rails request UUID, present on any event fired during a web request context. Set by the Honeybadger agent when available.",
      "examples": [
        "0f5e4bb2-3c46-4b1c-91d5-2f4e8a6b9c01"
      ]
    },
    "hostname": {
      "type": "string",
      "description": "Server hostname. Attached to every event by default (events.attach_hostname).",
      "examples": [
        "web-1.example.com"
      ]
    },
    "environment": {
      "type": "string",
      "description": "Application environment, e.g. \"production\". Attached to every event by default (events.attach_environment).",
      "examples": [
        "production"
      ]
    },
    "instrumenter_id": {
      "type": "string",
      "description": "ActiveSupport::Notifications instrumenter UUID, added by the Honeybadger notification subscriber.",
      "examples": [
        "d6a5b3f4c2e1908a7b6c"
      ]
    },
    "duration": {
      "type": "number",
      "description": "Duration of the instrumented operation in milliseconds.",
      "examples": [
        0.42
      ]
    }
  },
  "required": [
    "event_type",
    "feature_name",
    "operation"
  ]
}
