vector icon indicating copy to clipboard operation
vector copied to clipboard

Refactor field iterators to return `OwnedTargetPath`s

Open pront opened this issue 1 year ago • 2 comments

These functions live here:

  • https://github.com/vectordotdev/vector/blob/master/lib/vector-core/src/event/log_event.rs#L441
  • https://github.com/vectordotdev/vector/blob/master/lib/vector-core/src/event/util/log/all_fields.rs

This should eliminate unnecessary path editing like this.

pront avatar Aug 14 '24 21:08 pront

@pront I would like to work on this issue. I am new to Rust and the Vector project, but I am eager to learn and contribute. Could you please provide some guidance or point me to relevant resources to help me get started?

pramud avatar Aug 15 '24 05:08 pramud

Hi @pramud, thank you for your interest!

You can start by reading the https://github.com/vectordotdev/vector/blob/master/CONTRIBUTING.md guide.

Then you can look at the iterator functions here: https://github.com/vectordotdev/vector/blob/master/lib/vector-core/src/event/log_event.rs#L441.

Notice how they all define Item = (KeyString, &Value). This issue is about changing that KeyString type with an OwnedTargetPath type. The compiler should be able to guide you to all the places that need updating.

The low level implementation is here: https://github.com/vectordotdev/vector/blob/master/lib/vector-core/src/event/util/log/all_fields.rs

After all the code is updated, we need to ensure the changes didn't break code that is relying on these iterators.

Note: I will be away for a couple of weeks so I might not be responsive but feel free to ask more questions here.

pront avatar Aug 15 '24 14:08 pront

Hi @pramud, I am back. If you are still interesting in tackling this issue, I am happy to help.

pront avatar Sep 03 '24 15:09 pront

Hi, can i take on this issue ?

mahmudsudo avatar Oct 21 '24 16:10 mahmudsudo

Hi, can i take on this issue ?

Sure, you are welcome.

pront avatar Oct 22 '24 22:10 pront