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.
flow: Add otelcol.receiver.vcenter component #5715
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
flow: Add otelcol.receiver.vcenter component #5715
Changes from 3 commits
e3baf8e
12d8ccf
ae785aa
d9fe9f9
abfb48a
93fa7c2
5f2cf69
c708425
a346827
5cfef4c
84b75ee
04be039
6465d15
1de1406
a8aceca
a747885
63385ea
80876f9
33a62aa
cf803c9
ea66d8f
f3ea19e
fa17b65
65f7233
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Seems like "timeout" can be 0, whereas "collection interval" cannot? In that case the error message for timeout should be a bit different, to say the value should not be negative?
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'm not quite sure what this test is testing :) Maybe if we have a dummy http server which this receiver can connect to, we could test the receiver's outputs? This kind of test could be useful in the future if we want to reproduce issues. But I wouldn't say it's necessary. If you want to, I'm happy to leave the test as it is.
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.
For unmarshal tests, I personally prefer the table driven approach. It allows you to add lots of tests with minimal overhead.
For example, I'd use the
map[string]interface{}
style when some config structs are internal to OTel:https://github.com/grafana/agent/blob/main/component/otelcol/processor/span/span_test.go
If none of the config structs are internal, I'd go for specifying the OTel structs directly:
https://github.com/grafana/agent/blob/main/component/otelcol/connector/servicegraph/servicegraph_test.go
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.
Given that this address is only used for unmarshaling, it's unnecessary to look for a free address.