• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

ゲートウェイ YAML 設定リファレンス

このリファレンスでは、上級ユーザーがカスタム ゲートウェイ設定を作成するための YAML 構文について説明します。 概念情報については、 「ゲートウェイの概要」を参照してください。ガイド付きのエクスペリエンスの場合は、 Gateway UI を使用します。ゲートウェイUIはほとんどのユーザーに推奨されますが、YAML 設定はテレメトリー パイプライン構造を完全に制御できます。

完全なYAML構造

ゲートウェイ設定では宣言型 YAML 形式を使用します。

version: 2.0.1
autoscaling:
minReplicas: 6
maxReplicas: 10
targetCPUUtilizationPercentage: 60
configuration:
simplified/v2:
troubleshooting:
proxy: false
requestTraceLogs: false
steps:
receivelogs:
description: Receive logs from OTLP and New Relic proprietary sources
output:
- probabilistic_sampler/Logs
receivemetrics:
description: Receive metrics from OTLP and New Relic proprietary sources
output:
- filter/Metrics
receivetraces:
description: Receive traces from OTLP and New Relic proprietary sources
output:
- probabilistic_sampler/Traces
probabilistic_sampler/Logs:
description: Probabilistic sampling for all logs
output:
- filter/Logs
config:
rules:
- name: sample the log records for ruby test service
description: sample the log records for ruby test service with 70%
sampling_percentage: 70
source_of_randomness: trace.id
conditions:
- resource.attributes["service.name"] == "ruby-test-service"
default_sampling_percentage: 100
probabilistic_sampler/Traces:
description: Probabilistic sampling for traces
output:
- filter/Traces
config:
default_sampling_percentage: 100
filter/Logs:
description: Apply drop rules and data processing for logs
output:
- transform/Logs
config:
error_mode: ignore
rules:
- name: drop the log records
description: drop all records which has severity text INFO
conditions:
- log.severity_text == "INFO"
context: log
filter/Metrics:
description: Apply drop rules and data processing for metrics
output:
- transform/Metrics
config:
error_mode: ignore
rules:
- name: drop-internal-metrics
description: drop internal metric
conditions:
- IsMatch(name, "^internal\\.")
context: metric
- name: drop-debug-datapoints
description: drop-debug-datapoints
conditions:
- attributes["metric.type"] == "debug"
context: datapoint
filter/Traces:
description: Apply drop rules and data processing for traces
output:
- transform/Traces
config:
error_mode: ignore
rules:
- name: drop-health-endpoint
description: drop-health-endpoint
conditions:
- attributes["http.path"] == "/health"
context: span
- name: drop-debug-events
description: drop-debug-events
conditions:
- name == "debug_event"
context: span_event
transform/Logs:
description: Transform and process logs
output:
- nrexporter/newrelic
config:
rules:
- name: add new field to attribute
description: for otlp-test-service application add newrelic source type field
conditions:
- resource.attributes["service.name"] == "otlp-java-test-service"
statements:
- set(resource.attributes["source.type"],"otlp")
transform/Metrics:
description: Transform and process metrics
output:
- nrexporter/newrelic
config:
rules:
- name: adding a new attributes
description: adding a new field into a attributes
conditions:
- resource.attributes["service.name"] == "payments-api"
statements:
- set(resource.attributes["application.name"], "compute-application")
transform/Traces:
description: Transform and process traces
output:
- nrexporter/newrelic
config:
rules:
- name: remove the attribute
description: remove the attribute when service name is payment-service
conditions:
- resource.attributes["service.name"] == "payment-service"
statements:
- delete_key(resource.attributes, "service.version")
nrexporter/newrelic:
description: Export to New Relic

ヒント

Installation mode note: The version and autoscaling fields behavior depends on your fleet's installation mode:

  • With Flux: These fields are fully managed through the UI. Changes deploy automatically to all clusters in the fleet.
  • Without Flux: These fields can be set during initial installation to configure the Horizontal Pod Autoscaler (HPA). However, post-installation changes via the UI are ignored. Only the configuration.simplified/v2 section (pipeline rules) continues to deploy automatically via ConfigMap. You must manually update scaling via HPA and versions via Helm upgrades. Refer to Manage gateway without Flux for details.

