Skip to content

Conversation

@thomasqueirozb
Copy link
Contributor

Summary

Update to_alternative_components function signature from VRL and add interval_ms to mutable code path amongst other refactors that are now possible.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • The CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
      • ./scripts/check_changelog_fragments.sh
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run cargo vdev build licenses to regenerate the license inventory and commit the changes (if any). More details here.

References

@thomasqueirozb thomasqueirozb requested a review from a team as a code owner June 17, 2025 15:50
@github-actions github-actions bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Jun 17, 2025
.to_string())
}
let Some(paths) = path.to_alternative_components(MAX_METRIC_PATH_DEPTH) else {
return Ok(None);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before it'd return vec![] on the effective None case and therefore the for loop would never run and would eventually return Ok(None);. This just makes it more explicit + the comment was very misleading

| ["tags", _]
| ["namespace"]
| ["timestamp"]
| ["interval_ms"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing, feature was working without this so not sure how critical it is

@thomasqueirozb thomasqueirozb requested a review from pront June 17, 2025 15:55
@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Jun 17, 2025
@thomasqueirozb thomasqueirozb changed the title refactor(core): use latest VRL and update function signature chore(core): use latest VRL and update function signature Jun 17, 2025
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Jun 17, 2025

Datadog Report

Branch report: update-vrl-to-alternative-components
Commit report: ddc43af
Test service: vector

✅ 0 Failed, 10 Passed, 0 Skipped, 25.26s Total Time

Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat change, thanks!

@pront
Copy link
Member

pront commented Jun 17, 2025

Did you have a chance to manually verify by running a config (similar to what you did for the interval_ms change)?

@thomasqueirozb
Copy link
Contributor Author

Did you have a chance to manually verify by running a config (similar to what you did for the interval_ms change)?

Yes, behavior seems to be the same as in master

@thomasqueirozb thomasqueirozb added this pull request to the merge queue Jun 17, 2025
Merged via the queue into master with commit 2f71bb7 Jun 17, 2025
74 checks passed
@thomasqueirozb thomasqueirozb deleted the update-vrl-to-alternative-components branch June 17, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants