Skip to content

Starlark processor: Allow to manage errors that occur in the apply function #8354

@essobedo

Description

@essobedo

Thanks to the Starlark processor, it is now possible to execute code written in Starlark language which is very cool. The problem is how to deal with errors that occur within the apply function. Indeed, for example if we want to parse a JSON content, and the JSON content is invalid. Up to now, we get an error in the logger of Telegraf while we would like to somehow catch the exception (which is not supported by the Starlark language) to add a field in my metric with an error message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions