docs/REVIEWING.md
Pull request reviews are required before merging code into Vector. This document will outline Vector's pull request review requirements. The following checklist should be used for all pull requests:
For component changes, especially pull requests introducing new components, the following items should also be checked:
This checklist is specific for Vector's sources.
sinks::datadog::metrics::encoder::source_type_to_service),
which maps the source to the correct Service value, needs to be updated. If this source is an Agent role and thus is the true origin of it's
metrics, this will need to be a follow-up PR by a member of the Vector team.This checklist is specific for Vector's sinks.
use crate::sinks::prelude::*)?SinkConfig::build is the return from VectorSink::from_event_streamsink.mod.rs, config.rs, sink.rs, request_builder.rs, service.rscd website & make serve. Does it look good?cue file linking to base?/website/content/en/docs/reference/configuration/sinks/?mod.rs linking to any relevant areas in the external services documentation?We endeavour to review all PRs within 2 working days (Monday to Friday) of submission.
All changes should strive to retain backward compatibility. If a change breaks backward compatibility, it is much less likely to be approved. It is highly recommended you discuss this change with a Vector team member before investing development time.
Any deprecations should follow our deprecation policy.
If you have not, please review Vector's Code of Conduct to ensure reviews are welcoming, open, and respectful.
Dependencies should be carefully selected. Before adding a dependency, we should ask the following questions:
Documentation is incredibly important to Vector; it is a feature and differentiator for Vector. Pull requests should not be merged without adequate documentation, nor should they be merged with "TODOs" opened for documentation.
Ideally all modules should have module level documentation. Module level documentation can be omitted for modules where the purpose is obvious and covered by a general pattern. With the sinks there is typically a standard number of modules included (config.rs, request_builder.rs, service.rs, sink.rs, tests.rs), these modules don't need documentation as they will be covered with higher level documentation.
All pub and pub(crate) functions, structs and macros must have documentation.
Consider including examples for modules, structs, functions or macros that will be well used throughout Vector.
See the rustdoc book for more details on writing documentation.
Vector currently offers 2 methods for performance testing:
/benches folder.For new integrations, consider whether a new soak test should be added.
Changes in a pull request should address a single concern. This promotes quality reviews through focus. If a pull request addresses multiple concerns, it should be closed and followed up with multiple pull requests addresses each concern separately. If you are unsure about your change, please open an issue and the Vector maintainers will help guide you through the scope of the change.
Code is read more than it is written. Code must be documented and readable.
Unsafe code should be reviewed carefully and avoided if possible. If code is
marked as unsafe, a detailed comment should be added explaining why.
Security is incredibly important to Vector. Users rely on Vector ship mission-critical and sensitive data. Please review the code explicitly for security issues. See Vector's Security guide for more info.
Code should be reasonably tested. Vector does not require 100% test coverage. We believe this level of coverage is unnecessary. As a general rule of thumb, we strive for 80% coverage, beyond this returns are diminishing. Please use your best judgment, some code requires more testing than others depending on its importance.
For integrations, consider whether the code could be integration tested.