> For the complete documentation index, see [llms.txt](https://docs.wantedly.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wantedly.dev/fields/infrastructure/troubleshooting/honeybadger.md).

# Honeybadger

[Honeybadger](https://www.honeybadger.io/) は、主にアプリケーションで発生したエラーの記録・観測、エラーによるアラートの発火のために利用しているエラートラッキングサービスです。

Honeybadger にエラーを送信する仕組みは [servicex](/fields/the-system/servicex.md) で実現されています。

「観測したい事象に対してどのツールを使えばよいか」については [トラブルシューティング](/fields/infrastructure/troubleshooting.md) を参照してください。

## 使い方

トップページに行くと、Honeybadger でエラーをトラッキングしているプロジェクト (アプリケーション) が一覧になっているので、観測したいものを選択します。

![](/files/-MhWAN94UZJwvQvKycec)

プロジェクトを選択すると、以下のようなプロジェクト内で起こったエラー一覧が表示される画面に遷移します。ここでは同じ内容のエラーがグルーピングされて表示されるようになっており、今までに起こった回数や 1 時間以内に起こった回数などをざっくり把握できます。

**この画面でよく見るのは 1 時間以内に大量にエラーが出ているかどうか** です。もし大量に出ているエラーがあれば、それを選択して詳細画面へ進みます。

![](/files/-MhWAN954JRwxZM5GUn_)

各エラーの詳細画面は以下のようになっています。**例えばある特定の時刻からエラーが急増していることを発見し、その時刻付近に起こったイベント (e.g. デプロイ、DB の障害) を紐付けて仮説を立てていく** ことをよくやります。

![](/files/-MhWAN96AwzAfdUmUQcF)

具体的にコード上のどこでエラーが発生したのかはバックトレースで確認します。

![](/files/-MhWAN97_rWcjaXBmzc2)

## エラー通知から、どのようなリクエストが原因でエラーが発生したか確認する <a href="#error-to-datadog-trace" id="error-to-datadog-trace"></a>

他のマイクロサービスからのリクエストでエラーが発生した場合、その API がどのような使われ方をしているか分かりにくく、Honeybadger だけを見てもユーザー影響の判断やデバッグが難しいことがあります。

そのような場合は、「Context」欄の中の `datadogTraceUrl` から、そのエラーが発生したリクエストが含まれる Datadog Trace ページを開くと、そのエラーがリクエスト全体のどの部分で発生したのか、ユーザーがどのようなリクエストをしたときに発生したエラーなのかを確認できます。

この `datadogTraceUrl` は [servicex](/fields/the-system/servicex.md) によって追加されています ([実装 (internal)](https://github.com/wantedly/servicex-ruby/blob/master/lib/servicex/honeybadger.rb#L18))。

![](/files/TS5oUiIkNLvEZjjpJmVx)

![](/files/l4OhNkeUkBRjCbOzJmW1)

Datadog Trace の見方については [Datadog](/fields/infrastructure/troubleshooting/datadog.md) を参照してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wantedly.dev/fields/infrastructure/troubleshooting/honeybadger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
