-
Notifications
You must be signed in to change notification settings - Fork 488
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
New otelcol.exporter.debug
component
#5867
Conversation
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.
Thank you for your contribution! I left a few comments. Would you mind also adding a couple of things please:
- Unit tests - they need to be in a debug_test.go file, similar to spanmetrics_test.go.
- A documentation page - it could be similar to otelcol.exporter.logging.md
Thank you for the review and suggestions @ptodev! Based on your comments, I felt that having an internal I've updated the PR with the following changes:
Let me know if there's anything else you'd like me to change here. I'm still working on the documentation part. I'll add it within the next couple of days, if that's okay? |
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.
Hi, thank you for the update! I don't think it's necessary to have a exporterArguments
though. It makes adding new arguments more inconvenient, since then we have to add them to both exporterArguments
and Arguments
it also makes it less clear how default value are applied, and could make the component a bit more slow due to extra copying.
I'll add it within the next couple of days, if that's okay?
Yes, of course, thank you!
@ptodev happy new year! Apologies for the delay in making the requested changes, I got caught up in other stuff over the holidays. I've now addressed all the review comments you left. In summary:
Please let me know if there are any other changes you'd like me to make. Thanks! |
Hi @BarunKGP! Happy new year, and apologies for the late reply! The code looks great, thank you! The only remaining task is to add a docs page similar to otelcol.exporter.logging.md. Would you be able to add it please? PS: There is a minor linter issue too. |
@ptodev I've created the doc, but what about the aliases section as in otelcol.exporter.logging.md? Should I remove it, or do we have any new aliases to include here? Also taking a look at the linter issue. I'll push my changes by this weekend. |
Thank you, the docs look good! It is best to retain the same aliases as
Thank you! I'll give it a final stamp of approval afterwards. It would be nice to rebase the branch with |
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.
Some doc input.
docs/sources/flow/reference/components/otelcol.exporter.debug.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.exporter.debug.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.exporter.debug.md
Outdated
Show resolved
Hide resolved
docs/sources/flow/reference/components/otelcol.exporter.debug.md
Outdated
Show resolved
Hide resolved
@clayton-cornell Thank you for the doc suggestions. I have accepted and incorporated all of them. @ptodev rebased the branch. Let me know if there's anything else I should take a look at :) |
@BarunKGP - The rebase must have gone wrong, because there are lots of changes in the PR now. |
@ptodev I've reverted this branch to its state prior to the rebase and added the doc changes to it. Upon investigating, it looks like I was incorporating suggestions from these comments onto my origin/main directly, which is why the two branches diverged. I'm thinking of creating a new branch with all my changes from here, while I force pull |
This is the way I normally rebase my feature branches:
If you'd like to clean up your branch in a more step-by-step basis, you can also do something like:
You could also just create a new branch off of main, apply your changes there, and then use |
I've added all the changes to the branch after rebasing. I've also updated the new components to the revised API for What should be the |
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.
Thank you for the update!
What should be the
Stability
for this however? I've left it asStabilityExperimental
for now.
"Experimental" is the right one, yes.
There is a linter error:
internal/component/otelcol/exporter/debug/debug.go:9: File is not `gofmt`-ed with `-s` (gofmt)
I also added a few minor comments. After they are resolved, I think it should be ok for merging.
docs/sources/flow/reference/components/otelcol.exporter.debug.md
Outdated
Show resolved
Hide resolved
@ptodev thank you for your time in reviewing the PR! I have accepted all suggestions and made the following changes addressing them:
Please let me know if there are any other areas I need to work on 😃 |
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.
Thank you very much! LGTM 🚀
@ptodev This one seems to have been missed... is it still valid? Does anything need to be moved to Alloy? |
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.
Docs are OK as-is
@ptodev There is a linting error (outside the docs) that I can't fix. Any ideas? |
@clayton-cornell I fixed it, no worries. Thank you for the review! I also opened a PR to add the component to Alloy. |
PR Description
Added a new
otelcol.exporter.debug
component based on the otelcol debugexporter.Which issue(s) this PR fixes
Fixes grafana/alloy#301
Notes to the Reviewer
otelcol.exporter
components, specifically theotelcol.exporter.logging
component (as debug exporter is replacing logging exporter).exporterArguments
type which is a wrapper overArguments
and maintains an implementation that is consistent withdebugexporter
.DebugMetrics
field fromArguments
struct. However, it couldn't be completely removed because the upstreamexporter.Argument
specifies this in its interface.Arguments.Verbosity
is now a string and can be set to a string (such as"detailed"
).exporterArguments
deals with the conversion intoconfigtelemetry.Level
typeConfig
is created fromArguments
and error is thrown when an invalidVerbosity
is passedPR Checklist