Skip to content

Commit

Permalink
chore(config): Update field labels for the rest of the sources and tr…
Browse files Browse the repository at this point in the history
…ansforms fields (vectordotdev#17564)

This PR updates the rest of the sources and transforms' field labels
that needs a human_name label. Related to
vectordotdev#17517.

<!--
**Your PR title must conform to the conventional commit spec!**

  <type>(<scope>)!: <description>

  * `type` = chore, enhancement, feat, fix, docs
  * `!` = OPTIONAL: signals a breaking change
* `scope` = Optional when `type` is "chore" or "docs", available scopes
https://github.com/vectordotdev/vector/blob/master/.github/semantic.yml#L20
  * `description` = short description of the change

Examples:

  * enhancement(file source): Add `sort` option to sort discovered files
  * feat(new source): Initial `statsd` source
  * fix(file source): Fix a bug discovering new files
  * chore(external docs): Clarify `batch_size` option
-->

---------

Signed-off-by: Spencer Gilbert <spencer.gilbert@datadoghq.com>
Co-authored-by: Spencer Gilbert <spencer.gilbert@datadoghq.com>
  • Loading branch information
maycmlee and spencergilbert committed Jun 2, 2023
1 parent 134578d commit 6e45477
Show file tree
Hide file tree
Showing 33 changed files with 46 additions and 22 deletions.
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/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.
/// After reaching EOF, the number of seconds to wait before removing the file, unless new data is written.
///
/// 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 = "Wait Time Before Removing File"))]
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 Files Older Than"))]
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"))]
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/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.
#[configurable_component]
#[derive(Clone, Debug)]
enum V2 {
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/lua/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum BuildError {
InvalidLua { source: mlua::Error },
}

/// Configuration for the version one of the `lua` transform.
/// Configuration for version one of the `lua` transform.
#[configurable_component]
#[derive(Clone, Debug)]
#[serde(deny_unknown_fields)]
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
2 changes: 1 addition & 1 deletion website/cue/reference/components/base/sinks.cue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ base: components: sinks: configuration: {
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.
"""
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/components/base/sources.cue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ base: components: sources: configuration: proxy: {
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.
"""
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/components/sources/base/exec.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package metadata

base: components: sources: exec: configuration: {
command: {
description: "The command to be run, plus any arguments required."
description: "The command to run, plus any arguments required."
required: true
type: array: items: type: string: examples: ["echo", "Hello World!"]
}
Expand Down
4 changes: 2 additions & 2 deletions website/cue/reference/components/sources/base/file.cue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ base: components: sources: file: configuration: {
}
glob_minimum_cooldown_ms: {
description: """
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 Down Expand Up @@ -336,7 +336,7 @@ base: components: sources: file: configuration: {
}
remove_after_secs: {
description: """
Timeout from reaching `EOF` after which the file is removed from the filesystem, unless new data is written in the meantime.
After reaching EOF, the number of seconds to wait before removing the file, unless new data is written.
If not specified, files are not removed.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ base: components: sources: host_metrics: configuration: {
description: """
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.
"""
required: false
type: uint: {
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/components/sources/base/http.cue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ base: components: sources: http: configuration: {
description: """
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.
"""
required: false
type: string: enum: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ base: components: sources: http_server: configuration: {
description: """
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.
"""
required: false
type: string: enum: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ base: components: sources: splunk_hec: configuration: {
}
valid_tokens: {
description: """
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
2 changes: 1 addition & 1 deletion website/cue/reference/components/sources/base/syslog.cue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ base: components: sources: syslog: configuration: {
description: """
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.
"""
relevant_when: "mode = \"unix\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ base: components: transforms: aws_ec2_metadata: configuration: {
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.
"""
Expand Down

0 comments on commit 6e45477

Please sign in to comment.