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

fix(outputs.yandex_cloud_monitoring): catch int64 values #12156

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Nov 3, 2022

fixes: #12155

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Nov 3, 2022
Copy link
Contributor

@sspaink sspaink left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this so quickly!

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @powersj! One suggestion, but not a must.

// Write writes metrics to the remote endpoint
func (a *YandexCloudMonitoring) Write(metrics []telegraf.Metric) error {
var yandexCloudMonitoringMetrics []yandexCloudMonitoringMetric
for _, m := range metrics {
for _, field := range m.FieldList() {
value, err := setValue(field.Value)
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to use ToFloat64() of the internal package, but not a must.

Copy link
Contributor Author

@powersj powersj Nov 3, 2022

Choose a reason for hiding this comment

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

oh hey look at that! I'll use that. Thank you!

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Nov 3, 2022

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 4, 2022
@powersj powersj merged commit f2b49ce into influxdata:master Nov 7, 2022
@powersj powersj deleted the fix/12155 branch November 7, 2022 14:28
powersj added a commit that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: interface conversion: interface {} is int64, not float64
4 participants