> ## Documentation Index
> Fetch the complete documentation index at: https://translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ログストリーミングを使用して、ほぼリアルタイムでログをエクスポートする方法について説明します。

# ログストリーム

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  ログストリームは、監視と分析を目的として設計されています。アプリケーションのクリティカルパスやリアルタイムの意思決定にログストリームを使用することは推奨していません。

  デフォルトでは、ログは実際に発生した順序どおりに表示されない場合があります。テナントログをストリーミングしていて時系列順での並べ替えが必要な場合は、ストリーム処理側でログの並べ替えを実装することをお勧めします。
</Callout>

Auth0 のログストリーミングサービスを使用すると、テナントログをログ分析サービスにエクスポートできます。コンテンツタイプと形式を選択し、<Tooltip tip="Auth0 Dashboard: サービスを設定するための Auth0 のメイン製品です。" cta="用語集を表示" href="/ja/docs/glossary?term=Auth0+Dashboard">Auth0 Dashboard</Tooltip> でペイロードをプレビューできます。ログストリーミングを使用すると、パスワード変更や新規登録などのログイベントに対して、独自のビジネスロジックで対応できます。Auth0 Dashboard と API を使用して、ストリームの一時停止、設定の表示と更新、ストリームの正常性の確認を行えます。

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  ログストリームを有効にすると、Customer はかかる情報の Controller となり、どの情報をストリーミングするか、また Customer がその情報をどのように使用するかを含め、Auth0 Platform からエクスポートされるデータについて責任を負います。
</Callout>

Auth0 Dashboard では、サポートされているいずれかのサービスを使用して新しいログストリームを作成できます。また、カスタム Webhook を使用して、すでに利用しているサービスへのストリームを設定することもできます。

<Frame>
  <img src="https://mintcdn.com/translations/MV7tE-x71x8RWRES/docs/images/cdy7uua7fh8z/5ZY6sT68DabXNL9Dr4bhss/ff0f7306fcf9d64247a61a48b12a39a9/log_stream.png?fit=max&auto=format&n=MV7tE-x71x8RWRES&q=85&s=d758c12e1c9314e6cbddb3457bdf088e" alt="Dashboard Monitoring Streams" width="1924" height="1336" data-path="docs/images/cdy7uua7fh8z/5ZY6sT68DabXNL9Dr4bhss/ff0f7306fcf9d64247a61a48b12a39a9/log_stream.png" />
</Frame>

<div id="supported-log-streaming-services">
  ## 対応しているログストリーミングサービス
</div>