トップレベルの構造

  • version: 設定形式のバージョン (現在"2.0.1")
  • autoscaling: ゲートウェイレプリカスケーリング設定
  • configuration.simplified/v2: テレメトリーパイプラインを定義するための簡素化された抽象化レイヤー
  • troubleshooting: デバッグ設定

設定階層

The gateway configuration follows a directed acyclic graph (DAG) structure where each step defines its behavior and points to the next step in the pipeline using the output field. This creates an explicit data flow: data enters through receivers, flows through processors (transform, filter, sample), and exits through exporters.

ステップの命名規則

  • 受信者: receivelogsreceivemetricsreceivetraces

  • プロセッサ: processortype/TelemetryType形式:

    • 変換: transform/Logstransform/Metricstransform/Traces
    • フィルター: filter/Logsfilter/Metricsfilter/Traces
    • サンプリング: probabilistic_sampler/Logsprobabilistic_sampler/Traces
  • 輸出業者: nrexporter

プロセッサーの設定

Gateway は、テレメトリー データの変換、フィルタリング、サンプリングのために 3 つの主要なプロセッサ タイプをサポートしています。

変換プロセッサ

OTTL (OpenTelemetry Transformation Language) を使用してテレメトリーを変更、拡充、または解析するために使用されます。

設定フィールド:

  • metric_statements: メトリクス変換の配列 (コンテキスト: メトリクス)
  • log_statements: ログ変換の配列 (コンテキスト: ログ)
  • trace_statements: トレース変換の配列 (コンテキスト: span)

フィルタープロセッサ

ブール式に基づいてテレメトリー レコードを削除するために使用されます。

設定フィールド:

  • ログ: ログ フィルタリング用の OTTL ブール式の配列
  • スパン: メトリクス/トレース フィルタリング用の OTTL ブール式の配列

サンプリングプロセッサ

確率的サンプリング ロジックを実装するために使用されます。

設定フィールド:

  • global_sampling_percentage: デフォルトのサンプリングレート(0~100)

  • conditionalSamplingRules: 条件付きルールの配列

    • 名前: ルール識別子
    • 説明: 人間が読める説明
    • サンプリング率: 一致したデータのサンプリング率 (0-100)
    • source_of_randomness: ランダム性に使用するフィールド (通常はトレース.id)
    • 条件: 属性一致式

フィールド参照

トップレベルフィールド

フィールドタイプ必須デフォルト
versionストリングはい-
自動スケーリング.minReplicas整数いいえ6
自動スケーリング.maxReplicas整数いいえ10
自動スケーリング.targetCPU使用率整数いいえ60
configuration.simplified/v2物体はい-
トラブルシューティング.プロキシブール値いいえfalse
トラブルシューティング.requestTraceLogsブール値いいえfalse

ヒント

Installation mode note: The version and autoscaling fields behavior depends on your fleet's installation mode:

  • With Flux: These fields are fully managed through the UI. Changes deploy automatically to all clusters in the fleet.
  • Without Flux: These fields can be set during initial installation to configure the Horizontal Pod Autoscaler (HPA). However, post-installation changes via the UI are ignored. Only the configuration.simplified/v2 section (pipeline rules) continues to deploy automatically via ConfigMap. You must manually update scaling via HPA and versions via Helm upgrades. Refer to Manage gateway without Flux for details.

ステップフィールド

フィールドタイプ必須説明
descriptionストリング推奨人間が読める説明
コンフィグ物体条件付き加工業者の場合は必須、受取人/輸出業者の場合は省略
出力アレイはい次のステップ名(エクスポーターの場合は空の[])

フィールドの命名規則

  • 例の大文字と小文字を正確に使用してください (YAML は大文字と小文字を区別します)。

各ステップの出力配列は次のステップを指定します。

検証とデプロイメント

  1. YAML リンターを使用して構文を検証します。
  2. まずは本番環境以外の環境へのデプロイ。
  3. テレメトリーがNew Relicに正しく到達することを確認します。
  4. ゲートウェイUIを通じて設定をアップロードします。

追加リソース

Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.