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(config): Update field labels for the rest of the sources and transforms fields #17564

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/vector-core/src/config/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl NoProxyInterceptor {
///
/// Configure to proxy traffic through an HTTP(S) proxy when making external requests.
///
/// Similar to common proxy configuration convention, users can set different proxies
/// Similar to common proxy configuration convention, you can set different proxies
/// to use based on the type of traffic being proxied, as well as set specific hosts that
/// should not be proxied.
#[configurable_component]
Expand Down
1 change: 1 addition & 0 deletions src/line_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub struct Config {
/// The maximum amount of time to wait for the next additional line, in milliseconds.
///
/// Once this timeout is reached, the buffered message is guaranteed to be flushed, even if incomplete.
#[configurable(metadata(docs::human_name = "Timeout"))]
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
pub timeout: Duration,
}

Expand Down
1 change: 1 addition & 0 deletions src/sources/aws_sqs/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub struct AwsSqsConfig {
#[serde(default = "default_poll_secs")]
#[derivative(Default(value = "default_poll_secs()"))]
#[configurable(metadata(docs::type_unit = "seconds"))]
#[configurable(metadata(docs::human_name = "Poll Wait Time"))]
pub poll_secs: u32,

/// The visibility timeout to use for messages, in seconds.
Expand Down
1 change: 1 addition & 0 deletions src/sources/docker_logs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ pub struct DockerLogsConfig {
/// The amount of time to wait before retrying after an error.
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[serde(default = "default_retry_backoff_secs")]
#[configurable(metadata(docs::human_name = "Retry Backoff"))]
retry_backoff_secs: Duration,

/// Multiline aggregation configuration.
Expand Down
1 change: 1 addition & 0 deletions src/sources/eventstoredb_metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub struct EventStoreDbConfig {
/// The interval between scrapes, in seconds.
#[serde(default = "default_scrape_interval_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
scrape_interval_secs: Duration,

/// Overrides the default namespace for the metrics emitted by the source.
Expand Down
3 changes: 2 additions & 1 deletion src/sources/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct ExecConfig {
#[configurable(derived)]
pub streaming: Option<StreamingConfig>,

/// The command to be run, plus any arguments required.
/// The command to run, plus any arguments required.
#[configurable(metadata(docs::examples = "echo", docs::examples = "Hello World!"))]
pub command: Vec<String>,

Expand Down Expand Up @@ -119,6 +119,7 @@ pub struct StreamingConfig {

/// The amount of time, in seconds, before rerunning a streaming command that exited.
#[serde(default = "default_respawn_interval_secs")]
#[configurable(metadata(docs::human_name = "Respawn Interval"))]
respawn_interval_secs: u64,
}

Expand Down
8 changes: 6 additions & 2 deletions src/sources/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ pub struct FileConfig {
#[serde(alias = "ignore_older", default)]
#[configurable(metadata(docs::type_unit = "seconds"))]
#[configurable(metadata(docs::examples = 600))]
#[configurable(metadata(docs::human_name = "Ignore Older Files"))]
pub ignore_older_secs: Option<u64>,

/// The maximum size of a line before it is discarded.
Expand Down Expand Up @@ -149,6 +150,7 @@ pub struct FileConfig {
/// [global_data_dir]: https://vector.dev/docs/reference/configuration/global-options/#data_dir
#[serde(default)]
#[configurable(metadata(docs::examples = "/var/local/lib/vector/"))]
#[configurable(metadata(docs::human_name = "Data Directory"))]
pub data_dir: Option<PathBuf>,

/// Enables adding the file offset to each event and sets the name of the log field used.
Expand All @@ -160,7 +162,7 @@ pub struct FileConfig {
#[configurable(metadata(docs::examples = "offset"))]
pub offset_key: Option<OptionalValuePath>,

/// Delay between file discovery calls.
/// The delay between file discovery calls.
///
/// This controls the interval at which files are searched. A higher value results in greater
/// chances of some short-lived files being missed between searches, but a lower value increases
Expand All @@ -171,6 +173,7 @@ pub struct FileConfig {
)]
#[serde_as(as = "serde_with::DurationMilliSeconds<u64>")]
#[configurable(metadata(docs::type_unit = "milliseconds"))]
#[configurable(metadata(docs::human_name = "Glob Minimum Cooldown"))]
pub glob_minimum_cooldown_ms: Duration,

#[configurable(derived)]
Expand Down Expand Up @@ -211,14 +214,15 @@ pub struct FileConfig {
#[serde(default)]
pub oldest_first: bool,

/// Timeout from reaching `EOF` after which the file is removed from the filesystem, unless new data is written in the meantime.
/// Timeout, in seconds, from reaching `EOF` after which the file is removed from the filesystem, unless new data is written in the meantime.
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
///
/// If not specified, files are not removed.
#[serde(alias = "remove_after", default)]
#[configurable(metadata(docs::type_unit = "seconds"))]
#[configurable(metadata(docs::examples = 0))]
#[configurable(metadata(docs::examples = 5))]
#[configurable(metadata(docs::examples = 60))]
#[configurable(metadata(docs::human_name = "Remove After"))]
maycmlee marked this conversation as resolved.
Show resolved Hide resolved
pub remove_after_secs: Option<u64>,

/// String sequence used to separate one file line from another.
Expand Down
1 change: 1 addition & 0 deletions src/sources/file_descriptors/file_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub struct FileDescriptorSourceConfig {

/// The file descriptor number to read from.
#[configurable(metadata(docs::examples = 10))]
#[configurable(metadata(docs::human_name = "File Descriptor Number"))]
pub fd: u32,

/// The namespace to use for logs. This overrides the global setting.
Expand Down
4 changes: 3 additions & 1 deletion src/sources/host_metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub struct HostMetricsConfig {
/// The interval between metric gathering, in seconds.
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[serde(default = "default_scrape_interval")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
pub scrape_interval_secs: Duration,

/// The list of host metric collector services to use.
Expand Down Expand Up @@ -136,7 +137,7 @@ pub struct HostMetricsConfig {
pub struct CGroupsConfig {
/// The number of levels of the cgroups hierarchy for which to report metrics.
///
/// A value of `1` means just the root or named cgroup.
/// A value of `1` means the root or named cgroup.
#[derivative(Default(value = "default_levels()"))]
#[serde(default = "default_levels")]
#[configurable(metadata(docs::examples = 1))]
Expand All @@ -157,6 +158,7 @@ pub struct CGroupsConfig {
/// Base cgroup directory, for testing use only
#[serde(skip_serializing)]
#[configurable(metadata(docs::hidden))]
#[configurable(metadata(docs::human_name = "Base Directory"))]
base_dir: Option<PathBuf>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/sources/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct SimpleHttpConfig {

/// The expected encoding of received data.
///
/// Note: For `json` and `ndjson` encodings, the fields of the JSON objects are output as separate fields.
/// For `json` and `ndjson` encodings, the fields of the JSON objects are output as separate fields.
#[serde(default)]
encoding: Option<Encoding>,

Expand Down
1 change: 1 addition & 0 deletions src/sources/internal_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct InternalMetricsConfig {
/// The interval between metric gathering, in seconds.
#[serde_as(as = "serde_with::DurationSeconds<f64>")]
#[serde(default = "default_scrape_interval")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
pub scrape_interval_secs: Duration,

#[configurable(derived)]
Expand Down
1 change: 1 addition & 0 deletions src/sources/journald.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pub struct JournaldConfig {
/// permissions to this directory.
#[serde(default)]
#[configurable(metadata(docs::examples = "/var/lib/vector"))]
#[configurable(metadata(docs::human_name = "Data Directory"))]
pub data_dir: Option<PathBuf>,

/// The systemd journal is read in batches, and a checkpoint is set at the end of each batch.
Expand Down
4 changes: 4 additions & 0 deletions src/sources/kubernetes_logs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub struct Config {
/// By default, the global `data_dir` option is used. Make sure the running user has write
/// permissions to this directory.
#[configurable(metadata(docs::examples = "/var/local/lib/vector/"))]
#[configurable(metadata(docs::human_name = "Data Directory"))]
data_dir: Option<PathBuf>,

#[configurable(derived)]
Expand All @@ -167,6 +168,7 @@ pub struct Config {
#[serde(default)]
#[configurable(metadata(docs::type_unit = "seconds"))]
#[configurable(metadata(docs::examples = 600))]
#[configurable(metadata(docs::human_name = "Ignore Older Files"))]
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
ignore_older_secs: Option<u64>,

/// Max amount of bytes to read from a single file before switching over
Expand Down Expand Up @@ -198,6 +200,7 @@ pub struct Config {
/// in the underlying file server, so setting it too low may introduce
/// a significant overhead.
#[serde_as(as = "serde_with::DurationMilliSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Glob Minimum Cooldown"))]
maycmlee marked this conversation as resolved.
Show resolved Hide resolved
glob_minimum_cooldown_ms: Duration,

/// Overrides the name of the log field used to add the ingestion timestamp to each event.
Expand Down Expand Up @@ -229,6 +232,7 @@ pub struct Config {
/// removed. If relevant metadata has been removed, the log is forwarded un-enriched and a
/// warning is emitted.
#[serde_as(as = "serde_with::DurationMilliSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Delay Deletion"))]
delay_deletion_ms: Duration,

/// The namespace to use for logs. This overrides the global setting.
Expand Down
1 change: 1 addition & 0 deletions src/sources/mongodb_metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pub struct MongoDbMetricsConfig {
/// The interval between scrapes, in seconds.
#[serde(default = "default_scrape_interval_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
scrape_interval_secs: Duration,

/// Overrides the default namespace for the metrics emitted by the source.
Expand Down
1 change: 1 addition & 0 deletions src/sources/nginx_metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pub struct NginxMetricsConfig {
/// The interval between scrapes.
#[serde(default = "default_scrape_interval_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
scrape_interval_secs: Duration,

/// Overrides the default namespace for the metrics emitted by the source.
Expand Down
1 change: 1 addition & 0 deletions src/sources/postgresql_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ pub struct PostgresqlMetricsConfig {
/// The interval between scrapes.
#[serde(default = "default_scrape_interval_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
scrape_interval_secs: Duration,

/// Overrides the default namespace for the metrics emitted by the source.
Expand Down
1 change: 1 addition & 0 deletions src/sources/socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub struct TcpConfig {
/// The timeout before a connection is forcefully closed during shutdown.
#[serde(default = "default_shutdown_timeout_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Shutdown Timeout"))]
shutdown_timeout_secs: Duration,

/// Overrides the name of the log field used to add the peer host to each event.
Expand Down
2 changes: 1 addition & 1 deletion src/sources/splunk_hec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub struct SplunkConfig {
#[configurable(deprecated = "This option has been deprecated, use `valid_tokens` instead.")]
token: Option<SensitiveString>,

/// Optional list of valid authorization tokens.
/// A list of valid authorization tokens.
///
/// If supplied, incoming requests must supply one of these tokens in the `Authorization` header, just as a client
/// would if it was communicating with the Splunk HEC endpoint directly.
Expand Down
1 change: 1 addition & 0 deletions src/sources/statsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ pub struct TcpConfig {
/// The timeout before a connection is forcefully closed during shutdown.
#[serde(default = "default_shutdown_timeout_secs")]
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Shutdown Timeout"))]
shutdown_timeout_secs: Duration,

/// The size of the receive buffer used for each connection.
Expand Down
2 changes: 1 addition & 1 deletion src/sources/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub enum Mode {

/// Unix file mode bits to be applied to the unix socket file as its designated file permissions.
///
/// Note: The file mode value can be specified in any numeric format supported by your configuration
/// The file mode value can be specified in any numeric format supported by your configuration
/// language, but it is most intuitive to use an octal number.
socket_file_mode: Option<u32>,
},
Expand Down
2 changes: 1 addition & 1 deletion src/sources/util/http/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use warp::http::HeaderMap;
))]
use super::error::ErrorMessage;

/// HTTP Basic authentication configuration.
/// HTTP basic authentication configuration.
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
#[configurable_component]
#[derive(Clone, Debug)]
pub struct HttpSourceAuthConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/sources/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::{
SourceSender,
};

/// Marker type for the version two of the configuration for the `vector` source.
/// Marker type for version two of the configuration for the `vector` source.
#[configurable_component]
#[derive(Clone, Debug)]
enum VectorConfigVersion {
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/lua/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct LuaConfigV1 {
config: v1::LuaConfig,
}

/// Marker type for the version two of the configuration for the `lua` transform.
/// Marker type for version two of the configuration for the `lua` transform.
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
#[configurable_component]
#[derive(Clone, Debug)]
enum V2 {
Expand Down
2 changes: 2 additions & 0 deletions src/transforms/lua/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub struct LuaConfig {
/// If not specified, the modules are looked up in the configuration directories.
#[serde(default = "default_config_paths")]
#[configurable(metadata(docs::examples = "/etc/vector/lua"))]
#[configurable(metadata(docs::human_name = "Search Directories"))]
search_dirs: Vec<PathBuf>,

#[configurable(derived)]
Expand Down Expand Up @@ -156,6 +157,7 @@ struct HooksConfig {
struct TimerConfig {
/// The interval to execute the handler, in seconds.
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
#[configurable(metadata(docs::human_name = "Interval"))]
interval_seconds: Duration,

/// The handler function which is called when the timer ticks.
Expand Down