Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): Add helper function to add a semantic meaning to an event metadata #20439

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bruceg
Copy link
Member

@bruceg bruceg commented May 6, 2024

I noticed the pattern referenced in the comments while reviewing some new code, and wanted to add a helper to simplify using that pattern in future code. While doing so, I realized that, since the field may be immediately replaced by the same value, we could play games with unwrapping the Arc instead of cloning it to improve efficiency.

@bruceg bruceg added domain: schemas Anything related to internal Vector event schemas 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 labels May 6, 2024
@bruceg bruceg requested review from tobz and lukesteensen May 6, 2024 21:43
@bruceg bruceg requested a review from a team as a code owner May 6, 2024 21:43
@datadog-vectordotdev
Copy link

Datadog Report

Branch report: bruceg/add-schema-meaning-helper
Commit report: 967b189
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.38s Wall Time

@bruceg
Copy link
Member Author

bruceg commented May 9, 2024

As a side note, this article about unwind describes why we can't just replace the schema slot in the metadata and have to resort to the uninit data shenanigans.

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 domain: schemas Anything related to internal Vector event schemas 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.

None yet

1 participant