You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I save values across multiple calls to the script?
Telegraf freezes the global scope, which prevents it from being modified.
Attempting to modify the global scope will fail with an error.
Suggest replacing this with:
A shared global dictionary named "state" exists, this can be used by the apply function.
See an example of this in plugins/processors/starlark/testdata/compare_metrics.star
Thanks
The text was updated successfully, but these errors were encountered:
@thatsafunnyname would you want to submit a PR for changes to the README?
sjwang90
added
docs
Issues related to Telegraf documentation and configuration descriptions
and removed
bug
unexpected problem or unintended behavior
labels
Feb 25, 2021
For influxdata#8907 . After influxdata#8447 , this common question in the Starlark Processor README.md should be updated to reflect the newly available shared state.
Hello and thanks for telegraf.
After #8447 , this common question in the Starlark Processor README.md should be updated to reflect the newly available shared state:
https://github.com/influxdata/telegraf/blame/8ddbab47a46e256281392ad0aac876715189c117/plugins/processors/starlark/README.md#L166
Suggest replacing this with:
A shared global dictionary named "state" exists, this can be used by the apply function.
See an example of this in
plugins/processors/starlark/testdata/compare_metrics.star
Thanks
The text was updated successfully, but these errors were encountered: