From fa79b2789f59040162d8a18cc0a8043363a7eb80 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Fri, 26 May 2023 14:36:56 -0400 Subject: [PATCH 1/2] chore(observability): remove deprecated internal metrics + massive cleanup to vector top and graphql API --- .../graphql/queries/components.graphql | 22 +- lib/vector-api-client/graphql/schema.json | 1515 +++++++---------- ...ponent_processed_bytes_throughputs.graphql | 6 - .../component_processed_bytes_totals.graphql | 8 - ...onent_processed_events_throughputs.graphql | 6 - .../component_processed_events_totals.graphql | 8 - ...mponent_received_bytes_throughputs.graphql | 6 + .../component_received_bytes_totals.graphql | 8 + .../component_sent_bytes_throughputs.graphql | 6 + .../component_sent_bytes_totals.graphql | 8 + .../processed_events_throughput.graphql | 3 - .../processed_events_total.graphql | 5 - lib/vector-api-client/src/gql/components.rs | 56 +- lib/vector-api-client/src/gql/metrics.rs | 259 +-- .../tests/queries/file_source_metrics.graphql | 3 - .../src/internal_event/events_received.rs | 2 - .../src/internal_event/events_sent.rs | 6 - lib/vector-core/src/event/metric/mod.rs | 2 +- lib/vector-core/src/metrics/mod.rs | 22 - src/api/schema/metrics/events_in.rs | 42 - src/api/schema/metrics/events_out.rs | 42 - src/api/schema/metrics/filter.rs | 76 +- src/api/schema/metrics/mod.rs | 148 +- .../{processed_bytes.rs => received_bytes.rs} | 49 +- .../{processed_events.rs => sent_bytes.rs} | 49 +- src/api/schema/metrics/sink/generic.rs | 23 +- src/api/schema/metrics/sink/mod.rs | 20 +- src/api/schema/metrics/source/file.rs | 108 +- src/api/schema/metrics/source/generic.rs | 23 +- src/api/schema/metrics/source/mod.rs | 20 +- src/api/schema/metrics/transform/generic.rs | 22 +- src/api/schema/metrics/transform/mod.rs | 19 +- src/config/mod.rs | 4 +- src/internal_events/apache_metrics.rs | 4 - src/internal_events/aws_ecs_metrics.rs | 2 - src/internal_events/conditions.rs | 2 - src/internal_events/docker_logs.rs | 5 - src/internal_events/exec.rs | 27 - src/internal_events/file.rs | 4 - src/internal_events/fluent.rs | 1 - src/internal_events/http.rs | 1 - src/internal_events/http_client_source.rs | 5 - src/internal_events/kafka.rs | 2 - src/internal_events/kubernetes_logs.rs | 4 +- src/internal_events/log_to_metric.rs | 10 - src/internal_events/mongodb_metrics.rs | 5 - src/internal_events/nginx_metrics.rs | 5 - src/internal_events/socket.rs | 2 - src/top/cmd.rs | 5 +- src/top/dashboard.rs | 77 +- src/top/metrics.rs | 196 ++- src/top/mod.rs | 8 +- src/top/state.rs | 105 +- website/content/en/blog/graphql-api.md | 6 +- website/cue/reference/components.cue | 8 - website/cue/reference/components/sinks.cue | 1 - .../components/sinks/aws_kinesis_streams.cue | 2 - .../reference/components/sinks/aws_sqs.cue | 2 - .../cue/reference/components/sinks/axiom.cue | 1 - .../reference/components/sinks/azure_blob.cue | 1 - .../components/sinks/azure_monitor_logs.cue | 1 - .../reference/components/sinks/blackhole.cue | 2 - .../reference/components/sinks/clickhouse.cue | 1 - .../reference/components/sinks/console.cue | 2 - .../reference/components/sinks/databend.cue | 1 - .../components/sinks/datadog_events.cue | 1 - .../components/sinks/elasticsearch.cue | 1 - .../reference/components/sinks/gcp_pubsub.cue | 1 - .../components/sinks/gcp_stackdriver_logs.cue | 1 - .../sinks/gcp_stackdriver_metrics.cue | 3 +- .../reference/components/sinks/honeycomb.cue | 1 - .../cue/reference/components/sinks/http.cue | 3 - .../cue/reference/components/sinks/humio.cue | 1 - .../components/sinks/influxdb_logs.cue | 1 - .../cue/reference/components/sinks/loki.cue | 2 - .../cue/reference/components/sinks/mezmo.cue | 1 - .../cue/reference/components/sinks/nats.cue | 2 - .../cue/reference/components/sinks/redis.cue | 4 - .../cue/reference/components/sinks/socket.cue | 2 - .../components/sinks/splunk_hec_logs.cue | 2 - .../cue/reference/components/sinks/vector.cue | 2 - .../reference/components/sinks/websocket.cue | 3 - website/cue/reference/components/sources.cue | 1 - .../cue/reference/components/sources/amqp.cue | 3 - .../components/sources/apache_metrics.cue | 3 - .../components/sources/aws_ecs_metrics.cue | 3 - .../sources/aws_kinesis_firehose.cue | 2 - .../reference/components/sources/aws_s3.cue | 2 - .../components/sources/datadog_agent.cue | 1 - .../components/sources/demo_logs.cue | 1 - .../reference/components/sources/dnstap.cue | 3 - .../components/sources/docker_logs.cue | 3 - .../sources/eventstoredb_metrics.cue | 2 - .../cue/reference/components/sources/exec.cue | 3 - .../cue/reference/components/sources/file.cue | 1 - .../components/sources/file_descriptor.cue | 3 - .../reference/components/sources/fluent.cue | 3 - .../components/sources/heroku_logs.cue | 2 - .../components/sources/host_metrics.cue | 1 - .../components/sources/http_client.cue | 3 - .../components/sources/http_server.cue | 1 - .../components/sources/internal_metrics.cue | 64 - .../reference/components/sources/journald.cue | 3 - .../reference/components/sources/kafka.cue | 3 - .../components/sources/kubernetes_logs.cue | 3 - .../reference/components/sources/logstash.cue | 3 - .../components/sources/mongodb_metrics.cue | 1 - .../cue/reference/components/sources/nats.cue | 3 - .../components/sources/nginx_metrics.cue | 1 - .../components/sources/opentelemetry.cue | 7 +- .../components/sources/postgresql_metrics.cue | 1 - .../sources/prometheus_remote_write.cue | 3 - .../components/sources/prometheus_scrape.cue | 3 - .../reference/components/sources/redis.cue | 4 - .../reference/components/sources/socket.cue | 1 - .../components/sources/splunk_hec.cue | 1 - .../reference/components/sources/statsd.cue | 3 - .../reference/components/sources/stdin.cue | 3 - .../reference/components/sources/syslog.cue | 3 - .../reference/components/sources/vector.cue | 1 - .../cue/reference/components/transforms.cue | 2 - 121 files changed, 1132 insertions(+), 2147 deletions(-) delete mode 100644 lib/vector-api-client/graphql/subscriptions/component_processed_bytes_throughputs.graphql delete mode 100644 lib/vector-api-client/graphql/subscriptions/component_processed_bytes_totals.graphql delete mode 100644 lib/vector-api-client/graphql/subscriptions/component_processed_events_throughputs.graphql delete mode 100644 lib/vector-api-client/graphql/subscriptions/component_processed_events_totals.graphql create mode 100644 lib/vector-api-client/graphql/subscriptions/component_received_bytes_throughputs.graphql create mode 100644 lib/vector-api-client/graphql/subscriptions/component_received_bytes_totals.graphql create mode 100644 lib/vector-api-client/graphql/subscriptions/component_sent_bytes_throughputs.graphql create mode 100644 lib/vector-api-client/graphql/subscriptions/component_sent_bytes_totals.graphql delete mode 100644 lib/vector-api-client/graphql/subscriptions/processed_events_throughput.graphql delete mode 100644 lib/vector-api-client/graphql/subscriptions/processed_events_total.graphql delete mode 100644 src/api/schema/metrics/events_in.rs delete mode 100644 src/api/schema/metrics/events_out.rs rename src/api/schema/metrics/{processed_bytes.rs => received_bytes.rs} (57%) rename src/api/schema/metrics/{processed_events.rs => sent_bytes.rs} (57%) diff --git a/lib/vector-api-client/graphql/queries/components.graphql b/lib/vector-api-client/graphql/queries/components.graphql index 5be42459f8ef0..3a6f78fc27989 100644 --- a/lib/vector-api-client/graphql/queries/components.graphql +++ b/lib/vector-api-client/graphql/queries/components.graphql @@ -14,11 +14,8 @@ query ComponentsQuery($first: Int!) { } metrics { __typename - processedEventsTotal { - processedEventsTotal - } - processedBytesTotal { - processedBytesTotal + receivedBytesTotal { + receivedBytesTotal } receivedEventsTotal { receivedEventsTotal @@ -37,12 +34,6 @@ query ComponentsQuery($first: Int!) { } metrics { __typename - processedEventsTotal { - processedEventsTotal - } - processedBytesTotal { - processedBytesTotal - } receivedEventsTotal { receivedEventsTotal } @@ -54,15 +45,12 @@ query ComponentsQuery($first: Int!) { ... on Sink { metrics { __typename - processedEventsTotal { - processedEventsTotal - } - processedBytesTotal { - processedBytesTotal - } receivedEventsTotal { receivedEventsTotal } + sentBytesTotal { + sentBytesTotal + } sentEventsTotal { sentEventsTotal } diff --git a/lib/vector-api-client/graphql/schema.json b/lib/vector-api-client/graphql/schema.json index fee86167638c6..034780a80d718 100644 --- a/lib/vector-api-client/graphql/schema.json +++ b/lib/vector-api-client/graphql/schema.json @@ -9,6 +9,45 @@ "name": "Subscription" }, "types": [ + { + "kind": "OBJECT", + "name": "AllocatedBytes", + "description": null, + "fields": [ + { + "name": "timestamp", + "description": "Metric timestamp", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "allocatedBytes", + "description": "Allocated bytes", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Boolean", @@ -80,35 +119,19 @@ }, { "kind": "OBJECT", - "name": "ComponentConnection", + "name": "ComponentAllocatedBytes", "description": null, "fields": [ { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "componentId", + "description": "Component id", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "edges", - "description": "A list of edges.", - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ComponentEdge", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -116,15 +139,15 @@ "deprecationReason": null }, { - "name": "totalCount", - "description": "Total result set count", + "name": "metric", + "description": "Allocated bytes metric", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "AllocatedBytes", "ofType": null } }, @@ -139,19 +162,19 @@ }, { "kind": "OBJECT", - "name": "ComponentEdge", - "description": "An edge in a connection.", + "name": "ComponentConnection", + "description": null, "fields": [ { - "name": "node", - "description": "The item at the end of the edge", + "name": "pageInfo", + "description": "Information to aid in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INTERFACE", - "name": "Component", + "kind": "OBJECT", + "name": "PageInfo", "ofType": null } }, @@ -159,15 +182,63 @@ "deprecationReason": null }, { - "name": "cursor", - "description": "A cursor for use in pagination", + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ComponentEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Component", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Total result set count", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, @@ -182,12 +253,12 @@ }, { "kind": "OBJECT", - "name": "ComponentAllocatedBytes", - "description": null, + "name": "ComponentEdge", + "description": "An edge in a connection.", "fields": [ { - "name": "componentId", - "description": "Component id", + "name": "cursor", + "description": "A cursor for use in pagination", "args": [], "type": { "kind": "NON_NULL", @@ -202,15 +273,15 @@ "deprecationReason": null }, { - "name": "metric", - "description": "Allocated bytes metric", + "name": "node", + "description": "The item at the end of the edge", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "AllocatedBytes", + "kind": "INTERFACE", + "name": "Component", "ofType": null } }, @@ -328,12 +399,12 @@ }, { "kind": "OBJECT", - "name": "ComponentProcessedBytesThroughput", + "name": "ComponentReceivedBytesThroughput", "description": null, "fields": [ { "name": "componentId", - "description": "Component id", + "description": "Component ID.", "args": [], "type": { "kind": "NON_NULL", @@ -349,7 +420,7 @@ }, { "name": "throughput", - "description": "Bytes processed throughput", + "description": "Throughput of bytes sent.", "args": [], "type": { "kind": "NON_NULL", @@ -371,12 +442,12 @@ }, { "kind": "OBJECT", - "name": "ComponentProcessedBytesTotal", + "name": "ComponentReceivedBytesTotal", "description": null, "fields": [ { "name": "componentId", - "description": "Component id", + "description": "Component ID.", "args": [], "type": { "kind": "NON_NULL", @@ -392,14 +463,14 @@ }, { "name": "metric", - "description": "Bytes processed total metric", + "description": "Metric for total bytes received.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "ProcessedBytesTotal", + "name": "ReceivedBytesTotal", "ofType": null } }, @@ -414,7 +485,7 @@ }, { "kind": "OBJECT", - "name": "ComponentProcessedEventsThroughput", + "name": "ComponentReceivedEventsThroughput", "description": null, "fields": [ { @@ -435,7 +506,7 @@ }, { "name": "throughput", - "description": "Events processed throughput", + "description": "Received events throughput", "args": [], "type": { "kind": "NON_NULL", @@ -457,7 +528,7 @@ }, { "kind": "OBJECT", - "name": "ComponentProcessedEventsTotal", + "name": "ComponentReceivedEventsTotal", "description": null, "fields": [ { @@ -478,14 +549,14 @@ }, { "name": "metric", - "description": "Events processed total metric", + "description": "Total received events metric", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "ProcessedEventsTotal", + "name": "ReceivedEventsTotal", "ofType": null } }, @@ -500,12 +571,12 @@ }, { "kind": "OBJECT", - "name": "ComponentReceivedEventsThroughput", + "name": "ComponentSentBytesThroughput", "description": null, "fields": [ { "name": "componentId", - "description": "Component id", + "description": "Component ID.", "args": [], "type": { "kind": "NON_NULL", @@ -521,7 +592,7 @@ }, { "name": "throughput", - "description": "Received events throughput", + "description": "Throughput of bytes sent.", "args": [], "type": { "kind": "NON_NULL", @@ -543,12 +614,12 @@ }, { "kind": "OBJECT", - "name": "ComponentReceivedEventsTotal", + "name": "ComponentSentBytesTotal", "description": null, "fields": [ { "name": "componentId", - "description": "Component id", + "description": "Component ID.", "args": [], "type": { "kind": "NON_NULL", @@ -564,14 +635,14 @@ }, { "name": "metric", - "description": "Total received events metric", + "description": "Metric for total bytes sent.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "ReceivedEventsTotal", + "name": "SentBytesTotal", "ofType": null } }, @@ -980,45 +1051,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "OBJECT", - "name": "AllocatedBytes", - "description": null, - "fields": [ - { - "name": "timestamp", - "description": "Metric timestamp", - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "allocatedBytes", - "description": "Total allocated bytes count", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, { "kind": "OBJECT", "name": "ErrorsTotal", @@ -1132,33 +1164,57 @@ }, { "kind": "OBJECT", - "name": "EventsInTotal", + "name": "FileSourceMetricFile", "description": null, "fields": [ { - "name": "timestamp", - "description": "Metric timestamp", + "name": "name", + "description": "File name", "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "receivedBytesTotal", + "description": "Metric indicating bytes received for the current file", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ReceivedBytesTotal", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "eventsInTotal", - "description": "Total incoming events", + "name": "receivedEventsTotal", + "description": "Metric indicating received events for the current file", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "OBJECT", + "name": "ReceivedEventsTotal", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sentEventsTotal", + "description": "Metric indicating outgoing events for the current file", + "args": [], + "type": { + "kind": "OBJECT", + "name": "SentEventsTotal", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1171,58 +1227,19 @@ }, { "kind": "OBJECT", - "name": "EventsOutTotal", + "name": "FileSourceMetricFileConnection", "description": null, "fields": [ { - "name": "timestamp", - "description": "Metric timestamp", - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsOutTotal", - "description": "Total outgoing events", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FileSourceMetricFile", - "description": null, - "fields": [ - { - "name": "name", - "description": "File name", + "name": "pageInfo", + "description": "Information to aid in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "PageInfo", "ofType": null } }, @@ -1230,115 +1247,48 @@ "deprecationReason": null }, { - "name": "processedEventsTotal", - "description": "Metric indicating events processed for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Metric indicating bytes processed for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsInTotal", - "description": "Metric indicating incoming events for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "receivedEventsTotal", - "description": "Metric indicating received events for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ReceivedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsOutTotal", - "description": "Metric indicating outgoing events for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sentEventsTotal", - "description": "Metric indicating outgoing events for the current file", - "args": [], - "type": { - "kind": "OBJECT", - "name": "SentEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FileSourceMetricFileConnection", - "description": null, - "fields": [ - { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "edges", + "description": "A list of edges.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FileSourceMetricFileEdge", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "edges", - "description": "A list of edges.", + "name": "nodes", + "description": "A list of nodes.", "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "FileSourceMetricFileEdge", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FileSourceMetricFile", + "ofType": null + } + } } }, "isDeprecated": false, @@ -1372,15 +1322,15 @@ "description": "An edge in a connection.", "fields": [ { - "name": "node", - "description": "The item at the end of the edge", + "name": "cursor", + "description": "A cursor for use in pagination", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "FileSourceMetricFile", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -1388,15 +1338,15 @@ "deprecationReason": null }, { - "name": "cursor", - "description": "A cursor for use in pagination", + "name": "node", + "description": "The item at the end of the edge", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "FileSourceMetricFile", "ofType": null } }, @@ -1463,13 +1413,7 @@ "deprecationReason": null }, { - "name": "PROCESSED_BYTES_TOTAL", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PROCESSED_EVENTS_TOTAL", + "name": "RECEIVED_BYTES_TOTAL", "description": null, "isDeprecated": false, "deprecationReason": null @@ -1480,23 +1424,11 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "EVENTS_IN_TOTAL", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "SENT_EVENTS_TOTAL", "description": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "EVENTS_OUT_TOTAL", - "description": null, - "isDeprecated": false, - "deprecationReason": null } ], "possibleTypes": null @@ -1592,36 +1524,12 @@ "deprecationReason": null }, { - "name": "processedEventsTotal", - "description": "Events processed for the current file source", + "name": "receivedBytesTotal", + "description": "Total received bytes for the current file source", "args": [], "type": { "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Bytes processed for the current file source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsInTotal", - "description": "Total incoming events for the current file source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", + "name": "ReceivedBytesTotal", "ofType": null }, "isDeprecated": false, @@ -1639,21 +1547,9 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "eventsOutTotal", - "description": "Total outgoing events for the current file source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "sentEventsTotal", - "description": "Total outgoing events for the current file source", + "description": "Total sent events for the current file source", "args": [], "type": { "kind": "OBJECT", @@ -1796,42 +1692,6 @@ "name": "GenericSinkMetrics", "description": null, "fields": [ - { - "name": "processedEventsTotal", - "description": "Events processed for the current sink", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Bytes processed for the current sink", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsInTotal", - "description": "Total incoming events for the current sink", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "receivedEventsTotal", "description": "Total received events for the current sink", @@ -1845,12 +1705,12 @@ "deprecationReason": null }, { - "name": "eventsOutTotal", - "description": "Total outgoing events for the current sink", + "name": "sentBytesTotal", + "description": "Total sent bytes for the current sink", "args": [], "type": { "kind": "OBJECT", - "name": "EventsOutTotal", + "name": "SentBytesTotal", "ofType": null }, "isDeprecated": false, @@ -1858,7 +1718,7 @@ }, { "name": "sentEventsTotal", - "description": "Total outgoing events for the current sink", + "description": "Total sent events for the current sink", "args": [], "type": { "kind": "OBJECT", @@ -1886,36 +1746,12 @@ "description": null, "fields": [ { - "name": "processedEventsTotal", - "description": "Events processed for the current source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Bytes processed for the current source", + "name": "receivedBytesTotal", + "description": "Total received bytes for the current source", "args": [], "type": { "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsInTotal", - "description": "Total incoming events for the current source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", + "name": "ReceivedBytesTotal", "ofType": null }, "isDeprecated": false, @@ -1933,21 +1769,9 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "eventsOutTotal", - "description": "Total outgoing events for the current source", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "sentEventsTotal", - "description": "Total outgoing events for the current source", + "description": "Total sent events for the current source", "args": [], "type": { "kind": "OBJECT", @@ -1974,42 +1798,6 @@ "name": "GenericTransformMetrics", "description": null, "fields": [ - { - "name": "processedEventsTotal", - "description": "Events processed for the current transform", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Bytes processed for the current transform", - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "eventsInTotal", - "description": "Total incoming events for the current transform", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "receivedEventsTotal", "description": "Total received events for the current transform", @@ -2022,21 +1810,9 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "eventsOutTotal", - "description": "Total outgoing events for the current transform", - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "sentEventsTotal", - "description": "Total outgoing events for the current transform", + "description": "Total sent events for the current transform", "args": [], "type": { "kind": "OBJECT", @@ -2275,16 +2051,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "SCALAR", - "name": "Json", - "description": "Raw JSON data`", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, { "kind": "OBJECT", "name": "LoadAverageMetrics", @@ -2473,7 +2239,7 @@ ], "type": { "kind": "SCALAR", - "name": "Json", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -2984,16 +2750,6 @@ "kind": "OBJECT", "name": "Uptime", "ofType": null - }, - { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null } ] }, @@ -3345,96 +3101,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "description": null, - "fields": [ - { - "name": "timestamp", - "description": "Metric timestamp", - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": "Total number of bytes processed", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "MetricType", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "description": null, - "fields": [ - { - "name": "timestamp", - "description": "Metric timestamp", - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedEventsTotal", - "description": "Total number of events processed", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "MetricType", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, { "kind": "OBJECT", "name": "Query", @@ -3861,6 +3527,45 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ReceivedBytesTotal", + "description": null, + "fields": [ + { + "name": "timestamp", + "description": "Metric timestamp.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "receivedBytesTotal", + "description": "Total number of bytes received.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "ReceivedEventsTotal", @@ -3900,6 +3605,45 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SentBytesTotal", + "description": null, + "fields": [ + { + "name": "timestamp", + "description": "Metric timestamp.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sentBytesTotal", + "description": "Total number of bytes sent.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "SentEventsTotal", @@ -4078,12 +3822,44 @@ "description": "A list of edges.", "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "SinkEdge", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SinkEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Sink", + "ofType": null + } + } } }, "isDeprecated": false, @@ -4117,15 +3893,15 @@ "description": "An edge in a connection.", "fields": [ { - "name": "node", - "description": "The item at the end of the edge", + "name": "cursor", + "description": "A cursor for use in pagination", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Sink", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -4133,15 +3909,15 @@ "deprecationReason": null }, { - "name": "cursor", - "description": "A cursor for use in pagination", + "name": "node", + "description": "The item at the end of the edge", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Sink", "ofType": null } }, @@ -4159,30 +3935,6 @@ "name": "SinkMetrics", "description": null, "fields": [ - { - "name": "processedEventsTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "receivedEventsTotal", "description": null, @@ -4196,16 +3948,16 @@ "deprecationReason": null }, { - "name": "eventsInTotal", + "name": "sentBytesTotal", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "EventsInTotal", + "name": "SentBytesTotal", "ofType": null }, - "isDeprecated": true, - "deprecationReason": "Use received_events_total instead" + "isDeprecated": false, + "deprecationReason": null }, { "name": "sentEventsTotal", @@ -4218,18 +3970,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "eventsOutTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": true, - "deprecationReason": "Use sent_events_total instead" } ], "inputFields": null, @@ -4557,12 +4297,44 @@ "description": "A list of edges.", "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "SourceEdge", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SourceEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Source", + "ofType": null + } + } } }, "isDeprecated": false, @@ -4596,15 +4368,15 @@ "description": "An edge in a connection.", "fields": [ { - "name": "node", - "description": "The item at the end of the edge", + "name": "cursor", + "description": "A cursor for use in pagination", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Source", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -4612,15 +4384,15 @@ "deprecationReason": null }, { - "name": "cursor", - "description": "A cursor for use in pagination", + "name": "node", + "description": "The item at the end of the edge", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Source", "ofType": null } }, @@ -4639,24 +4411,12 @@ "description": null, "fields": [ { - "name": "processedEventsTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", + "name": "receivedBytesTotal", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "ProcessedBytesTotal", + "name": "ReceivedBytesTotal", "ofType": null }, "isDeprecated": false, @@ -4674,18 +4434,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "eventsInTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", - "ofType": null - }, - "isDeprecated": true, - "deprecationReason": "Use received_events_total instead" - }, { "name": "sentEventsTotal", "description": null, @@ -4697,18 +4445,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "eventsOutTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": true, - "deprecationReason": "Use sent_events_total instead" } ], "inputFields": null, @@ -4977,7 +4713,7 @@ { "kind": "SCALAR", "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + "description": "The `String` scalar type represents textual data, represented as UTF-8\ncharacter sequences. The String type is most often used by GraphQL to\nrepresent free-form human-readable text.", "fields": null, "inputFields": null, "interfaces": null, @@ -5016,177 +4752,53 @@ "type": { "kind": "SCALAR", "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "notContains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "startsWith", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "endsWith", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Subscription", - "description": null, - "fields": [ - { - "name": "heartbeat", - "description": "Heartbeat, containing the UTC timestamp of the last server-sent payload", - "args": [ - { - "name": "interval", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "defaultValue": "1000" - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Heartbeat", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uptime", - "description": "Metrics for how long the Vector instance has been running", - "args": [ - { - "name": "interval", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "defaultValue": "1000" - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Uptime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedEventsTotal", - "description": "Event processing metrics.", - "args": [ - { - "name": "interval", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "defaultValue": "1000" - } - ], + "ofType": null + }, + "defaultValue": null + }, + { + "name": "notContains", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processedEventsThroughput", - "description": "Event processing throughput sampled over the provided millisecond `interval`.", - "args": [ - { - "name": "interval", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "defaultValue": "1000" - } - ], + "name": "startsWith", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "componentProcessedEventsThroughputs", - "description": "Component event processing throughput metrics over `interval`.", + "name": "endsWith", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Subscription", + "description": null, + "fields": [ + { + "name": "heartbeat", + "description": "Heartbeat, containing the UTC timestamp of the last server-sent payload", "args": [ { "name": "interval", @@ -5207,25 +4819,17 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ComponentProcessedEventsThroughput", - "ofType": null - } - } + "kind": "OBJECT", + "name": "Heartbeat", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "componentProcessedEventsTotals", - "description": "Component event processing metrics over `interval`.", + "name": "uptime", + "description": "Metrics for how long the Vector instance has been running", "args": [ { "name": "interval", @@ -5246,17 +4850,9 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ComponentProcessedEventsTotal", - "ofType": null - } - } + "kind": "OBJECT", + "name": "Uptime", + "ofType": null } }, "isDeprecated": false, @@ -5543,8 +5139,8 @@ "deprecationReason": null }, { - "name": "processedBytesTotal", - "description": "Byte processing metrics.", + "name": "componentReceivedBytesTotals", + "description": "Component bytes received metrics over `interval`.", "args": [ { "name": "interval", @@ -5565,17 +5161,25 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ComponentReceivedBytesTotal", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "processedBytesThroughput", - "description": "Byte processing throughput sampled over a provided millisecond `interval`.", + "name": "componentReceivedBytesThroughputs", + "description": "Component bytes received throughput over `interval`", "args": [ { "name": "interval", @@ -5596,17 +5200,25 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ComponentReceivedBytesThroughput", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "componentProcessedBytesTotals", - "description": "Component byte processing metrics over `interval`.", + "name": "componentSentBytesTotals", + "description": "Component bytes sent metrics over `interval`.", "args": [ { "name": "interval", @@ -5634,7 +5246,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ComponentProcessedBytesTotal", + "name": "ComponentSentBytesTotal", "ofType": null } } @@ -5644,8 +5256,8 @@ "deprecationReason": null }, { - "name": "componentProcessedBytesThroughputs", - "description": "Component byte processing throughput over `interval`", + "name": "componentSentBytesThroughputs", + "description": "Component bytes sent throughput over `interval`", "args": [ { "name": "interval", @@ -5673,7 +5285,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ComponentProcessedBytesThroughput", + "name": "ComponentSentBytesThroughput", "ofType": null } } @@ -5713,9 +5325,40 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "allocatedBytes", + "description": "Allocated bytes metrics.", + "args": [ + { + "name": "interval", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": "1000" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AllocatedBytes", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "componentAllocatedBytes", - "description": "Component allocated bytes metrics over `interval`.", + "description": "Component allocation metrics", "args": [ { "name": "interval", @@ -6141,7 +5784,7 @@ ], "type": { "kind": "SCALAR", - "name": "Json", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -6340,12 +5983,44 @@ "description": "A list of edges.", "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TransformEdge", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TransformEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Transform", + "ofType": null + } + } } }, "isDeprecated": false, @@ -6379,15 +6054,15 @@ "description": "An edge in a connection.", "fields": [ { - "name": "node", - "description": "The item at the end of the edge", + "name": "cursor", + "description": "A cursor for use in pagination", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Transform", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -6395,15 +6070,15 @@ "deprecationReason": null }, { - "name": "cursor", - "description": "A cursor for use in pagination", + "name": "node", + "description": "The item at the end of the edge", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Transform", "ofType": null } }, @@ -6421,30 +6096,6 @@ "name": "TransformMetrics", "description": null, "fields": [ - { - "name": "processedEventsTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedEventsTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processedBytesTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "ProcessedBytesTotal", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "receivedEventsTotal", "description": null, @@ -6457,18 +6108,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "eventsInTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsInTotal", - "ofType": null - }, - "isDeprecated": true, - "deprecationReason": "Use received_events_total instead" - }, { "name": "sentEventsTotal", "description": null, @@ -6480,18 +6119,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "eventsOutTotal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EventsOutTotal", - "ofType": null - }, - "isDeprecated": true, - "deprecationReason": "Use sent_events_total instead" } ], "inputFields": null, @@ -6680,7 +6307,7 @@ { "kind": "OBJECT", "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "description": "A Directive provides a way to describe alternate runtime execution and type\nvalidation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution\nbehavior in ways field arguments will not suffice, such as conditionally\nincluding or skipping a field. Directives provide this by describing\nadditional information to the executor.", "fields": [ { "name": "name", @@ -6783,7 +6410,7 @@ { "kind": "ENUM", "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a\n__DirectiveLocation describes one such possible adjacencies.", "fields": null, "inputFields": null, "interfaces": null, @@ -6908,7 +6535,7 @@ { "kind": "OBJECT", "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "description": "One possible value for a given Enum. Enum values are unique values, not a\nplaceholder for a string or numeric value. However an Enum value is returned\nin a JSON response as a string.", "fields": [ { "name": "name", @@ -6975,7 +6602,7 @@ { "kind": "OBJECT", "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "description": "Object and Interface types are described by a list of Fields, each of which\nhas a name, potentially a list of arguments, and a return type.", "fields": [ { "name": "name", @@ -7082,7 +6709,7 @@ { "kind": "OBJECT", "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "description": "Arguments provided to Fields or Directives and the input fields of an\nInputObject are represented as Input Values which describe their type and\noptionally a default value.", "fields": [ { "name": "name", @@ -7149,7 +6776,7 @@ { "kind": "OBJECT", "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes\nall available types and directives on the server, as well as the entry\npoints for query, mutation, and subscription operations.", "fields": [ { "name": "types", @@ -7193,7 +6820,7 @@ }, { "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", + "description": "If this server supports mutation, the type that mutation operations will\nbe rooted at.", "args": [], "type": { "kind": "OBJECT", @@ -7205,7 +6832,7 @@ }, { "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", + "description": "If this server support subscription, the type that subscription\noperations will be rooted at.", "args": [], "type": { "kind": "OBJECT", @@ -7248,7 +6875,7 @@ { "kind": "OBJECT", "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds\nof types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about\nthat type. Scalar types provide no information beyond a name and\ndescription, while Enum types provide their values. Object and Interface\ntypes provide the fields they describe. Abstract types, Union and Interface,\nprovide the Object types possible at runtime. List and NonNull types compose\nother types.", "fields": [ { "name": "kind", @@ -7443,6 +7070,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "isOneOf", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -7466,13 +7105,13 @@ }, { "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid\nfields.", "isDeprecated": false, "deprecationReason": null }, { "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "description": "Indicates this type is an interface. `fields` and `possibleTypes` are\nvalid fields.", "isDeprecated": false, "deprecationReason": null }, diff --git a/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_throughputs.graphql b/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_throughputs.graphql deleted file mode 100644 index 4c9229b173927..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_throughputs.graphql +++ /dev/null @@ -1,6 +0,0 @@ -subscription ComponentProcessedBytesThroughputsSubscription($interval: Int!) { - componentProcessedBytesThroughputs(interval: $interval) { - componentId - throughput - } -} diff --git a/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_totals.graphql b/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_totals.graphql deleted file mode 100644 index 9b0862c31b997..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/component_processed_bytes_totals.graphql +++ /dev/null @@ -1,8 +0,0 @@ -subscription ComponentProcessedBytesTotalsSubscription($interval: Int!) { - componentProcessedBytesTotals(interval: $interval) { - componentId - metric { - processedBytesTotal - } - } -} diff --git a/lib/vector-api-client/graphql/subscriptions/component_processed_events_throughputs.graphql b/lib/vector-api-client/graphql/subscriptions/component_processed_events_throughputs.graphql deleted file mode 100644 index 727c3440a9144..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/component_processed_events_throughputs.graphql +++ /dev/null @@ -1,6 +0,0 @@ -subscription ComponentProcessedEventsThroughputsSubscription($interval: Int!) { - componentProcessedEventsThroughputs(interval: $interval) { - componentId - throughput - } -} diff --git a/lib/vector-api-client/graphql/subscriptions/component_processed_events_totals.graphql b/lib/vector-api-client/graphql/subscriptions/component_processed_events_totals.graphql deleted file mode 100644 index bbfe1c20b573b..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/component_processed_events_totals.graphql +++ /dev/null @@ -1,8 +0,0 @@ -subscription ComponentProcessedEventsTotalsSubscription($interval: Int!) { - componentProcessedEventsTotals(interval: $interval) { - componentId - metric { - processedEventsTotal - } - } -} diff --git a/lib/vector-api-client/graphql/subscriptions/component_received_bytes_throughputs.graphql b/lib/vector-api-client/graphql/subscriptions/component_received_bytes_throughputs.graphql new file mode 100644 index 0000000000000..ec1b018d27107 --- /dev/null +++ b/lib/vector-api-client/graphql/subscriptions/component_received_bytes_throughputs.graphql @@ -0,0 +1,6 @@ +subscription ComponentReceivedBytesThroughputsSubscription($interval: Int!) { + componentReceivedBytesThroughputs(interval: $interval) { + componentId + throughput + } +} diff --git a/lib/vector-api-client/graphql/subscriptions/component_received_bytes_totals.graphql b/lib/vector-api-client/graphql/subscriptions/component_received_bytes_totals.graphql new file mode 100644 index 0000000000000..748b8930fb087 --- /dev/null +++ b/lib/vector-api-client/graphql/subscriptions/component_received_bytes_totals.graphql @@ -0,0 +1,8 @@ +subscription ComponentReceivedBytesTotalsSubscription($interval: Int!) { + componentReceivedBytesTotals(interval: $interval) { + componentId + metric { + receivedBytesTotal + } + } +} diff --git a/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_throughputs.graphql b/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_throughputs.graphql new file mode 100644 index 0000000000000..a1b4f54c1a300 --- /dev/null +++ b/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_throughputs.graphql @@ -0,0 +1,6 @@ +subscription ComponentSentBytesThroughputsSubscription($interval: Int!) { + componentSentBytesThroughputs(interval: $interval) { + componentId + throughput + } +} diff --git a/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_totals.graphql b/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_totals.graphql new file mode 100644 index 0000000000000..aa2c2f6dd0832 --- /dev/null +++ b/lib/vector-api-client/graphql/subscriptions/component_sent_bytes_totals.graphql @@ -0,0 +1,8 @@ +subscription ComponentSentBytesTotalsSubscription($interval: Int!) { + componentSentBytesTotals(interval: $interval) { + componentId + metric { + sentBytesTotal + } + } +} diff --git a/lib/vector-api-client/graphql/subscriptions/processed_events_throughput.graphql b/lib/vector-api-client/graphql/subscriptions/processed_events_throughput.graphql deleted file mode 100644 index f6b5b37a29d91..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/processed_events_throughput.graphql +++ /dev/null @@ -1,3 +0,0 @@ -subscription ProcessedEventsThroughputSubscription($interval: Int!) { - processedEventsThroughput(interval: $interval) -} diff --git a/lib/vector-api-client/graphql/subscriptions/processed_events_total.graphql b/lib/vector-api-client/graphql/subscriptions/processed_events_total.graphql deleted file mode 100644 index d10dde89a6451..0000000000000 --- a/lib/vector-api-client/graphql/subscriptions/processed_events_total.graphql +++ /dev/null @@ -1,5 +0,0 @@ -subscription ProcessedEventsTotalSubscription($interval: Int!) { - processedEventsTotal(interval: $interval) { - processedEventsTotal - } -} diff --git a/lib/vector-api-client/src/gql/components.rs b/lib/vector-api-client/src/gql/components.rs index 4efb95c47316f..00dcb2f8a72e5 100644 --- a/lib/vector-api-client/src/gql/components.rs +++ b/lib/vector-api-client/src/gql/components.rs @@ -70,71 +70,53 @@ impl ComponentsSubscriptionExt for crate::SubscriptionClient { } impl components_query::ComponentsQueryComponentsEdgesNodeOn { - pub fn processed_events_total(&self) -> i64 { + pub fn received_bytes_total(&self) -> i64 { + // This is network bytes received, and only sources can receive events. match self { components_query::ComponentsQueryComponentsEdgesNodeOn::Source(s) => s .metrics - .processed_events_total + .received_bytes_total .as_ref() - .map(|p| p.processed_events_total as i64) - .unwrap_or(0), - components_query::ComponentsQueryComponentsEdgesNodeOn::Transform(t) => t - .metrics - .processed_events_total - .as_ref() - .map(|p| p.processed_events_total as i64) - .unwrap_or(0), - components_query::ComponentsQueryComponentsEdgesNodeOn::Sink(s) => s - .metrics - .processed_events_total - .as_ref() - .map(|p| p.processed_events_total as i64) + .map(|p| p.received_bytes_total as i64) .unwrap_or(0), + components_query::ComponentsQueryComponentsEdgesNodeOn::Transform(_) => 0, + components_query::ComponentsQueryComponentsEdgesNodeOn::Sink(_) => 0, } } - pub fn processed_bytes_total(&self) -> i64 { + pub fn received_events_total(&self) -> i64 { match self { components_query::ComponentsQueryComponentsEdgesNodeOn::Source(s) => s .metrics - .processed_bytes_total + .received_events_total .as_ref() - .map(|p| p.processed_bytes_total as i64) + .map(|p| p.received_events_total as i64) .unwrap_or(0), components_query::ComponentsQueryComponentsEdgesNodeOn::Transform(t) => t .metrics - .processed_bytes_total + .received_events_total .as_ref() - .map(|p| p.processed_bytes_total as i64) + .map(|p| p.received_events_total as i64) .unwrap_or(0), components_query::ComponentsQueryComponentsEdgesNodeOn::Sink(s) => s .metrics - .processed_bytes_total + .received_events_total .as_ref() - .map(|p| p.processed_bytes_total as i64) + .map(|p| p.received_events_total as i64) .unwrap_or(0), } } - pub fn received_events_total(&self) -> i64 { + pub fn sent_bytes_total(&self) -> i64 { + // This is network bytes sent, and only sinks can send out events. match self { - components_query::ComponentsQueryComponentsEdgesNodeOn::Source(s) => s - .metrics - .received_events_total - .as_ref() - .map(|p| p.received_events_total as i64) - .unwrap_or(0), - components_query::ComponentsQueryComponentsEdgesNodeOn::Transform(t) => t - .metrics - .received_events_total - .as_ref() - .map(|p| p.received_events_total as i64) - .unwrap_or(0), + components_query::ComponentsQueryComponentsEdgesNodeOn::Source(_) => 0, + components_query::ComponentsQueryComponentsEdgesNodeOn::Transform(_) => 0, components_query::ComponentsQueryComponentsEdgesNodeOn::Sink(s) => s .metrics - .received_events_total + .sent_bytes_total .as_ref() - .map(|p| p.received_events_total as i64) + .map(|p| p.sent_bytes_total as i64) .unwrap_or(0), } } diff --git a/lib/vector-api-client/src/gql/metrics.rs b/lib/vector-api-client/src/gql/metrics.rs index 516de83a95313..a9df90f7c0bd7 100644 --- a/lib/vector-api-client/src/gql/metrics.rs +++ b/lib/vector-api-client/src/gql/metrics.rs @@ -14,56 +14,6 @@ use crate::BoxedSubscription; )] pub struct UptimeSubscription; -/// ProcessedEventsTotalSubscription contains metrics on the number of events -/// that have been processed by a Vector instance. -#[derive(GraphQLQuery, Debug, Copy, Clone)] -#[graphql( - schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/processed_events_total.graphql", - response_derives = "Debug" -)] -pub struct ProcessedEventsTotalSubscription; - -/// ProcessedEventsThroughputSubscription contains metrics on the number of events -/// that have been processed between `interval` samples. -#[derive(GraphQLQuery, Debug, Copy, Clone)] -#[graphql( - schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/processed_events_throughput.graphql", - response_derives = "Debug" -)] -pub struct ProcessedEventsThroughputSubscription; - -/// ProcessedBytesThroughputSubscription contains metrics on the number of bytes -/// that have been processed between `interval` samples. -#[derive(GraphQLQuery, Debug, Copy, Clone)] -#[graphql( - schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/processed_bytes_throughput.graphql", - response_derives = "Debug" -)] -pub struct ProcessedBytesThroughputSubscription; - -/// ComponentProcessedEventsThroughputsSubscription contains metrics on the number of events -/// that have been processed between `interval` samples, against specific components. -#[derive(GraphQLQuery, Debug, Copy, Clone)] -#[graphql( - schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/component_processed_events_throughputs.graphql", - response_derives = "Debug" -)] -pub struct ComponentProcessedEventsThroughputsSubscription; - -/// ComponentProcessedEventsTotalsSubscription contains metrics on the number of events -/// that have been processed by a Vector instance, against specific components. -#[derive(GraphQLQuery, Debug, Copy, Clone)] -#[graphql( - schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/component_processed_events_totals.graphql", - response_derives = "Debug" -)] -pub struct ComponentProcessedEventsTotalsSubscription; - /// ComponentAllocatedBytesSubscription contains metrics on the number of allocated bytes /// that have been processed by a Vector instance, against specific components. #[derive(GraphQLQuery, Debug, Copy, Clone)] @@ -74,25 +24,25 @@ pub struct ComponentProcessedEventsTotalsSubscription; )] pub struct ComponentAllocatedBytesSubscription; -/// ComponentProcessedBytesThroughputsSubscription contains metrics on the number of bytes -/// that have been processed between `interval` samples, against specific components. +/// ComponentReceivedBytesThroughputsSubscription contains metrics on the number of bytes +/// that have been received between `interval` samples, against specific components. #[derive(GraphQLQuery, Debug, Copy, Clone)] #[graphql( schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/component_processed_bytes_throughputs.graphql", + query_path = "graphql/subscriptions/component_received_bytes_throughputs.graphql", response_derives = "Debug" )] -pub struct ComponentProcessedBytesThroughputsSubscription; +pub struct ComponentReceivedBytesThroughputsSubscription; -/// ComponentProcessedBytesTotalsSubscription contains metrics on the number of bytes -/// that have been processed by a Vector instance, against a specific component. +/// ComponentReceivedBytesTotalsSubscription contains metrics on the number of bytes +/// that have been received by a Vector instance, against a specific component. #[derive(GraphQLQuery, Debug, Copy, Clone)] #[graphql( schema_path = "graphql/schema.json", - query_path = "graphql/subscriptions/component_processed_bytes_totals.graphql", + query_path = "graphql/subscriptions/component_received_bytes_totals.graphql", response_derives = "Debug" )] -pub struct ComponentProcessedBytesTotalsSubscription; +pub struct ComponentReceivedBytesTotalsSubscription; /// ComponentReceivedEventsThroughputsSubscription contains metrics on the number of events /// that have been accepted for processing between `interval` samples, against specific components. @@ -114,6 +64,26 @@ pub struct ComponentReceivedEventsThroughputsSubscription; )] pub struct ComponentReceivedEventsTotalsSubscription; +/// ComponentSentBytesThroughputsSubscription contains metrics on the number of bytes +/// that have been received between `interval` samples, against specific components. +#[derive(GraphQLQuery, Debug, Copy, Clone)] +#[graphql( + schema_path = "graphql/schema.json", + query_path = "graphql/subscriptions/component_sent_bytes_throughputs.graphql", + response_derives = "Debug" +)] +pub struct ComponentSentBytesThroughputsSubscription; + +/// ComponentSentBytesTotalsSubscription contains metrics on the number of bytes +/// that have been received by a Vector instance, against a specific component. +#[derive(GraphQLQuery, Debug, Copy, Clone)] +#[graphql( + schema_path = "graphql/schema.json", + query_path = "graphql/subscriptions/component_sent_bytes_totals.graphql", + response_derives = "Debug" +)] +pub struct ComponentSentBytesTotalsSubscription; + /// ComponentSentEventsThroughputsSubscription contains metrics on the number of events /// that have been emitted between `interval` samples, against specific components. #[derive(GraphQLQuery, Debug, Copy, Clone)] @@ -188,47 +158,17 @@ pub trait MetricsSubscriptionExt { interval: i64, ) -> BoxedSubscription; - /// Executes an events processed metrics subscription. - fn processed_events_total_subscription( + /// Executes a component bytes received totals subscription. + fn component_received_bytes_totals_subscription( &self, interval: i64, - ) -> crate::BoxedSubscription; + ) -> crate::BoxedSubscription; - /// Executes an events processed throughput subscription. - fn processed_events_throughput_subscription( + /// Executes a component bytes received throughput subscription. + fn component_received_bytes_throughputs_subscription( &self, interval: i64, - ) -> crate::BoxedSubscription; - - /// Executes a bytes processed throughput subscription. - fn processed_bytes_throughput_subscription( - &self, - interval: i64, - ) -> crate::BoxedSubscription; - - /// Executes a component events processed totals subscription - fn component_processed_events_totals_subscription( - &self, - interval: i64, - ) -> crate::BoxedSubscription; - - /// Executes a component events processed throughputs subscription. - fn component_processed_events_throughputs_subscription( - &self, - interval: i64, - ) -> crate::BoxedSubscription; - - /// Executes a component bytes processed totals subscription. - fn component_processed_bytes_totals_subscription( - &self, - interval: i64, - ) -> crate::BoxedSubscription; - - /// Executes a component bytes processed throughputs subscription. - fn component_processed_bytes_throughputs_subscription( - &self, - interval: i64, - ) -> crate::BoxedSubscription; + ) -> crate::BoxedSubscription; /// Executes a component received events totals subscription. fn component_received_events_totals_subscription( @@ -242,6 +182,18 @@ pub trait MetricsSubscriptionExt { interval: i64, ) -> crate::BoxedSubscription; + /// Executes a component bytes sent totals subscription. + fn component_sent_bytes_totals_subscription( + &self, + interval: i64, + ) -> crate::BoxedSubscription; + + /// Executes a component bytes sent throughput subscription. + fn component_sent_bytes_throughputs_subscription( + &self, + interval: i64, + ) -> crate::BoxedSubscription; + /// Executes a component events totals subscription. fn component_sent_events_totals_subscription( &self, @@ -268,101 +220,42 @@ impl MetricsSubscriptionExt for crate::SubscriptionClient { self.start::(&request_body) } - /// Executes an events processed metrics subscription. - fn processed_events_total_subscription( - &self, - interval: i64, - ) -> BoxedSubscription { - let request_body = ProcessedEventsTotalSubscription::build_query( - processed_events_total_subscription::Variables { interval }, - ); - - self.start::(&request_body) - } - - /// Executes an events processed throughput subscription. - fn processed_events_throughput_subscription( - &self, - interval: i64, - ) -> BoxedSubscription { - let request_body = ProcessedEventsThroughputSubscription::build_query( - processed_events_throughput_subscription::Variables { interval }, - ); - - self.start::(&request_body) - } - - /// Executes a bytes processed throughput subscription. - fn processed_bytes_throughput_subscription( - &self, - interval: i64, - ) -> BoxedSubscription { - let request_body = ProcessedBytesThroughputSubscription::build_query( - processed_bytes_throughput_subscription::Variables { interval }, - ); - - self.start::(&request_body) - } - - /// Executes an all component events processed totals subscription. - fn component_processed_events_totals_subscription( - &self, - interval: i64, - ) -> BoxedSubscription { - let request_body = ComponentProcessedEventsTotalsSubscription::build_query( - component_processed_events_totals_subscription::Variables { interval }, - ); - - self.start::(&request_body) - } - - /// Executes an all component events processed throughputs subscription. - fn component_processed_events_throughputs_subscription( + /// Executes an all component allocated bytes subscription. + fn component_allocated_bytes_subscription( &self, interval: i64, - ) -> BoxedSubscription { - let request_body = ComponentProcessedEventsThroughputsSubscription::build_query( - component_processed_events_throughputs_subscription::Variables { interval }, + ) -> BoxedSubscription { + let request_body = ComponentAllocatedBytesSubscription::build_query( + component_allocated_bytes_subscription::Variables { interval }, ); - self.start::(&request_body) + self.start::(&request_body) } - /// Executes an all component bytes processed totals subscription. - fn component_processed_bytes_totals_subscription( + /// Executes an all component bytes received totals subscription. + fn component_received_bytes_totals_subscription( &self, interval: i64, - ) -> BoxedSubscription { - let request_body = ComponentProcessedBytesTotalsSubscription::build_query( - component_processed_bytes_totals_subscription::Variables { interval }, + ) -> BoxedSubscription { + let request_body = ComponentReceivedBytesTotalsSubscription::build_query( + component_received_bytes_totals_subscription::Variables { interval }, ); - self.start::(&request_body) + self.start::(&request_body) } - /// Executes an all component bytes processed throughputs subscription. - fn component_processed_bytes_throughputs_subscription( + /// Executes a component bytes received throughput subscription. + fn component_received_bytes_throughputs_subscription( &self, interval: i64, - ) -> BoxedSubscription { - let request_body = ComponentProcessedBytesThroughputsSubscription::build_query( - component_processed_bytes_throughputs_subscription::Variables { interval }, + ) -> BoxedSubscription { + let request_body = ComponentReceivedBytesThroughputsSubscription::build_query( + component_received_bytes_throughputs_subscription::Variables { interval }, ); - self.start::(&request_body) + self.start::(&request_body) } - /// Executes an all component allocated bytes subscription. - fn component_allocated_bytes_subscription( - &self, - interval: i64, - ) -> BoxedSubscription { - let request_body = ComponentAllocatedBytesSubscription::build_query( - component_allocated_bytes_subscription::Variables { interval }, - ); - - self.start::(&request_body) - } /// Executes an all component received events totals subscription. fn component_received_events_totals_subscription( &self, @@ -387,6 +280,30 @@ impl MetricsSubscriptionExt for crate::SubscriptionClient { self.start::(&request_body) } + /// Executes an all component bytes sent totals subscription. + fn component_sent_bytes_totals_subscription( + &self, + interval: i64, + ) -> BoxedSubscription { + let request_body = ComponentSentBytesTotalsSubscription::build_query( + component_sent_bytes_totals_subscription::Variables { interval }, + ); + + self.start::(&request_body) + } + + /// Executes a component bytes sent throughput subscription. + fn component_sent_bytes_throughputs_subscription( + &self, + interval: i64, + ) -> BoxedSubscription { + let request_body = ComponentSentBytesThroughputsSubscription::build_query( + component_sent_bytes_throughputs_subscription::Variables { interval }, + ); + + self.start::(&request_body) + } + /// Executes a component sent events totals subscription. fn component_sent_events_totals_subscription( &self, diff --git a/lib/vector-api-client/tests/queries/file_source_metrics.graphql b/lib/vector-api-client/tests/queries/file_source_metrics.graphql index 2a4cb2aae2fe6..7b9d2afb0f10e 100644 --- a/lib/vector-api-client/tests/queries/file_source_metrics.graphql +++ b/lib/vector-api-client/tests/queries/file_source_metrics.graphql @@ -11,9 +11,6 @@ query FileSourceMetricsQuery($after: String, $before: String, $first: Int, $last edges { node { name - processedEventsTotal { - processedEventsTotal - } receivedEventsTotal { receivedEventsTotal } diff --git a/lib/vector-common/src/internal_event/events_received.rs b/lib/vector-common/src/internal_event/events_received.rs index ee9ffa3ef0ee8..4021b3c578143 100644 --- a/lib/vector-common/src/internal_event/events_received.rs +++ b/lib/vector-common/src/internal_event/events_received.rs @@ -7,7 +7,6 @@ crate::registered_event!( EventsReceived => { events_count: Histogram = register_histogram!("component_received_events_count"), events: Counter = register_counter!("component_received_events_total"), - events_in: Counter = register_counter!("events_in_total"), event_bytes: Counter = register_counter!("component_received_event_bytes_total"), } @@ -19,7 +18,6 @@ crate::registered_event!( #[allow(clippy::cast_precision_loss)] self.events_count.record(count as f64); self.events.increment(count as u64); - self.events_in.increment(count as u64); self.event_bytes.increment(byte_size as u64); } ); diff --git a/lib/vector-common/src/internal_event/events_sent.rs b/lib/vector-common/src/internal_event/events_sent.rs index 061d11b6527af..7d9986fdf63c4 100644 --- a/lib/vector-common/src/internal_event/events_sent.rs +++ b/lib/vector-common/src/internal_event/events_sent.rs @@ -14,11 +14,6 @@ crate::registered_event!( } else { register_counter!("component_sent_events_total") }, - events_out: Counter = if let Some(output) = &self.output { - register_counter!("events_out_total", "output" => output.clone()) - } else { - register_counter!("events_out_total") - }, event_bytes: Counter = if let Some(output) = &self.output { register_counter!("component_sent_event_bytes_total", "output" => output.clone()) } else { @@ -40,7 +35,6 @@ crate::registered_event!( } self.events.increment(count as u64); - self.events_out.increment(count as u64); self.event_bytes.increment(byte_size as u64); } ); diff --git a/lib/vector-core/src/event/metric/mod.rs b/lib/vector-core/src/event/metric/mod.rs index 849823e301035..392e43a6cda74 100644 --- a/lib/vector-core/src/event/metric/mod.rs +++ b/lib/vector-core/src/event/metric/mod.rs @@ -430,7 +430,7 @@ impl Display for Metric { /// /// example: /// ```text - /// 2020-08-12T20:23:37.248661343Z vector_processed_bytes_total{component_kind="sink",component_type="blackhole"} = 6391 + /// 2020-08-12T20:23:37.248661343Z vector_received_bytes_total{component_kind="sink",component_type="blackhole"} = 6391 /// ``` fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), fmt::Error> { if let Some(timestamp) = &self.data.time.timestamp { diff --git a/lib/vector-core/src/metrics/mod.rs b/lib/vector-core/src/metrics/mod.rs index b842f90812e28..375dba4af624b 100644 --- a/lib/vector-core/src/metrics/mod.rs +++ b/lib/vector-core/src/metrics/mod.rs @@ -161,28 +161,6 @@ impl Controller { let mut metrics = self.recorder.with_registry(Registry::visit_metrics); - // Add aliases for deprecated metrics - for i in 0..metrics.len() { - let metric = &metrics[i]; - match metric.name() { - "component_sent_events_total" => { - let alias = metric.clone().with_name("processed_events_total"); - metrics.push(alias); - } - "component_sent_bytes_total" if metric.tag_matches("component_kind", "sink") => { - let alias = metric.clone().with_name("processed_bytes_total"); - metrics.push(alias); - } - "component_received_bytes_total" - if metric.tag_matches("component_kind", "source") => - { - let alias = metric.clone().with_name("processed_bytes_total"); - metrics.push(alias); - } - _ => {} - } - } - #[allow(clippy::cast_precision_loss)] let value = (metrics.len() + 2) as f64; metrics.push(Metric::from_metric_kv( diff --git a/src/api/schema/metrics/events_in.rs b/src/api/schema/metrics/events_in.rs deleted file mode 100644 index b9550457d09e0..0000000000000 --- a/src/api/schema/metrics/events_in.rs +++ /dev/null @@ -1,42 +0,0 @@ -use async_graphql::Object; -use chrono::{DateTime, Utc}; - -use crate::event::{Metric, MetricValue}; - -pub struct EventsInTotal(Metric); - -impl EventsInTotal { - pub const fn new(m: Metric) -> Self { - Self(m) - } - - pub fn get_timestamp(&self) -> Option> { - self.0.timestamp() - } - - pub fn get_events_in_total(&self) -> f64 { - match self.0.value() { - MetricValue::Counter { value } => *value, - _ => 0.00, - } - } -} - -#[Object] -impl EventsInTotal { - /// Metric timestamp - pub async fn timestamp(&self) -> Option> { - self.get_timestamp() - } - - /// Total incoming events - pub async fn events_in_total(&self) -> f64 { - self.get_events_in_total() - } -} - -impl From for EventsInTotal { - fn from(m: Metric) -> Self { - Self(m) - } -} diff --git a/src/api/schema/metrics/events_out.rs b/src/api/schema/metrics/events_out.rs deleted file mode 100644 index de565d56bf56f..0000000000000 --- a/src/api/schema/metrics/events_out.rs +++ /dev/null @@ -1,42 +0,0 @@ -use async_graphql::Object; -use chrono::{DateTime, Utc}; - -use crate::event::{Metric, MetricValue}; - -pub struct EventsOutTotal(Metric); - -impl EventsOutTotal { - pub const fn new(m: Metric) -> Self { - Self(m) - } - - pub fn get_timestamp(&self) -> Option> { - self.0.timestamp() - } - - pub fn get_events_out_total(&self) -> f64 { - match self.0.value() { - MetricValue::Counter { value } => *value, - _ => 0.00, - } - } -} - -#[Object] -impl EventsOutTotal { - /// Metric timestamp - pub async fn timestamp(&self) -> Option> { - self.get_timestamp() - } - - /// Total outgoing events - pub async fn events_out_total(&self) -> f64 { - self.get_events_out_total() - } -} - -impl From for EventsOutTotal { - fn from(m: Metric) -> Self { - Self(m) - } -} diff --git a/src/api/schema/metrics/filter.rs b/src/api/schema/metrics/filter.rs index 0c61a5794fffe..bd094d64ce1c5 100644 --- a/src/api/schema/metrics/filter.rs +++ b/src/api/schema/metrics/filter.rs @@ -5,8 +5,8 @@ use tokio::time::Duration; use tokio_stream::{Stream, StreamExt}; use super::{ - filter_output_metric, EventsInTotal, EventsOutTotal, OutputThroughput, ProcessedBytesTotal, - ProcessedEventsTotal, ReceivedEventsTotal, SentEventsTotal, + filter_output_metric, OutputThroughput, ReceivedBytesTotal, ReceivedEventsTotal, + SentBytesTotal, SentEventsTotal, }; use crate::{ config::ComponentKey, @@ -46,31 +46,20 @@ fn sum_metrics_owned>(metrics: I) -> Option { - fn processed_events_total(&self) -> Option; - fn processed_bytes_total(&self) -> Option; + fn received_bytes_total(&self) -> Option; fn received_events_total(&self) -> Option; - fn events_in_total(&self) -> Option; - fn events_out_total(&self) -> Option; + fn sent_bytes_total(&self) -> Option; fn sent_events_total(&self) -> Option; } impl<'a> MetricsFilter<'a> for Vec { - fn processed_events_total(&self) -> Option { - let sum = sum_metrics(self.iter().filter(|m| m.name() == "processed_events_total"))?; - - Some(ProcessedEventsTotal::new(sum)) - } - - fn processed_bytes_total(&self) -> Option { - let sum = sum_metrics(self.iter().filter(|m| m.name() == "processed_bytes_total"))?; - - Some(ProcessedBytesTotal::new(sum)) - } - - fn events_in_total(&self) -> Option { - let sum = sum_metrics(self.iter().filter(|m| m.name() == "events_in_total"))?; + fn received_bytes_total(&self) -> Option { + let sum = sum_metrics( + self.iter() + .filter(|m| m.name() == "component_received_bytes_total"), + )?; - Some(EventsInTotal::new(sum)) + Some(ReceivedBytesTotal::new(sum)) } fn received_events_total(&self) -> Option { @@ -82,10 +71,13 @@ impl<'a> MetricsFilter<'a> for Vec { Some(ReceivedEventsTotal::new(sum)) } - fn events_out_total(&self) -> Option { - let sum = sum_metrics(self.iter().filter(|m| m.name() == "events_out_total"))?; + fn sent_bytes_total(&self) -> Option { + let sum = sum_metrics( + self.iter() + .filter(|m| m.name() == "component_sent_bytes_total"), + )?; - Some(EventsOutTotal::new(sum)) + Some(SentBytesTotal::new(sum)) } fn sent_events_total(&self) -> Option { @@ -99,24 +91,14 @@ impl<'a> MetricsFilter<'a> for Vec { } impl<'a> MetricsFilter<'a> for Vec<&'a Metric> { - fn processed_events_total(&self) -> Option { - let sum = sum_metrics( - self.iter() - .filter(|m| m.name() == "processed_events_total") - .copied(), - )?; - - Some(ProcessedEventsTotal::new(sum)) - } - - fn processed_bytes_total(&self) -> Option { + fn received_bytes_total(&self) -> Option { let sum = sum_metrics( self.iter() - .filter(|m| m.name() == "processed_bytes_total") + .filter(|m| m.name() == "component_received_bytes_total") .copied(), )?; - Some(ProcessedBytesTotal::new(sum)) + Some(ReceivedBytesTotal::new(sum)) } fn received_events_total(&self) -> Option { @@ -129,24 +111,14 @@ impl<'a> MetricsFilter<'a> for Vec<&'a Metric> { Some(ReceivedEventsTotal::new(sum)) } - fn events_in_total(&self) -> Option { - let sum = sum_metrics( - self.iter() - .filter(|m| m.name() == "events_in_total") - .copied(), - )?; - - Some(EventsInTotal::new(sum)) - } - - fn events_out_total(&self) -> Option { + fn sent_bytes_total(&self) -> Option { let sum = sum_metrics( self.iter() - .filter(|m| m.name() == "events_out_total") + .filter(|m| m.name() == "component_sent_bytes_total") .copied(), )?; - Some(EventsOutTotal::new(sum)) + Some(SentBytesTotal::new(sum)) } fn sent_events_total(&self) -> Option { @@ -202,7 +174,7 @@ pub fn by_component_key(component_key: &ComponentKey) -> Vec { type MetricFilterFn = dyn Fn(&Metric) -> bool + Send + Sync; /// Returns a stream of `Vec`, where `metric_name` matches the name of the metric -/// (e.g. "processed_events_total"), and the value is derived from `MetricValue::Counter`. Uses a +/// (e.g. "component_sent_events_total"), and the value is derived from `MetricValue::Counter`. Uses a /// local cache to match against the `component_id` of a metric, to return results only when /// the value of a current iteration is greater than the previous. This is useful for the client /// to be notified as metrics increase without returning 'empty' or identical results. @@ -230,7 +202,7 @@ pub fn component_counter_metrics( } /// Returns a stream of `Vec`, where `metric_name` matches the name of the metric -/// (e.g. "processed_events_total"), and the value is derived from `MetricValue::Gauge`. Uses a +/// (e.g. "component_sent_events_total"), and the value is derived from `MetricValue::Gauge`. Uses a /// local cache to match against the `component_id` of a metric, to return results only when /// the value of a current iteration is greater than the previous. This is useful for the client /// to be notified as metrics increase without returning 'empty' or identical results. diff --git a/src/api/schema/metrics/mod.rs b/src/api/schema/metrics/mod.rs index d883d560645e2..11b8abc51ddc5 100644 --- a/src/api/schema/metrics/mod.rs +++ b/src/api/schema/metrics/mod.rs @@ -1,12 +1,10 @@ mod allocated_bytes; mod errors; -mod events_in; -mod events_out; pub mod filter; mod output; -mod processed_bytes; -mod processed_events; +mod received_bytes; mod received_events; +mod sent_bytes; mod sent_events; mod sink; pub mod source; @@ -20,19 +18,15 @@ pub use allocated_bytes::{AllocatedBytes, ComponentAllocatedBytes}; use async_graphql::{Interface, Object, Subscription}; use chrono::{DateTime, Utc}; pub use errors::{ComponentErrorsTotal, ErrorsTotal}; -pub use events_in::EventsInTotal; -pub use events_out::EventsOutTotal; pub use filter::*; pub use output::*; -pub use processed_bytes::{ - ComponentProcessedBytesThroughput, ComponentProcessedBytesTotal, ProcessedBytesTotal, -}; -pub use processed_events::{ - ComponentProcessedEventsThroughput, ComponentProcessedEventsTotal, ProcessedEventsTotal, +pub use received_bytes::{ + ComponentReceivedBytesThroughput, ComponentReceivedBytesTotal, ReceivedBytesTotal, }; pub use received_events::{ ComponentReceivedEventsThroughput, ComponentReceivedEventsTotal, ReceivedEventsTotal, }; +pub use sent_bytes::{ComponentSentBytesThroughput, ComponentSentBytesTotal, SentBytesTotal}; pub use sent_events::{ComponentSentEventsThroughput, ComponentSentEventsTotal, SentEventsTotal}; pub use sink::{IntoSinkMetrics, SinkMetrics}; pub use source::{IntoSourceMetrics, SourceMetrics}; @@ -46,8 +40,6 @@ use crate::config::ComponentKey; #[graphql(field(name = "timestamp", type = "Option>"))] pub enum MetricType { Uptime(Uptime), - ProcessedEventsTotal(ProcessedEventsTotal), - ProcessedBytesTotal(ProcessedBytesTotal), } #[derive(Default)] @@ -78,57 +70,6 @@ impl MetricsSubscription { }) } - /// Event processing metrics. - async fn processed_events_total( - &self, - #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream { - get_metrics(interval).filter_map(|m| match m.name() { - "processed_events_total" => Some(ProcessedEventsTotal::new(m)), - _ => None, - }) - } - - /// Event processing throughput sampled over the provided millisecond `interval`. - async fn processed_events_throughput( - &self, - #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream { - counter_throughput(interval, &|m| m.name() == "processed_events_total") - .map(|(_, throughput)| throughput as i64) - } - - /// Component event processing throughput metrics over `interval`. - async fn component_processed_events_throughputs( - &self, - #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream> { - component_counter_throughputs(interval, &|m| m.name() == "processed_events_total").map( - |m| { - m.into_iter() - .map(|(m, throughput)| { - ComponentProcessedEventsThroughput::new( - ComponentKey::from(m.tag_value("component_id").unwrap()), - throughput as i64, - ) - }) - .collect() - }, - ) - } - - /// Component event processing metrics over `interval`. - async fn component_processed_events_totals( - &self, - #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream> { - component_counter_metrics(interval, &|m| m.name() == "processed_events_total").map(|m| { - m.into_iter() - .map(ComponentProcessedEventsTotal::new) - .collect() - }) - } - /// Total received events metrics #[graphql(deprecation = "Use component_received_events_totals instead")] async fn received_events_total( @@ -231,53 +172,64 @@ impl MetricsSubscription { }) } - /// Byte processing metrics. - async fn processed_bytes_total( + /// Component bytes received metrics over `interval`. + async fn component_received_bytes_totals( &self, #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream { - get_metrics(interval).filter_map(|m| match m.name() { - "processed_bytes_total" => Some(ProcessedBytesTotal::new(m)), - _ => None, - }) + ) -> impl Stream> { + component_counter_metrics(interval, &|m| m.name() == "component_received_bytes_total").map( + |m| { + m.into_iter() + .map(ComponentReceivedBytesTotal::new) + .collect() + }, + ) } - /// Byte processing throughput sampled over a provided millisecond `interval`. - async fn processed_bytes_throughput( + /// Component bytes received throughput over `interval` + async fn component_received_bytes_throughputs( &self, #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream { - counter_throughput(interval, &|m| m.name() == "processed_bytes_total") - .map(|(_, throughput)| throughput as i64) + ) -> impl Stream> { + component_counter_throughputs(interval, &|m| m.name() == "component_received_bytes_total") + .map(|m| { + m.into_iter() + .map(|(m, throughput)| { + ComponentReceivedBytesThroughput::new( + ComponentKey::from(m.tag_value("component_id").unwrap()), + throughput as i64, + ) + }) + .collect() + }) } - /// Component byte processing metrics over `interval`. - async fn component_processed_bytes_totals( + /// Component bytes sent metrics over `interval`. + async fn component_sent_bytes_totals( &self, #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream> { - component_counter_metrics(interval, &|m| m.name() == "processed_bytes_total").map(|m| { - m.into_iter() - .map(ComponentProcessedBytesTotal::new) - .collect() - }) + ) -> impl Stream> { + component_counter_metrics(interval, &|m| m.name() == "component_sent_bytes_total") + .map(|m| m.into_iter().map(ComponentSentBytesTotal::new).collect()) } - /// Component byte processing throughput over `interval` - async fn component_processed_bytes_throughputs( + /// Component bytes sent throughput over `interval` + async fn component_sent_bytes_throughputs( &self, #[graphql(default = 1000, validator(minimum = 10, maximum = 60_000))] interval: i32, - ) -> impl Stream> { - component_counter_throughputs(interval, &|m| m.name() == "processed_bytes_total").map(|m| { - m.into_iter() - .map(|(m, throughput)| { - ComponentProcessedBytesThroughput::new( - ComponentKey::from(m.tag_value("component_id").unwrap()), - throughput as i64, - ) - }) - .collect() - }) + ) -> impl Stream> { + component_counter_throughputs(interval, &|m| m.name() == "component_sent_bytes_total").map( + |m| { + m.into_iter() + .map(|(m, throughput)| { + ComponentSentBytesThroughput::new( + ComponentKey::from(m.tag_value("component_id").unwrap()), + throughput as i64, + ) + }) + .collect() + }, + ) } /// Total error metrics. @@ -325,8 +277,6 @@ impl MetricsSubscription { ) -> impl Stream { get_metrics(interval).filter_map(|m| match m.name() { "uptime_seconds" => Some(MetricType::Uptime(m.into())), - "processed_events_total" => Some(MetricType::ProcessedEventsTotal(m.into())), - "processed_bytes_total" => Some(MetricType::ProcessedBytesTotal(m.into())), _ => None, }) } diff --git a/src/api/schema/metrics/processed_bytes.rs b/src/api/schema/metrics/received_bytes.rs similarity index 57% rename from src/api/schema/metrics/processed_bytes.rs rename to src/api/schema/metrics/received_bytes.rs index 9711272cb08e3..516631559cbae 100644 --- a/src/api/schema/metrics/processed_bytes.rs +++ b/src/api/schema/metrics/received_bytes.rs @@ -6,9 +6,9 @@ use crate::{ event::{Metric, MetricValue}, }; -pub struct ProcessedBytesTotal(Metric); +pub struct ReceivedBytesTotal(Metric); -impl ProcessedBytesTotal { +impl ReceivedBytesTotal { pub const fn new(m: Metric) -> Self { Self(m) } @@ -17,7 +17,7 @@ impl ProcessedBytesTotal { self.0.timestamp() } - pub fn get_processed_bytes_total(&self) -> f64 { + pub fn get_received_bytes_total(&self) -> f64 { match self.0.value() { MetricValue::Counter { value } => *value, _ => 0.00, @@ -26,32 +26,33 @@ impl ProcessedBytesTotal { } #[Object] -impl ProcessedBytesTotal { - /// Metric timestamp +impl ReceivedBytesTotal { + /// Metric timestamp. pub async fn timestamp(&self) -> Option> { self.get_timestamp() } - /// Total number of bytes processed - pub async fn processed_bytes_total(&self) -> f64 { - self.get_processed_bytes_total() + /// Total number of bytes received. + pub async fn received_bytes_total(&self) -> f64 { + self.get_received_bytes_total() } } -impl From for ProcessedBytesTotal { +impl From for ReceivedBytesTotal { fn from(m: Metric) -> Self { Self(m) } } -pub struct ComponentProcessedBytesTotal { +pub struct ComponentReceivedBytesTotal { component_key: ComponentKey, metric: Metric, } -impl ComponentProcessedBytesTotal { - /// Returns a new `ComponentProcessedBytesTotal` struct, which is a GraphQL type. The - /// component id is hoisted for clear field resolution in the resulting payload +impl ComponentReceivedBytesTotal { + /// Returns a new `ComponentReceivedBytesTotal`. + /// + /// Expects that the metric contains a tag for the component ID the metric is referenced to. pub fn new(metric: Metric) -> Self { let component_key = metric.tag_value("component_id").expect( "Returned a metric without a `component_id`, which shouldn't happen. Please report.", @@ -66,25 +67,25 @@ impl ComponentProcessedBytesTotal { } #[Object] -impl ComponentProcessedBytesTotal { - /// Component id +impl ComponentReceivedBytesTotal { + /// Component ID. async fn component_id(&self) -> &str { self.component_key.id() } - /// Bytes processed total metric - async fn metric(&self) -> ProcessedBytesTotal { - ProcessedBytesTotal::new(self.metric.clone()) + /// Metric for total bytes received. + async fn metric(&self) -> ReceivedBytesTotal { + ReceivedBytesTotal::new(self.metric.clone()) } } -pub struct ComponentProcessedBytesThroughput { +pub struct ComponentReceivedBytesThroughput { component_key: ComponentKey, throughput: i64, } -impl ComponentProcessedBytesThroughput { - /// Returns a new `ComponentProcessedBytesThroughput`, set to the provided id/throughput values +impl ComponentReceivedBytesThroughput { + /// Returns a new `ComponentReceivedBytesThroughput` for the given component. pub const fn new(component_key: ComponentKey, throughput: i64) -> Self { Self { component_key, @@ -94,13 +95,13 @@ impl ComponentProcessedBytesThroughput { } #[Object] -impl ComponentProcessedBytesThroughput { - /// Component id +impl ComponentReceivedBytesThroughput { + /// Component ID. async fn component_id(&self) -> &str { self.component_key.id() } - /// Bytes processed throughput + /// Throughput of bytes sent. async fn throughput(&self) -> i64 { self.throughput } diff --git a/src/api/schema/metrics/processed_events.rs b/src/api/schema/metrics/sent_bytes.rs similarity index 57% rename from src/api/schema/metrics/processed_events.rs rename to src/api/schema/metrics/sent_bytes.rs index 9b3a5c974fc3e..02fb833a39adc 100644 --- a/src/api/schema/metrics/processed_events.rs +++ b/src/api/schema/metrics/sent_bytes.rs @@ -6,9 +6,9 @@ use crate::{ event::{Metric, MetricValue}, }; -pub struct ProcessedEventsTotal(Metric); +pub struct SentBytesTotal(Metric); -impl ProcessedEventsTotal { +impl SentBytesTotal { pub const fn new(m: Metric) -> Self { Self(m) } @@ -17,7 +17,7 @@ impl ProcessedEventsTotal { self.0.timestamp() } - pub fn get_processed_events_total(&self) -> f64 { + pub fn get_sent_bytes_total(&self) -> f64 { match self.0.value() { MetricValue::Counter { value } => *value, _ => 0.00, @@ -26,32 +26,33 @@ impl ProcessedEventsTotal { } #[Object] -impl ProcessedEventsTotal { - /// Metric timestamp +impl SentBytesTotal { + /// Metric timestamp. pub async fn timestamp(&self) -> Option> { self.get_timestamp() } - /// Total number of events processed - pub async fn processed_events_total(&self) -> f64 { - self.get_processed_events_total() + /// Total number of bytes sent. + pub async fn sent_bytes_total(&self) -> f64 { + self.get_sent_bytes_total() } } -impl From for ProcessedEventsTotal { +impl From for SentBytesTotal { fn from(m: Metric) -> Self { Self(m) } } -pub struct ComponentProcessedEventsTotal { +pub struct ComponentSentBytesTotal { component_key: ComponentKey, metric: Metric, } -impl ComponentProcessedEventsTotal { - /// Returns a new `ComponentProcessedEventsTotal` struct, which is a GraphQL type. The - /// component id is hoisted for clear field resolution in the resulting payload +impl ComponentSentBytesTotal { + /// Returns a new `ComponentSentBytesTotal` for the given metric. + /// + /// Expects that the metric contains a tag for the component ID the metric is referenced to. pub fn new(metric: Metric) -> Self { let component_key = metric.tag_value("component_id").expect( "Returned a metric without a `component_id`, which shouldn't happen. Please report.", @@ -66,25 +67,25 @@ impl ComponentProcessedEventsTotal { } #[Object] -impl ComponentProcessedEventsTotal { - /// Component id +impl ComponentSentBytesTotal { + /// Component ID. async fn component_id(&self) -> &str { self.component_key.id() } - /// Events processed total metric - async fn metric(&self) -> ProcessedEventsTotal { - ProcessedEventsTotal::new(self.metric.clone()) + /// Metric for total bytes sent. + async fn metric(&self) -> SentBytesTotal { + SentBytesTotal::new(self.metric.clone()) } } -pub struct ComponentProcessedEventsThroughput { +pub struct ComponentSentBytesThroughput { component_key: ComponentKey, throughput: i64, } -impl ComponentProcessedEventsThroughput { - /// Returns a new `ComponentProcessedEventsThroughput`, set to the provided id/throughput values +impl ComponentSentBytesThroughput { + /// Returns a new `ComponentSentBytesThroughput` for the given component. pub const fn new(component_key: ComponentKey, throughput: i64) -> Self { Self { component_key, @@ -94,13 +95,13 @@ impl ComponentProcessedEventsThroughput { } #[Object] -impl ComponentProcessedEventsThroughput { - /// Component id +impl ComponentSentBytesThroughput { + /// Component ID. async fn component_id(&self) -> &str { self.component_key.id() } - /// Events processed throughput + /// Throughput of bytes sent. async fn throughput(&self) -> i64 { self.throughput } diff --git a/src/api/schema/metrics/sink/generic.rs b/src/api/schema/metrics/sink/generic.rs index e2a01b55d5961..e0f96e38fbd6d 100644 --- a/src/api/schema/metrics/sink/generic.rs +++ b/src/api/schema/metrics/sink/generic.rs @@ -16,32 +16,17 @@ impl GenericSinkMetrics { #[Object] impl GenericSinkMetrics { - /// Events processed for the current sink - pub async fn processed_events_total(&self) -> Option { - self.0.processed_events_total() - } - - /// Bytes processed for the current sink - pub async fn processed_bytes_total(&self) -> Option { - self.0.processed_bytes_total() - } - - /// Total incoming events for the current sink - pub async fn events_in_total(&self) -> Option { - self.0.events_in_total() - } - /// Total received events for the current sink pub async fn received_events_total(&self) -> Option { self.0.received_events_total() } - /// Total outgoing events for the current sink - pub async fn events_out_total(&self) -> Option { - self.0.events_out_total() + /// Total sent bytes for the current sink + pub async fn sent_bytes_total(&self) -> Option { + self.0.sent_bytes_total() } - /// Total outgoing events for the current sink + /// Total sent events for the current sink pub async fn sent_events_total(&self) -> Option { self.0.sent_events_total() } diff --git a/src/api/schema/metrics/sink/mod.rs b/src/api/schema/metrics/sink/mod.rs index c6c25c3f8a726..97f943a7dbef7 100644 --- a/src/api/schema/metrics/sink/mod.rs +++ b/src/api/schema/metrics/sink/mod.rs @@ -2,28 +2,14 @@ mod generic; use async_graphql::Interface; -use super::{ - EventsInTotal, EventsOutTotal, ProcessedBytesTotal, ProcessedEventsTotal, ReceivedEventsTotal, - SentEventsTotal, -}; +use super::{ReceivedEventsTotal, SentBytesTotal, SentEventsTotal}; use crate::event::Metric; #[derive(Debug, Clone, Interface)] #[graphql( - field(name = "processed_events_total", type = "Option"), - field(name = "processed_bytes_total", type = "Option"), field(name = "received_events_total", type = "Option"), - field( - name = "events_in_total", - type = "Option", - deprecation = "Use received_events_total instead" - ), - field(name = "sent_events_total", type = "Option"), - field( - name = "events_out_total", - type = "Option", - deprecation = "Use sent_events_total instead" - ) + field(name = "sent_bytes_total", type = "Option"), + field(name = "sent_events_total", type = "Option") )] pub enum SinkMetrics { GenericSinkMetrics(generic::GenericSinkMetrics), diff --git a/src/api/schema/metrics/source/file.rs b/src/api/schema/metrics/source/file.rs index 4108f68d7210e..daff4648cc967 100644 --- a/src/api/schema/metrics/source/file.rs +++ b/src/api/schema/metrics/source/file.rs @@ -37,19 +37,9 @@ impl<'a> FileSourceMetricFile<'a> { &*self.name } - /// Metric indicating events processed for the current file - async fn processed_events_total(&self) -> Option { - self.metrics.processed_events_total() - } - - /// Metric indicating bytes processed for the current file - async fn processed_bytes_total(&self) -> Option { - self.metrics.processed_bytes_total() - } - - /// Metric indicating incoming events for the current file - async fn events_in_total(&self) -> Option { - self.metrics.events_in_total() + /// Metric indicating bytes received for the current file + async fn received_bytes_total(&self) -> Option { + self.metrics.received_bytes_total() } /// Metric indicating received events for the current file @@ -57,11 +47,6 @@ impl<'a> FileSourceMetricFile<'a> { self.metrics.received_events_total() } - /// Metric indicating outgoing events for the current file - async fn events_out_total(&self) -> Option { - self.metrics.events_out_total() - } - /// Metric indicating outgoing events for the current file async fn sent_events_total(&self) -> Option { self.metrics.sent_events_total() @@ -93,38 +78,24 @@ impl FileSourceMetrics { #[derive(Enum, Copy, Clone, Eq, PartialEq)] pub enum FileSourceMetricFilesSortFieldName { Name, - ProcessedBytesTotal, - ProcessedEventsTotal, + ReceivedBytesTotal, ReceivedEventsTotal, - EventsInTotal, SentEventsTotal, - EventsOutTotal, } impl sort::SortableByField for FileSourceMetricFile<'_> { fn sort(&self, rhs: &Self, field: &FileSourceMetricFilesSortFieldName) -> Ordering { match field { FileSourceMetricFilesSortFieldName::Name => Ord::cmp(&self.name, &rhs.name), - FileSourceMetricFilesSortFieldName::ProcessedBytesTotal => Ord::cmp( - &self - .metrics - .processed_bytes_total() - .map(|m| m.get_processed_bytes_total() as i64) - .unwrap_or(0), - &rhs.metrics - .processed_bytes_total() - .map(|m| m.get_processed_bytes_total() as i64) - .unwrap_or(0), - ), - FileSourceMetricFilesSortFieldName::ProcessedEventsTotal => Ord::cmp( + FileSourceMetricFilesSortFieldName::ReceivedBytesTotal => Ord::cmp( &self .metrics - .processed_events_total() - .map(|m| m.get_processed_events_total() as i64) + .received_bytes_total() + .map(|m| m.get_received_bytes_total() as i64) .unwrap_or(0), &rhs.metrics - .processed_events_total() - .map(|m| m.get_processed_events_total() as i64) + .received_bytes_total() + .map(|m| m.get_received_bytes_total() as i64) .unwrap_or(0), ), FileSourceMetricFilesSortFieldName::ReceivedEventsTotal => Ord::cmp( @@ -138,17 +109,6 @@ impl sort::SortableByField for FileSourceMet .map(|m| m.get_received_events_total() as i64) .unwrap_or(0), ), - FileSourceMetricFilesSortFieldName::EventsInTotal => Ord::cmp( - &self - .metrics - .events_in_total() - .map(|m| m.get_events_in_total() as i64) - .unwrap_or(0), - &rhs.metrics - .events_in_total() - .map(|m| m.get_events_in_total() as i64) - .unwrap_or(0), - ), FileSourceMetricFilesSortFieldName::SentEventsTotal => Ord::cmp( &self .metrics @@ -160,17 +120,6 @@ impl sort::SortableByField for FileSourceMet .map(|m| m.get_sent_events_total() as i64) .unwrap_or(0), ), - FileSourceMetricFilesSortFieldName::EventsOutTotal => Ord::cmp( - &self - .metrics - .events_out_total() - .map(|m| m.get_events_out_total() as i64) - .unwrap_or(0), - &rhs.metrics - .events_out_total() - .map(|m| m.get_events_out_total() as i64) - .unwrap_or(0), - ), } } } @@ -223,19 +172,9 @@ impl FileSourceMetrics { .await } - /// Events processed for the current file source - pub async fn processed_events_total(&self) -> Option { - self.0.processed_events_total() - } - - /// Bytes processed for the current file source - pub async fn processed_bytes_total(&self) -> Option { - self.0.processed_bytes_total() - } - - /// Total incoming events for the current file source - pub async fn events_in_total(&self) -> Option { - self.0.events_in_total() + /// Total received bytes for the current file source + pub async fn received_bytes_total(&self) -> Option { + self.0.received_bytes_total() } /// Total received events for the current file source @@ -243,12 +182,7 @@ impl FileSourceMetrics { self.0.received_events_total() } - /// Total outgoing events for the current file source - pub async fn events_out_total(&self) -> Option { - self.0.events_out_total() - } - - /// Total outgoing events for the current file source + /// Total sent events for the current file source pub async fn sent_events_total(&self) -> Option { self.0.sent_events_total() } @@ -272,8 +206,8 @@ mod tests { fn new(name: &'static str, events_processed: f64, bytes_processed: f64) -> Self { Self { name, - events_metric: metric("processed_events_total", events_processed), - bytes_metric: metric("processed_bytes_total", bytes_processed), + events_metric: metric("component_sent_events_total", events_processed), + bytes_metric: metric("component_received_bytes_total", bytes_processed), } } @@ -343,7 +277,7 @@ mod tests { let mut files = vec![t1.get_metric(), t2.get_metric(), t3.get_metric()]; let fields = vec![SortField:: { - field: FileSourceMetricFilesSortFieldName::ProcessedEventsTotal, + field: FileSourceMetricFilesSortFieldName::SentEventsTotal, direction: sort::Direction::Asc, }]; @@ -362,7 +296,7 @@ mod tests { let mut files = vec![t1.get_metric(), t2.get_metric(), t3.get_metric()]; let fields = vec![SortField:: { - field: FileSourceMetricFilesSortFieldName::ProcessedEventsTotal, + field: FileSourceMetricFilesSortFieldName::SentEventsTotal, direction: sort::Direction::Desc, }]; @@ -374,14 +308,14 @@ mod tests { } #[test] - fn processed_bytes_asc() { + fn received_bytes_asc() { let t1 = FileSourceMetricTest::new("a", 1000.00, 100.00); let t2 = FileSourceMetricTest::new("b", 500.00, 300.00); let t3 = FileSourceMetricTest::new("c", 250.00, 200.00); let mut files = vec![t1.get_metric(), t2.get_metric(), t3.get_metric()]; let fields = vec![SortField:: { - field: FileSourceMetricFilesSortFieldName::ProcessedBytesTotal, + field: FileSourceMetricFilesSortFieldName::ReceivedBytesTotal, direction: sort::Direction::Asc, }]; @@ -393,14 +327,14 @@ mod tests { } #[test] - fn processed_bytes_desc() { + fn received_bytes_desc() { let t1 = FileSourceMetricTest::new("a", 1000.00, 100.00); let t2 = FileSourceMetricTest::new("b", 500.00, 300.00); let t3 = FileSourceMetricTest::new("c", 250.00, 200.00); let mut files = vec![t1.get_metric(), t2.get_metric(), t3.get_metric()]; let fields = vec![SortField:: { - field: FileSourceMetricFilesSortFieldName::ProcessedBytesTotal, + field: FileSourceMetricFilesSortFieldName::ReceivedBytesTotal, direction: sort::Direction::Desc, }]; diff --git a/src/api/schema/metrics/source/generic.rs b/src/api/schema/metrics/source/generic.rs index f37cf8b13a716..c66d50a841c91 100644 --- a/src/api/schema/metrics/source/generic.rs +++ b/src/api/schema/metrics/source/generic.rs @@ -16,19 +16,9 @@ impl GenericSourceMetrics { #[Object] impl GenericSourceMetrics { - /// Events processed for the current source - pub async fn processed_events_total(&self) -> Option { - self.0.processed_events_total() - } - - /// Bytes processed for the current source - pub async fn processed_bytes_total(&self) -> Option { - self.0.processed_bytes_total() - } - - /// Total incoming events for the current source - pub async fn events_in_total(&self) -> Option { - self.0.events_in_total() + /// Total received bytes for the current source + pub async fn received_bytes_total(&self) -> Option { + self.0.received_bytes_total() } /// Total received events for the current source @@ -36,12 +26,7 @@ impl GenericSourceMetrics { self.0.received_events_total() } - /// Total outgoing events for the current source - pub async fn events_out_total(&self) -> Option { - self.0.events_out_total() - } - - /// Total outgoing events for the current source + /// Total sent events for the current source pub async fn sent_events_total(&self) -> Option { self.0.sent_events_total() } diff --git a/src/api/schema/metrics/source/mod.rs b/src/api/schema/metrics/source/mod.rs index e47cb48cf1333..5463ac0ecf545 100644 --- a/src/api/schema/metrics/source/mod.rs +++ b/src/api/schema/metrics/source/mod.rs @@ -3,28 +3,14 @@ mod generic; use async_graphql::Interface; -use super::{ - EventsInTotal, EventsOutTotal, ProcessedBytesTotal, ProcessedEventsTotal, ReceivedEventsTotal, - SentEventsTotal, -}; +use super::{ReceivedBytesTotal, ReceivedEventsTotal, SentEventsTotal}; use crate::event::Metric; #[derive(Debug, Clone, Interface)] #[graphql( - field(name = "processed_events_total", type = "Option"), - field(name = "processed_bytes_total", type = "Option"), + field(name = "received_bytes_total", type = "Option"), field(name = "received_events_total", type = "Option"), - field( - name = "events_in_total", - type = "Option", - deprecation = "Use received_events_total instead" - ), - field(name = "sent_events_total", type = "Option"), - field( - name = "events_out_total", - type = "Option", - deprecation = "Use sent_events_total instead" - ) + field(name = "sent_events_total", type = "Option") )] pub enum SourceMetrics { GenericSourceMetrics(generic::GenericSourceMetrics), diff --git a/src/api/schema/metrics/transform/generic.rs b/src/api/schema/metrics/transform/generic.rs index e6c5af7c90a0a..0fd2569551473 100644 --- a/src/api/schema/metrics/transform/generic.rs +++ b/src/api/schema/metrics/transform/generic.rs @@ -16,32 +16,12 @@ impl GenericTransformMetrics { #[Object] impl GenericTransformMetrics { - /// Events processed for the current transform - pub async fn processed_events_total(&self) -> Option { - self.0.processed_events_total() - } - - /// Bytes processed for the current transform - pub async fn processed_bytes_total(&self) -> Option { - self.0.processed_bytes_total() - } - - /// Total incoming events for the current transform - pub async fn events_in_total(&self) -> Option { - self.0.events_in_total() - } - /// Total received events for the current transform pub async fn received_events_total(&self) -> Option { self.0.received_events_total() } - /// Total outgoing events for the current transform - pub async fn events_out_total(&self) -> Option { - self.0.events_out_total() - } - - /// Total outgoing events for the current transform + /// Total sent events for the current transform pub async fn sent_events_total(&self) -> Option { self.0.sent_events_total() } diff --git a/src/api/schema/metrics/transform/mod.rs b/src/api/schema/metrics/transform/mod.rs index b408ac490a783..bfdc8a5a08b30 100644 --- a/src/api/schema/metrics/transform/mod.rs +++ b/src/api/schema/metrics/transform/mod.rs @@ -2,28 +2,13 @@ mod generic; use async_graphql::Interface; -use super::{ - EventsInTotal, EventsOutTotal, ProcessedBytesTotal, ProcessedEventsTotal, ReceivedEventsTotal, - SentEventsTotal, -}; +use super::{ReceivedEventsTotal, SentEventsTotal}; use crate::event::Metric; #[derive(Debug, Clone, Interface)] #[graphql( - field(name = "processed_events_total", type = "Option"), - field(name = "processed_bytes_total", type = "Option"), field(name = "received_events_total", type = "Option"), - field( - name = "events_in_total", - type = "Option", - deprecation = "Use received_events_total instead" - ), - field(name = "sent_events_total", type = "Option"), - field( - name = "events_out_total", - type = "Option", - deprecation = "Use sent_events_total instead" - ) + field(name = "sent_events_total", type = "Option") )] pub enum TransformMetrics { GenericTransformMetrics(generic::GenericTransformMetrics), diff --git a/src/config/mod.rs b/src/config/mod.rs index c1f949d3506fa..1de078ae873b9 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1102,7 +1102,7 @@ mod tests { type = "filter" inputs = ["internal_metrics"] condition = """ - .name == "processed_bytes_total" + .name == "component_received_bytes_total" """ [sinks.out] @@ -1133,7 +1133,7 @@ mod tests { type = "filter" inputs = ["internal_metrics"] condition = """ - .name == "processed_bytes_total" + .name == "component_received_bytes_total" """ [sinks.out] diff --git a/src/internal_events/apache_metrics.rs b/src/internal_events/apache_metrics.rs index ac09f4f71ada5..d3550c17223e2 100644 --- a/src/internal_events/apache_metrics.rs +++ b/src/internal_events/apache_metrics.rs @@ -24,10 +24,6 @@ impl<'a> InternalEvent for ApacheMetricsEventsReceived<'a> { "component_received_event_bytes_total", self.byte_size as u64, "endpoint" => self.endpoint.to_owned(), ); - counter!( - "events_in_total", self.count as u64, - "uri" => self.endpoint.to_owned(), - ); } } diff --git a/src/internal_events/aws_ecs_metrics.rs b/src/internal_events/aws_ecs_metrics.rs index bb394b0f491db..92340ba484110 100644 --- a/src/internal_events/aws_ecs_metrics.rs +++ b/src/internal_events/aws_ecs_metrics.rs @@ -30,8 +30,6 @@ impl<'a> InternalEvent for AwsEcsMetricsEventsReceived<'a> { "component_received_event_bytes_total", self.byte_size as u64, "endpoint" => self.endpoint.to_string(), ); - // deprecated - counter!("events_in_total", self.count as u64); } } diff --git a/src/internal_events/conditions.rs b/src/internal_events/conditions.rs index 4b88685d32edf..31ddeecc60bae 100644 --- a/src/internal_events/conditions.rs +++ b/src/internal_events/conditions.rs @@ -22,7 +22,5 @@ impl<'a> InternalEvent for VrlConditionExecutionError<'a> { "error_type" => error_type::SCRIPT_FAILED, "stage" => error_stage::PROCESSING, ); - // deprecated - counter!("processing_errors_total", 1); } } diff --git a/src/internal_events/docker_logs.rs b/src/internal_events/docker_logs.rs index f02ce627a3310..d126b656a6773 100644 --- a/src/internal_events/docker_logs.rs +++ b/src/internal_events/docker_logs.rs @@ -27,11 +27,6 @@ impl InternalEvent for DockerLogsEventsReceived<'_> { "component_received_event_bytes_total", self.byte_size as u64, "container_name" => self.container_name.to_owned() ); - // deprecated - counter!( - "events_in_total", 1, - "container_name" => self.container_name.to_owned() - ); } } diff --git a/src/internal_events/exec.rs b/src/internal_events/exec.rs index 99f41f143d490..f171ca374fbb1 100644 --- a/src/internal_events/exec.rs +++ b/src/internal_events/exec.rs @@ -33,11 +33,6 @@ impl InternalEvent for ExecEventsReceived<'_> { "component_received_event_bytes_total", self.byte_size as u64, "command" => self.command.to_owned(), ); - // deprecated - counter!( - "events_in_total", self.count as u64, - "command" => self.command.to_owned(), - ); } } @@ -65,13 +60,6 @@ impl InternalEvent for ExecFailedError<'_> { "error_code" => io_error_code(&self.error), "stage" => error_stage::RECEIVING, ); - // deprecated - counter!( - "processing_errors_total", 1, - "command" => self.command.to_owned(), - "error_type" => error_type::COMMAND_FAILED, - "stage" => error_stage::RECEIVING, - ); } } @@ -99,13 +87,6 @@ impl InternalEvent for ExecTimeoutError<'_> { "error_type" => error_type::TIMED_OUT, "stage" => error_stage::RECEIVING, ); - // deprecated - counter!( - "processing_errors_total", 1, - "command" => self.command.to_owned(), - "error_type" => error_type::TIMED_OUT, - "stage" => error_stage::RECEIVING, - ); } } @@ -216,14 +197,6 @@ impl InternalEvent for ExecFailedToSignalChildError<'_> { "error_type" => error_type::COMMAND_FAILED, "stage" => error_stage::RECEIVING, ); - // deprecated - counter!( - "processing_errors_total", 1, - "command_code" => format!("{:?}", self.command.as_std()), - "error" => self.error.to_error_code(), - "error_type" => error_type::COMMAND_FAILED, - "stage" => error_stage::RECEIVING, - ); } } diff --git a/src/internal_events/file.rs b/src/internal_events/file.rs index 2e3cb17344fb9..6e76be2f5d398 100644 --- a/src/internal_events/file.rs +++ b/src/internal_events/file.rs @@ -125,10 +125,6 @@ mod source { byte_size = %self.byte_size, file = %self.file ); - counter!( - "events_in_total", self.count as u64, - "file" => self.file.to_owned(), - ); counter!( "component_received_events_total", self.count as u64, "file" => self.file.to_owned(), diff --git a/src/internal_events/fluent.rs b/src/internal_events/fluent.rs index a325dc969eeac..9fbcdc0031e5f 100644 --- a/src/internal_events/fluent.rs +++ b/src/internal_events/fluent.rs @@ -13,7 +13,6 @@ impl InternalEvent for FluentMessageReceived { fn emit(self) { trace!(message = "Received fluent message.", byte_size = %self.byte_size); counter!("component_received_events_total", 1); - counter!("events_in_total", 1); } } diff --git a/src/internal_events/http.rs b/src/internal_events/http.rs index a1879c2379bcb..a016998b7655b 100644 --- a/src/internal_events/http.rs +++ b/src/internal_events/http.rs @@ -58,7 +58,6 @@ impl InternalEvent for HttpEventsReceived<'_> { "http_path" => self.http_path.to_string(), "protocol" => self.protocol, ); - counter!("events_in_total", self.count as u64); } } diff --git a/src/internal_events/http_client_source.rs b/src/internal_events/http_client_source.rs index 6d9d6a1e1c3e8..b5e7ec2d8b68a 100644 --- a/src/internal_events/http_client_source.rs +++ b/src/internal_events/http_client_source.rs @@ -27,11 +27,6 @@ impl InternalEvent for HttpClientEventsReceived { "component_received_event_bytes_total", self.byte_size as u64, "uri" => self.url.clone(), ); - // deprecated - counter!( - "events_in_total", self.count as u64, - "uri" => self.url, - ); } } diff --git a/src/internal_events/kafka.rs b/src/internal_events/kafka.rs index 92afe66b98a53..b17e04e6396b1 100644 --- a/src/internal_events/kafka.rs +++ b/src/internal_events/kafka.rs @@ -54,8 +54,6 @@ impl<'a> InternalEvent for KafkaEventsReceived<'a> { "topic" => self.topic.to_string(), "partition" => self.partition.to_string(), ); - // deprecated - counter!("events_in_total", self.count as u64); } } diff --git a/src/internal_events/kubernetes_logs.rs b/src/internal_events/kubernetes_logs.rs index 02aefa9bbe374..a008fdb4499c1 100644 --- a/src/internal_events/kubernetes_logs.rs +++ b/src/internal_events/kubernetes_logs.rs @@ -34,8 +34,7 @@ impl InternalEvent for KubernetesLogsEventsReceived<'_> { let pod_namespace = pod_info.namespace; counter!("component_received_events_total", 1, "pod_name" => pod_name.clone(), "pod_namespace" => pod_namespace.clone()); - counter!("component_received_event_bytes_total", self.byte_size as u64, "pod_name" => pod_name.clone(), "pod_namespace" => pod_namespace.clone()); - counter!("events_in_total", 1, "pod_name" => pod_name, "pod_namespace" => pod_namespace); + counter!("component_received_event_bytes_total", self.byte_size as u64, "pod_name" => pod_name, "pod_namespace" => pod_namespace); } None => { counter!("component_received_events_total", 1); @@ -43,7 +42,6 @@ impl InternalEvent for KubernetesLogsEventsReceived<'_> { "component_received_event_bytes_total", self.byte_size as u64 ); - counter!("events_in_total", 1); } } } diff --git a/src/internal_events/log_to_metric.rs b/src/internal_events/log_to_metric.rs index df9027a40b234..1925dd135efba 100644 --- a/src/internal_events/log_to_metric.rs +++ b/src/internal_events/log_to_metric.rs @@ -30,11 +30,6 @@ impl<'a> InternalEvent for LogToMetricFieldNullError<'a> { "stage" => error_stage::PROCESSING, "null_field" => self.field.to_string(), ); - // deprecated - counter!( - "processing_errors_total", 1, - "error_type" => "field_null", - ); emit!(ComponentEventsDropped:: { count: 1, reason }) } @@ -64,11 +59,6 @@ impl<'a> InternalEvent for LogToMetricParseFloatError<'a> { "stage" => error_stage::PROCESSING, "field" => self.field.to_string(), ); - // deprecated - counter!( - "processing_errors_total", 1, - "error_type" => "parse_error", - ); emit!(ComponentEventsDropped:: { count: 1, reason }) } diff --git a/src/internal_events/mongodb_metrics.rs b/src/internal_events/mongodb_metrics.rs index d5038e54a5f47..bc33a258c8c04 100644 --- a/src/internal_events/mongodb_metrics.rs +++ b/src/internal_events/mongodb_metrics.rs @@ -27,11 +27,6 @@ impl<'a> InternalEvent for MongoDbMetricsEventsReceived<'a> { "component_received_event_bytes_total", self.byte_size as u64, "endpoint" => self.endpoint.to_owned(), ); - // deprecated - counter!( - "events_in_total", self.count as u64, - "endpoint" => self.endpoint.to_owned(), - ); } } diff --git a/src/internal_events/nginx_metrics.rs b/src/internal_events/nginx_metrics.rs index d8db19fcb7c60..46da39b6288f4 100644 --- a/src/internal_events/nginx_metrics.rs +++ b/src/internal_events/nginx_metrics.rs @@ -27,11 +27,6 @@ impl<'a> InternalEvent for NginxMetricsEventsReceived<'a> { "component_received_event_bytes_total", self.byte_size as u64, "endpoint" => self.endpoint.to_owned(), ); - // deprecated - counter!( - "events_in_total", self.count as u64, - "endpoint" => self.endpoint.to_owned(), - ); } } diff --git a/src/internal_events/socket.rs b/src/internal_events/socket.rs index 468701a1fa194..bdc4c884be209 100644 --- a/src/internal_events/socket.rs +++ b/src/internal_events/socket.rs @@ -60,8 +60,6 @@ impl InternalEvent for SocketEventsReceived { ); counter!("component_received_events_total", self.count as u64, "mode" => mode); counter!("component_received_event_bytes_total", self.byte_size as u64, "mode" => mode); - // deprecated - counter!("events_in_total", self.count as u64, "mode" => mode); } } diff --git a/src/top/cmd.rs b/src/top/cmd.rs index f967b7d2c98ce..16aa38126548a 100644 --- a/src/top/cmd.rs +++ b/src/top/cmd.rs @@ -1,5 +1,6 @@ use std::time::Duration; +use chrono::Local; use futures_util::future::join_all; use tokio::sync::oneshot; use url::Url; @@ -86,7 +87,9 @@ pub async fn cmd(opts: &super::Opts) -> exitcode::ExitCode { metrics::subscribe(subscription_client, tx.clone(), opts_clone.interval as i64); _ = tx - .send(EventType::ConnectionUpdated(ConnectionStatus::Connected)) + .send(EventType::ConnectionUpdated(ConnectionStatus::Connected( + Local::now(), + ))) .await; // Tasks spawned in metrics::subscribe finish when the subscription // streams have completed. Currently, subscription streams only diff --git a/src/top/dashboard.rs b/src/top/dashboard.rs index 3f73b3424685e..ccf0b49085a5c 100644 --- a/src/top/dashboard.rs +++ b/src/top/dashboard.rs @@ -104,10 +104,25 @@ fn format_metric(total: i64, throughput: i64, human_metrics: bool) -> String { } } +fn format_metric_bytes(total: i64, throughput: i64, human_metrics: bool) -> String { + match total { + 0 => "N/A".to_string(), + v => format!( + "{} ({}/s)", + if human_metrics { + v.human_format_bytes() + } else { + v.thousands_format() + }, + throughput.human_format_bytes() + ), + } +} + const NUM_COLUMNS: usize = if is_allocation_tracking_enabled() { - 9 + 10 } else { - 8 + 9 }; static HEADER: [&str; NUM_COLUMNS] = [ @@ -116,11 +131,12 @@ static HEADER: [&str; NUM_COLUMNS] = [ "Kind", "Type", "Events In", + "Bytes In", "Events Out", - "Bytes", + "Bytes Out", "Errors", #[cfg(feature = "allocation-tracing")] - "Mem Usage Bytes", + "Memory Used", ]; struct Widgets<'a> { @@ -152,15 +168,17 @@ impl<'a> Widgets<'a> { area: Rect, connection_status: &ConnectionStatus, ) { - let text = vec![Spans::from(vec![ + let mut text = vec![ Span::from(self.url_string), Span::styled( format!(" | Sampling @ {}ms", self.opts.interval.thousands_format()), Style::default().fg(Color::Gray), ), Span::from(" | "), - Span::styled(connection_status.to_string(), connection_status.style()), - ])]; + ]; + text.extend(connection_status.as_ui_spans()); + + let text = vec![Spans::from(text)]; let block = Block::default().borders(Borders::ALL).title(Span::styled( "Vector", @@ -201,14 +219,19 @@ impl<'a> Widgets<'a> { r.received_events_throughput_sec, self.opts.human_metrics, ), + format_metric_bytes( + r.received_bytes_total, + r.received_bytes_throughput_sec, + self.opts.human_metrics, + ), format_metric( r.sent_events_total, r.sent_events_throughput_sec, self.opts.human_metrics, ), - format_metric( - r.processed_bytes_total, - r.processed_bytes_throughput_sec, + format_metric_bytes( + r.sent_bytes_total, + r.sent_bytes_throughput_sec, self.opts.human_metrics, ), if self.opts.human_metrics { @@ -217,7 +240,7 @@ impl<'a> Widgets<'a> { r.errors.thousands_format() }, #[cfg(feature = "allocation-tracing")] - r.allocated_bytes.human_format(), + r.allocated_bytes.human_format_bytes(), ]; data.extend_from_slice(&formatted_metrics); @@ -248,26 +271,28 @@ impl<'a> Widgets<'a> { .column_spacing(2) .widths(if is_allocation_tracking_enabled() { &[ - Constraint::Percentage(15), // ID - Constraint::Percentage(6), // Output - Constraint::Percentage(8), // Kind - Constraint::Percentage(10), // Type + Constraint::Percentage(13), // ID + Constraint::Percentage(8), // Output + Constraint::Percentage(4), // Kind + Constraint::Percentage(9), // Type Constraint::Percentage(10), // Events In + Constraint::Percentage(12), // Bytes In Constraint::Percentage(10), // Events Out - Constraint::Percentage(10), // Bytes - Constraint::Percentage(5), // Errors - Constraint::Percentage(16), // Allocated Bytes + Constraint::Percentage(12), // Bytes Out + Constraint::Percentage(8), // Errors + Constraint::Percentage(14), // Allocated Bytes ] } else { &[ - Constraint::Percentage(15), // ID - Constraint::Percentage(15), // Output - Constraint::Percentage(10), // Kind - Constraint::Percentage(10), // Type - Constraint::Percentage(10), // Events In - Constraint::Percentage(10), // Events Out - Constraint::Percentage(10), // Bytes - Constraint::Percentage(10), // Errors + Constraint::Percentage(13), // ID + Constraint::Percentage(12), // Output + Constraint::Percentage(9), // Kind + Constraint::Percentage(6), // Type + Constraint::Percentage(12), // Events In + Constraint::Percentage(14), // Bytes In + Constraint::Percentage(12), // Events Out + Constraint::Percentage(14), // Bytes Out + Constraint::Percentage(8), // Errors ] }); f.render_widget(w, area); diff --git a/src/top/metrics.rs b/src/top/metrics.rs index 8afbdbb9727f5..cbacc5ab9c904 100644 --- a/src/top/metrics.rs +++ b/src/top/metrics.rs @@ -29,12 +29,14 @@ async fn component_added(client: Arc, tx: state::EventTx) { kind: c.on.to_string(), component_type: c.component_type, outputs: HashMap::new(), + received_bytes_total: 0, + received_bytes_throughput_sec: 0, received_events_total: 0, received_events_throughput_sec: 0, + sent_bytes_total: 0, + sent_bytes_throughput_sec: 0, sent_events_total: 0, sent_events_throughput_sec: 0, - processed_bytes_total: 0, - processed_bytes_throughput_sec: 0, #[cfg(feature = "allocation-tracing")] allocated_bytes: 0, errors: 0, @@ -84,6 +86,54 @@ async fn component_removed(client: Arc, tx: state::EventTx) } } +async fn received_bytes_totals(client: Arc, tx: state::EventTx, interval: i64) { + tokio::pin! { + let stream = client.component_received_bytes_totals_subscription(interval); + }; + + while let Some(Some(res)) = stream.next().await { + if let Some(d) = res.data { + let c = d.component_received_bytes_totals; + _ = tx + .send(state::EventType::ReceivedBytesTotals( + c.into_iter() + .map(|c| { + ( + ComponentKey::from(c.component_id.as_str()), + c.metric.received_bytes_total as i64, + ) + }) + .collect(), + )) + .await; + } + } +} + +async fn received_bytes_throughputs( + client: Arc, + tx: state::EventTx, + interval: i64, +) { + tokio::pin! { + let stream = client.component_received_bytes_throughputs_subscription(interval); + }; + + while let Some(Some(res)) = stream.next().await { + if let Some(d) = res.data { + let c = d.component_received_bytes_throughputs; + _ = tx + .send(state::EventType::ReceivedBytesThroughputs( + interval, + c.into_iter() + .map(|c| (ComponentKey::from(c.component_id.as_str()), c.throughput)) + .collect(), + )) + .await; + } + } +} + async fn received_events_totals( client: Arc, tx: state::EventTx, @@ -136,21 +186,22 @@ async fn received_events_throughputs( } } -async fn sent_events_totals(client: Arc, tx: state::EventTx, interval: i64) { +async fn sent_bytes_totals(client: Arc, tx: state::EventTx, interval: i64) { tokio::pin! { - let stream = client.component_sent_events_totals_subscription(interval); + let stream = client.component_sent_bytes_totals_subscription(interval); }; while let Some(Some(res)) = stream.next().await { if let Some(d) = res.data { - let c = d.component_sent_events_totals; + let c = d.component_sent_bytes_totals; _ = tx - .send(state::EventType::SentEventsTotals( + .send(state::EventType::SentBytesTotals( c.into_iter() - .map(|c| SentEventsMetric { - key: ComponentKey::from(c.component_id.as_str()), - total: c.metric.sent_events_total as i64, - outputs: c.outputs().into_iter().collect(), + .map(|c| { + ( + ComponentKey::from(c.component_id.as_str()), + c.metric.sent_bytes_total as i64, + ) }) .collect(), )) @@ -159,27 +210,23 @@ async fn sent_events_totals(client: Arc, tx: state::EventTx, } } -async fn sent_events_throughputs( +async fn sent_bytes_throughputs( client: Arc, tx: state::EventTx, interval: i64, ) { tokio::pin! { - let stream = client.component_sent_events_throughputs_subscription(interval); + let stream = client.component_sent_bytes_throughputs_subscription(interval); }; while let Some(Some(res)) = stream.next().await { if let Some(d) = res.data { - let c = d.component_sent_events_throughputs; + let c = d.component_sent_bytes_throughputs; _ = tx - .send(state::EventType::SentEventsThroughputs( + .send(state::EventType::SentBytesThroughputs( interval, c.into_iter() - .map(|c| SentEventsMetric { - key: ComponentKey::from(c.component_id.as_str()), - total: c.throughput, - outputs: c.outputs().into_iter().collect(), - }) + .map(|c| (ComponentKey::from(c.component_id.as_str()), c.throughput)) .collect(), )) .await; @@ -187,26 +234,21 @@ async fn sent_events_throughputs( } } -async fn processed_bytes_totals( - client: Arc, - tx: state::EventTx, - interval: i64, -) { +async fn sent_events_totals(client: Arc, tx: state::EventTx, interval: i64) { tokio::pin! { - let stream = client.component_processed_bytes_totals_subscription(interval); + let stream = client.component_sent_events_totals_subscription(interval); }; while let Some(Some(res)) = stream.next().await { if let Some(d) = res.data { - let c = d.component_processed_bytes_totals; + let c = d.component_sent_events_totals; _ = tx - .send(state::EventType::ProcessedBytesTotals( + .send(state::EventType::SentEventsTotals( c.into_iter() - .map(|c| { - ( - ComponentKey::from(c.component_id.as_str()), - c.metric.processed_bytes_total as i64, - ) + .map(|c| SentEventsMetric { + key: ComponentKey::from(c.component_id.as_str()), + total: c.metric.sent_events_total as i64, + outputs: c.outputs().into_iter().collect(), }) .collect(), )) @@ -215,23 +257,27 @@ async fn processed_bytes_totals( } } -async fn processed_bytes_throughputs( +async fn sent_events_throughputs( client: Arc, tx: state::EventTx, interval: i64, ) { tokio::pin! { - let stream = client.component_processed_bytes_throughputs_subscription(interval); + let stream = client.component_sent_events_throughputs_subscription(interval); }; while let Some(Some(res)) = stream.next().await { if let Some(d) = res.data { - let c = d.component_processed_bytes_throughputs; + let c = d.component_sent_events_throughputs; _ = tx - .send(state::EventType::ProcessedBytesThroughputs( + .send(state::EventType::SentEventsThroughputs( interval, c.into_iter() - .map(|c| (ComponentKey::from(c.component_id.as_str()), c.throughput)) + .map(|c| SentEventsMetric { + key: ComponentKey::from(c.component_id.as_str()), + total: c.throughput, + outputs: c.outputs().into_iter().collect(), + }) .collect(), )) .await; @@ -275,32 +321,38 @@ pub fn subscribe( vec![ tokio::spawn(component_added(Arc::clone(&client), tx.clone())), tokio::spawn(component_removed(Arc::clone(&client), tx.clone())), - tokio::spawn(received_events_totals( + tokio::spawn(received_bytes_totals( Arc::clone(&client), tx.clone(), interval, )), - tokio::spawn(received_events_throughputs( + tokio::spawn(received_bytes_throughputs( Arc::clone(&client), tx.clone(), interval, )), - tokio::spawn(sent_events_totals( + tokio::spawn(received_events_totals( Arc::clone(&client), tx.clone(), interval, )), - tokio::spawn(sent_events_throughputs( + tokio::spawn(received_events_throughputs( + Arc::clone(&client), + tx.clone(), + interval, + )), + tokio::spawn(sent_bytes_totals(Arc::clone(&client), tx.clone(), interval)), + tokio::spawn(sent_bytes_throughputs( Arc::clone(&client), tx.clone(), interval, )), - tokio::spawn(processed_bytes_totals( + tokio::spawn(sent_events_totals( Arc::clone(&client), tx.clone(), interval, )), - tokio::spawn(processed_bytes_throughputs( + tokio::spawn(sent_events_throughputs( Arc::clone(&client), tx.clone(), interval, @@ -326,36 +378,34 @@ pub async fn init_components(client: &Client) -> Result { .components .edges .into_iter() - .flat_map(|d| { - d.into_iter().filter_map(|edge| { - let d = edge?.node; - let key = ComponentKey::from(d.component_id); - Some(( - key.clone(), - state::ComponentRow { - key, - kind: d.on.to_string(), - component_type: d.component_type, - outputs: d - .on - .outputs() - .into_iter() - .map(|(id, sent_events_total)| { - (id, OutputMetrics::from(sent_events_total)) - }) - .collect(), - received_events_total: d.on.received_events_total(), - received_events_throughput_sec: 0, - sent_events_total: d.on.sent_events_total(), - sent_events_throughput_sec: 0, - processed_bytes_total: d.on.processed_bytes_total(), - processed_bytes_throughput_sec: 0, - #[cfg(feature = "allocation-tracing")] - allocated_bytes: 0, - errors: 0, - }, - )) - }) + .flat_map(|edge| { + let d = edge.node; + let key = ComponentKey::from(d.component_id); + Some(( + key.clone(), + state::ComponentRow { + key, + kind: d.on.to_string(), + component_type: d.component_type, + outputs: d + .on + .outputs() + .into_iter() + .map(|(id, sent_events_total)| (id, OutputMetrics::from(sent_events_total))) + .collect(), + received_bytes_total: d.on.received_bytes_total(), + received_bytes_throughput_sec: 0, + received_events_total: d.on.received_events_total(), + received_events_throughput_sec: 0, + sent_bytes_total: d.on.sent_bytes_total(), + sent_bytes_throughput_sec: 0, + sent_events_total: d.on.sent_events_total(), + sent_events_throughput_sec: 0, + #[cfg(feature = "allocation-tracing")] + allocated_bytes: 0, + errors: 0, + }, + )) }) .collect::>(); diff --git a/src/top/mod.rs b/src/top/mod.rs index e2b8f3347e810..24a0e8b48c99c 100644 --- a/src/top/mod.rs +++ b/src/top/mod.rs @@ -12,7 +12,7 @@ use url::Url; #[command(rename_all = "kebab-case")] pub struct Opts { /// Interval to sample metrics at, in milliseconds - #[arg(default_value = "500", short = 'i', long)] + #[arg(default_value = "1000", short = 'i', long)] interval: u32, /// Vector GraphQL API server endpoint @@ -20,10 +20,12 @@ pub struct Opts { url: Option, /// Humanize metrics, using numeric suffixes - e.g. 1,100 = 1.10 k, 1,000,000 = 1.00 M - #[arg(short = 'H', long)] + #[arg(short = 'H', long, default_value_t = true)] human_metrics: bool, - /// Whether to reconnect if the underlying Vector API connection drops. By default, top will attempt to reconnect if the connection drops. + /// Whether to reconnect if the underlying Vector API connection drops. + /// + /// By default, top will attempt to reconnect if the connection drops. #[arg(short, long)] no_reconnect: bool, } diff --git a/src/top/state.rs b/src/top/state.rs index dcc10409d4136..8e8d4e51fe770 100644 --- a/src/top/state.rs +++ b/src/top/state.rs @@ -1,10 +1,11 @@ -use std::{ - collections::{BTreeMap, HashMap}, - fmt::Display, -}; +use std::collections::{BTreeMap, HashMap}; +use chrono::{DateTime, Local}; use tokio::sync::mpsc; -use tui::style::{Color, Style}; +use tui::{ + style::{Color, Style}, + text::Span, +}; use vector_core::internal_event::DEFAULT_OUTPUT; use crate::config::ComponentKey; @@ -21,16 +22,19 @@ pub struct SentEventsMetric { #[derive(Debug)] pub enum EventType { InitializeState(State), + ReceivedBytesTotals(Vec), + /// Interval + identified metric + ReceivedBytesThroughputs(i64, Vec), ReceivedEventsTotals(Vec), /// Interval in ms + identified metric ReceivedEventsThroughputs(i64, Vec), + SentBytesTotals(Vec), + /// Interval + identified metric + SentBytesThroughputs(i64, Vec), // Identified overall metric + output-specific metrics SentEventsTotals(Vec), /// Interval in ms + identified overall metric + output-specific metrics SentEventsThroughputs(i64, Vec), - ProcessedBytesTotals(Vec), - /// Interval + identified metric - ProcessedBytesThroughputs(i64, Vec), ErrorsTotals(Vec), #[cfg(feature = "allocation-tracing")] AllocatedBytes(Vec), @@ -47,30 +51,24 @@ pub enum ConnectionStatus { // reconnect attempts Disconnected(u64), // Connection is working - Connected, + Connected(DateTime), } impl ConnectionStatus { - /// Color styling to apply depending on the connection status - pub fn style(&self) -> Style { + pub fn as_ui_spans(&self) -> Vec { match self { - ConnectionStatus::Pending => Style::default().fg(Color::Yellow), - ConnectionStatus::Disconnected(_) => Style::default().fg(Color::Red), - ConnectionStatus::Connected => Style::default().fg(Color::Green), - } - } -} - -impl Display for ConnectionStatus { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - ConnectionStatus::Pending => write!(f, "Initializing connection"), - ConnectionStatus::Disconnected(delay) => write!( - f, - "Disconnected: reconnecting every {} seconds", - delay / 1000 - ), - ConnectionStatus::Connected => write!(f, "Connected"), + Self::Pending => vec![Span::styled( + "Connecting...", + Style::default().fg(Color::Yellow), + )], + Self::Disconnected(delay) => vec![ + Span::styled("Disconnected", Style::default().fg(Color::Red)), + Span::from(format!(" (reconnecting every {} seconds)", delay / 1000)), + ], + Self::Connected(since) => vec![ + Span::styled("Connected", Style::default().fg(Color::Green)), + Span::from(format!(" (since {})", since.format("%F %r %Z"))), + ], } } } @@ -114,10 +112,12 @@ pub struct ComponentRow { pub kind: String, pub component_type: String, pub outputs: HashMap, - pub processed_bytes_total: i64, - pub processed_bytes_throughput_sec: i64, + pub received_bytes_total: i64, + pub received_bytes_throughput_sec: i64, pub received_events_total: i64, pub received_events_throughput_sec: i64, + pub sent_bytes_total: i64, + pub sent_bytes_throughput_sec: i64, pub sent_events_total: i64, pub sent_events_throughput_sec: i64, #[cfg(feature = "allocation-tracing")] @@ -147,6 +147,21 @@ pub async fn updater(mut event_rx: EventRx) -> StateRx { EventType::InitializeState(new_state) => { state = new_state; } + EventType::ReceivedBytesTotals(rows) => { + for (key, v) in rows { + if let Some(r) = state.components.get_mut(&key) { + r.received_bytes_total = v; + } + } + } + EventType::ReceivedBytesThroughputs(interval, rows) => { + for (key, v) in rows { + if let Some(r) = state.components.get_mut(&key) { + r.received_bytes_throughput_sec = + (v as f64 * (1000.0 / interval as f64)) as i64; + } + } + } EventType::ReceivedEventsTotals(rows) => { for (key, v) in rows { if let Some(r) = state.components.get_mut(&key) { @@ -162,6 +177,21 @@ pub async fn updater(mut event_rx: EventRx) -> StateRx { } } } + EventType::SentBytesTotals(rows) => { + for (key, v) in rows { + if let Some(r) = state.components.get_mut(&key) { + r.sent_bytes_total = v; + } + } + } + EventType::SentBytesThroughputs(interval, rows) => { + for (key, v) in rows { + if let Some(r) = state.components.get_mut(&key) { + r.sent_bytes_throughput_sec = + (v as f64 * (1000.0 / interval as f64)) as i64; + } + } + } EventType::SentEventsTotals(rows) => { for m in rows { if let Some(r) = state.components.get_mut(&m.key) { @@ -190,21 +220,6 @@ pub async fn updater(mut event_rx: EventRx) -> StateRx { } } } - EventType::ProcessedBytesTotals(rows) => { - for (key, v) in rows { - if let Some(r) = state.components.get_mut(&key) { - r.processed_bytes_total = v; - } - } - } - EventType::ProcessedBytesThroughputs(interval, rows) => { - for (key, v) in rows { - if let Some(r) = state.components.get_mut(&key) { - r.processed_bytes_throughput_sec = - (v as f64 * (1000.0 / interval as f64)) as i64; - } - } - } EventType::ErrorsTotals(rows) => { for (key, v) in rows { if let Some(r) = state.components.get_mut(&key) { diff --git a/website/content/en/blog/graphql-api.md b/website/content/en/blog/graphql-api.md index f1df0159155f5..4c093bc215324 100644 --- a/website/content/en/blog/graphql-api.md +++ b/website/content/en/blog/graphql-api.md @@ -114,9 +114,9 @@ query { node { componentId metrics { - # Total bytes processed by this sink. - processedBytesTotal { - processedBytesTotal + # Total bytes sent by this sink. + sentBytesTotal { + sentBytesTotal } } } diff --git a/website/cue/reference/components.cue b/website/cue/reference/components.cue index ad40bf4e1630f..ff3c36b24d862 100644 --- a/website/cue/reference/components.cue +++ b/website/cue/reference/components.cue @@ -1277,14 +1277,6 @@ components: { } } - if Kind == "transform" { - telemetry: metrics: { - // Default metrics for each transform - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - } - } - how_it_works: { state: { title: "State" diff --git a/website/cue/reference/components/sinks.cue b/website/cue/reference/components/sinks.cue index e44491fedd0cc..d3df682927263 100644 --- a/website/cue/reference/components/sinks.cue +++ b/website/cue/reference/components/sinks.cue @@ -655,7 +655,6 @@ components: sinks: [Name=string]: { component_received_events_count: components.sources.internal_metrics.output.metrics.component_received_events_count component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total utilization: components.sources.internal_metrics.output.metrics.utilization buffer_byte_size: components.sources.internal_metrics.output.metrics.buffer_byte_size buffer_events: components.sources.internal_metrics.output.metrics.buffer_events diff --git a/website/cue/reference/components/sinks/aws_kinesis_streams.cue b/website/cue/reference/components/sinks/aws_kinesis_streams.cue index ed496572228b0..c980d6df5de6c 100644 --- a/website/cue/reference/components/sinks/aws_kinesis_streams.cue +++ b/website/cue/reference/components/sinks/aws_kinesis_streams.cue @@ -146,7 +146,5 @@ components: sinks: aws_kinesis_streams: components._aws & { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sinks/aws_sqs.cue b/website/cue/reference/components/sinks/aws_sqs.cue index 49b9ba9556e0b..4d3d40a303735 100644 --- a/website/cue/reference/components/sinks/aws_sqs.cue +++ b/website/cue/reference/components/sinks/aws_sqs.cue @@ -98,8 +98,6 @@ components: sinks: aws_sqs: components._aws & { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sinks/axiom.cue b/website/cue/reference/components/sinks/axiom.cue index fdfac0ff8677c..631c3876fc848 100644 --- a/website/cue/reference/components/sinks/axiom.cue +++ b/website/cue/reference/components/sinks/axiom.cue @@ -96,7 +96,6 @@ components: sinks: axiom: { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sinks/azure_blob.cue b/website/cue/reference/components/sinks/azure_blob.cue index c870eeba52530..82c701969415f 100644 --- a/website/cue/reference/components/sinks/azure_blob.cue +++ b/website/cue/reference/components/sinks/azure_blob.cue @@ -131,6 +131,5 @@ components: sinks: azure_blob: { processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total http_error_response_total: components.sources.internal_metrics.output.metrics.http_error_response_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total } } diff --git a/website/cue/reference/components/sinks/azure_monitor_logs.cue b/website/cue/reference/components/sinks/azure_monitor_logs.cue index 357d798c7592e..a5e0949c5a596 100644 --- a/website/cue/reference/components/sinks/azure_monitor_logs.cue +++ b/website/cue/reference/components/sinks/azure_monitor_logs.cue @@ -73,6 +73,5 @@ components: sinks: azure_monitor_logs: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/blackhole.cue b/website/cue/reference/components/sinks/blackhole.cue index 56cd2560f4e7c..74d0945a6ac8a 100644 --- a/website/cue/reference/components/sinks/blackhole.cue +++ b/website/cue/reference/components/sinks/blackhole.cue @@ -46,7 +46,5 @@ components: sinks: blackhole: { } telemetry: metrics: { - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sinks/clickhouse.cue b/website/cue/reference/components/sinks/clickhouse.cue index 6db4cea9b782a..1f3e48fcb1219 100644 --- a/website/cue/reference/components/sinks/clickhouse.cue +++ b/website/cue/reference/components/sinks/clickhouse.cue @@ -85,6 +85,5 @@ components: sinks: clickhouse: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/console.cue b/website/cue/reference/components/sinks/console.cue index 5d1cf433a46f2..c0aa859bd9176 100644 --- a/website/cue/reference/components/sinks/console.cue +++ b/website/cue/reference/components/sinks/console.cue @@ -57,8 +57,6 @@ components: sinks: console: { } telemetry: metrics: { - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sinks/databend.cue b/website/cue/reference/components/sinks/databend.cue index 467e5f1f1a92f..a9bfab6a27f37 100644 --- a/website/cue/reference/components/sinks/databend.cue +++ b/website/cue/reference/components/sinks/databend.cue @@ -106,6 +106,5 @@ components: sinks: databend: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/datadog_events.cue b/website/cue/reference/components/sinks/datadog_events.cue index 504ee4a8d8305..5fa9cf1ef18aa 100644 --- a/website/cue/reference/components/sinks/datadog_events.cue +++ b/website/cue/reference/components/sinks/datadog_events.cue @@ -57,6 +57,5 @@ components: sinks: datadog_events: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/elasticsearch.cue b/website/cue/reference/components/sinks/elasticsearch.cue index 3ce0fdb2c1d62..6768159b643c5 100644 --- a/website/cue/reference/components/sinks/elasticsearch.cue +++ b/website/cue/reference/components/sinks/elasticsearch.cue @@ -140,7 +140,6 @@ components: sinks: elasticsearch: { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sinks/gcp_pubsub.cue b/website/cue/reference/components/sinks/gcp_pubsub.cue index 4d75205967c2a..6d0307d430534 100644 --- a/website/cue/reference/components/sinks/gcp_pubsub.cue +++ b/website/cue/reference/components/sinks/gcp_pubsub.cue @@ -98,6 +98,5 @@ components: sinks: gcp_pubsub: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/gcp_stackdriver_logs.cue b/website/cue/reference/components/sinks/gcp_stackdriver_logs.cue index 46c0adcf211c8..632dcdeddb624 100644 --- a/website/cue/reference/components/sinks/gcp_stackdriver_logs.cue +++ b/website/cue/reference/components/sinks/gcp_stackdriver_logs.cue @@ -120,6 +120,5 @@ components: sinks: gcp_stackdriver_logs: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/gcp_stackdriver_metrics.cue b/website/cue/reference/components/sinks/gcp_stackdriver_metrics.cue index 8938c237215f0..93200c3f9f0d1 100644 --- a/website/cue/reference/components/sinks/gcp_stackdriver_metrics.cue +++ b/website/cue/reference/components/sinks/gcp_stackdriver_metrics.cue @@ -1,7 +1,7 @@ package metadata components: sinks: gcp_stackdriver_metrics: { - title: "GCP Cloud Monitoring (formerly Stackdrive) Metrics" + title: "GCP Cloud Monitoring (formerly Stackdriver) Metrics" classes: { commonly_used: true @@ -108,6 +108,5 @@ components: sinks: gcp_stackdriver_metrics: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/honeycomb.cue b/website/cue/reference/components/sinks/honeycomb.cue index c2a4a79e173d3..2fa680df67eaa 100644 --- a/website/cue/reference/components/sinks/honeycomb.cue +++ b/website/cue/reference/components/sinks/honeycomb.cue @@ -82,6 +82,5 @@ components: sinks: honeycomb: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/http.cue b/website/cue/reference/components/sinks/http.cue index 4e3c2dd45a7ef..bb626d846f88d 100644 --- a/website/cue/reference/components/sinks/http.cue +++ b/website/cue/reference/components/sinks/http.cue @@ -96,10 +96,7 @@ components: sinks: http: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total http_bad_requests_total: components.sources.internal_metrics.output.metrics.http_bad_requests_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sinks/humio.cue b/website/cue/reference/components/sinks/humio.cue index e1f7dd5caae6c..3b7f6101d6c94 100644 --- a/website/cue/reference/components/sinks/humio.cue +++ b/website/cue/reference/components/sinks/humio.cue @@ -155,6 +155,5 @@ components: sinks: _humio: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/influxdb_logs.cue b/website/cue/reference/components/sinks/influxdb_logs.cue index 2f27e7059091d..13fa0182145a9 100644 --- a/website/cue/reference/components/sinks/influxdb_logs.cue +++ b/website/cue/reference/components/sinks/influxdb_logs.cue @@ -102,6 +102,5 @@ components: sinks: influxdb_logs: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total } } diff --git a/website/cue/reference/components/sinks/loki.cue b/website/cue/reference/components/sinks/loki.cue index 5111f39ec9778..057df8af0b2d4 100644 --- a/website/cue/reference/components/sinks/loki.cue +++ b/website/cue/reference/components/sinks/loki.cue @@ -163,8 +163,6 @@ components: sinks: loki: { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total streams_total: components.sources.internal_metrics.output.metrics.streams_total } diff --git a/website/cue/reference/components/sinks/mezmo.cue b/website/cue/reference/components/sinks/mezmo.cue index 3eb922656be49..6a284c4b4f001 100644 --- a/website/cue/reference/components/sinks/mezmo.cue +++ b/website/cue/reference/components/sinks/mezmo.cue @@ -68,7 +68,6 @@ components: sinks: mezmo: { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sinks/nats.cue b/website/cue/reference/components/sinks/nats.cue index e25e68e08ac58..494bd131f85e7 100644 --- a/website/cue/reference/components/sinks/nats.cue +++ b/website/cue/reference/components/sinks/nats.cue @@ -66,8 +66,6 @@ components: sinks: nats: { telemetry: metrics: { events_discarded_total: components.sources.internal_metrics.output.metrics.events_discarded_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total send_errors_total: components.sources.internal_metrics.output.metrics.send_errors_total } } diff --git a/website/cue/reference/components/sinks/redis.cue b/website/cue/reference/components/sinks/redis.cue index 73c10dd8bfd7d..6f4e44cc1a386 100644 --- a/website/cue/reference/components/sinks/redis.cue +++ b/website/cue/reference/components/sinks/redis.cue @@ -77,10 +77,6 @@ components: sinks: redis: { telemetry: metrics: { component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total send_errors_total: components.sources.internal_metrics.output.metrics.send_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sinks/socket.cue b/website/cue/reference/components/sinks/socket.cue index e058ff0bc9fb2..7bb7064e660d6 100644 --- a/website/cue/reference/components/sinks/socket.cue +++ b/website/cue/reference/components/sinks/socket.cue @@ -69,7 +69,5 @@ components: sinks: socket: { telemetry: metrics: { connection_errors_total: components.sources.internal_metrics.output.metrics.connection_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sinks/splunk_hec_logs.cue b/website/cue/reference/components/sinks/splunk_hec_logs.cue index 751dc6063b2a0..c3915ec5be422 100644 --- a/website/cue/reference/components/sinks/splunk_hec_logs.cue +++ b/website/cue/reference/components/sinks/splunk_hec_logs.cue @@ -87,9 +87,7 @@ components: sinks: splunk_hec_logs: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total requests_received_total: components.sources.internal_metrics.output.metrics.requests_received_total } diff --git a/website/cue/reference/components/sinks/vector.cue b/website/cue/reference/components/sinks/vector.cue index a8b1828986a7f..922836ce15484 100644 --- a/website/cue/reference/components/sinks/vector.cue +++ b/website/cue/reference/components/sinks/vector.cue @@ -83,8 +83,6 @@ components: sinks: vector: { component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total protobuf_decode_errors_total: components.sources.internal_metrics.output.metrics.protobuf_decode_errors_total } } diff --git a/website/cue/reference/components/sinks/websocket.cue b/website/cue/reference/components/sinks/websocket.cue index 95341770cdfbf..21d5d7efce561 100644 --- a/website/cue/reference/components/sinks/websocket.cue +++ b/website/cue/reference/components/sinks/websocket.cue @@ -78,11 +78,8 @@ components: sinks: websocket: { connection_failed_total: components.sources.internal_metrics.output.metrics.connection_failed_total connection_shutdown_total: components.sources.internal_metrics.output.metrics.connection_shutdown_total connection_errors_total: components.sources.internal_metrics.output.metrics.connection_errors_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total component_sent_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total } } diff --git a/website/cue/reference/components/sources.cue b/website/cue/reference/components/sources.cue index 459076b31f34e..659753d81dc57 100644 --- a/website/cue/reference/components/sources.cue +++ b/website/cue/reference/components/sources.cue @@ -401,7 +401,6 @@ components: sources: [Name=string]: { } telemetry: metrics: { - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total source_lag_time_seconds: components.sources.internal_metrics.output.metrics.source_lag_time_seconds diff --git a/website/cue/reference/components/sources/amqp.cue b/website/cue/reference/components/sources/amqp.cue index 19b6349b7f8d1..b2647cbbad352 100644 --- a/website/cue/reference/components/sources/amqp.cue +++ b/website/cue/reference/components/sources/amqp.cue @@ -78,11 +78,8 @@ components: sources: amqp: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total consumer_offset_updates_failed_total: components.sources.internal_metrics.output.metrics.consumer_offset_updates_failed_total events_failed_total: components.sources.internal_metrics.output.metrics.events_failed_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } how_it_works: components._amqp.how_it_works diff --git a/website/cue/reference/components/sources/apache_metrics.cue b/website/cue/reference/components/sources/apache_metrics.cue index 2a4ef6f069d3f..f39a895f79a77 100644 --- a/website/cue/reference/components/sources/apache_metrics.cue +++ b/website/cue/reference/components/sources/apache_metrics.cue @@ -166,12 +166,9 @@ components: sources: apache_metrics: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_error_response_total: components.sources.internal_metrics.output.metrics.http_error_response_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total requests_completed_total: components.sources.internal_metrics.output.metrics.requests_completed_total request_duration_seconds: components.sources.internal_metrics.output.metrics.request_duration_seconds } diff --git a/website/cue/reference/components/sources/aws_ecs_metrics.cue b/website/cue/reference/components/sources/aws_ecs_metrics.cue index 88b17b37b5349..7eb00540a88e3 100644 --- a/website/cue/reference/components/sources/aws_ecs_metrics.cue +++ b/website/cue/reference/components/sources/aws_ecs_metrics.cue @@ -192,12 +192,9 @@ components: sources: aws_ecs_metrics: { component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total component_sent_events_total: components.sources.internal_metrics.output.metrics.component_sent_events_total component_sent_event_bytes_total: components.sources.internal_metrics.output.metrics.component_sent_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_error_response_total: components.sources.internal_metrics.output.metrics.http_error_response_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total requests_completed_total: components.sources.internal_metrics.output.metrics.requests_completed_total request_duration_seconds: components.sources.internal_metrics.output.metrics.request_duration_seconds } diff --git a/website/cue/reference/components/sources/aws_kinesis_firehose.cue b/website/cue/reference/components/sources/aws_kinesis_firehose.cue index e144247d84190..7d9997685b41d 100644 --- a/website/cue/reference/components/sources/aws_kinesis_firehose.cue +++ b/website/cue/reference/components/sources/aws_kinesis_firehose.cue @@ -194,8 +194,6 @@ components: sources: aws_kinesis_firehose: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total request_read_errors_total: components.sources.internal_metrics.output.metrics.request_read_errors_total requests_received_total: components.sources.internal_metrics.output.metrics.requests_received_total request_automatic_decode_errors_total: components.sources.internal_metrics.output.metrics.request_automatic_decode_errors_total diff --git a/website/cue/reference/components/sources/aws_s3.cue b/website/cue/reference/components/sources/aws_s3.cue index 38a62d3f21616..d8316999b521f 100644 --- a/website/cue/reference/components/sources/aws_s3.cue +++ b/website/cue/reference/components/sources/aws_s3.cue @@ -162,8 +162,6 @@ components: sources: aws_s3: components._aws & { ] telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/datadog_agent.cue b/website/cue/reference/components/sources/datadog_agent.cue index 05df12d903601..e83edf69d723d 100644 --- a/website/cue/reference/components/sources/datadog_agent.cue +++ b/website/cue/reference/components/sources/datadog_agent.cue @@ -224,6 +224,5 @@ components: sources: datadog_agent: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total } } diff --git a/website/cue/reference/components/sources/demo_logs.cue b/website/cue/reference/components/sources/demo_logs.cue index c985142352570..e7b506a9edb51 100644 --- a/website/cue/reference/components/sources/demo_logs.cue +++ b/website/cue/reference/components/sources/demo_logs.cue @@ -62,6 +62,5 @@ components: sources: demo_logs: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sources/dnstap.cue b/website/cue/reference/components/sources/dnstap.cue index 63096c448c0d3..aa38de8f1f711 100644 --- a/website/cue/reference/components/sources/dnstap.cue +++ b/website/cue/reference/components/sources/dnstap.cue @@ -1171,9 +1171,6 @@ components: sources: dnstap: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total diff --git a/website/cue/reference/components/sources/docker_logs.cue b/website/cue/reference/components/sources/docker_logs.cue index 33b82984a9dad..f9786bce712af 100644 --- a/website/cue/reference/components/sources/docker_logs.cue +++ b/website/cue/reference/components/sources/docker_logs.cue @@ -208,15 +208,12 @@ components: sources: docker_logs: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total communication_errors_total: components.sources.internal_metrics.output.metrics.communication_errors_total container_metadata_fetch_errors_total: components.sources.internal_metrics.output.metrics.container_metadata_fetch_errors_total container_processed_events_total: components.sources.internal_metrics.output.metrics.container_processed_events_total containers_unwatched_total: components.sources.internal_metrics.output.metrics.containers_unwatched_total containers_watched_total: components.sources.internal_metrics.output.metrics.containers_watched_total logging_driver_errors_total: components.sources.internal_metrics.output.metrics.logging_driver_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/eventstoredb_metrics.cue b/website/cue/reference/components/sources/eventstoredb_metrics.cue index 09b38eff7ba67..5421f4d94624d 100644 --- a/website/cue/reference/components/sources/eventstoredb_metrics.cue +++ b/website/cue/reference/components/sources/eventstoredb_metrics.cue @@ -116,10 +116,8 @@ components: sources: eventstoredb_metrics: { } } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total diff --git a/website/cue/reference/components/sources/exec.cue b/website/cue/reference/components/sources/exec.cue index 34927d7907291..0bf792c886781 100644 --- a/website/cue/reference/components/sources/exec.cue +++ b/website/cue/reference/components/sources/exec.cue @@ -128,9 +128,6 @@ components: sources: exec: { telemetry: metrics: { command_executed_total: components.sources.internal_metrics.output.metrics.command_executed_total command_execution_duration_seconds: components.sources.internal_metrics.output.metrics.command_execution_duration_seconds - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total diff --git a/website/cue/reference/components/sources/file.cue b/website/cue/reference/components/sources/file.cue index 906c76eda4ba1..61564ea8d1850 100644 --- a/website/cue/reference/components/sources/file.cue +++ b/website/cue/reference/components/sources/file.cue @@ -427,7 +427,6 @@ components: sources: file: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total checkpoint_write_errors_total: components.sources.internal_metrics.output.metrics.checkpoint_write_errors_total checkpoints_total: components.sources.internal_metrics.output.metrics.checkpoints_total checksum_errors_total: components.sources.internal_metrics.output.metrics.checksum_errors_total diff --git a/website/cue/reference/components/sources/file_descriptor.cue b/website/cue/reference/components/sources/file_descriptor.cue index 803012459d9c4..0a54a4b67251c 100644 --- a/website/cue/reference/components/sources/file_descriptor.cue +++ b/website/cue/reference/components/sources/file_descriptor.cue @@ -79,9 +79,6 @@ components: sources: file_descriptor: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/fluent.cue b/website/cue/reference/components/sources/fluent.cue index 06a14a67166b3..a8492e1adcbdf 100644 --- a/website/cue/reference/components/sources/fluent.cue +++ b/website/cue/reference/components/sources/fluent.cue @@ -177,10 +177,7 @@ components: sources: fluent: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total decode_errors_total: components.sources.internal_metrics.output.metrics.decode_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total } diff --git a/website/cue/reference/components/sources/heroku_logs.cue b/website/cue/reference/components/sources/heroku_logs.cue index 7cefd1dfeca4c..1741703745193 100644 --- a/website/cue/reference/components/sources/heroku_logs.cue +++ b/website/cue/reference/components/sources/heroku_logs.cue @@ -105,8 +105,6 @@ components: sources: heroku_logs: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total request_read_errors_total: components.sources.internal_metrics.output.metrics.request_read_errors_total requests_received_total: components.sources.internal_metrics.output.metrics.requests_received_total } diff --git a/website/cue/reference/components/sources/host_metrics.cue b/website/cue/reference/components/sources/host_metrics.cue index 77c4680810e12..0018e403b7117 100644 --- a/website/cue/reference/components/sources/host_metrics.cue +++ b/website/cue/reference/components/sources/host_metrics.cue @@ -259,7 +259,6 @@ components: sources: host_metrics: { } telemetry: metrics: { - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/http_client.cue b/website/cue/reference/components/sources/http_client.cue index 6bb9a0e21b9f9..304e18070743f 100644 --- a/website/cue/reference/components/sources/http_client.cue +++ b/website/cue/reference/components/sources/http_client.cue @@ -139,12 +139,9 @@ components: sources: http_client: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_error_response_total: components.sources.internal_metrics.output.metrics.http_error_response_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/http_server.cue b/website/cue/reference/components/sources/http_server.cue index 398aaaf175d5b..317de8954e618 100644 --- a/website/cue/reference/components/sources/http_server.cue +++ b/website/cue/reference/components/sources/http_server.cue @@ -182,7 +182,6 @@ components: sources: http_server: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_bad_requests_total: components.sources.internal_metrics.output.metrics.http_bad_requests_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total diff --git a/website/cue/reference/components/sources/internal_metrics.cue b/website/cue/reference/components/sources/internal_metrics.cue index 2331b23401b15..36b5757141a94 100644 --- a/website/cue/reference/components/sources/internal_metrics.cue +++ b/website/cue/reference/components/sources/internal_metrics.cue @@ -380,38 +380,6 @@ components: sources: internal_metrics: { default_namespace: "vector" tags: _component_tags } - events_in_total: { - description: """ - The number of events accepted by this component either from tagged - origins like file and uri, or cumulatively from other origins. - This metric is deprecated and will be removed in a future version. - Use [`component_received_events_total`](\(urls.vector_sources)/internal_metrics/#component_received_events_total) instead. - """ - type: "counter" - default_namespace: "vector" - tags: component_received_events_total.tags - } - events_out_total: { - description: """ - The total number of events emitted by this component. - This metric is deprecated and will be removed in a future version. - Use [`component_sent_events_total`](\(urls.vector_sources)/internal_metrics/#component_sent_events_total) instead. - """ - type: "counter" - default_namespace: "vector" - tags: _component_tags & {output: _output} - } - processed_events_total: { - description: """ - The total number of events processed by this component. - This metric is deprecated in place of using - [`component_received_events_total`](\(urls.vector_sources)/internal_metrics/#component_received_events_total) and - [`component_sent_events_total`](\(urls.vector_sources)/internal_metrics/#component_sent_events_total) metrics. - """ - type: "counter" - default_namespace: "vector" - tags: _component_tags - } buffer_byte_size: { description: "The number of bytes current in the buffer." type: "gauge" @@ -851,38 +819,6 @@ components: sources: internal_metrics: { default_namespace: "vector" tags: _internal_metrics_tags } - processed_bytes_total: { - description: "The number of bytes processed by the component." - type: "counter" - default_namespace: "vector" - tags: _component_tags & { - file: { - description: "The file from which the bytes originate." - required: false - } - uri: { - description: "The sanitized URI from which the bytes originate." - required: false - } - container_name: { - description: "The name of the container from which the bytes originate." - required: false - } - pod_name: { - description: "The name of the pod from which the bytes originate." - required: false - } - peer_addr: { - description: "The IP from which the bytes originate." - required: false - } - peer_path: { - description: "The pathname from which the bytes originate." - required: false - } - mode: _mode - } - } processing_errors_total: { description: "The total number of processing errors encountered by this component. This metric is deprecated in favor of `component_errors_total`." type: "counter" diff --git a/website/cue/reference/components/sources/journald.cue b/website/cue/reference/components/sources/journald.cue index 7c1cc99a3a09c..c64c1fdcaa486 100644 --- a/website/cue/reference/components/sources/journald.cue +++ b/website/cue/reference/components/sources/journald.cue @@ -154,10 +154,7 @@ components: sources: journald: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total invalid_record_total: components.sources.internal_metrics.output.metrics.invalid_record_total invalid_record_bytes_total: components.sources.internal_metrics.output.metrics.invalid_record_bytes_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total } } diff --git a/website/cue/reference/components/sources/kafka.cue b/website/cue/reference/components/sources/kafka.cue index 281c1a2a97389..d5d56563b5bac 100644 --- a/website/cue/reference/components/sources/kafka.cue +++ b/website/cue/reference/components/sources/kafka.cue @@ -88,7 +88,6 @@ components: sources: kafka: { telemetry: metrics: { events_failed_total: components.sources.internal_metrics.output.metrics.events_failed_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total consumer_offset_updates_failed_total: components.sources.internal_metrics.output.metrics.consumer_offset_updates_failed_total kafka_queue_messages: components.sources.internal_metrics.output.metrics.kafka_queue_messages kafka_queue_messages_bytes: components.sources.internal_metrics.output.metrics.kafka_queue_messages_bytes @@ -101,8 +100,6 @@ components: sources: kafka: { kafka_consumed_messages_total: components.sources.internal_metrics.output.metrics.kafka_consumed_messages_total kafka_consumed_messages_bytes_total: components.sources.internal_metrics.output.metrics.kafka_consumed_messages_bytes_total kafka_consumer_lag: components.sources.internal_metrics.output.metrics.kafka_consumer_lag - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/kubernetes_logs.cue b/website/cue/reference/components/sources/kubernetes_logs.cue index 3e40e6935eac5..50ee665bdcd6a 100644 --- a/website/cue/reference/components/sources/kubernetes_logs.cue +++ b/website/cue/reference/components/sources/kubernetes_logs.cue @@ -465,7 +465,6 @@ components: sources: kubernetes_logs: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total k8s_format_picker_edge_cases_total: components.sources.internal_metrics.output.metrics.k8s_format_picker_edge_cases_total k8s_docker_format_parse_failures_total: components.sources.internal_metrics.output.metrics.k8s_docker_format_parse_failures_total k8s_event_annotation_failures_total: components.sources.internal_metrics.output.metrics.k8s_event_annotation_failures_total @@ -478,8 +477,6 @@ components: sources: kubernetes_logs: { k8s_watch_stream_failed_total: components.sources.internal_metrics.output.metrics.k8s_watch_stream_failed_total k8s_watch_stream_items_obtained_total: components.sources.internal_metrics.output.metrics.k8s_watch_stream_items_obtained_total k8s_watcher_http_error_total: components.sources.internal_metrics.output.metrics.k8s_watcher_http_error_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/logstash.cue b/website/cue/reference/components/sources/logstash.cue index 9c24a7a78ad90..0329e2ea50484 100644 --- a/website/cue/reference/components/sources/logstash.cue +++ b/website/cue/reference/components/sources/logstash.cue @@ -308,10 +308,7 @@ components: sources: logstash: { connection_errors_total: components.sources.internal_metrics.output.metrics.connection_errors_total connection_send_ack_errors_total: components.sources.internal_metrics.output.metrics.connection_send_ack_errors_total decode_errors_total: components.sources.internal_metrics.output.metrics.decode_errors_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total open_connections: components.sources.internal_metrics.output.metrics.open_connections - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total } diff --git a/website/cue/reference/components/sources/mongodb_metrics.cue b/website/cue/reference/components/sources/mongodb_metrics.cue index 2e12d11114e01..92f142e7318f7 100644 --- a/website/cue/reference/components/sources/mongodb_metrics.cue +++ b/website/cue/reference/components/sources/mongodb_metrics.cue @@ -722,7 +722,6 @@ components: sources: mongodb_metrics: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total collect_completed_total: components.sources.internal_metrics.output.metrics.collect_completed_total collect_duration_seconds: components.sources.internal_metrics.output.metrics.collect_duration_seconds parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total diff --git a/website/cue/reference/components/sources/nats.cue b/website/cue/reference/components/sources/nats.cue index ea067705bcf97..80e92a4c7c7d1 100644 --- a/website/cue/reference/components/sources/nats.cue +++ b/website/cue/reference/components/sources/nats.cue @@ -69,9 +69,6 @@ components: sources: nats: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/nginx_metrics.cue b/website/cue/reference/components/sources/nginx_metrics.cue index 59abcecdfc96e..57c31f3ec8294 100644 --- a/website/cue/reference/components/sources/nginx_metrics.cue +++ b/website/cue/reference/components/sources/nginx_metrics.cue @@ -128,7 +128,6 @@ components: sources: nginx_metrics: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total collect_completed_total: components.sources.internal_metrics.output.metrics.collect_completed_total collect_duration_seconds: components.sources.internal_metrics.output.metrics.collect_duration_seconds http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total diff --git a/website/cue/reference/components/sources/opentelemetry.cue b/website/cue/reference/components/sources/opentelemetry.cue index 5559ce52bfaed..3638a9cd95085 100644 --- a/website/cue/reference/components/sources/opentelemetry.cue +++ b/website/cue/reference/components/sources/opentelemetry.cue @@ -136,7 +136,7 @@ components: sources: opentelemetry: { severity_number: { description: """ Numerical value of the severity. - + Smaller numerical values correspond to less severe events (such as debug events), larger numerical values correspond to more severe events (such as errors and critical events). """ required: false @@ -168,7 +168,7 @@ components: sources: opentelemetry: { timestamp: { description: """ The UTC Datetime when the event occurred. If this value is unset, or `0`, it will be set to the `observed_timestamp` field. - + This field is converted from the `time_unix_nano` Protobuf field. """ required: true @@ -177,7 +177,7 @@ components: sources: opentelemetry: { observed_timestamp: { description: """ The UTC Datetime when the event was observed by the collection system. If this value is unset, or `0`, it will be set to the current time. - + This field is converted from the `observed_time_unix_nano` Protobuf field. """ required: true @@ -200,7 +200,6 @@ components: sources: opentelemetry: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total } how_it_works: { diff --git a/website/cue/reference/components/sources/postgresql_metrics.cue b/website/cue/reference/components/sources/postgresql_metrics.cue index 9eed3e74e01b4..f1573ea4e8564 100644 --- a/website/cue/reference/components/sources/postgresql_metrics.cue +++ b/website/cue/reference/components/sources/postgresql_metrics.cue @@ -69,7 +69,6 @@ components: sources: postgresql_metrics: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total collect_completed_total: components.sources.internal_metrics.output.metrics.collect_completed_total collect_duration_seconds: components.sources.internal_metrics.output.metrics.collect_duration_seconds component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total diff --git a/website/cue/reference/components/sources/prometheus_remote_write.cue b/website/cue/reference/components/sources/prometheus_remote_write.cue index 7ef6028e70b10..02ccbb25b63a2 100644 --- a/website/cue/reference/components/sources/prometheus_remote_write.cue +++ b/website/cue/reference/components/sources/prometheus_remote_write.cue @@ -88,10 +88,7 @@ components: sources: prometheus_remote_write: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total requests_completed_total: components.sources.internal_metrics.output.metrics.requests_completed_total requests_received_total: components.sources.internal_metrics.output.metrics.requests_received_total request_duration_seconds: components.sources.internal_metrics.output.metrics.request_duration_seconds diff --git a/website/cue/reference/components/sources/prometheus_scrape.cue b/website/cue/reference/components/sources/prometheus_scrape.cue index 31f6c8ce0009f..ac051c92ebe86 100644 --- a/website/cue/reference/components/sources/prometheus_scrape.cue +++ b/website/cue/reference/components/sources/prometheus_scrape.cue @@ -97,12 +97,9 @@ components: sources: prometheus_scrape: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_error_response_total: components.sources.internal_metrics.output.metrics.http_error_response_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total parse_errors_total: components.sources.internal_metrics.output.metrics.parse_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/redis.cue b/website/cue/reference/components/sources/redis.cue index a12634023a562..19e7a2780da8d 100644 --- a/website/cue/reference/components/sources/redis.cue +++ b/website/cue/reference/components/sources/redis.cue @@ -97,10 +97,6 @@ components: sources: redis: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total processing_errors_total: components.sources.internal_metrics.output.metrics.processing_errors_total } } diff --git a/website/cue/reference/components/sources/socket.cue b/website/cue/reference/components/sources/socket.cue index 36f202f1e1928..f6bed0e610611 100644 --- a/website/cue/reference/components/sources/socket.cue +++ b/website/cue/reference/components/sources/socket.cue @@ -111,7 +111,6 @@ components: sources: socket: { ] telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total connection_errors_total: components.sources.internal_metrics.output.metrics.connection_errors_total connection_failed_total: components.sources.internal_metrics.output.metrics.connection_failed_total connection_established_total: components.sources.internal_metrics.output.metrics.connection_established_total diff --git a/website/cue/reference/components/sources/splunk_hec.cue b/website/cue/reference/components/sources/splunk_hec.cue index 27e7064c72e3f..43be16cdfc7dd 100644 --- a/website/cue/reference/components/sources/splunk_hec.cue +++ b/website/cue/reference/components/sources/splunk_hec.cue @@ -83,7 +83,6 @@ components: sources: splunk_hec: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total http_request_errors_total: components.sources.internal_metrics.output.metrics.http_request_errors_total requests_received_total: components.sources.internal_metrics.output.metrics.requests_received_total } diff --git a/website/cue/reference/components/sources/statsd.cue b/website/cue/reference/components/sources/statsd.cue index b137956d69bf2..cb190cd2b503a 100644 --- a/website/cue/reference/components/sources/statsd.cue +++ b/website/cue/reference/components/sources/statsd.cue @@ -79,12 +79,9 @@ components: sources: statsd: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total connection_errors_total: components.sources.internal_metrics.output.metrics.connection_errors_total invalid_record_total: components.sources.internal_metrics.output.metrics.invalid_record_total invalid_record_bytes_total: components.sources.internal_metrics.output.metrics.invalid_record_bytes_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/stdin.cue b/website/cue/reference/components/sources/stdin.cue index 743bf76995183..e823a74c4156a 100644 --- a/website/cue/reference/components/sources/stdin.cue +++ b/website/cue/reference/components/sources/stdin.cue @@ -85,9 +85,6 @@ components: sources: stdin: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_discarded_events_total: components.sources.internal_metrics.output.metrics.component_discarded_events_total component_errors_total: components.sources.internal_metrics.output.metrics.component_errors_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total diff --git a/website/cue/reference/components/sources/syslog.cue b/website/cue/reference/components/sources/syslog.cue index 61bec82319f7d..dc228327221b7 100644 --- a/website/cue/reference/components/sources/syslog.cue +++ b/website/cue/reference/components/sources/syslog.cue @@ -205,10 +205,7 @@ components: sources: syslog: { } telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total connection_read_errors_total: components.sources.internal_metrics.output.metrics.connection_read_errors_total - processed_bytes_total: components.sources.internal_metrics.output.metrics.processed_bytes_total - processed_events_total: components.sources.internal_metrics.output.metrics.processed_events_total component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total utf8_convert_errors_total: components.sources.internal_metrics.output.metrics.utf8_convert_errors_total diff --git a/website/cue/reference/components/sources/vector.cue b/website/cue/reference/components/sources/vector.cue index 305bb8a983f43..2b933f40fef4a 100644 --- a/website/cue/reference/components/sources/vector.cue +++ b/website/cue/reference/components/sources/vector.cue @@ -105,7 +105,6 @@ components: sources: vector: { component_received_bytes_total: components.sources.internal_metrics.output.metrics.component_received_bytes_total component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total protobuf_decode_errors_total: components.sources.internal_metrics.output.metrics.protobuf_decode_errors_total } } diff --git a/website/cue/reference/components/transforms.cue b/website/cue/reference/components/transforms.cue index 7ff42fd869116..f548f7be69c35 100644 --- a/website/cue/reference/components/transforms.cue +++ b/website/cue/reference/components/transforms.cue @@ -13,8 +13,6 @@ components: transforms: [Name=string]: { configuration: base.components.transforms.configuration telemetry: metrics: { - events_in_total: components.sources.internal_metrics.output.metrics.events_in_total - events_out_total: components.sources.internal_metrics.output.metrics.events_out_total component_received_events_count: components.sources.internal_metrics.output.metrics.component_received_events_count component_received_events_total: components.sources.internal_metrics.output.metrics.component_received_events_total component_received_event_bytes_total: components.sources.internal_metrics.output.metrics.component_received_event_bytes_total From ecdf1aec8face892fb15059f3be7f30bb9e83a18 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Fri, 26 May 2023 16:20:02 -0400 Subject: [PATCH 2/2] make check-events happy --- src/internal_events/apache_metrics.rs | 1 + src/internal_events/mongodb_metrics.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/internal_events/apache_metrics.rs b/src/internal_events/apache_metrics.rs index d3550c17223e2..86b5bfbdfd61c 100644 --- a/src/internal_events/apache_metrics.rs +++ b/src/internal_events/apache_metrics.rs @@ -14,6 +14,7 @@ pub struct ApacheMetricsEventsReceived<'a> { } impl<'a> InternalEvent for ApacheMetricsEventsReceived<'a> { + // ## skip check-duplicate-events ## fn emit(self) { trace!(message = "Events received.", count = %self.count, byte_size = %self.byte_size, endpoint = %self.endpoint); counter!( diff --git a/src/internal_events/mongodb_metrics.rs b/src/internal_events/mongodb_metrics.rs index bc33a258c8c04..eb585fbccf6de 100644 --- a/src/internal_events/mongodb_metrics.rs +++ b/src/internal_events/mongodb_metrics.rs @@ -12,6 +12,7 @@ pub struct MongoDbMetricsEventsReceived<'a> { } impl<'a> InternalEvent for MongoDbMetricsEventsReceived<'a> { + // ## skip check-duplicate-events ## fn emit(self) { trace!( message = "Events received.",