搭 OpenTelemetry 配收集器使用 OpenSearch 擷取管線 - Amazon OpenSearch 服務

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

搭 OpenTelemetry 配收集器使用 OpenSearch 擷取管線

此範例OpenTelemetry 組態檔案會從 OpenTelemetry收集器匯出追蹤資料,並將其傳送至 OpenSearch 擷取管線。如需有關擷取追蹤資料的詳細資訊,請參閱資料準備器文件中的追蹤分析

注意下列事項:

  • endpoint值必須包含您的管道端點。例如:https://pipeline-endpoint.us-east-1.osis.amazonaws.com

  • service 值必須為 osis

  • OTLP/HTTP匯出器的compression選項必須與管線 OpenTelemetry 來源上的compression選項相符。

extensions: sigv4auth: region: "us-east-1" service: "osis" receivers: jaeger: protocols: grpc: exporters: otlphttp: traces_endpoint: "https://pipeline-endpoint.us-east-1.osis.amazonaws.com/v1/traces" auth: authenticator: sigv4auth compression: none service: extensions: [sigv4auth] pipelines: traces: receivers: [jaeger] exporters: [otlphttp]

然後,您可以設定如下所示的 OpenSearch 擷取管線,將 OTeltrace 外掛程式指定為來源:

version: "2" otel-trace-pipeline: source: otel_trace_source: path: "/v1/traces" processor: - trace_peer_forwarder: sink: - pipeline: name: "trace-pipeline" - pipeline: name: "service-map-pipeline" trace-pipeline: source: pipeline: name: "otel-trace-pipeline" processor: - otel_traces: sink: - opensearch: hosts: ["https://search-domain-endpoint.us-east-1.es.amazonaws.com"] index_type: trace-analytics-raw aws: # IAM role that OpenSearch Ingestion assumes to access the domain sink sts_role_arn: "arn:aws:iam::{account-id}:role/pipeline-role" region: "us-east-1" service-map-pipeline: source: pipeline: name: "otel-trace-pipeline" processor: - service_map: sink: - opensearch: hosts: ["https://search-domain-endpoint.us-east-1.es.amazonaws.com"] index_type: trace-analytics-service-map aws: # IAM role that the pipeline assumes to access the domain sink sts_role_arn: "arn:aws:iam::{account-id}:role/pipeline-role" region: "us-east-1"

如需其他管道範例,請參閱預先設定的追蹤分析藍圖。如需詳細資訊,請參閱使用藍圖建立管道