Skip to content

Commit

Permalink
Correct Q+A about state (influxdata#8918)
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsafunnyname authored Mar 5, 2021
1 parent 858bcd4 commit 1b7f445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/processors/starlark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def apply(metric):

**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.
A shared global dictionary named `state` exists, this can be used by the `apply` function.
See an example of this in [compare with previous metric](/plugins/processors/starlark/testdata/compare_metrics.star)

**How to manage errors that occur in the apply function?**

Expand Down

0 comments on commit 1b7f445

Please sign in to comment.