{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.rubyschema.org/honeybadger.json",
  "title": "Honeybadger configuration",
  "markdownDescription": "Configuration for Honeybadger, an error and performance monitoring service for Ruby, JavaScript, PHP, Python, Elixir, and more.\n\nThis YAML configuration file supports environment-specific settings, ERB templating, and both error tracking and Insights (performance monitoring) features.\n\n[Honeybadger Configuration Documentation](https://docs.honeybadger.io/lib/ruby/gem-reference/configuration/)",
  "type": "object",
  "definitions": {
    "erb": {
      "type": "string",
      "pattern": "^<%=.*%>$"
    },
    "constant": {
      "type": "string",
      "pattern": "^(?:::)?[A-Z][a-zA-Z0-9_]*(?:::[A-Z][a-zA-Z0-9_]*)*$"
    },
    "environment": {
      "markdownDescription": "Environment-specific configuration for Honeybadger.\n\nSettings defined here override top-level settings when running in the specified environment (e.g., `production`, `development`, `staging`).\n\nSupports ERB templating for dynamic values.",
      "properties": {
        "api_key": {
          "type": "string",
          "markdownDescription": "The API key for your Honeybadger project.\n\n**Required** for error reporting and Insights.\n\nFind your API key in your Honeybadger project settings: **Settings → API Keys**\n\n[API Keys Documentation](https://docs.honeybadger.io/lib/ruby/gem-reference/configuration/)"
        },
        "env": {
          "type": "string",
          "markdownDescription": "The environment the app is running in.\n\nIn Rails this defaults to `Rails.env`.\n\nExample: `production`, `staging`, `development`\n\nThis affects error grouping and allows environment-specific configuration."
        },
        "report_data": {
          "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
          "markdownDescription": "Enable/disable reporting of data to Honeybadger.\n\nDefault: `false` for `test`, `development`, and `cucumber` environments; `true` for all others.\n\nSet to `false` to disable error and event reporting entirely (useful for local development).\n\n[Environments Documentation](https://docs.honeybadger.io/lib/ruby/getting-started/environments/)"
        },
        "root": {
          "type": "string",
          "markdownDescription": "The project's absolute root path."
        },
        "revision": {
          "type": "string",
          "markdownDescription": "The project's git revision (commit SHA).\n\nDefault: Automatically detected from git.\n\nUsed to link errors to specific code versions and for deployment tracking.\n\n[Deployment Tracking Documentation](https://docs.honeybadger.io/lib/ruby/getting-started/tracking-deployments/)"
        },
        "hostname": {
          "type": "string",
          "markdownDescription": "The hostname of the current box."
        },
        "backend": {
          "type": "string",
          "markdownDescription": "An alternate backend to use for reporting data."
        },
        "debug": {
          "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
          "markdownDescription": "Enables verbose debug logging."
        },
        "send_data_at_exit": {
          "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
          "markdownDescription": "Prevent the Ruby program from exiting until all queued notices have been delivered to Honeybadger. (This can take a while in some cases; see `max_queue_size`.)"
        },
        "max_queue_size": {
          "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
          "markdownDescription": "Maximum number of error notices to queue for delivery at one time.\n\nNew notices will be dropped if this number is exceeded.\n\nDefault: `100`\n\n**Note:** Increasing this value can use more memory. Decrease if you're experiencing memory issues in high-error scenarios."
        },
        "logging": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string",
              "markdownDescription": "The path (absolute, or relative from `root`) to the log file.\n\nDefault: Rails logger or STDOUT.\n\nSet to `'STDOUT'` to log to standard output.\n\nExample: `'log/honeybadger.log'`"
            },
            "level": {
              "anyOf": [
                { "$ref": "#/definitions/erb" },
                {
                  "enum": [
                    "DEBUG",
                    "INFO",
                    "WARN",
                    "ERROR",
                    "FATAL",
                    "UNKNOWN"
                  ],
                  "markdownEnumDescriptions": [
                    "Most verbose logging level",
                    "Standard informational messages (default)",
                    "Warning messages only",
                    "Error messages only",
                    "Fatal error messages only",
                    "Unknown severity messages"
                  ]
                }
              ],
              "markdownDescription": "The log level for Honeybadger's internal logging.\n\nDefault: `INFO`\n\nDoes nothing unless `logging.path` is also set."
            },
            "tty_level": {
              "anyOf": [
                {
                  "enum": [
                    "DEBUG",
                    "INFO",
                    "WARN",
                    "ERROR",
                    "FATAL",
                    "UNKNOWN"
                  ],
                  "markdownEnumDescriptions": [
                    "Most verbose logging level",
                    "Standard informational messages",
                    "Warning messages only",
                    "Error messages only",
                    "Fatal error messages only",
                    "Unknown severity messages"
                  ]
                },
                { "$ref": "#/definitions/erb" }
              ],
              "markdownDescription": "The log level when outputting to a terminal (TTY).\n\nMust be >= `logging.level` — any level below `logging.level` will be ignored.\n\nDefault: Same as `logging.level`"
            }
          },
          "additionalProperties": false,
          "required": ["path"]
        },
        "connection": {
          "type": "object",
          "properties": {
            "secure": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Use SSL when sending data.",
              "default": true
            },
            "host": {
              "type": "string",
              "markdownDescription": "The host to use when sending data.",
              "default": "api.honeybadger.io"
            },
            "port": {
              "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "The port to use when sending data.",
              "default": 443
            },
            "http_open_timeout": {
              "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "The HTTP open timeout (in seconds) when connecting to the server.",
              "default": 2
            },
            "http_read_timeout": {
              "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "The HTTP read timeout (in seconds) when connecting to the server.",
              "default": 5
            },
            "proxy_host": {
              "type": "string",
              "markdownDescription": "The proxy host to use when sending data."
            },
            "proxy_port": {
              "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "The proxy port to use when sending data."
            },
            "proxy_user": {
              "type": "string",
              "markdownDescription": "The proxy user to use when sending data."
            },
            "proxy_pass": {
              "type": "string",
              "markdownDescription": "The proxy password to use when sending data."
            }
          }
        },
        "request": {
          "type": "object",
          "properties": {
            "filter_keys": {
              "markdownDescription": "A list of keys to filter when sending request data.\n\nIn Rails, this also includes existing params filters configured in `config.filter_parameters`.\n\nDefault: `['password', 'password_confirmation']`\n\nExample: Add `'credit_card'`, `'ssn'`, or other sensitive field names.\n\n[Filtering Sensitive Data Documentation](https://docs.honeybadger.io/lib/ruby/getting-started/filtering-sensitive-data/)",
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string"
              },
              "default": ["password", "password_confirmation"]
            },
            "disable_session": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Prevent session from being sent with request data.",
              "default": false
            },
            "disable_params": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Prevent params from being sent with request data.",
              "default": false
            },
            "disable_environment": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Prevent Rack environment from being sent with request data.",
              "default": false
            },
            "disable_url": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Prevent url from being sent with request data (Rack environment may still contain it in some cases).",
              "default": false
            }
          }
        },
        "user_informer": {
          "type": "object",
          "properties": {
            "enabled": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable the UserInformer middleware. The user informer displays information about a Honeybadger error to your end-users when you display a 500 error page. This typically includes the error id which can be used to reference the error inside your Honeybadger account. [Learn more](https://docs.honeybadger.io/lib/ruby/getting-started/collecting-user-feedback/)",
              "default": true
            },
            "info": {
              "type": "string",
              "markdownDescription": "Replacement string for HTML comment in templates."
            }
          }
        },
        "feedback": {
          "type": "object",
          "properties": {
            "enabled": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable the UserFeedback middleware. Feedback displays a comment form to your-end user when they encounter an error. When the user creates a comment, it is added to the error in Honeybadger, and a notification is sent. [Learn More](https://docs.honeybadger.io/lib/ruby/getting-started/collecting-user-feedback/)",
              "default": true
            }
          }
        },
        "exceptions": {
          "type": "object",
          "properties": {
            "enabled": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable error reporting functionality.",
              "default": true
            },
            "ignore": {
              "markdownDescription": "A list of exception class names to ignore.\n\n**Appends** to default ignore list (use `ignore_only` to override defaults).\n\nDefault ignore list includes common framework exceptions like `ActionController::RoutingError`, `ActiveRecord::RecordNotFound`, etc.\n\nExample:\n```yaml\nexceptions:\n  ignore:\n    - CustomNotFoundError\n    - TemporaryError\n```\n\n[Ignoring Errors Documentation](https://docs.honeybadger.io/lib/ruby/getting-started/ignoring-errors/)",
              "type": "array",
              "uniqueItems": true,
              "items": {
                "anyOf": [
                  { "$ref": "#/definitions/constant" },
                  { "$ref": "#/definitions/erb" }
                ]
              }
            },
            "ignore_only": {
              "markdownDescription": "A list of exception class names to ignore.\n\n**Overrides** default ignore list (use `ignore` to append to defaults).\n\nUse this when you want complete control over which exceptions are ignored.\n\nExample:\n```yaml\nexceptions:\n  ignore_only:\n    - ActionController::RoutingError\n```",
              "type": "array",
              "uniqueItems": true,
              "items": {
                "anyOf": [
                  { "$ref": "#/definitions/constant" },
                  { "$ref": "#/definitions/erb" }
                ]
              }
            },
            "ignored_user_agents": {
              "markdownDescription": "A list of user agents to ignore.",
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string"
              }
            },
            "rescue_rake": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable rescuing exceptions in rake tasks. Default: `true` when run in background; `false` when run in terminal."
            },
            "notify_at_exit": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Report unhandled exception when Ruby crashes (at_exit).",
              "default": true
            },
            "source_radius": {
              "anyOf": [{ "type": "integer" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "The number of lines before and after the source when reporting snippets.",
              "default": 2
            },
            "local_variables": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable sending local variables. Requires the [binding_of_caller](https://rubygems.org/gems/binding_of_caller) gem.",
              "default": false
            },
            "unwrap": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Reports #original_exception or #cause one level up from rescued exception when available.",
              "default": false
            }
          }
        },
        "breadcrumbs": {
          "type": "object",
          "properties": {
            "enabled": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable breadcrumb functionality.\n\nBreadcrumbs capture a trail of events leading up to an error, helping you understand context.\n\nDefault: `true`\n\n[Breadcrumbs Documentation](https://docs.honeybadger.io/lib/ruby/getting-started/breadcrumbs/)",
              "default": true
            },
            "active_support_notifications": {
              "markdownDescription": "Configuration for automatic breadcrumb capture from Active Support Instrumentation events.\n\nBy default, Honeybadger automatically creates breadcrumbs for Rails framework events like database queries, cache operations, and view renders.\n\nYou can customize which events are captured here.\n\n[Active Support Instrumentation](https://guides.rubyonrails.org/active_support_instrumentation.html)",
              "type": "object"
            },
            "logging": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable/Disable automatic breadcrumbs from log messages.",
                  "default": true
                }
              }
            }
          }
        },
        "active_job": {
          "type": "object",
          "properties": {
            "attempt_threshold": {
              "anyOf": [
                { "type": "integer", "minimum": 0 },
                { "$ref": "#/definitions/erb" }
              ],
              "markdownDescription": "The number of attempts before notifications will be sent."
            },
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for this plugin.\n\nInsights provides performance monitoring and APM features.\n\nDefault: `true`\n\n[Insights Documentation](https://docs.honeybadger.io/guides/insights/)",
                  "default": true
                }
              }
            }
          }
        },
        "sidekiq": {
          "type": "object",
          "properties": {
            "attempt_threshold": {
              "anyOf": [
                { "type": "integer", "minimum": 0 },
                { "$ref": "#/definitions/erb" }
              ],
              "markdownDescription": "The number of attempts before notifications will be sent."
            },
            "use_component": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Automatically set the component to the class of the job. Helps with grouping.",
              "default": true
            },
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for Sidekiq.",
                  "default": true
                },
                "collection_interval": {
                  "anyOf": [
                    { "type": "integer", "minimum": 0 },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "The frequency, in seconds, in which Sidekiq metrics are sampled.",
                  "default": 60
                },
                "cluster_collection": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable cluster wide metric collection. If you are using Sidekiq Enterprise, this is configured automatically."
                },
                "events": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Sidekiq events to Insights."
                },
                "metrics": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Sidekiq metrics to Insights."
                }
              }
            }
          }
        },
        "solid_queue": {
          "type": "object",
          "properties": {
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for SolidQueue.",
                  "default": true
                },
                "collection_interval": {
                  "anyOf": [
                    { "type": "integer" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "The frequency, in seconds, in which SolidQueue metrics are sampled.",
                  "default": 60
                },
                "cluster_collection": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable cluster wide metric collection.",
                  "default": true
                }
              }
            }
          }
        },
        "delayed_job": {
          "type": "object",
          "properties": {
            "attempt_threshold": {
              "anyOf": [
                { "type": "integer", "minimum": 0 },
                { "$ref": "#/definitions/erb" }
              ],
              "markdownDescription": "The number of attempts before notifications will be sent.",
              "default": 0
            }
          }
        },
        "shoryuken": {
          "type": "object",
          "properties": {
            "attempt_threshold": {
              "anyOf": [
                { "type": "integer", "minimum": 0 },
                { "$ref": "#/definitions/erb" }
              ],
              "markdownDescription": "The number of attempts before notifications will be sent.",
              "default": 0
            }
          }
        },
        "sinatra": {
          "type": "object",
          "properties": {
            "enabled": {
              "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/erb" }],
              "markdownDescription": "Enable Sinatra auto-initialization.",
              "default": true
            }
          }
        },
        "rails": {
          "type": "object",
          "properties": {
            "subscriber_ignore_sources": {
              "markdownDescription": "sources (strings or regexes) that should be ignored when using the Rails error reporter.",
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string"
              }
            },
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for Rails.",
                  "default": true
                },
                "events": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Rails events to Insights.",
                  "default": true
                },
                "metrics": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Rails metrics to Insights.",
                  "default": false
                }
              }
            }
          }
        },
        "autotuner": {
          "type": "object",
          "properties": {
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights data collection for Autotuner.",
                  "default": true
                }
              }
            }
          }
        },
        "karafka": {
          "type": "object",
          "properties": {
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for Karafka.",
                  "default": true
                },
                "events": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Karafka events to Insights.",
                  "default": true
                },
                "metrics": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending Karafka metrics to Insights.",
                  "default": false
                }
              }
            }
          }
        },
        "net_http": {
          "type": "object",
          "properties": {
            "insights": {
              "type": "object",
              "properties": {
                "enabled": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable automatic Insights instrumentation for `Net::HTTP`.",
                  "default": true
                },
                "full_url": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Log the request URL instead of just the domain.",
                  "default": false
                },
                "events": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending `Net::HTTP` events to Insights.",
                  "default": true
                },
                "metrics": {
                  "anyOf": [
                    { "type": "boolean" },
                    { "$ref": "#/definitions/erb" }
                  ],
                  "markdownDescription": "Enable sending `Net::HTTP` metrics to Insights.",
                  "default": false
                }
              }
            }
          }
        }
      }
    }
  },
  "properties": {
    "production": { "$ref": "#/definitions/environment" },
    "development": { "$ref": "#/definitions/environment" }
  },
  "$ref": "#/definitions/environment",
  "additionalProperties": {
    "$ref": "#/definitions/environment"
  }
}
