1use serde_json::json;
2use strum::{AsRefStr, Display, EnumIter};
3use vector_config::configurable_component;
4
5use super::metric_tags::{
6 COMPONENT_RECEIVED_EVENTS_TAGS, COMPONENT_RECEIVED_EVENTS_TOTAL_TAGS, COMPONENT_TAGS,
7 COMPONENT_TAGS_ERROR_TYPE_STAGE, COMPONENT_TAGS_GRPC_ALL, COMPONENT_TAGS_GRPC_METHOD_SERVICE,
8 COMPONENT_TAGS_HTTP_ALL, COMPONENT_TAGS_HTTP_ERROR_KIND, COMPONENT_TAGS_HTTP_METHOD,
9 COMPONENT_TAGS_HTTP_METHOD_PATH, COMPONENT_TAGS_HTTP_STATUS, COMPONENT_TAGS_OUTPUT,
10 INTERNAL_METRICS_TAGS, INTERNAL_METRICS_TAGS_FILE, INTERNAL_METRICS_TAGS_REASON,
11 S3_OBJECT_PROCESSING_TAGS, merge_lazy,
12};
13
14#[configurable_component]
16#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, AsRefStr, EnumIter)]
17#[serde(rename_all = "snake_case")]
18#[strum(serialize_all = "snake_case")]
19pub enum CounterName {
20 #[configurable(metadata(docs::tags = &*COMPONENT_RECEIVED_EVENTS_TOTAL_TAGS))]
23 ComponentReceivedEventsTotal,
24
25 #[configurable(metadata(docs::tags = &*COMPONENT_RECEIVED_EVENTS_TAGS))]
28 ComponentReceivedEventBytesTotal,
29
30 #[configurable(metadata(docs::tags = &*COMPONENT_RECEIVED_EVENTS_TAGS))]
32 ComponentReceivedBytesTotal,
33
34 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
36 ComponentSentEventsTotal,
37
38 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
40 ComponentSentEventBytesTotal,
41
42 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
44 "endpoint": {"description": "The endpoint to which the bytes were sent. For HTTP, this will be the host and path only, excluding the query string.", "required": false},
45 "file": {"description": "The absolute path of the destination file.", "required": false},
46 "protocol": {"description": "The protocol used to send the bytes.", "required": true},
47 "region": {"description": "The AWS region name to which the bytes were sent. In some configurations, this may be a literal hostname.", "required": false}
48 }))))]
49 ComponentSentBytesTotal,
50
51 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
53 "intentional": {"description": "True if the events were discarded intentionally, like a `filter` transform, or false if due to an error.", "required": true}
54 }))))]
55 ComponentDiscardedEventsTotal,
56
57 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_ERROR_TYPE_STAGE))]
59 ComponentErrorsTotal,
60
61 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
63 ComponentTimedOutEventsTotal,
64
65 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
67 ComponentTimedOutRequestsTotal,
68
69 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
71 BufferReceivedEventsTotal,
72
73 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
75 BufferReceivedBytesTotal,
76
77 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
79 BufferSentEventsTotal,
80
81 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
83 BufferSentBytesTotal,
84
85 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
87 BufferDiscardedEventsTotal,
88
89 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
91 BufferDiscardedBytesTotal,
92
93 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
95 BufferErrorsTotal,
96
97 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
100 AggregateEventsRecordedTotal,
101
102 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
104 AggregateFailedUpdates,
105
106 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
108 AggregateFlushesTotal,
109
110 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
112 ApiStartedTotal,
113
114 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
116 CheckpointsTotal,
117
118 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_FILE))]
120 ChecksumErrorsTotal,
121
122 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
124 CollectCompletedTotal,
125
126 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
128 CommandExecutedTotal,
129
130 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
132 ConnectionEstablishedTotal,
133
134 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
136 ConnectionSendErrorsTotal,
137
138 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
140 ConnectionShutdownTotal,
141
142 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
144 ContainerProcessedEventsTotal,
145
146 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
148 ContainersUnwatchedTotal,
149
150 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
152 ContainersWatchedTotal,
153
154 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
156 DecoderBomRemovalsTotal,
157
158 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
160 DecoderMalformedReplacementWarningsTotal,
161
162 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
164 DorisBytesLoadedTotal,
165
166 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
168 DorisRowsFilteredTotal,
169
170 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
172 DorisRowsLoadedTotal,
173
174 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
176 EncoderUnmappableReplacementWarningsTotal,
177
178 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_REASON))]
180 EventsDiscardedTotal,
181
182 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_FILE))]
184 FilesAddedTotal,
185
186 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_FILE))]
188 FilesDeletedTotal,
189
190 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_FILE))]
192 FilesResumedTotal,
193
194 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_FILE))]
196 FilesUnwatchedTotal,
197
198 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_GRPC_METHOD_SERVICE))]
200 GrpcServerMessagesReceivedTotal,
201
202 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_GRPC_ALL))]
204 GrpcServerMessagesSentTotal,
205
206 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_ERROR_KIND))]
208 HttpClientErrorsTotal,
209
210 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_METHOD))]
212 HttpClientRequestsSentTotal,
213
214 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_STATUS))]
216 HttpClientResponsesTotal,
217
218 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_METHOD_PATH))]
220 HttpServerRequestsReceivedTotal,
221
222 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_ALL))]
224 HttpServerResponsesSentTotal,
225
226 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
228 KafkaConsumedMessagesBytesTotal,
229
230 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
232 KafkaConsumedMessagesTotal,
233
234 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
236 KafkaProducedMessagesBytesTotal,
237
238 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
240 KafkaProducedMessagesTotal,
241
242 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
244 KafkaRequestsBytesTotal,
245
246 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
248 KafkaRequestsTotal,
249
250 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
252 KafkaResponsesBytesTotal,
253
254 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
256 KafkaResponsesTotal,
257
258 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
260 MetadataRefreshFailedTotal,
261
262 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
264 MetadataRefreshSuccessfulTotal,
265
266 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
268 ParseErrorsTotal,
269
270 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
272 QuitTotal,
273
274 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
276 ReloadedTotal,
277
278 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
280 RewrittenTimestampEventsTotal,
281
282 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
284 SqsMessageDeferSucceededTotal,
285
286 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
288 SqsMessageDeleteSucceededTotal,
289
290 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
292 SqsMessageProcessingSucceededTotal,
293
294 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
296 SqsMessageReceiveSucceededTotal,
297
298 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
300 SqsMessageReceivedMessagesTotal,
301
302 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
304 StaleEventsFlushedTotal,
305
306 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
308 StartedTotal,
309
310 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
312 StoppedTotal,
313
314 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
316 TagCardinalityUntrackedEventsTotal,
317
318 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
324 "metric_name": {"description": "The name of the metric whose tag value limit was exceeded. Only present when `internal_metrics.include_extended_tags` is enabled.", "required": false},
325 "tag_key": {"description": "The key of the tag whose value limit was exceeded. Only present when `internal_metrics.include_extended_tags` is enabled.", "required": false}
326 }))))]
327 TagValueLimitExceededTotal,
328
329 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
332 ValueLimitReachedTotal,
333
334 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
336 WebsocketBytesSentTotal,
337
338 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
340 WebsocketMessagesSentTotal,
341
342 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
344 WindowsServiceInstallTotal,
345
346 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
348 WindowsServiceRestartTotal,
349
350 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
352 WindowsServiceStartTotal,
353
354 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
356 WindowsServiceStopTotal,
357
358 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
360 WindowsServiceUninstallTotal,
361
362 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
364 K8sEventNamespaceAnnotationFailuresTotal,
365
366 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
368 K8sEventNodeAnnotationFailuresTotal,
369
370 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
372 K8sFormatPickerEdgeCasesTotal,
373
374 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
376 K8sDockerFormatParseFailuresTotal,
377
378 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
380 "ignore_type": {
381 "description": "The reason for ignoring the S3 record",
382 "required": true,
383 "enum": {"invalid_event_kind": "The kind of invalid event."}
384 }
385 }))))]
386 SqsS3EventRecordIgnoredTotal,
387
388 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
390 ComponentAllocatedBytesTotal,
391
392 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
394 ComponentDeallocatedBytesTotal,
395
396 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
398 MemoryEnrichmentTableFailedInsertions,
399
400 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
402 MemoryEnrichmentTableFailedReads,
403
404 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
406 MemoryEnrichmentTableFlushesTotal,
407
408 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
410 MemoryEnrichmentTableInsertionsTotal,
411
412 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
414 MemoryEnrichmentTableReadsTotal,
415
416 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
418 MemoryEnrichmentTableTtlExpirations,
419
420 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
422 "mode": {"description": "The connection mode used by the component.", "required": true, "enum": {"udp": "User Datagram Protocol"}}
423 }))))]
424 ConnectionReadErrorsTotal,
425
426 #[configurable(metadata(docs::tags = "{}"))]
428 InternalMetricsCardinalityTotal,
429
430 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS_REASON))]
432 ConfigReloadRejected,
433
434 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
436 "mode": {"description": "The connection mode used by the component.", "required": true, "enum": {"udp": "User Datagram Protocol"}}
437 }))))]
438 Utf8ConvertErrorsTotal,
439}
440
441#[configurable_component]
443#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, AsRefStr, EnumIter)]
444#[serde(rename_all = "snake_case")]
445#[strum(serialize_all = "snake_case")]
446pub enum HistogramName {
447 #[configurable(metadata(docs::tags = &*COMPONENT_RECEIVED_EVENTS_TAGS))]
452 ComponentReceivedEventsCount,
453
454 #[configurable(metadata(docs::tags = &*COMPONENT_RECEIVED_EVENTS_TAGS))]
456 ComponentReceivedBytes,
457
458 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
460 BufferSendDurationSeconds,
461
462 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
467 ComponentLatencySeconds,
468
469 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
471 SourceLagTimeSeconds,
472
473 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
475 SourceSendLatencySeconds,
476
477 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
479 SourceSendBatchLatencySeconds,
480
481 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
483 AdaptiveConcurrencyAveragedRtt,
484
485 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
487 AdaptiveConcurrencyBackPressure,
488
489 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
491 AdaptiveConcurrencyInFlight,
492
493 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
495 AdaptiveConcurrencyLimit,
496
497 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
499 AdaptiveConcurrencyObservedRtt,
500
501 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
503 AdaptiveConcurrencyPastRttMean,
504
505 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
507 AdaptiveConcurrencyReachedLimit,
508
509 #[configurable(metadata(docs::tags = &*S3_OBJECT_PROCESSING_TAGS))]
511 S3ObjectProcessingSucceededDurationSeconds,
512
513 #[configurable(metadata(docs::tags = &*S3_OBJECT_PROCESSING_TAGS))]
515 S3ObjectProcessingFailedDurationSeconds,
516
517 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
519 CollectDurationSeconds,
520
521 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
523 CommandExecutionDurationSeconds,
524
525 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_GRPC_ALL))]
527 GrpcServerHandlerDurationSeconds,
528
529 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_ALL))]
531 HttpServerHandlerDurationSeconds,
532
533 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
535 HttpClientRttSeconds,
536
537 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_STATUS))]
539 HttpClientResponseRttSeconds,
540
541 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_HTTP_ERROR_KIND))]
543 HttpClientErrorRttSeconds,
544
545 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
547 SourceBufferUtilization,
548
549 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
551 TransformBufferUtilization,
552}
553
554impl HistogramName {
555 #[must_use]
556 pub const fn as_str(self) -> &'static str {
557 match self {
558 Self::ComponentReceivedEventsCount => "component_received_events_count",
559 Self::ComponentReceivedBytes => "component_received_bytes",
560 Self::BufferSendDurationSeconds => "buffer_send_duration_seconds",
561 Self::ComponentLatencySeconds => "component_latency_seconds",
562 Self::SourceLagTimeSeconds => "source_lag_time_seconds",
563 Self::SourceSendLatencySeconds => "source_send_latency_seconds",
564 Self::SourceSendBatchLatencySeconds => "source_send_batch_latency_seconds",
565 Self::AdaptiveConcurrencyAveragedRtt => "adaptive_concurrency_averaged_rtt",
566 Self::AdaptiveConcurrencyBackPressure => "adaptive_concurrency_back_pressure",
567 Self::AdaptiveConcurrencyInFlight => "adaptive_concurrency_in_flight",
568 Self::AdaptiveConcurrencyLimit => "adaptive_concurrency_limit",
569 Self::AdaptiveConcurrencyObservedRtt => "adaptive_concurrency_observed_rtt",
570 Self::AdaptiveConcurrencyPastRttMean => "adaptive_concurrency_past_rtt_mean",
571 Self::AdaptiveConcurrencyReachedLimit => "adaptive_concurrency_reached_limit",
572 Self::S3ObjectProcessingSucceededDurationSeconds => {
573 "s3_object_processing_succeeded_duration_seconds"
574 }
575 Self::S3ObjectProcessingFailedDurationSeconds => {
576 "s3_object_processing_failed_duration_seconds"
577 }
578 Self::CollectDurationSeconds => "collect_duration_seconds",
579 Self::CommandExecutionDurationSeconds => "command_execution_duration_seconds",
580 Self::GrpcServerHandlerDurationSeconds => "grpc_server_handler_duration_seconds",
581 Self::HttpServerHandlerDurationSeconds => "http_server_handler_duration_seconds",
582 Self::HttpClientRttSeconds => "http_client_rtt_seconds",
583 Self::HttpClientResponseRttSeconds => "http_client_response_rtt_seconds",
584 Self::HttpClientErrorRttSeconds => "http_client_error_rtt_seconds",
585 Self::SourceBufferUtilization => "source_buffer_utilization",
586 Self::TransformBufferUtilization => "transform_buffer_utilization",
587 }
588 }
589}
590
591#[configurable_component]
593#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, AsRefStr, EnumIter)]
594#[serde(rename_all = "snake_case")]
595#[strum(serialize_all = "snake_case")]
596pub enum GaugeName {
597 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
603 ComponentLatencyMeanSeconds,
604
605 #[configurable(
607 deprecated = "This metric has been deprecated in favor of [`source_buffer_max_size_events`](#source_buffer_max_size_events)."
608 )]
609 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
610 SourceBufferMaxEventSize,
611
612 #[configurable(
614 deprecated = "This metric has been deprecated in favor of [`source_buffer_max_size_bytes`](#source_buffer_max_size_bytes)."
615 )]
616 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
617 SourceBufferMaxByteSize,
618
619 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
621 SourceBufferMaxSizeEvents,
622
623 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
625 SourceBufferMaxSizeBytes,
626
627 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
629 SourceBufferUtilizationLevel,
630
631 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
633 SourceBufferUtilizationMean,
634
635 #[configurable(
637 deprecated = "This metric has been deprecated in favor of [`transform_buffer_max_size_events`](#transform_buffer_max_size_events)."
638 )]
639 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
640 TransformBufferMaxEventSize,
641
642 #[configurable(
644 deprecated = "This metric has been deprecated in favor of [`transform_buffer_max_size_bytes`](#transform_buffer_max_size_bytes)."
645 )]
646 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
647 TransformBufferMaxByteSize,
648
649 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
651 TransformBufferMaxSizeEvents,
652
653 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
655 TransformBufferMaxSizeBytes,
656
657 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
659 TransformBufferUtilizationLevel,
660
661 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS_OUTPUT))]
663 TransformBufferUtilizationMean,
664
665 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
667 BufferMaxSizeEvents,
668
669 #[configurable(
671 deprecated = "This metric has been deprecated in favor of [`buffer_max_size_events`](#buffer_max_size_events).",
672 metadata(docs::tags = &*COMPONENT_TAGS)
673 )]
674 BufferMaxEventSize,
675
676 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
678 BufferMaxSizeBytes,
679
680 #[configurable(
682 deprecated = "This metric has been deprecated in favor of [`buffer_max_size_bytes`](#buffer_max_size_bytes).",
683 metadata(docs::tags = &*COMPONENT_TAGS)
684 )]
685 BufferMaxByteSize,
686
687 #[configurable(
689 deprecated = "This metric has been deprecated in favor of [`buffer_size_events`](#buffer_size_events)."
690 )]
691 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
692 BufferEvents,
693
694 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
696 BufferSizeEvents,
697
698 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
700 BufferSizeBytes,
701
702 #[configurable(
704 deprecated = "This metric has been deprecated in favor of [`buffer_size_bytes`](#buffer_size_bytes)."
705 )]
706 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
707 BufferByteSize,
708
709 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
711 Utilization,
712
713 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
715 ComponentAllocatedBytes,
716
717 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
719 OpenFiles,
720
721 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
723 UptimeSeconds,
724
725 #[configurable(metadata(docs::tags = merge_lazy(&INTERNAL_METRICS_TAGS, json!({
727 "debug": {"description": "Whether this is a debug build of Vector", "required": true},
728 "version": {"description": "Vector version.", "required": true},
729 "rust_version": {"description": "The Rust version from the package manifest.", "required": true},
730 "arch": {"description": "The target architecture being compiled for. (e.g. x86_64)", "required": true},
731 "revision": {"description": "Revision identifer, related to versioned releases.", "required": true}
732 }))))]
733 BuildInfo,
734
735 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
737 KafkaQueueMessages,
738
739 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
741 KafkaQueueMessagesBytes,
742
743 #[configurable(metadata(docs::tags = merge_lazy(&COMPONENT_TAGS, json!({
745 "topic_id": {"description": "The Kafka topic id.", "required": true},
746 "partition_id": {"description": "The Kafka partition id.", "required": true}
747 }))))]
748 KafkaConsumerLag,
749
750 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
752 LuaMemoryUsedBytes,
753
754 #[configurable(metadata(docs::tags = &*INTERNAL_METRICS_TAGS))]
756 OpenConnections,
757
758 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
760 ActiveEndpoints,
761
762 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
764 SplunkPendingAcks,
765
766 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
768 ActiveClients,
769
770 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
772 MemoryEnrichmentTableObjectsCount,
773
774 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
776 MemoryEnrichmentTableByteSize,
777
778 #[configurable(metadata(docs::tags = &*COMPONENT_TAGS))]
780 TagCardinalityTrackedKeys,
781
782 #[configurable(metadata(docs::tags = "{}"))]
784 InternalMetricsCardinality,
785}
786
787impl GaugeName {
788 #[must_use]
789 pub const fn as_str(self) -> &'static str {
790 match self {
791 Self::ComponentLatencyMeanSeconds => "component_latency_mean_seconds",
792 Self::SourceBufferMaxSizeEvents => "source_buffer_max_size_events",
793 Self::SourceBufferMaxSizeBytes => "source_buffer_max_size_bytes",
794 Self::SourceBufferMaxEventSize => "source_buffer_max_event_size",
795 Self::SourceBufferMaxByteSize => "source_buffer_max_byte_size",
796 Self::SourceBufferUtilizationLevel => "source_buffer_utilization_level",
797 Self::SourceBufferUtilizationMean => "source_buffer_utilization_mean",
798 Self::TransformBufferMaxSizeEvents => "transform_buffer_max_size_events",
799 Self::TransformBufferMaxSizeBytes => "transform_buffer_max_size_bytes",
800 Self::TransformBufferMaxEventSize => "transform_buffer_max_event_size",
801 Self::TransformBufferMaxByteSize => "transform_buffer_max_byte_size",
802 Self::TransformBufferUtilizationLevel => "transform_buffer_utilization_level",
803 Self::TransformBufferUtilizationMean => "transform_buffer_utilization_mean",
804 Self::BufferMaxSizeEvents => "buffer_max_size_events",
805 Self::BufferMaxEventSize => "buffer_max_event_size",
806 Self::BufferMaxSizeBytes => "buffer_max_size_bytes",
807 Self::BufferMaxByteSize => "buffer_max_byte_size",
808 Self::BufferEvents => "buffer_events",
809 Self::BufferSizeEvents => "buffer_size_events",
810 Self::BufferSizeBytes => "buffer_size_bytes",
811 Self::BufferByteSize => "buffer_byte_size",
812 Self::Utilization => "utilization",
813 Self::ComponentAllocatedBytes => "component_allocated_bytes",
814 Self::OpenFiles => "open_files",
815 Self::UptimeSeconds => "uptime_seconds",
816 Self::BuildInfo => "build_info",
817 Self::KafkaQueueMessages => "kafka_queue_messages",
818 Self::KafkaQueueMessagesBytes => "kafka_queue_messages_bytes",
819 Self::KafkaConsumerLag => "kafka_consumer_lag",
820 Self::LuaMemoryUsedBytes => "lua_memory_used_bytes",
821 Self::OpenConnections => "open_connections",
822 Self::ActiveEndpoints => "active_endpoints",
823 Self::SplunkPendingAcks => "splunk_pending_acks",
824 Self::ActiveClients => "active_clients",
825 Self::MemoryEnrichmentTableObjectsCount => "memory_enrichment_table_objects_count",
826 Self::MemoryEnrichmentTableByteSize => "memory_enrichment_table_byte_size",
827 Self::TagCardinalityTrackedKeys => "tag_cardinality_tracked_keys",
828 Self::InternalMetricsCardinality => "internal_metrics_cardinality",
829 }
830 }
831}
832
833impl CounterName {
834 #[allow(clippy::too_many_lines)]
835 #[must_use]
836 pub const fn as_str(self) -> &'static str {
837 match self {
838 Self::ComponentReceivedEventsTotal => "component_received_events_total",
839 Self::ComponentReceivedEventBytesTotal => "component_received_event_bytes_total",
840 Self::ComponentReceivedBytesTotal => "component_received_bytes_total",
841 Self::ComponentSentEventsTotal => "component_sent_events_total",
842 Self::ComponentSentEventBytesTotal => "component_sent_event_bytes_total",
843 Self::ComponentSentBytesTotal => "component_sent_bytes_total",
844 Self::ComponentDiscardedEventsTotal => "component_discarded_events_total",
845 Self::ComponentErrorsTotal => "component_errors_total",
846 Self::ComponentTimedOutEventsTotal => "component_timed_out_events_total",
847 Self::ComponentTimedOutRequestsTotal => "component_timed_out_requests_total",
848 Self::BufferReceivedEventsTotal => "buffer_received_events_total",
849 Self::BufferReceivedBytesTotal => "buffer_received_bytes_total",
850 Self::BufferSentEventsTotal => "buffer_sent_events_total",
851 Self::BufferSentBytesTotal => "buffer_sent_bytes_total",
852 Self::BufferDiscardedEventsTotal => "buffer_discarded_events_total",
853 Self::BufferDiscardedBytesTotal => "buffer_discarded_bytes_total",
854 Self::BufferErrorsTotal => "buffer_errors_total",
855 Self::AggregateEventsRecordedTotal => "aggregate_events_recorded_total",
856 Self::AggregateFailedUpdates => "aggregate_failed_updates",
857 Self::AggregateFlushesTotal => "aggregate_flushes_total",
858 Self::ApiStartedTotal => "api_started_total",
859 Self::CheckpointsTotal => "checkpoints_total",
860 Self::ChecksumErrorsTotal => "checksum_errors_total",
861 Self::CollectCompletedTotal => "collect_completed_total",
862 Self::CommandExecutedTotal => "command_executed_total",
863 Self::ConnectionEstablishedTotal => "connection_established_total",
864 Self::ConnectionSendErrorsTotal => "connection_send_errors_total",
865 Self::ConnectionShutdownTotal => "connection_shutdown_total",
866 Self::ContainerProcessedEventsTotal => "container_processed_events_total",
867 Self::ContainersUnwatchedTotal => "containers_unwatched_total",
868 Self::ContainersWatchedTotal => "containers_watched_total",
869 Self::DecoderBomRemovalsTotal => "decoder_bom_removals_total",
870 Self::DecoderMalformedReplacementWarningsTotal => {
871 "decoder_malformed_replacement_warnings_total"
872 }
873 Self::DorisBytesLoadedTotal => "doris_bytes_loaded_total",
874 Self::DorisRowsFilteredTotal => "doris_rows_filtered_total",
875 Self::DorisRowsLoadedTotal => "doris_rows_loaded_total",
876 Self::EncoderUnmappableReplacementWarningsTotal => {
877 "encoder_unmappable_replacement_warnings_total"
878 }
879 Self::EventsDiscardedTotal => "events_discarded_total",
880 Self::FilesAddedTotal => "files_added_total",
881 Self::FilesDeletedTotal => "files_deleted_total",
882 Self::FilesResumedTotal => "files_resumed_total",
883 Self::FilesUnwatchedTotal => "files_unwatched_total",
884 Self::GrpcServerMessagesReceivedTotal => "grpc_server_messages_received_total",
885 Self::GrpcServerMessagesSentTotal => "grpc_server_messages_sent_total",
886 Self::HttpClientErrorsTotal => "http_client_errors_total",
887 Self::HttpClientRequestsSentTotal => "http_client_requests_sent_total",
888 Self::HttpClientResponsesTotal => "http_client_responses_total",
889 Self::HttpServerRequestsReceivedTotal => "http_server_requests_received_total",
890 Self::HttpServerResponsesSentTotal => "http_server_responses_sent_total",
891 Self::KafkaConsumedMessagesBytesTotal => "kafka_consumed_messages_bytes_total",
892 Self::KafkaConsumedMessagesTotal => "kafka_consumed_messages_total",
893 Self::KafkaProducedMessagesBytesTotal => "kafka_produced_messages_bytes_total",
894 Self::KafkaProducedMessagesTotal => "kafka_produced_messages_total",
895 Self::KafkaRequestsBytesTotal => "kafka_requests_bytes_total",
896 Self::KafkaRequestsTotal => "kafka_requests_total",
897 Self::KafkaResponsesBytesTotal => "kafka_responses_bytes_total",
898 Self::KafkaResponsesTotal => "kafka_responses_total",
899 Self::MetadataRefreshFailedTotal => "metadata_refresh_failed_total",
900 Self::MetadataRefreshSuccessfulTotal => "metadata_refresh_successful_total",
901 Self::ParseErrorsTotal => "parse_errors_total",
902 Self::QuitTotal => "quit_total",
903 Self::ReloadedTotal => "reloaded_total",
904 Self::RewrittenTimestampEventsTotal => "rewritten_timestamp_events_total",
905 Self::SqsMessageDeferSucceededTotal => "sqs_message_defer_succeeded_total",
906 Self::SqsMessageDeleteSucceededTotal => "sqs_message_delete_succeeded_total",
907 Self::SqsMessageProcessingSucceededTotal => "sqs_message_processing_succeeded_total",
908 Self::SqsMessageReceiveSucceededTotal => "sqs_message_receive_succeeded_total",
909 Self::SqsMessageReceivedMessagesTotal => "sqs_message_received_messages_total",
910 Self::StaleEventsFlushedTotal => "stale_events_flushed_total",
911 Self::StartedTotal => "started_total",
912 Self::StoppedTotal => "stopped_total",
913 Self::TagCardinalityUntrackedEventsTotal => "tag_cardinality_untracked_events_total",
914 Self::TagValueLimitExceededTotal => "tag_value_limit_exceeded_total",
915 Self::ValueLimitReachedTotal => "value_limit_reached_total",
916 Self::WebsocketBytesSentTotal => "websocket_bytes_sent_total",
917 Self::WebsocketMessagesSentTotal => "websocket_messages_sent_total",
918 Self::WindowsServiceInstallTotal => "windows_service_install_total",
919 Self::WindowsServiceRestartTotal => "windows_service_restart_total",
920 Self::WindowsServiceStartTotal => "windows_service_start_total",
921 Self::WindowsServiceStopTotal => "windows_service_stop_total",
922 Self::WindowsServiceUninstallTotal => "windows_service_uninstall_total",
923 Self::K8sEventNamespaceAnnotationFailuresTotal => {
924 "k8s_event_namespace_annotation_failures_total"
925 }
926 Self::K8sEventNodeAnnotationFailuresTotal => "k8s_event_node_annotation_failures_total",
927 Self::K8sFormatPickerEdgeCasesTotal => "k8s_format_picker_edge_cases_total",
928 Self::K8sDockerFormatParseFailuresTotal => "k8s_docker_format_parse_failures_total",
929 Self::SqsS3EventRecordIgnoredTotal => "sqs_s3_event_record_ignored_total",
930 Self::ComponentAllocatedBytesTotal => "component_allocated_bytes_total",
931 Self::ComponentDeallocatedBytesTotal => "component_deallocated_bytes_total",
932 Self::MemoryEnrichmentTableFailedInsertions => {
933 "memory_enrichment_table_failed_insertions"
934 }
935 Self::MemoryEnrichmentTableFailedReads => "memory_enrichment_table_failed_reads",
936 Self::MemoryEnrichmentTableFlushesTotal => "memory_enrichment_table_flushes_total",
937 Self::MemoryEnrichmentTableInsertionsTotal => {
938 "memory_enrichment_table_insertions_total"
939 }
940 Self::MemoryEnrichmentTableReadsTotal => "memory_enrichment_table_reads_total",
941 Self::MemoryEnrichmentTableTtlExpirations => "memory_enrichment_table_ttl_expirations",
942 Self::ConnectionReadErrorsTotal => "connection_read_errors_total",
943 Self::InternalMetricsCardinalityTotal => "internal_metrics_cardinality_total",
944 Self::ConfigReloadRejected => "config_reload_rejected",
945 Self::Utf8ConvertErrorsTotal => "utf8_convert_errors_total",
946 }
947 }
948}