From eaf3c4343603e818b5acb5ad1364a718551d9b8c Mon Sep 17 00:00:00 2001 From: Michal Pristas Date: Mon, 6 May 2024 13:54:56 +0200 Subject: [PATCH] Updated otel readme (#4674) * updated otel readme * Update internal/pkg/otel/README.md Co-authored-by: Pierre HILBERT * Update internal/pkg/otel/templates/README.md.tmpl Co-authored-by: Pierre HILBERT * Update internal/pkg/otel/templates/README.md.tmpl Co-authored-by: Pierre HILBERT * Update internal/pkg/otel/README.md Co-authored-by: Pierre HILBERT --------- Co-authored-by: Pierre HILBERT --- internal/pkg/otel/README.md | 14 +++++++++----- internal/pkg/otel/templates/README.md.tmpl | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/internal/pkg/otel/README.md b/internal/pkg/otel/README.md index 5911250af5e..4a09429bc63 100644 --- a/internal/pkg/otel/README.md +++ b/internal/pkg/otel/README.md @@ -8,15 +8,19 @@ To run the Elastic Distribution for OpenTelemetry Collector you can use Elastic- Running command ```bash -./elastic-agent -c otel.yml run +./elastic-agent otel --config otel.yml ``` -from unpacked Elastic Agent package will run Elastic-Agent as an OpenTelemetry Collector. The `-c` flag needs to point to [OpenTelemetry Collector Configuration file](https://opentelemetry.io/docs/collector/configuration/) named `otel`, `otlp` or `otelcol`. -Both `yaml` and `yml` suffixes are supported. +from unpacked Elastic Agent package will run Elastic-Agent as an OpenTelemetry Collector. The `--config` flag needs to point to [OpenTelemetry Collector Configuration file](https://opentelemetry.io/docs/collector/configuration/). OTel mode is available only using `otel` subcommand. Elastic Agent will not do any autodetection of configuration file passed when used without `otel` subcommand and will try to run normally. -> In case this condition is not met, Elastic Agent will run in its default mode and will not behave as OpenTelemetry Collector. -Note that `validate` subcommand and [feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#controlling-gates) are not supported yet. +To validate OTel configuration run `otel validate` subcommand: + +```bash +./elastic-agent otel validate --config otel.yml +``` + +[feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#controlling-gates) are supported using `--feature-gates` flag. ## Components diff --git a/internal/pkg/otel/templates/README.md.tmpl b/internal/pkg/otel/templates/README.md.tmpl index 0470c57a012..cbf17409f4a 100644 --- a/internal/pkg/otel/templates/README.md.tmpl +++ b/internal/pkg/otel/templates/README.md.tmpl @@ -8,15 +8,19 @@ To run the Elastic Distribution for OpenTelemetry Collector you can use Elastic- Running command ```bash -./elastic-agent -c otel.yml run +./elastic-agent otel --config otel.yml ``` -from unpacked Elastic Agent package will run Elastic-Agent as an OpenTelemetry Collector. The `-c` flag needs to point to [OpenTelemetry Collector Configuration file](https://opentelemetry.io/docs/collector/configuration/) named `otel`, `otlp` or `otelcol`. -Both `yaml` and `yml` suffixes are supported. +from unpacked Elastic Agent package will run Elastic-Agent as an OpenTelemetry Collector. The `--config` flag needs to point to [OpenTelemetry Collector Configuration file](https://opentelemetry.io/docs/collector/configuration/). OTel mode is available only using `otel` subcommand. Elastic Agent will not do any autodetection of configuration file passed when used without `otel` subcommand and will try to run normally. -> In case this condition is not met, Elastic Agent will run in its default mode and will not behave as OpenTelemetry Collector. -Note that `validate` subcommand and [feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#controlling-gates) are not supported yet. +To validate OTel configuration run `otel validate` subcommand: + +```bash +./elastic-agent otel validate --config otel.yml +``` + +[feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#controlling-gates) are supported using `--feature-gates` flag. ## Components