[Auth0 Marketplace](https://marketplace.auth0.com) を通じて、次のようなさまざまな[ログストリーミングサービス](https://marketplace.auth0.com/features/log-streaming)をサポートしています。

* [Amazon EventBridge](https://marketplace.auth0.com/integrations/amazon-log-streaming)
* [Azure Event Grid](https://marketplace.auth0.com/integrations/azure-log-streaming)
* [Elastic](https://marketplace.auth0.com/integrations/elastic-security)
* [Logz.io](https://marketplace.auth0.com/integrations/logz-io)
* [MDR ONE](https://marketplace.auth0.com/integrations/mdr-one)
* [Mixpanel](https://marketplace.auth0.com/integrations/mixpanel-log-streaming)
* [Oodle AI](https://marketplace.auth0.com/integrations/oodle)
* [Oort](https://marketplace.auth0.com/integrations/oort)
* [Pangea](https://marketplace.auth0.com/integrations/pangea-log-streaming)
* [Panther](https://marketplace.auth0.com/integrations/panther-log-stream)
* [Perch Security](https://marketplace.auth0.com/integrations/perch-security-log-streaming)
* [Segment](https://marketplace.auth0.com/integrations/segment-log-streaming)
* [Slack](https://marketplace.auth0.com/integrations/slack-log-streaming)
* [Datadog](https://marketplace.auth0.com/integrations/datadog-log-streaming)

  * Auth0 では Datadog の Dashboard テンプレートを提供しています。詳しくは、[Use Auth0 Dashboard Templates with Datadog](/ja/docs/customize/log-streams/datadog-dashboard-templates) を参照してください。
* [Splunk](https://marketplace.auth0.com/integrations/splunk-log-streaming)

  * Auth0 では、Auth0 テナントのデータを可視化するためのダッシュボードも提供しています。このアプリを使用すると、Auth0 が推奨する集計を表示したり、それらを出発点として独自のカスタム可視化を作成したりできます。詳しくは、[Use Auth0 App for Splunk](/ja/docs/customize/log-streams/splunk-dashboard) を参照してください。
* [Sumo Logic](https://marketplace.auth0.com/integrations/sumo-logic-log-streaming)

  * Auth0 では、Auth0 テナントのログイントラフィックの健全性を可視化して監視するための Sumo Logic アプリとダッシュボードを提供しています。また、Auth0 が推奨する集計を表示したり、それらを出発点として独自のカスタム可視化を作成したりすることもできます。詳しくは、[Use Auth0 App for Sumo Logic](/ja/docs/customize/log-streams/sumo-logic-dashboard) を参照してください。

<div id="delivery-attempts">
  ## 配信の試行
</div>

Auth0 は、システム内で生成された各ログを、その都度お客様のサーバーに配信します。ログは少なくとも 1 回配信されることを保証します。

ログが生成されると、次の処理が行われます。

1. お客様のサーバーへのログ配信を最大 3 回試行します。
2. 3 回目の試行でもお客様のサーバーに到達できない場合は、ログストリームの **Health** ビューに表示されるエラーを記録します。
3. エラーが発生したログについては、問題が解決されるまでこのプロセスを繰り返します。

7 日連続でお客様のサーバーに到達できない場合、ストリームは自動的に一時停止されます。問題を解決した後、ストリームを手動で再開する必要があります。

<div id="log-retention">
  ## ログ保持
</div>

Auth0 のログ保持期間は、[サブスクリプションレベル](/ja/docs/deploy-monitor/logs/log-data-retention)によって異なります。

サーバーで Auth0 から送信されたログを受信できない問題が発生した場合は、ストリームを削除してから、Starting Cursor フィールドを保持期間内の特定の日時に設定して再作成できます。

<div id="filtering-and-pii-obfuscation">
  ## フィルタリングとPIIの難読化
</div>

お客様は、外部の送信先が必要なデータのみを受信できるように、ログのどの[フィルターカテゴリ](/ja/docs/deploy-monitor/logs/log-event-filters)をストリーミングし、どれを除外するかを選択できます。また、ストリーミングされるログに含まれる個人を特定できる情報 (PII) をマスクまたはハッシュ化することもできます。

<div id="pii-obfuscation">
  ### PII の難読化
</div>

Auth0 では、サードパーティの送信先へストリーミングする際に、テナントログ内の PII フィールドを難読化するための 2 つの方法を提供しています。

* **マスキング:** フィールド値をアスタリスクに置き換えます
* **xxHash:** 高速な非暗号学的ハッシュアルゴリズム

ストリーミング時には、次のログデータとフィールド名を難読化できます。

| データ          | フィールド名                                                                      |
| ------------ | --------------------------------------------------------------------------- |
| `first_name` | `first_name`<br />`given_name`<br />`name`                                  |
| `last_name`  | `last_name`<br />`family_name`<br />`name`                                  |
| `email`      | `email`                                                                     |
| `phone`      | `phone`<br />`phone_number`<br />`old_phone_number`<br />`new_phone_number` |
| `address`    | `address`                                                                   |
| `username`   | `username`<br />`user_name`                                                 |

<div id="learn-more">
  ## 詳細
</div>

* [Webhook を使用したカスタムログストリームの作成](/ja/docs/customize/log-streams/custom-log-streams)
* [ログストリームの正常性を確認する](/ja/docs/customize/log-streams/check-log-stream-health)
* [ログストリームのフィルター](/ja/docs/customize/log-streams/event-filters)
