-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Starlark processor: Allow to manage errors that occur in the apply function #8354
Comments
This is a good idea. I think we could add some extra functions to help with this. Let me test out some ideas and get back to you |
How about we add an extra
Would that work for you? |
Yes, clearly, It would be good enough |
@ssoroka: What do you think about my proposal? How should the function be called? Do you want to or should I? :-) |
@essobedo: If you are up to putting together a PR that would be cool. I'm willing to review it if you don't mind. |
merged! I think we could do a little bit more in this area, I've added a couple more issues under the starlark label. I'm going to close this out as the original issue is resolved. |
@essobedo: I think |
@srebhan AFAIK It is not supported intentionally to keep it simple so I don't think they will accept it anyway google/skylark#125 |
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.
The text was updated successfully, but these errors were encountered: