Skip to content
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

feat: Network Port templates #1231

Merged
merged 1 commit into from
Aug 26, 2022
Merged

feat: Network Port templates #1231

merged 1 commit into from
Aug 26, 2022

Conversation

rahulguptajss
Copy link
Contributor

Fixes #472

cmd/collectors/rest/rest.go Show resolved Hide resolved
@rahulguptajss rahulguptajss merged commit a39e5b6 into main Aug 26, 2022
@rahulguptajss rahulguptajss deleted the rg2-port-template branch August 26, 2022 16:19
@@ -443,7 +449,9 @@ func (r *Rest) HandleResults(result []gjson.Result, prop *prop, allowInstanceCre
}
count++
} else {
r.Logger.Warn().Str("Instance key", instanceKey).Str("label", label).Msg("Missing label value")
if !util.Contains(ignoreLabelMissingWarning, r.GetObject()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor but a map would be better than a list. On the other hand, this list only has one item so meh.
Doesn't this change suppress all labels warnings for NetPort?
If so, doesn't that make it easy to miss a mistyped label?
Can the bigger problem be solved by explicitly specifying the labels instead of using include_all_labels: true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, all label warnings for NetPort will be suppressed. include_all_labels: true is used in prometheus.go and not during the collector. A solution would be to parse schema and compare if label is mistyped. I'll open a story to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need more network port details to give Ethernet parity with FC
3 participants