Add TypedExtensionConfig type to tap filter output sink
Title: Add TypedExtensionConfig as a new output sink type to enable extensions to write their own sinks for tap output
Description: Currently, the only possible output sinks are an admin endpoint or to the file system. Adding a TypedExtensionConfig will allow Envoy extensions to write custom output sink types for additional protocols and endpoints.
Relevant Links: I have a work in progress pull request. However, before sinking too much time into this, I would like to hear back from the Envoy team and get a better idea of whether this change is something that they would like to merge.
Seems reasonable CC @mattklein123
@ashishb-solo This looks great! Can you provide a custom sink extension for example? Thanks!
@ashishb-solo which custom output sink type do you used for your test? would you share a example? thanks Cliff
I would also like to see an example for this.
@sjtuzbk @coolg92003 @3goats thanks for all your comments - I'm really happy to hear that there's so much interest in this feature! I don't have a working example of a tap filter at the moment, but for now, I would look at the test config for an example of what the Envoy configuration would look like. I'll try my best to find some time to post a more comprehensive example at some point in the future. In the mean time, I'm closing this since #28808 has been merged
Hi @ashishb-solo, CC to @3goats @sjtuzbk thanks in advance! one quick question, when I try to config as below, there is as below exception: [2023-11-01 02:29:40.725][23][critical][main] [source/exe/terminate_handler.cc:30] std::terminate called! Uncaught EnvoyException 'Didn't find a registered implementation for 'custom_sink' with type URL: 'google.protobuf.StringValue'', see trace.
174 const std::string tap_config_yaml = 175 R"EOF( 176 match: 177 any_match: true 178 output_config: 179 sinks: 180 - format: PROTO_BINARY 181 custom_sink: 182 name: custom_sink 183 typed_config: 184 "@type": type.googleapis.cm/google.protobuf.StringValue 185 )EOF"; Therefore, what is the valid url if "type.googleapis.cm/google.protobuf.StringValue" isn't?
thanks Cliff
There's a typo in there - the o in .com is missing.
I should note that in order to get a working example working, you would have to implement the createSinkPtr interface defined here. The StringValue interface that I used in the test would not implement that so you would likely get some sort of runtime or configuration-time error if you use this code.
Implementing this interface is a bit non-trivial, hence why I haven't gotten around to posting an example yet. Apologies for the delay, but it's most certainly on my todo-list.
Hi @ashishb-solo , Really appreciate your reply! Look forward to your post.
thanks again! Cliff
Hi @ashishb-solo , Did you get a chance on this? Recently, when we use Tap to do call trace, however, it found there was seriously performance issue. Main thread would be veryvery busy there if there were lots of HTTP message were traced, check below link: https://github.com/envoyproxy/envoy/issues/32068
From our investigation, there is Not short solution for this. Therefore, want to check you whether your solution can solve this issue if there is no code changes.
thanks Cliff
Anyone got an example for this ? I haven't seen an example of using a custom_sink anywhere