nomad-vector-logger icon indicating copy to clipboard operation
nomad-vector-logger copied to clipboard

feat: add job type and parent job fields to allocation metadata

Open justmiles opened this issue 1 year ago • 1 comments

Hi @mr-karan,

First, thanks for taking the time to build this! I've found it to be quite useful.

I run a lot of batch jobs via Nomad and the logging sinks tend to lose the context of the job their in. Nomad batch jobs all have a parent job. This PR adds the JobType and ParentJob labels which will allow us to properly configure downstream sinks for batch jobs.

  • Added JobType and ParentJob fields to the AllocMeta struct in app.go
  • Added the job_type and parent_job_name fields to the vector.toml.tmpl file

justmiles avatar Jun 05 '24 18:06 justmiles

This is super useful, thanks a lot. Give me some time to locally test it and get back!

mr-karan avatar Jun 06 '24 03:06 mr-karan