Skip to content

[feature request] path functions dirname and basename #1348

@shantanugadgil

Description

@shantanugadgil

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.

Based on the discussion at:
vectordotdev/vector#22657

Use Cases

Based on the discussion at vectordotdev/vector#22657 I want to be able to extract the "name only" part of a filename_with_extension. I want to use that extracted "only name" as a "service label" when forwarding the logs to Loki.

Hence I am requesting the path functions like dirname and basename

Attempted Solutions

The attempted solution is already at:
vectordotdev/vector#22657

Proposal

In addition to the simple basename/dirname functions, if there was a function to directly yield the "only file name" part, it could be even-more-awesome! 🙂

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureA value-adding code addition that introduce new functionality.vrl: stdlibChanges to the standard library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions