Skip to content
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

Component's path information for custom plugins #46

Open
packman80 opened this issue Jul 2, 2024 · 2 comments
Open

Component's path information for custom plugins #46

packman80 opened this issue Jul 2, 2024 · 2 comments
Labels
configuration Any tasks or issues relating to Benthos configuration enhancement New feature or request

Comments

@packman80
Copy link

I've been working on developing a custom processor plugin for Benthos and encountered a scenario where accessing the component path information within the plugin would be incredibly useful. Specifically, I'm interested in retrieving the path similar to how it's represented in Benthos logs (e.g., processors.1.switch.1) for more contextual logging and processing within my plugin.

In a discussion with @Jeffail in Discord, it was suggested that this feature would require adding the component path information to the Resources type to be accessible by custom plugins.

P.S. issue moved from Connect repo

@packman80 packman80 changed the title Path information for custom plugins Component's path information for custom plugins Jul 2, 2024
@mihaitodor
Copy link
Collaborator

Hey @packman80 👋 I wonder if this new WalkedComponent API is of any use here. It has a Path field and, also, you can convert it to a JSON pointer via PathAsJSONPointer().

@mihaitodor mihaitodor added enhancement New feature or request configuration Any tasks or issues relating to Benthos configuration labels Aug 11, 2024
@packman80
Copy link
Author

@mihaitodor Thanks for answer and clue. Need to investigate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Any tasks or issues relating to Benthos configuration enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants