[][src]Function aw_transform::split_url_event

pub fn split_url_event(event: &mut Event)

Adds $protocol, $domain, $path and $params keys for events with an "url" key

But it only adds the generated field if it exists, for example if a url does not have a path the path value will not be set at all.

Example

This example is not tested
input:  {
          "data": {
            "url": "http://google.com/test"
          }
        }
output: {
          "data": {
            "$domain": "google.com",
            "$path": "/test",
            "$protocol": "http"
          }
        }