-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(outputs.timestream): Support ingesting multi-measures #11385
Conversation
Hi Lohith, thanks for the PR. Could you update the sample config to include the new settings? https://github.com/influxdata/telegraf/blob/master/docs/developers/SAMPLE_CONFIG.md#style Also update readme.md to describe how the settings are useful and maybe link to timestream documentation? |
Hey @lohithshetty, how does this code relate to the other two PRs (#11094 and #10952) with the exactly same PR title? Can we close those? |
Updated readme to include sample config for using multi-measure records
Hi reimda@, apologies for the delayed response. |
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.
Thanks for updateing the PR @lohithshetty! I have some minor comments in the code...
if t.SingleTableDimensionNameForTelegrafMeasurementName != "" { | ||
return fmt.Errorf("in '%s' mapping mode, do not specify SingleTableDimensionNameForTelegrafMeasurementName key", MappingModeMultiTable) | ||
} | ||
|
||
if t.UseMultiMeasureRecords && t.MeasureNameForMultiMeasureRecords == "" { | ||
return fmt.Errorf("in '%s' mapping mode, with multi-measure enabled, key MeasureNameForMultiMeasureRecords is required", MappingModeMultiTable) | ||
} |
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.
Why is this different from the code in lines 104 to 110?
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.
@srebhan
When ingesting in MappingModeSingleTable and UseMultiMeasureRecords is enabled, we use measurementName ( from line protocol ) as multiMeasure name in timestream, where as in MappingModeMultiTable mode ( data is ingested to multiple tables ) and UseMultiMeasureRecords is enabled, we ask for measureName(MeasureNameForMultiMeasureRecords) that needs to be used, this is due to the fact that measurementName(line protocol) is used as timestream table name. Hope that clarifies, Readme has some details about different combinations for these configs.
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.
@nirmeshk Please add any details I might have missed here.
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.
Fair enough. It would be good if you can add this explanation as a comment to the code...
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.
The comment is still missing.
@lohithshetty I think you did not push the changes yet, did you? Let me know once you are ready for another review round... |
@srebhan I pushed the changes, can you please take a look. Thank you. |
Hey @lohithshetty thanks for the push. This leaves us with the question on why lines 123 - 126 are different in structure... Can you please comment on this?! |
Hi @srebhan, would appreciate your help in reviewing and closing this PR. Thank you. |
@lohithshetty beside my comment, can you please run |
Update sample.conf to include new documentation, disabled failing test ( will re-visit with a follow up)
Hi @srebhan, Thanks for reviewing the pull request, I've made the changes as per your suggestion. Currently circle-ci failing for mac for plugin plugins/outputs/graylog ( not related to this pull request ). Appreciate merging this changes. Thank you. |
@srebhan Are we good to merge this change this week? |
moved lengthy documentation from toml to README.md
Linting errors
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.
Thanks @lohithshetty for the update! There are some small things here and there, but only formatting mostly. Can you please care for the comment documenting why the structure differs?
if t.SingleTableDimensionNameForTelegrafMeasurementName != "" { | ||
return fmt.Errorf("in '%s' mapping mode, do not specify SingleTableDimensionNameForTelegrafMeasurementName key", MappingModeMultiTable) | ||
} | ||
|
||
if t.UseMultiMeasureRecords && t.MeasureNameForMultiMeasureRecords == "" { | ||
return fmt.Errorf("in '%s' mapping mode, with multi-measure enabled, key MeasureNameForMultiMeasureRecords is required", MappingModeMultiTable) | ||
} |
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.
The comment is still missing.
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
linting
linting
linting
linting
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 🥳 This pull request decreases the Telegraf binary size by -1.60 % for linux amd64 (new size: 150.2 MB, nightly size 152.6 MB) 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Looks good to me. Thanks for your contribution @lohithshetty!
Is this released? tested with this tag telegraf:1.24.3 and seems like its not. |
Anything tagged a new "feature" is released in the next minor version. This should go out in v1.25.0 |
Fixes: #10493
Required for all PRs:
Feature: support ingesting multi-measures to timestream
The feature controlled using the use_multi_measure_records field which is set to false by default for backward compatibility.