-
Notifications
You must be signed in to change notification settings - Fork 537
feat: Expose otel subcommand and add user-facing documentation #5244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
dd91d85
Expose the OTel subcommand
blewis12 55c787b
Add docs for otel subcommand
blewis12 2a42c8b
Generate collector
blewis12 b828ae0
Update docs/sources/reference/cli/otel.md
blewis12 4e44f15
Point to OCB manifest to view component list, instead of embedded table
blewis12 45023f8
Mention otel subcommand is experimental in command list, change ordering
blewis12 f23e825
Separate out example to include Alloy Engine
blewis12 1f06e25
edit wording for the otel subcommand description
blewis12 14f3114
Update docs/sources/reference/cli/otel.md
blewis12 b515796
Update docs/sources/reference/cli/otel.md
blewis12 f8e91c5
Merge branch 'main' into expose-otel-subcommand-and-add-documentation
blewis12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| --- | ||
| canonical: https://grafana.com/docs/alloy/latest/reference/cli/otel/ | ||
| description: Learn about the otel command | ||
| labels: | ||
| stage: experimental | ||
| products: | ||
| - oss | ||
| title: otel | ||
| weight: 350 | ||
| --- | ||
|
|
||
| # `otel` | ||
|
|
||
| The `otel` command runs Grafana Alloy using the OpenTelemetry (OTel) Collector engine. This command accepts OpenTelemetry Collector YAML configuration files. | ||
|
|
||
| The Alloy OTel distribution includes receivers, processors, exporters, extensions, and connectors from the OpenTelemetry Collector core and contrib repositories. This includes components for OTLP, Prometheus, Kafka, Zipkin, and other popular integrations. | ||
|
|
||
| As with the `run` command, this runs in the foreground until an interrupt is received. | ||
|
|
||
| {{< admonition type="warning" >}} | ||
| Please note that this is an *experimental* feature and can therefore be subject to breaking changes or removal in future releases. | ||
| {{< /admonition >}} | ||
blewis12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Usage | ||
|
|
||
| ```shell | ||
| alloy otel --config=<CONFIG_FILE> [<FLAGS> ...] | ||
| ``` | ||
|
|
||
| Replace the following: | ||
|
|
||
| * _`<CONFIG_FILE>`_: Path to an OpenTelemetry Collector configuration file. | ||
| * _`<FLAGS>`_: One or more flags that configure the OpenTelemetry Collector. | ||
|
|
||
| ## Configuration | ||
|
|
||
| The `otel` command accepts standard OpenTelemetry Collector YAML configuration files. The configuration file defines receivers, processors, exporters, and other components that make up your telemetry pipeline. | ||
|
|
||
| For information about configuration options, refer to the [OpenTelemetry Collector documentation](https://opentelemetry.io/docs/collector/configuration/). | ||
|
|
||
| ### Optionally Running the Default Engine | ||
|
|
||
| The Alloy Collector Distro includes the option to run pipelines using the Default Engine alongside the OTel Engine using the built in Alloy Engine extension. More information on how to run the extension can be found [here](https://github.com/grafana/alloy/blob/main/extension/alloyengine/README.md) | ||
|
|
||
| This will run a Default Engine pipeline _in parallel_ to the OTel Engine pipeline - the two pipelines cannot natively interact. | ||
|
|
||
| ### Available Components | ||
|
|
||
| The included components are based off the upstream core distribution, in order to ensure that full end-to-end pipelines are accessible for most use cases. In addition to upstream components, we also integrate some of our own components that enable functionality to work well within the Alloy ecosystem. | ||
|
|
||
| To view the full list of components and their versioning, please refer to the [OCB manifest](https://github.com/grafana/alloy/blob/main/collector/builder-config.yaml) | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Running with OTel Engine only | ||
|
|
||
| This example runs the OTel Engine without the Alloy Engine extension: | ||
|
|
||
| ```shell | ||
| alloy otel --config=config.yaml | ||
| ``` | ||
|
|
||
| Example `config.yaml`: | ||
|
|
||
| ```yaml | ||
| receivers: | ||
| otlp: | ||
| protocols: | ||
| grpc: | ||
| endpoint: 0.0.0.0:4317 | ||
|
|
||
| processors: | ||
| batch: | ||
|
|
||
| exporters: | ||
| debug: | ||
|
|
||
| service: | ||
| pipelines: | ||
| traces: | ||
| receivers: [otlp] | ||
| processors: [batch] | ||
| exporters: [debug] | ||
| ``` | ||
|
|
||
| ### Running with OTel Engine and Alloy Engine extension | ||
|
|
||
| This example runs both the OTel Engine and the Alloy Engine extension in parallel: | ||
|
|
||
| ```shell | ||
| alloy otel --config=config.yaml | ||
| ``` | ||
|
|
||
| Example `config.yaml`: | ||
|
|
||
| ```yaml | ||
| extensions: | ||
| alloyengine: | ||
| config: | ||
| file: path/to/alloy-config.alloy | ||
| flags: | ||
| server.http.listen-addr: 0.0.0.0:12345 | ||
| stability.level: experimental | ||
|
|
||
| receivers: | ||
| otlp: | ||
| protocols: | ||
| grpc: | ||
| endpoint: 0.0.0.0:4317 | ||
|
|
||
| processors: | ||
| batch: | ||
|
|
||
| exporters: | ||
| debug: | ||
|
|
||
| service: | ||
| extensions: [alloyengine] | ||
| pipelines: | ||
| traces: | ||
| receivers: [otlp] | ||
| processors: [batch] | ||
| exporters: [debug] | ||
| ``` | ||
|
|
||
| ## Related documentation | ||
| * [OpenTelemetry Collector documentation](https://opentelemetry.io/docs/collector/): Official OpenTelemetry Collector documentation. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.