Skip to content

Commit 6e45477

Browse files
chore(config): Update field labels for the rest of the sources and transforms 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>
1 parent 134578d commit 6e45477

33 files changed

Lines changed: 46 additions & 22 deletions

File tree

lib/vector-core/src/config/proxy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl NoProxyInterceptor {
4141
///
4242
/// Configure to proxy traffic through an HTTP(S) proxy when making external requests.
4343
///
44-
/// Similar to common proxy configuration convention, users can set different proxies
44+
/// Similar to common proxy configuration convention, you can set different proxies
4545
/// to use based on the type of traffic being proxied, as well as set specific hosts that
4646
/// should not be proxied.
4747
#[configurable_component]

src/sources/aws_sqs/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub struct AwsSqsConfig {
4545
#[serde(default = "default_poll_secs")]
4646
#[derivative(Default(value = "default_poll_secs()"))]
4747
#[configurable(metadata(docs::type_unit = "seconds"))]
48+
#[configurable(metadata(docs::human_name = "Poll Wait Time"))]
4849
pub poll_secs: u32,
4950

5051
/// The visibility timeout to use for messages, in seconds.

src/sources/docker_logs/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ pub struct DockerLogsConfig {
151151
/// The amount of time to wait before retrying after an error.
152152
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
153153
#[serde(default = "default_retry_backoff_secs")]
154+
#[configurable(metadata(docs::human_name = "Retry Backoff"))]
154155
retry_backoff_secs: Duration,
155156

156157
/// Multiline aggregation configuration.

src/sources/eventstoredb_metrics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub struct EventStoreDbConfig {
4141
/// The interval between scrapes, in seconds.
4242
#[serde(default = "default_scrape_interval_secs")]
4343
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
44+
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
4445
scrape_interval_secs: Duration,
4546

4647
/// Overrides the default namespace for the metrics emitted by the source.

src/sources/exec/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct ExecConfig {
5656
#[configurable(derived)]
5757
pub streaming: Option<StreamingConfig>,
5858

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

@@ -119,6 +119,7 @@ pub struct StreamingConfig {
119119

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

src/sources/file.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ pub struct FileConfig {
121121
#[serde(alias = "ignore_older", default)]
122122
#[configurable(metadata(docs::type_unit = "seconds"))]
123123
#[configurable(metadata(docs::examples = 600))]
124+
#[configurable(metadata(docs::human_name = "Ignore Older Files"))]
124125
pub ignore_older_secs: Option<u64>,
125126

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

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

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

176179
#[configurable(derived)]
@@ -211,14 +214,15 @@ pub struct FileConfig {
211214
#[serde(default)]
212215
pub oldest_first: bool,
213216

214-
/// Timeout from reaching `EOF` after which the file is removed from the filesystem, unless new data is written in the meantime.
217+
/// After reaching EOF, the number of seconds to wait before removing the file, unless new data is written.
215218
///
216219
/// If not specified, files are not removed.
217220
#[serde(alias = "remove_after", default)]
218221
#[configurable(metadata(docs::type_unit = "seconds"))]
219222
#[configurable(metadata(docs::examples = 0))]
220223
#[configurable(metadata(docs::examples = 5))]
221224
#[configurable(metadata(docs::examples = 60))]
225+
#[configurable(metadata(docs::human_name = "Wait Time Before Removing File"))]
222226
pub remove_after_secs: Option<u64>,
223227

224228
/// String sequence used to separate one file line from another.

src/sources/file_descriptors/file_descriptor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub struct FileDescriptorSourceConfig {
3838

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

4344
/// The namespace to use for logs. This overrides the global setting.

src/sources/host_metrics/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub struct HostMetricsConfig {
9393
/// The interval between metric gathering, in seconds.
9494
#[serde_as(as = "serde_with::DurationSeconds<u64>")]
9595
#[serde(default = "default_scrape_interval")]
96+
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
9697
pub scrape_interval_secs: Duration,
9798

9899
/// The list of host metric collector services to use.
@@ -136,7 +137,7 @@ pub struct HostMetricsConfig {
136137
pub struct CGroupsConfig {
137138
/// The number of levels of the cgroups hierarchy for which to report metrics.
138139
///
139-
/// A value of `1` means just the root or named cgroup.
140+
/// A value of `1` means the root or named cgroup.
140141
#[derivative(Default(value = "default_levels()"))]
141142
#[serde(default = "default_levels")]
142143
#[configurable(metadata(docs::examples = 1))]
@@ -157,6 +158,7 @@ pub struct CGroupsConfig {
157158
/// Base cgroup directory, for testing use only
158159
#[serde(skip_serializing)]
159160
#[configurable(metadata(docs::hidden))]
161+
#[configurable(metadata(docs::human_name = "Base Directory"))]
160162
base_dir: Option<PathBuf>,
161163
}
162164

src/sources/http_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub struct SimpleHttpConfig {
8181

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

src/sources/internal_metrics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub struct InternalMetricsConfig {
2828
/// The interval between metric gathering, in seconds.
2929
#[serde_as(as = "serde_with::DurationSeconds<f64>")]
3030
#[serde(default = "default_scrape_interval")]
31+
#[configurable(metadata(docs::human_name = "Scrape Interval"))]
3132
pub scrape_interval_secs: Duration,
3233

3334
#[configurable(derived)]

0 commit comments

Comments
 (0)