-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add a collector flag to list available components. #5710
Conversation
CHANGELOG.md
Outdated
@@ -10,6 +10,7 @@ | |||
- Expose `pcommon.NewSliceFromRaw` function (#5679) | |||
- `loggingexporter`: create the exporter's logger from the service's logger (#5677) | |||
- Add `otelcol_exporter_queue_capacity` metrics show the collector's exporter queue capacity (#5475) | |||
- Add the Collector flag `--list-components` to show the available components. (#5709) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look like a flag to me, but like a subcommand (something like build-info
, components
or show-components
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh I thought about that, but it was more intrusive, and I didn't want to introduce a new thing that the collector wasn't already doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's likely we will eventually have subcommands, some other FRs also make sense as subcommands, like #5654 or #5223. But I agree that it's a significant addition, we may want to put this behind a feature gate to signal that we haven't yet fully figured out how the final design will look like.
Also this overlaps somewhat with what the |
Codecov ReportBase: 91.59% // Head: 91.62% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #5710 +/- ##
==========================================
+ Coverage 91.59% 91.62% +0.03%
==========================================
Files 217 217
Lines 13425 13477 +52
==========================================
+ Hits 12296 12348 +52
Misses 906 906
Partials 223 223
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Yeh, this probably makes sense in zpages. However, what I was looking for here is a quick way to see what I have in a collector binary. zpages makes more sense when I have a fleet of collectors. |
f4d6eb3
to
b96961c
Compare
Since we all agree that zpages is a must, let's do that and if we find out that is annoying for this case we can revisit. I feel that we are overthinking, let's start with what we know for sure is needed. |
I think that's a separate PR. It doesn't work for my use case, which is to check which components are in a binary. zpages might not be enabled in the build. To use the data I have to know that zpages is a thing and have read it's documentation, then configure and run the collector as a service and curl it, which is a lot more effort that I think is necessary, and not a good UX for people who are new to the ecosystem. |
@bogdandrutu so if I'm new to the otel ecosystem, I probably pull down a prebuilt collector binary. I start reading about how I need to configure receivers and exporters and all these optional components. The first thing I need to know is which components I have. IMHO zpages doesn't help this at all. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
not stale |
b96961c
to
9353eb9
Compare
I agree with @jpeach that a subcommand/flag is more useable for this use case. Zpages requires the collector to be running with a valid configuration (that includes the extension) and then you have to know how to use zpages to get to the endpoint that lists all the components. For a brand new user this is not a user-friendly. I believe that it is a better user experience to directly ask the collector "what components can I use" without first needing to pass it a valid config (which requires knowledge of what components can be used). Relying on Zpages also requires the binary to include the Zpages extension, which custom distributions may not include. If we really can't add a subcommand or another flag could we at least add the component list to the --help flag? |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
9353eb9
to
bdc1070
Compare
Rebased again. @open-telemetry/collector-approvers can we get consensus here? |
This has my vote. |
bdc1070
to
dbc3e57
Compare
Add a `--list-components` flag to the collector service. This currently show all the available components, their types and their signal stability levels. In future, we could also show the Go module and version, but that would require changes to the builder, so it's omitted for now. This fixes open-telemetry#5709. Signed-off-by: James Peach <jpeach@cloudflare.com>
dbc3e57
to
d699f93
Compare
@jpeach if we don't make progress on this in the next week I'll add this PR to the SIG meeting next Wednesday. |
@TylerHelmuth @jpeach @jpkrohling please provide exactly the commands/flags that you want to add:
|
Umm, that's in the patch and the description field for this PR?
Do you mean a flag that would let you list one type of component and not others? No, the behavior I'm proposing is what's in the PR.
What is this? If windows has collector components, then this would list them.
It's a flag, because the implementation is trivial and doesn't require a lot of refactoring or backwards compatibility. |
I think I already answered to this.
|
OK, sounds like we don't have consensus for this change. |
Not a strong preference, but as a user, I would prefer a flag like '--help' (as I see this as a specialization of '--help'). When looking at the binary, I know it's for running a collector, but before doing that, I might just want to check what's the version and which components it has. |
Description:
Add a
--list-components
flag to the collector service. This currentlyshow all the available components, their types and their signal stability
levels. In future, we could also show the Go module and version, but
that would require changes to the builder, so it's omitted for now.
Link to tracking Issue:
This fixes #5709.
Testing:
Just manual.
Documentation:
None. Visible in usage output.