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

Set message timestamp to the metric time in kafka output #6746

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

danielnelson
Copy link
Contributor

closes #6696

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Dec 3, 2019
@danielnelson danielnelson added this to the 1.13.0 milestone Dec 3, 2019
@@ -316,13 +318,14 @@ func (k *Kafka) Write(metrics []telegraf.Metric) error {
for _, metric := range metrics {
buf, err := k.serializer.Serialize(metric)
if err != nil {
log.Printf("D! [outputs.kafka] Could not serialize metric: %v", err)
k.Log.Debugf("Could not serialize metric: %v", err)

Choose a reason for hiding this comment

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

I think it's more like error than debug information. Because it's about data loss, and not about "how and where?". It's my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No change is made here to the level, so I think we can handle this in a separate issue. I think it may have been added at some point due to metrics without fields, need to do some research on the history.

@danielnelson danielnelson merged commit 317c823 into master Dec 3, 2019
@danielnelson danielnelson deleted the kafka-output-timestamp branch December 3, 2019 19:48
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka output with Timestamp
2 participants