Skip to content

http sources should be able to customise the response sent back to clients #21013

@frankh

Description

@frankh

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Currently the HTTP source can only send empty response bodies, only the response code is customisable

There are many cases where returning some kind of info to clients is useful (for example, we assign all received events a "uuid" and would like to return those to clients)

Attempted Solutions

there is almost no way at all currently to return information in a response

the only work around is to have an http server side-car which processes the event but that removes a lot of the simplicity of using vector

Proposal

I would like to add a configuration option, response_body_key which would read a given field from the first event received and return it to clients on ack

Because this would execute after the decoding step, with vrl decoding this would enable a huge number of use-cases here without too much complexity

References

No response

Version

0.40.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions