

# トラブルシューティング
<a name="CloudWatch-OTLPTroubleshooting"></a>

OTLP エンドポイントの一般的なトラブルシューティングシナリオとソリューションを次に示します。


| 問題 | 説明 | ソリューション | 
| --- | --- | --- | 
|  OCB コレクターの起動時に AWS 認証情報が存在しない  |  コレクターは起動時に次のエラーをスローします。 *エラー: 無効な設定: extensions::sigv4auth: 認証情報プロバイダーを取得できませんでした: キャッシュされた認証情報の更新に失敗しました。EC2 IMDS ロールが見つかりません。オペレーションエラー ec2imds: GetMetadata、リクエストがキャンセルされました。コンテキストの期限を超えました*。  |  正しい認証情報を入力します。  | 
|  AWS 認証情報が無効  |  コレクターは OTLP エンドポイントを介してリクエストを送信する場合、HTTP ステータスコード 403、「メッセージ = リクエストに含まれるセキュリティトークンが無効です、詳細 = []」をスローします。  | コレクターサーバーの AWS 認証情報を更新します。 | 
|  トランザクションの検索が無効  |  コレクターは「メッセージ = OTLP API はトレースセグメントの送信先として CloudWatch Logs をサポートします」をスローします。  | トレースに OTLP エンドポイントを使用する前に、CloudWatch でトランザクション検索が有効になっていることを確認します。詳細については、「[Transaction Search](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html)」を参照してください。 | 
| バッチ処理とタイムアウトの問題 | コレクターは、次のいずれかの問題をスローします。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPTroubleshooting.html) | [batchprocessor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) を使用してバッチ処理ポリシーとタイムアウトポリシーを調整します。 | 
| 再試行に関する問題 | コレクターと OTLP エンドポイント間の一時的なネットワークの問題。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPTroubleshooting.html) | [エクスポーター](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)を使用して再試行ポリシーを調整します。 | 
| ペイロードが拒否されました | NA | トレースエンドポイントに送信されるペイロードが制限内であることを確認します。詳細については、「[エンドポイントの制限と規制](CloudWatch-OTLPEndpoint.md#CloudWatch-LimitsandRestrictions)」を参照してください。 | 
| ADOT の送信エクスポートリクエストに認証ヘッダーが挿入されていない | 一般的な 403 エラー、「認証トークンが見つかりません」: 例: `ERROR:opentelemetry.exporter.otlp.proto.http.trace_exporter:Failed to export batch code: 403, reason: Missing Authentication Token` |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPTroubleshooting.html)  | 
| ログまたはスパンが CloudWatch ロググループに表示されない | ログやスパンは、予想される CloudWatch ロググループ (スパンの場合は aws/spans、ログの場合は指定したカスタムロググループ) には表示されません。 | 計測するライブラリが自動計測でサポートされていることを確認します。[Java](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md)、[Python](http://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/README.md)、[JavaScript](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/auto-instrumentations-node#supported-instrumentations)、および [.NET](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/internal/instrumentation-libraries.md) でサポートされているライブラリを参照してください。 | 