-
Notifications
You must be signed in to change notification settings - Fork 219
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
proposal: Add inspect
stage to loki.process
#503
Comments
👍 I'm in favor of this. What should the behavior be if a user has two inspect stages in the same component? |
Side-tangent: a few weeks ago I was considering the possibility of a component called
Then, one could change the values of variables using the API:
The UI could show a special view for debug.variables which would allow changing the values for variables within the UI itself (and showing the current values). I think a component like this provides some basic level of remote configuration that would be helpful specifically for debugging without having to update the config file. |
One idea is to have the
I like it 👍 People can already do that today by making use of a One thing we'll have to consider is what types of values will be allowed, is that only basic River types? Would the following be valid?
|
Yeah, I think only basic river types would be valid, and they'd have to use a boolean with an if statement (#2638) to switch where data gets sent at runtime. But I also don't want to derail your issue with my proposal :) I'll create a separate issue for it today. |
Moving the debug.variables discussion to grafana/agent#2772 to avoid derailing this too much.
Sure, SGTM 👍 |
Another option could be to use the stream debugging feature: grafana/agent#6045 |
I created an issue to add live debugging support for the loki.process component. It should be able to provide insights on every stage without having to modify the pipeline. |
Promtail's pipeline stages have been historically hard to debug; especially for pipelines that heavily depend on the extracted map of values, conditionally apply to only a subset of entries, or make use of more complex features such as templating. Flow's rendition of pipeline_stages in the
loki.process
component suffer from the same underlying issues.I'd like to suggest that we introduce an
inspect
pass-through stage that does not alter incoming log entries or the shared extracted map.The stage will make use of a LogQL stream selector and a sampling fraction to determine which log entries should be inspected. For entries selected for inspection, the stage would collect the log content, labels and the values in the shared extracted map and either log them, or append them to the parent
loki.process
component's DebugInfo.So, given a user who's trying to understand what's going on in the following pipeline, they should be able to insert the
inspect
stage in any step of the process, reload the Flow config and be able to gain some understanding on how their processing stages work.The text was updated successfully, but these errors were encountered: