feat(new transform): add type filter transform#1998
feat(new transform): add type filter transform#1998lukesteensen wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
|
Interesting. I'm sure you have this in mind, but I'm curious if we could automatically filter input based on the supported types. For example: [sources.vector]
type = "vector"
[sinks.prom]
type = "prometheus"
inputs = ["vector"]
[sinks.stackdriver_logging]
type = "stackdriver_logging"
inputs = ["vector"]The Finally, I'm curious if this is better solved with the |
Yes, this is pretty much what I was alluding to. The basic problem right now is that we don't have a place to (1) see what type of input we'll be getting, and (2) do type-based filtering before events get to the transform implementation. I explored solutions to (1) a bit, and I think we could come up with something interesting by better integrating type checking into Also slightly tricky is (2), since it gets into the way our Both of those areas involve more design thinking about core parts of our model, so I wanted to get this out there are a building block first. We could also modify the |
|
It'd be nice to spare users from needing to add a We could consider setting a precedent here where any component with an output type That would allow us to do stuff like: [sources.foo]
type = "vector"
[transforms.bar]
inputs = ["foo.logs"]And I think is easy enough to document for all In the case of name collisions (a user actually adding a We could then go one step further and during Then the above config could go back to: [sources.foo]
type = "vector"
[transforms.bar]
inputs = ["foo"]This takes the burden off the user entirely, but also at the cost of implicitly dropping events. We could mitigate that by giving warning logs whenever an |
|
Just noting, I'd like to be involved in the final UX decisions this change introduces. |
This is an interesting idea. It'd slightly complicate cases where you wanted to go from an
Do we handle this with
This is what I'd really like, but runs into the issue that we don't currently have a place to do this kind of analysis and apply changes based on the results. It's essentially blocked on some larger rethink of our topology building. |
Meh, I'm not a big fan of this, specifically for the reason @lukesteensen mentioned. Going from
This is my preferred solution. I think this is a simple and clear UX. |
I agree, and this is exactly the type of thing we discussed needing some rework to our internal topology building. Given that we'll want to do some deeper changes, I'm going to close this for the time being. Once some other in-flight work is complete, we can revisit with a full RFC. |
Ref #421, #1153
This introduces a simple
type_filtertransform with the goal of unblocking sources that produce both logs and metrics. Previously, there was no way to go from anAny-typed input to aLogorMetric-typed component.Unfortunately, this doesn't yet allow us to mark the
vectorsource asAny-typed because this would be a breaking change (existing uses as aLogsource would become invalid). It's also not a great UX to require users to configure this transform explicitly.As a followup to this, I'm planning to introduce more functionality for "expanding" parts of the configured topology. We have some of this as part of swimlanes, but with the ability to take your input types into account we could automatically insert this transform where appropriate. I've been experimenting with different ways of doing that, and will run strategies by the team before committing to any particular implementation. If it turns out to be too complex for right now, we can fall back to just doing the breaking change to the
vectorsource's type and having users use this manually.