From 270fdfd6002f58275610995e232aae241ada4822 Mon Sep 17 00:00:00 2001 From: Bruce Guenter Date: Wed, 25 Oct 2023 13:16:52 -0600 Subject: [PATCH] chore(dev): Wrap `vector-core` in `vector-lib` (#18934) * chore(dev): Wrap `vector-core` in `vector-lib` This is where things get a little more interesting. Both `vector-common` and `vector-core` export a `config` module, so we need to create a virtual module pulling in the relevant symbols. I have made those imports explicit so as to eliminate the ambiguity of which symbol comes from which package. * Feature flag fixes --- Cargo.lock | 2 +- Cargo.toml | 11 +++++----- lib/vector-lib/Cargo.toml | 7 +++++++ lib/vector-lib/src/lib.rs | 21 ++++++++++++++++++- src/api/schema/components/mod.rs | 2 +- src/api/schema/metrics/output.rs | 2 +- src/codecs/decoding/config.rs | 2 +- src/codecs/decoding/decoder.rs | 2 +- src/codecs/encoding/encoder.rs | 2 +- src/codecs/encoding/transformer.rs | 6 +++--- src/common/datadog.rs | 2 +- src/components/validation/resources/event.rs | 2 +- src/components/validation/resources/http.rs | 2 +- src/components/validation/resources/mod.rs | 2 +- src/components/validation/runner/io.rs | 2 +- src/components/validation/runner/mod.rs | 2 +- src/components/validation/runner/telemetry.rs | 2 +- .../validators/component_spec/mod.rs | 4 ++-- .../validators/component_spec/sources.rs | 6 +++--- src/components/validation/validators/mod.rs | 2 +- src/conditions/datadog_search.rs | 4 ++-- src/conditions/vrl.rs | 4 ++-- src/config/builder.rs | 2 +- src/config/compiler.rs | 2 +- src/config/enrichment_table.rs | 2 +- src/config/enterprise.rs | 4 ++-- src/config/graph.rs | 2 +- src/config/id.rs | 2 +- src/config/mod.rs | 6 +++--- src/config/schema.rs | 2 +- src/config/sink.rs | 6 +++--- src/config/source.rs | 4 ++-- src/config/transform.rs | 2 +- src/config/unit_test/unit_test_components.rs | 2 +- src/config/validation.rs | 2 +- src/generate.rs | 2 +- src/internal_events/aggregate.rs | 2 +- src/internal_events/amqp.rs | 4 ++-- src/internal_events/apache_metrics.rs | 2 +- src/internal_events/api.rs | 2 +- src/internal_events/aws_cloudwatch_logs.rs | 2 +- src/internal_events/aws_ec2_metadata.rs | 2 +- src/internal_events/aws_ecs_metrics.rs | 2 +- src/internal_events/aws_kinesis.rs | 2 +- src/internal_events/aws_kinesis_firehose.rs | 2 +- src/internal_events/aws_sqs.rs | 2 +- src/internal_events/batch.rs | 2 +- src/internal_events/codecs.rs | 2 +- src/internal_events/common.rs | 4 ++-- src/internal_events/conditions.rs | 2 +- src/internal_events/datadog_metrics.rs | 2 +- src/internal_events/datadog_traces.rs | 2 +- src/internal_events/dedupe.rs | 2 +- src/internal_events/demo_logs.rs | 2 +- src/internal_events/dnstap.rs | 2 +- src/internal_events/docker_logs.rs | 2 +- src/internal_events/encoding_transcode.rs | 2 +- src/internal_events/eventstoredb_metrics.rs | 2 +- src/internal_events/exec.rs | 2 +- src/internal_events/file.rs | 2 +- src/internal_events/file_descriptor.rs | 2 +- src/internal_events/fluent.rs | 2 +- src/internal_events/gcp_pubsub.rs | 2 +- src/internal_events/grpc.rs | 2 +- src/internal_events/heartbeat.rs | 2 +- src/internal_events/host_metrics.rs | 2 +- src/internal_events/http.rs | 2 +- src/internal_events/http_client.rs | 2 +- src/internal_events/http_client_source.rs | 2 +- src/internal_events/influxdb.rs | 2 +- src/internal_events/internal_logs.rs | 2 +- src/internal_events/internal_metrics.rs | 2 +- src/internal_events/journald.rs | 2 +- src/internal_events/kafka.rs | 2 +- src/internal_events/kubernetes_logs.rs | 2 +- src/internal_events/log_to_metric.rs | 2 +- src/internal_events/logplex.rs | 2 +- src/internal_events/loki.rs | 2 +- src/internal_events/lua.rs | 2 +- src/internal_events/metric_to_log.rs | 2 +- src/internal_events/mongodb_metrics.rs | 2 +- src/internal_events/nginx_metrics.rs | 2 +- src/internal_events/open.rs | 2 +- src/internal_events/parser.rs | 2 +- src/internal_events/postgresql_metrics.rs | 2 +- src/internal_events/process.rs | 2 +- src/internal_events/prometheus.rs | 2 +- src/internal_events/pulsar.rs | 2 +- src/internal_events/redis.rs | 2 +- src/internal_events/reduce.rs | 2 +- src/internal_events/remap.rs | 2 +- src/internal_events/sample.rs | 2 +- src/internal_events/sematext_metrics.rs | 2 +- src/internal_events/socket.rs | 2 +- src/internal_events/splunk_hec.rs | 4 ++-- src/internal_events/statsd_sink.rs | 2 +- src/internal_events/tag_cardinality_limit.rs | 2 +- src/internal_events/tcp.rs | 2 +- src/internal_events/template.rs | 2 +- src/internal_events/throttle.rs | 2 +- src/internal_events/udp.rs | 2 +- src/internal_events/unix.rs | 2 +- src/internal_events/websocket.rs | 2 +- src/internal_events/windows.rs | 2 +- src/lib.rs | 2 +- src/serde.rs | 2 +- src/sinks/amqp/encoder.rs | 2 +- src/sinks/amqp/integration_tests.rs | 2 +- src/sinks/appsignal/config.rs | 4 ++-- src/sinks/appsignal/encoder.rs | 2 +- src/sinks/appsignal/integration_tests.rs | 2 +- src/sinks/appsignal/normalizer.rs | 2 +- src/sinks/appsignal/request_builder.rs | 2 +- src/sinks/appsignal/tests.rs | 2 +- src/sinks/aws_cloudwatch_logs/config.rs | 2 +- .../aws_cloudwatch_logs/request_builder.rs | 8 +++---- src/sinks/aws_cloudwatch_logs/sink.rs | 2 +- .../integration_tests.rs | 4 ++-- src/sinks/aws_cloudwatch_metrics/mod.rs | 2 +- src/sinks/aws_cloudwatch_metrics/tests.rs | 4 ++-- src/sinks/aws_kinesis/request_builder.rs | 2 +- src/sinks/aws_s3/config.rs | 2 +- src/sinks/aws_s3/integration_tests.rs | 2 +- src/sinks/aws_s3/sink.rs | 2 +- src/sinks/aws_s_s/request_builder.rs | 2 +- src/sinks/aws_s_s/service.rs | 2 +- src/sinks/axiom.rs | 2 +- src/sinks/azure_blob/integration_tests.rs | 2 +- src/sinks/azure_blob/request_builder.rs | 2 +- src/sinks/azure_blob/test.rs | 2 +- src/sinks/azure_monitor_logs/config.rs | 2 +- src/sinks/azure_monitor_logs/mod.rs | 6 +++--- src/sinks/azure_monitor_logs/tests.rs | 2 +- src/sinks/blackhole/sink.rs | 2 +- src/sinks/clickhouse/integration_tests.rs | 2 +- src/sinks/clickhouse/mod.rs | 6 +++--- src/sinks/console/sink.rs | 4 ++-- src/sinks/databend/config.rs | 2 +- src/sinks/databend/integration_tests.rs | 4 ++-- src/sinks/databend/request_builder.rs | 2 +- src/sinks/datadog/events/config.rs | 4 ++-- src/sinks/datadog/events/request_builder.rs | 2 +- src/sinks/datadog/events/tests.rs | 2 +- src/sinks/datadog/logs/config.rs | 2 +- src/sinks/datadog/logs/integration_tests.rs | 2 +- src/sinks/datadog/logs/mod.rs | 6 +++--- src/sinks/datadog/logs/service.rs | 2 +- src/sinks/datadog/logs/tests.rs | 2 +- src/sinks/datadog/metrics/config.rs | 2 +- src/sinks/datadog/metrics/encoder.rs | 6 +++--- .../datadog/metrics/integration_tests.rs | 2 +- src/sinks/datadog/metrics/normalizer.rs | 4 ++-- src/sinks/datadog/metrics/request_builder.rs | 2 +- src/sinks/datadog/metrics/service.rs | 2 +- src/sinks/datadog/metrics/sink.rs | 4 ++-- src/sinks/datadog/mod.rs | 2 +- src/sinks/datadog/traces/apm_stats/mod.rs | 2 +- src/sinks/datadog/traces/config.rs | 2 +- src/sinks/datadog/traces/integration_tests.rs | 2 +- src/sinks/datadog/traces/mod.rs | 6 +++--- src/sinks/datadog/traces/request_builder.rs | 2 +- src/sinks/datadog/traces/service.rs | 2 +- src/sinks/datadog/traces/sink.rs | 2 +- src/sinks/datadog/traces/tests.rs | 2 +- src/sinks/elasticsearch/common.rs | 4 ++-- src/sinks/elasticsearch/config.rs | 2 +- src/sinks/elasticsearch/encoder.rs | 2 +- src/sinks/elasticsearch/integration_tests.rs | 2 +- src/sinks/elasticsearch/request_builder.rs | 2 +- src/sinks/elasticsearch/service.rs | 2 +- src/sinks/file/mod.rs | 4 ++-- src/sinks/gcp/chronicle_unstructured.rs | 6 +++--- src/sinks/gcp/cloud_storage.rs | 6 +++--- src/sinks/gcp/pubsub.rs | 2 +- src/sinks/gcp/stackdriver/logs/mod.rs | 6 +++--- .../stackdriver/metrics/request_builder.rs | 2 +- src/sinks/gcp/stackdriver/metrics/sink.rs | 2 +- src/sinks/gcp/stackdriver/metrics/tests.rs | 2 +- src/sinks/greptimedb/batch.rs | 2 +- src/sinks/greptimedb/integration_tests.rs | 4 ++-- src/sinks/greptimedb/request_builder.rs | 12 +++++------ src/sinks/greptimedb/service.rs | 2 +- src/sinks/greptimedb/sink.rs | 2 +- src/sinks/honeycomb/mod.rs | 6 +++--- src/sinks/http/batch.rs | 2 +- src/sinks/http/mod.rs | 6 +++--- src/sinks/http/tests.rs | 2 +- src/sinks/humio/metrics.rs | 6 +++--- src/sinks/influxdb/logs.rs | 10 ++++----- src/sinks/influxdb/metrics.rs | 18 ++++++++-------- src/sinks/influxdb/mod.rs | 4 ++-- src/sinks/kafka/tests.rs | 2 +- src/sinks/loki/event.rs | 2 +- src/sinks/loki/integration_tests.rs | 4 ++-- src/sinks/loki/sink.rs | 2 +- src/sinks/loki/tests.rs | 2 +- src/sinks/mezmo.rs | 2 +- src/sinks/mod.rs | 2 +- src/sinks/nats/config.rs | 2 +- src/sinks/nats/request_builder.rs | 2 +- src/sinks/new_relic/encoding.rs | 2 +- src/sinks/new_relic/tests.rs | 2 +- src/sinks/papertrail.rs | 2 +- src/sinks/prelude.rs | 2 +- src/sinks/prometheus/collector.rs | 10 ++++----- src/sinks/prometheus/exporter.rs | 4 ++-- src/sinks/prometheus/mod.rs | 2 +- src/sinks/prometheus/remote_write/mod.rs | 2 +- .../remote_write/request_builder.rs | 2 +- src/sinks/prometheus/remote_write/sink.rs | 2 +- src/sinks/prometheus/remote_write/tests.rs | 2 +- src/sinks/pulsar/config.rs | 2 +- src/sinks/pulsar/encoder.rs | 2 +- src/sinks/pulsar/util.rs | 2 +- src/sinks/redis/integration_tests.rs | 2 +- src/sinks/redis/request_builder.rs | 2 +- src/sinks/redis/tests.rs | 2 +- src/sinks/s3_common/partitioner.rs | 2 +- src/sinks/s3_common/service.rs | 2 +- src/sinks/sematext/metrics.rs | 4 ++-- .../splunk_hec/common/acknowledgements.rs | 4 ++-- src/sinks/splunk_hec/common/request.rs | 4 ++-- src/sinks/splunk_hec/common/response.rs | 2 +- src/sinks/splunk_hec/common/service.rs | 6 +++--- src/sinks/splunk_hec/common/util.rs | 6 +++--- src/sinks/splunk_hec/logs/config.rs | 2 +- src/sinks/splunk_hec/logs/encoder.rs | 2 +- .../splunk_hec/logs/integration_tests.rs | 2 +- src/sinks/splunk_hec/logs/request_builder.rs | 2 +- src/sinks/splunk_hec/logs/tests.rs | 2 +- src/sinks/splunk_hec/metrics/config.rs | 2 +- src/sinks/splunk_hec/metrics/encoder.rs | 2 +- .../splunk_hec/metrics/integration_tests.rs | 2 +- .../splunk_hec/metrics/request_builder.rs | 2 +- src/sinks/splunk_hec/metrics/sink.rs | 2 +- src/sinks/splunk_hec/metrics/tests.rs | 2 +- src/sinks/statsd/batch.rs | 2 +- src/sinks/statsd/config.rs | 4 ++-- src/sinks/statsd/encoder.rs | 16 +++++++------- src/sinks/statsd/normalizer.rs | 4 ++-- src/sinks/statsd/request_builder.rs | 4 ++-- src/sinks/statsd/sink.rs | 2 +- src/sinks/statsd/tests.rs | 4 ++-- src/sinks/util/buffer/metrics/mod.rs | 16 +++++++------- src/sinks/util/buffer/metrics/normalize.rs | 3 ++- src/sinks/util/buffer/metrics/split.rs | 4 ++-- src/sinks/util/buffer/partition.rs | 2 +- src/sinks/util/builder.rs | 2 +- src/sinks/util/encoding.rs | 4 ++-- src/sinks/util/http.rs | 2 +- src/sinks/util/metadata.rs | 2 +- src/sinks/util/normalizer.rs | 2 +- src/sinks/util/partitioner.rs | 2 +- src/sinks/util/processed_event.rs | 2 +- src/sinks/util/service/net/mod.rs | 2 +- src/sinks/util/service/net/tcp.rs | 2 +- src/sinks/util/sink.rs | 2 +- src/sinks/util/tcp.rs | 2 +- src/sinks/util/udp.rs | 2 +- src/sinks/util/unix.rs | 2 +- src/sinks/vector/mod.rs | 2 +- src/sinks/vector/sink.rs | 2 +- src/sinks/webhdfs/config.rs | 2 +- src/sinks/webhdfs/integration_tests.rs | 2 +- src/sinks/webhdfs/test.rs | 2 +- src/sinks/websocket/sink.rs | 2 +- src/source_sender/mod.rs | 8 +++---- src/sources/amqp.rs | 8 +++---- src/sources/apache_metrics/mod.rs | 4 ++-- src/sources/apache_metrics/parser.rs | 2 +- src/sources/aws_ecs_metrics/mod.rs | 2 +- src/sources/aws_ecs_metrics/parser.rs | 2 +- src/sources/aws_kinesis_firehose/filters.rs | 2 +- src/sources/aws_kinesis_firehose/handlers.rs | 2 +- src/sources/aws_kinesis_firehose/mod.rs | 2 +- src/sources/aws_s3/mod.rs | 2 +- src/sources/aws_s3/sqs.rs | 4 ++-- src/sources/aws_sqs/config.rs | 2 +- src/sources/aws_sqs/source.rs | 2 +- src/sources/datadog_agent/logs.rs | 2 +- src/sources/datadog_agent/metrics.rs | 4 ++-- src/sources/datadog_agent/mod.rs | 4 ++-- src/sources/datadog_agent/tests.rs | 2 +- src/sources/datadog_agent/traces.rs | 2 +- src/sources/demo_logs.rs | 8 +++---- src/sources/dnstap/mod.rs | 13 +++++------- src/sources/dnstap/parser.rs | 2 +- src/sources/dnstap/schema.rs | 12 +++++------ src/sources/docker_logs/mod.rs | 2 +- src/sources/eventstoredb_metrics/mod.rs | 4 ++-- src/sources/exec/mod.rs | 4 ++-- src/sources/exec/tests.rs | 2 +- src/sources/file.rs | 6 +++--- .../file_descriptors/file_descriptor.rs | 2 +- src/sources/file_descriptors/mod.rs | 10 ++++----- src/sources/file_descriptors/stdin.rs | 2 +- src/sources/fluent/message.rs | 4 ++-- src/sources/fluent/mod.rs | 8 +++---- src/sources/gcp_pubsub.rs | 6 +++--- src/sources/heroku_logs.rs | 4 ++-- src/sources/host_metrics/cgroups.rs | 4 ++-- src/sources/host_metrics/cpu.rs | 2 +- src/sources/host_metrics/disk.rs | 2 +- src/sources/host_metrics/filesystem.rs | 2 +- src/sources/host_metrics/memory.rs | 2 +- src/sources/host_metrics/mod.rs | 4 ++-- src/sources/host_metrics/network.rs | 2 +- src/sources/http_client/client.rs | 2 +- src/sources/http_client/integration_tests.rs | 2 +- src/sources/http_client/tests.rs | 2 +- src/sources/http_server.rs | 8 +++---- src/sources/internal_logs.rs | 6 +++--- src/sources/internal_metrics.rs | 4 ++-- src/sources/journald.rs | 2 +- src/sources/kafka.rs | 8 +++---- src/sources/kubernetes_logs/mod.rs | 4 ++-- .../namespace_metadata_annotator.rs | 2 +- .../node_metadata_annotator.rs | 2 +- src/sources/kubernetes_logs/parser/cri.rs | 2 +- src/sources/kubernetes_logs/parser/docker.rs | 2 +- src/sources/kubernetes_logs/parser/mod.rs | 2 +- .../kubernetes_logs/parser/test_util.rs | 2 +- .../kubernetes_logs/partial_events_merger.rs | 4 ++-- .../kubernetes_logs/pod_metadata_annotator.rs | 2 +- .../kubernetes_logs/transform_utils/mod.rs | 2 +- src/sources/logstash.rs | 2 +- src/sources/mod.rs | 2 +- src/sources/mongodb_metrics/mod.rs | 4 ++-- src/sources/nats.rs | 12 +++++------ src/sources/nginx_metrics/mod.rs | 4 ++-- src/sources/opentelemetry/grpc.rs | 4 ++-- src/sources/opentelemetry/http.rs | 8 +++---- src/sources/opentelemetry/mod.rs | 4 ++-- src/sources/opentelemetry/tests.rs | 2 +- src/sources/postgresql_metrics.rs | 4 ++-- src/sources/prometheus/parser.rs | 18 ++++++++-------- src/sources/prometheus/remote_write.rs | 8 +++---- src/sources/prometheus/scrape.rs | 4 ++-- src/sources/redis/mod.rs | 8 +++---- src/sources/socket/mod.rs | 4 ++-- src/sources/socket/tcp.rs | 2 +- src/sources/socket/udp.rs | 4 ++-- src/sources/socket/unix.rs | 2 +- src/sources/splunk_hec/acknowledgements.rs | 2 +- src/sources/splunk_hec/mod.rs | 12 +++++------ src/sources/statsd/mod.rs | 6 +++--- src/sources/statsd/parser.rs | 10 ++++----- src/sources/syslog.rs | 4 ++-- src/sources/util/framestream.rs | 2 +- src/sources/util/http/prelude.rs | 4 ++-- src/sources/util/http/query.rs | 2 +- src/sources/util/http_client.rs | 2 +- src/sources/util/message_decoding.rs | 2 +- src/sources/util/mod.rs | 4 ++-- src/sources/util/net/tcp/mod.rs | 4 ++-- src/sources/util/unix_datagram.rs | 2 +- src/sources/util/unix_stream.rs | 2 +- src/sources/vector/mod.rs | 8 +++---- src/template.rs | 2 +- src/test_util/components.rs | 2 +- src/test_util/metrics.rs | 12 +++++------ src/test_util/mock/mod.rs | 2 +- src/test_util/mock/sinks/basic.rs | 4 ++-- src/test_util/mock/sinks/error.rs | 2 +- src/test_util/mock/sinks/oneshot.rs | 2 +- src/test_util/mock/sinks/panic.rs | 2 +- src/test_util/mock/sources/backpressure.rs | 4 ++-- src/test_util/mock/sources/basic.rs | 4 ++-- src/test_util/mock/sources/error.rs | 6 +++--- src/test_util/mock/sources/panic.rs | 6 +++--- src/test_util/mock/sources/tripwire.rs | 6 +++--- src/test_util/mock/transforms/basic.rs | 4 ++-- .../mock/transforms/error_definitions.rs | 2 +- src/test_util/mock/transforms/noop.rs | 4 ++-- src/test_util/mod.rs | 4 ++-- src/test_util/stats.rs | 2 +- src/top/state.rs | 2 +- src/topology/builder.rs | 12 +++++------ src/topology/mod.rs | 2 +- src/topology/schema.rs | 4 ++-- src/topology/task.rs | 2 +- src/topology/test/backpressure.rs | 2 +- src/topology/test/compliance.rs | 4 ++-- src/topology/test/mod.rs | 2 +- src/topology/test/reload.rs | 2 +- src/transforms/aggregate.rs | 2 +- src/transforms/aws_ec2_metadata.rs | 2 +- src/transforms/dedupe.rs | 4 ++-- src/transforms/filter.rs | 4 ++-- src/transforms/log_to_metric.rs | 12 +++++------ src/transforms/lua/mod.rs | 2 +- src/transforms/lua/v2/mod.rs | 4 ++-- src/transforms/metric_to_log.rs | 10 ++++----- src/transforms/mod.rs | 4 ++-- src/transforms/reduce/mod.rs | 2 +- src/transforms/remap.rs | 8 +++---- src/transforms/route.rs | 12 ++++------- src/transforms/sample.rs | 2 +- .../tag_cardinality_limit/config.rs | 2 +- src/transforms/tag_cardinality_limit/tests.rs | 6 +++--- src/transforms/throttle.rs | 2 +- 401 files changed, 677 insertions(+), 658 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ab6f9f1eb7ba..2fa9f4baaf2f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9869,7 +9869,6 @@ dependencies = [ "vector-config", "vector-config-common", "vector-config-macros", - "vector-core", "vector-lib", "vector-lookup", "vector-stream", @@ -10119,6 +10118,7 @@ name = "vector-lib" version = "0.1.0" dependencies = [ "vector-common", + "vector-core", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 286900ecaf0ea..7dddc4e4b4ba6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -144,8 +144,7 @@ vector-buffers = { path = "lib/vector-buffers", default-features = false } vector-config = { path = "lib/vector-config" } vector-config-common = { path = "lib/vector-config-common" } vector-config-macros = { path = "lib/vector-config-macros" } -vector-core = { path = "lib/vector-core", default-features = false, features = ["vrl"] } -vector-lib = { path = "lib/vector-lib", default-features = false } +vector-lib = { path = "lib/vector-lib", default-features = false, features = ["vrl"] } vector-stream = { path = "lib/vector-stream" } vector-vrl-functions = { path = "lib/vector-vrl/functions" } loki-logproto = { path = "lib/loki-logproto", optional = true } @@ -377,7 +376,7 @@ test-generator = "0.3.1" tokio = { version = "1.33.0", features = ["test-util"] } tokio-test = "0.4.3" tower-test = "0.4.0" -vector-core = { path = "lib/vector-core", default-features = false, features = ["vrl", "test"] } +vector-lib = { path = "lib/vector-lib", default-features = false, features = ["vrl", "test"] } vrl = { version = "0.7.0", features = ["cli", "test", "test_framework", "arbitrary"] } wiremock = "0.5.19" @@ -438,7 +437,7 @@ api = [ "dep:async-graphql", "dep:async-graphql-warp", "dep:base64", - "vector-core/api", + "vector-lib/api", ] # API client @@ -447,7 +446,7 @@ api-client = [ "dep:num-format", "dep:number_prefix", "dep:ratatui", - "vector-core/api", + "vector-lib/api", "dep:vector-api-client", ] @@ -608,7 +607,7 @@ transforms-aws_ec2_metadata = ["dep:arc-swap"] transforms-dedupe = ["dep:lru"] transforms-filter = [] transforms-log_to_metric = [] -transforms-lua = ["dep:mlua", "vector-core/lua"] +transforms-lua = ["dep:mlua", "vector-lib/lua"] transforms-metric_to_log = [] transforms-pipelines = ["transforms-filter", "transforms-route"] transforms-reduce = [] diff --git a/lib/vector-lib/Cargo.toml b/lib/vector-lib/Cargo.toml index 51e6cdc6e7f80..a66408303abb5 100644 --- a/lib/vector-lib/Cargo.toml +++ b/lib/vector-lib/Cargo.toml @@ -7,3 +7,10 @@ publish = false [dependencies] vector-common = { path = "../vector-common", default-features = false } +vector-core = { path = "../vector-core", default-features = false } + +[features] +api = ["vector-core/api"] +lua = ["vector-core/lua"] +test = ["vector-core/test"] +vrl = ["vector-core/vrl"] diff --git a/lib/vector-lib/src/lib.rs b/lib/vector-lib/src/lib.rs index f089e7d004aaf..166bdac69c17a 100644 --- a/lib/vector-lib/src/lib.rs +++ b/lib/vector-lib/src/lib.rs @@ -1,6 +1,25 @@ pub use vector_common::{ - assert_event_data_eq, btreemap, byte_size_of, byte_size_of::ByteSizeOf, config, conversion, + assert_event_data_eq, btreemap, byte_size_of, byte_size_of::ByteSizeOf, conversion, encode_logfmt, finalization, finalizer, impl_event_data_eq, internal_event, json_size, registered_event, request_metadata, sensitive_string, shutdown, trigger, Error, Result, TimeZone, }; +#[cfg(feature = "vrl")] +pub use vector_core::compile_vrl; +#[cfg(feature = "test")] +pub use vector_core::event_test_util; +pub use vector_core::{ + buckets, buffers, default_data_dir, event, fanout, metric_tags, metrics, partition, quantiles, + samples, schema, serde, sink, source, tcp, tls, transform, update_counter, + EstimatedJsonEncodedSizeOf, +}; + +pub mod config { + pub use vector_common::config::ComponentKey; + pub use vector_core::config::{ + clone_input_definitions, init_log_schema, init_telemetry, log_schema, proxy, telemetry, + AcknowledgementsConfig, DataType, GlobalOptions, Input, LegacyKey, LogNamespace, LogSchema, + OutputId, SourceAcknowledgementsConfig, SourceOutput, Tags, Telemetry, TransformOutput, + MEMORY_BUFFER_DEFAULT_MAX_EVENTS, + }; +} diff --git a/src/api/schema/components/mod.rs b/src/api/schema/components/mod.rs index 1b5e4cf82a201..a8cb08731c19d 100644 --- a/src/api/schema/components/mod.rs +++ b/src/api/schema/components/mod.rs @@ -11,7 +11,7 @@ use std::{ use async_graphql::{Enum, InputObject, Interface, Object, Subscription}; use once_cell::sync::Lazy; use tokio_stream::{wrappers::BroadcastStream, Stream, StreamExt}; -use vector_core::internal_event::DEFAULT_OUTPUT; +use vector_lib::internal_event::DEFAULT_OUTPUT; use crate::{ api::schema::{ diff --git a/src/api/schema/metrics/output.rs b/src/api/schema/metrics/output.rs index c1282c689c479..1bf67791dc7c1 100644 --- a/src/api/schema/metrics/output.rs +++ b/src/api/schema/metrics/output.rs @@ -1,5 +1,5 @@ use async_graphql::Object; -use vector_core::config::ComponentKey; +use vector_lib::config::ComponentKey; use super::{by_component_key, sum_metrics, SentEventsTotal}; use crate::event::Metric; diff --git a/src/codecs/decoding/config.rs b/src/codecs/decoding/config.rs index 00e0c7e67d73b..80a78cb7594ed 100644 --- a/src/codecs/decoding/config.rs +++ b/src/codecs/decoding/config.rs @@ -1,6 +1,6 @@ use codecs::decoding::{DeserializerConfig, FramingConfig}; use serde::{Deserialize, Serialize}; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::codecs::Decoder; diff --git a/src/codecs/decoding/decoder.rs b/src/codecs/decoding/decoder.rs index cf4749ca64d58..6229961a4f4f1 100644 --- a/src/codecs/decoding/decoder.rs +++ b/src/codecs/decoding/decoder.rs @@ -4,7 +4,7 @@ use codecs::decoding::{ NewlineDelimitedDecoder, }; use smallvec::SmallVec; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::{ event::Event, diff --git a/src/codecs/encoding/encoder.rs b/src/codecs/encoding/encoder.rs index f7bfe086e2085..1ee47131ebcd7 100644 --- a/src/codecs/encoding/encoder.rs +++ b/src/codecs/encoding/encoder.rs @@ -187,7 +187,7 @@ mod tests { use codecs::encoding::BoxedFramingError; use futures_util::{SinkExt, StreamExt}; use tokio_util::codec::FramedWrite; - use vector_core::event::LogEvent; + use vector_lib::event::LogEvent; use super::*; diff --git a/src/codecs/encoding/transformer.rs b/src/codecs/encoding/transformer.rs index 6b2690b6c5cc1..d919a8872a39b 100644 --- a/src/codecs/encoding/transformer.rs +++ b/src/codecs/encoding/transformer.rs @@ -9,8 +9,8 @@ use lookup::{event_path, PathPrefix}; use ordered_float::NotNan; use serde::{Deserialize, Deserializer}; use vector_config::configurable_component; -use vector_core::event::{LogEvent, MaybeAsLogMut}; -use vector_core::schema::meaning; +use vector_lib::event::{LogEvent, MaybeAsLogMut}; +use vector_lib::schema::meaning; use vrl::path::OwnedValuePath; use vrl::value::Value; @@ -267,8 +267,8 @@ pub enum TimestampFormat { mod tests { use indoc::indoc; use lookup::path::parse_target_path; - use vector_core::config::{log_schema, LogNamespace}; use vector_lib::btreemap; + use vector_lib::config::{log_schema, LogNamespace}; use vrl::value::Kind; use crate::config::schema; diff --git a/src/common/datadog.rs b/src/common/datadog.rs index 306ff41f837b6..2bdd3ee200c30 100644 --- a/src/common/datadog.rs +++ b/src/common/datadog.rs @@ -4,7 +4,7 @@ #![allow(unreachable_pub)] use serde::{Deserialize, Serialize}; use vector_config::configurable_component; -use vector_core::event::DatadogMetricOriginMetadata; +use vector_lib::event::DatadogMetricOriginMetadata; pub const DD_US_SITE: &str = "datadoghq.com"; pub const DD_EU_SITE: &str = "datadoghq.eu"; diff --git a/src/components/validation/resources/event.rs b/src/components/validation/resources/event.rs index 1f91acfbe660d..c36a13cf7dfe6 100644 --- a/src/components/validation/resources/event.rs +++ b/src/components/validation/resources/event.rs @@ -8,7 +8,7 @@ use codecs::{ encoding, JsonSerializer, LengthDelimitedEncoder, LogfmtSerializer, MetricTagValues, NewlineDelimitedEncoder, }; -use vector_core::event::{Event, LogEvent}; +use vector_lib::event::{Event, LogEvent}; /// A test case event for deserialization from yaml file. /// This is an intermediary step to TestEvent. diff --git a/src/components/validation/resources/http.rs b/src/components/validation/resources/http.rs index 5e9be4edb2a2c..052dabec52cf8 100644 --- a/src/components/validation/resources/http.rs +++ b/src/components/validation/resources/http.rs @@ -21,7 +21,7 @@ use tokio::{ use tokio_util::codec::Decoder; use crate::components::validation::sync::{Configuring, TaskCoordinator}; -use vector_core::event::Event; +use vector_lib::event::Event; use super::{encode_test_event, ResourceCodec, ResourceDirection, TestEvent}; diff --git a/src/components/validation/resources/mod.rs b/src/components/validation/resources/mod.rs index 5d48427f70b45..0f6b77abbcb55 100644 --- a/src/components/validation/resources/mod.rs +++ b/src/components/validation/resources/mod.rs @@ -9,7 +9,7 @@ use codecs::{ BytesEncoder, }; use tokio::sync::mpsc; -use vector_core::{config::DataType, event::Event}; +use vector_lib::{config::DataType, event::Event}; use crate::codecs::{Decoder, DecodingConfig, Encoder, EncodingConfig, EncodingConfigWithFraming}; diff --git a/src/components/validation/runner/io.rs b/src/components/validation/runner/io.rs index b554140e04788..9e4e51e85651d 100644 --- a/src/components/validation/runner/io.rs +++ b/src/components/validation/runner/io.rs @@ -9,8 +9,8 @@ use tonic::{ Status, }; use tower::Service; -use vector_core::{event::Event, tls::MaybeTlsSettings}; use vector_lib::shutdown::ShutdownSignal; +use vector_lib::{event::Event, tls::MaybeTlsSettings}; use crate::{ components::validation::{ diff --git a/src/components/validation/runner/mod.rs b/src/components/validation/runner/mod.rs index 527eca3d8d9c9..0ad661c4d101f 100644 --- a/src/components/validation/runner/mod.rs +++ b/src/components/validation/runner/mod.rs @@ -19,7 +19,7 @@ use tokio::{ use tokio_util::codec::Encoder as _; use codecs::encoding; -use vector_core::{event::Event, EstimatedJsonEncodedSizeOf}; +use vector_lib::{event::Event, EstimatedJsonEncodedSizeOf}; use crate::{ codecs::Encoder, diff --git a/src/components/validation/runner/telemetry.rs b/src/components/validation/runner/telemetry.rs index 76e8c29f62a9f..d5bb8f5b438d3 100644 --- a/src/components/validation/runner/telemetry.rs +++ b/src/components/validation/runner/telemetry.rs @@ -1,7 +1,7 @@ use std::time::Duration; use tokio::{select, sync::mpsc, task::JoinHandle}; -use vector_core::event::Event; +use vector_lib::event::Event; use crate::{ components::validation::{ diff --git a/src/components/validation/validators/component_spec/mod.rs b/src/components/validation/validators/component_spec/mod.rs index f6758a44fe7cf..cfd1f8a5a88f5 100644 --- a/src/components/validation/validators/component_spec/mod.rs +++ b/src/components/validation/validators/component_spec/mod.rs @@ -1,6 +1,6 @@ mod sources; -use vector_core::event::{Event, Metric}; +use vector_lib::event::{Event, Metric}; use crate::components::validation::{ComponentType, RunnerMetrics, TestCaseExpectation, TestEvent}; @@ -124,7 +124,7 @@ fn filter_events_by_metric_and_component<'a>( let metrics: Vec<&Metric> = telemetry_events .iter() .flat_map(|e| { - if let vector_core::event::Event::Metric(m) = e { + if let vector_lib::event::Event::Metric(m) = e { Some(m) } else { None diff --git a/src/components/validation/validators/component_spec/sources.rs b/src/components/validation/validators/component_spec/sources.rs index 6002b0b4878e9..e4c6d3383f688 100644 --- a/src/components/validation/validators/component_spec/sources.rs +++ b/src/components/validation/validators/component_spec/sources.rs @@ -1,6 +1,6 @@ use std::fmt::{Display, Formatter}; -use vector_core::event::{Event, MetricKind}; +use vector_lib::event::{Event, MetricKind}; use crate::components::validation::RunnerMetrics; @@ -68,14 +68,14 @@ pub fn validate_sources( fn sum_counters( metric_name: &SourceMetricType, - metrics: &[&vector_core::event::Metric], + metrics: &[&vector_lib::event::Metric], ) -> Result> { let mut sum: f64 = 0.0; let mut errs = Vec::new(); for m in metrics { match m.value() { - vector_core::event::MetricValue::Counter { value } => { + vector_lib::event::MetricValue::Counter { value } => { if let MetricKind::Absolute = m.data().kind { sum = *value; } else { diff --git a/src/components/validation/validators/mod.rs b/src/components/validation/validators/mod.rs index e563488d7f416..b89441d8adc9a 100644 --- a/src/components/validation/validators/mod.rs +++ b/src/components/validation/validators/mod.rs @@ -2,7 +2,7 @@ mod component_spec; pub use self::component_spec::ComponentSpecValidator; -use vector_core::event::Event; +use vector_lib::event::Event; use super::{ComponentType, RunnerMetrics, TestCaseExpectation, TestEvent}; diff --git a/src/conditions/datadog_search.rs b/src/conditions/datadog_search.rs index 90e9641567038..1f11edc86e2e9 100644 --- a/src/conditions/datadog_search.rs +++ b/src/conditions/datadog_search.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use bytes::Bytes; use vector_config::configurable_component; -use vector_core::event::{Event, LogEvent, Value}; +use vector_lib::event::{Event, LogEvent, Value}; use vrl::datadog_filter::{ build_matcher, regex::{wildcard_regex, word_regex}, @@ -325,7 +325,7 @@ where #[cfg(test)] mod test { use serde_json::json; - use vector_core::event::Event; + use vector_lib::event::Event; use vrl::datadog_filter::{build_matcher, Filter, Resolver}; use vrl::datadog_search_syntax::parse; diff --git a/src/conditions/vrl.rs b/src/conditions/vrl.rs index 3a14089f82c83..7cd39712ceb2a 100644 --- a/src/conditions/vrl.rs +++ b/src/conditions/vrl.rs @@ -1,5 +1,5 @@ use vector_config::configurable_component; -use vector_core::compile_vrl; +use vector_lib::compile_vrl; use vector_lib::TimeZone; use vrl::compiler::runtime::{Runtime, RuntimeResult, Terminate}; use vrl::compiler::{CompilationResult, CompileConfig, Program, TypeState, VrlRuntime}; @@ -170,7 +170,7 @@ impl Conditional for Vrl { #[cfg(test)] mod test { - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::{ diff --git a/src/config/builder.rs b/src/config/builder.rs index 3645ef3755987..e7968fd587e37 100644 --- a/src/config/builder.rs +++ b/src/config/builder.rs @@ -6,7 +6,7 @@ use indexmap::IndexMap; #[cfg(feature = "enterprise")] use serde_json::Value; use vector_config::configurable_component; -use vector_core::config::GlobalOptions; +use vector_lib::config::GlobalOptions; use crate::{enrichment_tables::EnrichmentTables, providers::Providers, secrets::SecretBackends}; diff --git a/src/config/compiler.rs b/src/config/compiler.rs index 32465a479ab44..cff03862375b9 100644 --- a/src/config/compiler.rs +++ b/src/config/compiler.rs @@ -198,7 +198,7 @@ fn expand_globs_inner(inputs: &mut Inputs, id: &str, candidates: &IndexS mod test { use super::*; use crate::test_util::mock::{basic_sink, basic_source, basic_transform}; - use vector_core::config::ComponentKey; + use vector_lib::config::ComponentKey; #[test] fn glob_expansion() { diff --git a/src/config/enrichment_table.rs b/src/config/enrichment_table.rs index 60e68d92d7bd1..6d4f9d06ffdc6 100644 --- a/src/config/enrichment_table.rs +++ b/src/config/enrichment_table.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use enum_dispatch::enum_dispatch; use vector_config::{configurable_component, NamedComponent}; -use vector_core::config::GlobalOptions; +use vector_lib::config::GlobalOptions; use crate::enrichment_tables::EnrichmentTables; diff --git a/src/config/enterprise.rs b/src/config/enterprise.rs index bce787aa7d183..e5af10ee9009a 100644 --- a/src/config/enterprise.rs +++ b/src/config/enterprise.rs @@ -14,7 +14,7 @@ use tokio::{ time::{sleep, Duration}, }; use url::{ParseError, Url}; -use vector_core::config::proxy::ProxyConfig; +use vector_lib::config::proxy::ProxyConfig; use super::{ load_source_from_paths, process_paths, ComponentKey, Config, ConfigPath, OutputId, SinkOuter, @@ -832,7 +832,7 @@ mod test { use http::StatusCode; use indexmap::IndexMap; use tokio::time::sleep; - use vector_core::config::proxy::ProxyConfig; + use vector_lib::config::proxy::ProxyConfig; use vrl::btreemap; use vrl::compiler::state::ExternalEnv; use vrl::compiler::{compile, compile_with_external, CompileConfig}; diff --git a/src/config/graph.rs b/src/config/graph.rs index 6f4cdb81d4451..bf54d31604870 100644 --- a/src/config/graph.rs +++ b/src/config/graph.rs @@ -367,7 +367,7 @@ impl Graph { #[cfg(test)] mod test { use similar_asserts::assert_eq; - use vector_core::schema::Definition; + use vector_lib::schema::Definition; use super::*; diff --git a/src/config/id.rs b/src/config/id.rs index 8355fd22f1033..253ec0c35cb44 100644 --- a/src/config/id.rs +++ b/src/config/id.rs @@ -1,7 +1,7 @@ use std::ops::Deref; use vector_config::configurable_component; -pub use vector_core::config::ComponentKey; +pub use vector_lib::config::ComponentKey; /// A list of upstream [source][sources] or [transform][transforms] IDs. /// diff --git a/src/config/mod.rs b/src/config/mod.rs index 894531126485b..7999f13e24d72 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -12,7 +12,7 @@ use indexmap::IndexMap; use serde::Serialize; pub use vector_config::component::{GenerateConfig, SinkDescription, TransformDescription}; use vector_config::configurable_component; -pub use vector_core::config::{ +pub use vector_lib::config::{ AcknowledgementsConfig, DataType, GlobalOptions, Input, LogNamespace, SourceAcknowledgementsConfig, SourceOutput, TransformOutput, }; @@ -63,7 +63,7 @@ pub use transform::{ pub use unit_test::{build_unit_tests, build_unit_tests_main, UnitTestResult}; pub use validation::warnings; pub use vars::{interpolate, ENVIRONMENT_VARIABLE_INTERPOLATION_REGEX}; -pub use vector_core::config::{ +pub use vector_lib::config::{ init_telemetry, log_schema, proxy::ProxyConfig, telemetry, LogSchema, OutputId, }; @@ -73,7 +73,7 @@ pub use vector_core::config::{ /// If deny is set, will panic if schema has already been set. pub fn init_log_schema(config_paths: &[ConfigPath], deny_if_set: bool) -> Result<(), Vec> { let (builder, _) = load_builder_from_paths(config_paths)?; - vector_core::config::init_log_schema(builder.global.log_schema, deny_if_set); + vector_lib::config::init_log_schema(builder.global.log_schema, deny_if_set); Ok(()) } diff --git a/src/config/schema.rs b/src/config/schema.rs index 2f7e61534bc8e..1a0b5d276e4e6 100644 --- a/src/config/schema.rs +++ b/src/config/schema.rs @@ -1,5 +1,5 @@ use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; pub(crate) use crate::schema::Definition; diff --git a/src/config/sink.rs b/src/config/sink.rs index 050e437f87a77..fa1199d31281e 100644 --- a/src/config/sink.rs +++ b/src/config/sink.rs @@ -9,7 +9,7 @@ use vector_config::{ }; use vector_config_common::attributes::CustomAttribute; use vector_config_common::schema::{SchemaGenerator, SchemaObject}; -use vector_core::{ +use vector_lib::{ config::{AcknowledgementsConfig, GlobalOptions, Input}, sink::VectorSink, }; @@ -68,14 +68,14 @@ where #[configurable(derived)] #[serde( default, - skip_serializing_if = "vector_core::serde::skip_serializing_if_default" + skip_serializing_if = "vector_lib::serde::skip_serializing_if_default" )] pub buffer: BufferConfig, #[configurable(derived)] #[serde( default, - skip_serializing_if = "vector_core::serde::skip_serializing_if_default" + skip_serializing_if = "vector_lib::serde::skip_serializing_if_default" )] proxy: ProxyConfig, diff --git a/src/config/source.rs b/src/config/source.rs index 5e53ebbad1725..2be18502e7d5b 100644 --- a/src/config/source.rs +++ b/src/config/source.rs @@ -8,7 +8,7 @@ use vector_config::{ }; use vector_config_common::attributes::CustomAttribute; use vector_config_common::schema::{SchemaGenerator, SchemaObject}; -use vector_core::{ +use vector_lib::{ config::{ AcknowledgementsConfig, GlobalOptions, LogNamespace, SourceAcknowledgementsConfig, SourceOutput, @@ -53,7 +53,7 @@ pub struct SourceOuter { #[configurable(derived)] #[serde( default, - skip_serializing_if = "vector_core::serde::skip_serializing_if_default" + skip_serializing_if = "vector_lib::serde::skip_serializing_if_default" )] pub proxy: ProxyConfig, diff --git a/src/config/transform.rs b/src/config/transform.rs index 1b9f442ef0786..8d8c59352fd6a 100644 --- a/src/config/transform.rs +++ b/src/config/transform.rs @@ -10,7 +10,7 @@ use vector_config::{ Configurable, GenerateError, Metadata, NamedComponent, }; use vector_config_common::attributes::CustomAttribute; -use vector_core::{ +use vector_lib::{ config::{GlobalOptions, Input, LogNamespace, TransformOutput}, schema, transform::Transform, diff --git a/src/config/unit_test/unit_test_components.rs b/src/config/unit_test/unit_test_components.rs index 3166e396a17e4..3f1442598be77 100644 --- a/src/config/unit_test/unit_test_components.rs +++ b/src/config/unit_test/unit_test_components.rs @@ -4,7 +4,7 @@ use futures::{stream, Sink, Stream}; use futures_util::{future, stream::BoxStream, FutureExt, StreamExt}; use tokio::sync::{oneshot, Mutex}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{DataType, Input, LogNamespace}, event::Event, schema, diff --git a/src/config/validation.rs b/src/config/validation.rs index 07ba4639dc71f..53bbe64b95543 100644 --- a/src/config/validation.rs +++ b/src/config/validation.rs @@ -3,7 +3,7 @@ use futures_util::{stream, FutureExt, StreamExt, TryFutureExt, TryStreamExt}; use heim::{disk::Partition, units::information::byte}; use indexmap::IndexMap; use std::{collections::HashMap, path::PathBuf}; -use vector_core::internal_event::DEFAULT_OUTPUT; +use vector_lib::internal_event::DEFAULT_OUTPUT; use super::{ builder::ConfigBuilder, transform::get_transform_output_ids, ComponentKey, Config, OutputId, diff --git a/src/generate.rs b/src/generate.rs index e06a431c1afe7..41a22cad597cc 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -13,7 +13,7 @@ use toml::{map::Map, Value}; use vector_config::component::{ ExampleError, SinkDescription, SourceDescription, TransformDescription, }; -use vector_core::{buffers::BufferConfig, config::GlobalOptions, default_data_dir}; +use vector_lib::{buffers::BufferConfig, config::GlobalOptions, default_data_dir}; use crate::config::{format, Format, SinkHealthcheckOptions}; diff --git a/src/internal_events/aggregate.rs b/src/internal_events/aggregate.rs index ae33faa5a1307..aa0d97e242521 100644 --- a/src/internal_events/aggregate.rs +++ b/src/internal_events/aggregate.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct AggregateEventRecorded; diff --git a/src/internal_events/amqp.rs b/src/internal_events/amqp.rs index c0b05313b4b53..4577753d83590 100644 --- a/src/internal_events/amqp.rs +++ b/src/internal_events/amqp.rs @@ -1,7 +1,7 @@ #[cfg(feature = "sources-amqp")] pub mod source { use metrics::counter; - use vector_core::internal_event::InternalEvent; + use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; #[derive(Debug)] @@ -93,7 +93,7 @@ pub mod source { pub mod sink { use crate::emit; use metrics::counter; - use vector_core::internal_event::InternalEvent; + use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{ error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL, }; diff --git a/src/internal_events/apache_metrics.rs b/src/internal_events/apache_metrics.rs index 88c3d74613dd3..bb467f82d4972 100644 --- a/src/internal_events/apache_metrics.rs +++ b/src/internal_events/apache_metrics.rs @@ -1,6 +1,6 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, json_size::JsonSize, diff --git a/src/internal_events/api.rs b/src/internal_events/api.rs index 1fadf5300aad7..e0f58608d8ad8 100644 --- a/src/internal_events/api.rs +++ b/src/internal_events/api.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct ApiStarted { diff --git a/src/internal_events/aws_cloudwatch_logs.rs b/src/internal_events/aws_cloudwatch_logs.rs index 857827849b892..435342858848b 100644 --- a/src/internal_events/aws_cloudwatch_logs.rs +++ b/src/internal_events/aws_cloudwatch_logs.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; use crate::emit; diff --git a/src/internal_events/aws_ec2_metadata.rs b/src/internal_events/aws_ec2_metadata.rs index eefa592d871d5..6b9473aab17bd 100644 --- a/src/internal_events/aws_ec2_metadata.rs +++ b/src/internal_events/aws_ec2_metadata.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/aws_ecs_metrics.rs b/src/internal_events/aws_ecs_metrics.rs index d15061ad0e9c6..8b86ba9b783c8 100644 --- a/src/internal_events/aws_ecs_metrics.rs +++ b/src/internal_events/aws_ecs_metrics.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, json_size::JsonSize, diff --git a/src/internal_events/aws_kinesis.rs b/src/internal_events/aws_kinesis.rs index 0af8de5a03517..bd0a156c5254b 100644 --- a/src/internal_events/aws_kinesis.rs +++ b/src/internal_events/aws_kinesis.rs @@ -1,7 +1,7 @@ /// Used in both `aws_kinesis_streams` and `aws_kinesis_firehose` sinks use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; #[derive(Debug)] diff --git a/src/internal_events/aws_kinesis_firehose.rs b/src/internal_events/aws_kinesis_firehose.rs index 65906c1e4d155..2f8ea137a0b35 100644 --- a/src/internal_events/aws_kinesis_firehose.rs +++ b/src/internal_events/aws_kinesis_firehose.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; use super::prelude::{http_error_code, io_error_code}; diff --git a/src/internal_events/aws_sqs.rs b/src/internal_events/aws_sqs.rs index 3cdd6e9539974..3e1e4993f3f7e 100644 --- a/src/internal_events/aws_sqs.rs +++ b/src/internal_events/aws_sqs.rs @@ -1,7 +1,7 @@ use metrics::counter; #[cfg(feature = "sources-aws_s3")] pub use s3::*; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[cfg(any(feature = "sources-aws_s3", feature = "sources-aws_sqs"))] use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/batch.rs b/src/internal_events/batch.rs index 72462905a086c..e8a1c3e64d80b 100644 --- a/src/internal_events/batch.rs +++ b/src/internal_events/batch.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/codecs.rs b/src/internal_events/codecs.rs index 0794c0e21a450..e6867be7628dc 100644 --- a/src/internal_events/codecs.rs +++ b/src/internal_events/codecs.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/common.rs b/src/internal_events/common.rs index 0099c24524ddc..661a96d2d074b 100644 --- a/src/internal_events/common.rs +++ b/src/internal_events/common.rs @@ -2,8 +2,8 @@ use std::time::Instant; use crate::emit; use metrics::{counter, histogram}; -pub use vector_core::internal_event::EventsReceived; -use vector_core::internal_event::InternalEvent; +pub use vector_lib::internal_event::EventsReceived; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/conditions.rs b/src/internal_events/conditions.rs index 88576b8dac425..92a8828e435b6 100644 --- a/src/internal_events/conditions.rs +++ b/src/internal_events/conditions.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/datadog_metrics.rs b/src/internal_events/datadog_metrics.rs index 417629547ba78..9d6d35c78d35d 100644 --- a/src/internal_events/datadog_metrics.rs +++ b/src/internal_events/datadog_metrics.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/datadog_traces.rs b/src/internal_events/datadog_traces.rs index 77d3b2935a222..92df6f58e23f9 100644 --- a/src/internal_events/datadog_traces.rs +++ b/src/internal_events/datadog_traces.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/dedupe.rs b/src/internal_events/dedupe.rs index caf0dd9c204e1..e9bd7710ee8b6 100644 --- a/src/internal_events/dedupe.rs +++ b/src/internal_events/dedupe.rs @@ -1,5 +1,5 @@ use crate::emit; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; #[derive(Debug)] pub struct DedupeEventsDropped { diff --git a/src/internal_events/demo_logs.rs b/src/internal_events/demo_logs.rs index e2484590010f2..796c9e9fca7bd 100644 --- a/src/internal_events/demo_logs.rs +++ b/src/internal_events/demo_logs.rs @@ -1,4 +1,4 @@ -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct DemoLogsEventProcessed; diff --git a/src/internal_events/dnstap.rs b/src/internal_events/dnstap.rs index 4b68b965c58c0..90525b5f217d0 100644 --- a/src/internal_events/dnstap.rs +++ b/src/internal_events/dnstap.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/docker_logs.rs b/src/internal_events/docker_logs.rs index 49b423a5d4d1d..617b987ae6d83 100644 --- a/src/internal_events/docker_logs.rs +++ b/src/internal_events/docker_logs.rs @@ -1,7 +1,7 @@ use bollard::errors::Error; use chrono::ParseError; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, json_size::JsonSize, diff --git a/src/internal_events/encoding_transcode.rs b/src/internal_events/encoding_transcode.rs index ec36f05a309bd..d8532a4e96aab 100644 --- a/src/internal_events/encoding_transcode.rs +++ b/src/internal_events/encoding_transcode.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct DecoderBomRemoval { diff --git a/src/internal_events/eventstoredb_metrics.rs b/src/internal_events/eventstoredb_metrics.rs index 19dbff55b2ac4..1ed248d45511f 100644 --- a/src/internal_events/eventstoredb_metrics.rs +++ b/src/internal_events/eventstoredb_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/exec.rs b/src/internal_events/exec.rs index 4d5baabcd91c0..3315734d56024 100644 --- a/src/internal_events/exec.rs +++ b/src/internal_events/exec.rs @@ -3,7 +3,7 @@ use std::time::Duration; use crate::emit; use metrics::{counter, histogram}; use tokio::time::error::Elapsed; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}, json_size::JsonSize, diff --git a/src/internal_events/file.rs b/src/internal_events/file.rs index d947698b2bc81..871be8a93ce7b 100644 --- a/src/internal_events/file.rs +++ b/src/internal_events/file.rs @@ -1,6 +1,6 @@ use metrics::{counter, gauge}; use std::borrow::Cow; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; use crate::emit; diff --git a/src/internal_events/file_descriptor.rs b/src/internal_events/file_descriptor.rs index 45f73bfc400cf..a27ac7875ab71 100644 --- a/src/internal_events/file_descriptor.rs +++ b/src/internal_events/file_descriptor.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; #[derive(Debug)] diff --git a/src/internal_events/fluent.rs b/src/internal_events/fluent.rs index 5ac8685a65802..a5bfd3201ab71 100644 --- a/src/internal_events/fluent.rs +++ b/src/internal_events/fluent.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::sources::fluent::DecodeError; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/gcp_pubsub.rs b/src/internal_events/gcp_pubsub.rs index 9e669620448d4..5d7754ad13403 100644 --- a/src/internal_events/gcp_pubsub.rs +++ b/src/internal_events/gcp_pubsub.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/grpc.rs b/src/internal_events/grpc.rs index 7f48b2930b290..ee18a1bd225db 100644 --- a/src/internal_events/grpc.rs +++ b/src/internal_events/grpc.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; #[derive(Debug)] diff --git a/src/internal_events/heartbeat.rs b/src/internal_events/heartbeat.rs index 41417f312064a..8a7dc6beb9ef4 100644 --- a/src/internal_events/heartbeat.rs +++ b/src/internal_events/heartbeat.rs @@ -1,7 +1,7 @@ use std::time::Instant; use metrics::gauge; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct Heartbeat { diff --git a/src/internal_events/host_metrics.rs b/src/internal_events/host_metrics.rs index 59b957ff071e0..7c2b9c0ee2bfb 100644 --- a/src/internal_events/host_metrics.rs +++ b/src/internal_events/host_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/http.rs b/src/internal_events/http.rs index ce4bae4ede61d..bcef588f533ff 100644 --- a/src/internal_events/http.rs +++ b/src/internal_events/http.rs @@ -1,7 +1,7 @@ use std::error::Error; use metrics::{counter, histogram}; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, diff --git a/src/internal_events/http_client.rs b/src/internal_events/http_client.rs index 5d47336c8dad0..43d2001b01c88 100644 --- a/src/internal_events/http_client.rs +++ b/src/internal_events/http_client.rs @@ -6,7 +6,7 @@ use http::{ }; use hyper::{body::HttpBody, Error}; use metrics::{counter, histogram}; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/http_client_source.rs b/src/internal_events/http_client_source.rs index 55a868c1da597..b1450a5c8c71d 100644 --- a/src/internal_events/http_client_source.rs +++ b/src/internal_events/http_client_source.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, json_size::JsonSize, diff --git a/src/internal_events/influxdb.rs b/src/internal_events/influxdb.rs index 4dcbbcf081264..babe206896a72 100644 --- a/src/internal_events/influxdb.rs +++ b/src/internal_events/influxdb.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; #[derive(Debug)] diff --git a/src/internal_events/internal_logs.rs b/src/internal_events/internal_logs.rs index 9f0806db7b0a1..9321e9e7a81da 100644 --- a/src/internal_events/internal_logs.rs +++ b/src/internal_events/internal_logs.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::json_size::JsonSize; #[derive(Debug)] diff --git a/src/internal_events/internal_metrics.rs b/src/internal_events/internal_metrics.rs index 1e29cb664ccd2..680b209c7e1eb 100644 --- a/src/internal_events/internal_metrics.rs +++ b/src/internal_events/internal_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct InternalMetricsBytesReceived { diff --git a/src/internal_events/journald.rs b/src/internal_events/journald.rs index 5f0fc62cc767f..713d87b36df23 100644 --- a/src/internal_events/journald.rs +++ b/src/internal_events/journald.rs @@ -1,6 +1,6 @@ use codecs::decoding::BoxedFramingError; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/kafka.rs b/src/internal_events/kafka.rs index b6d50da6407ba..6c4d24e63cfb7 100644 --- a/src/internal_events/kafka.rs +++ b/src/internal_events/kafka.rs @@ -1,5 +1,5 @@ use metrics::{counter, gauge}; -use vector_core::{internal_event::InternalEvent, update_counter}; +use vector_lib::{internal_event::InternalEvent, update_counter}; use vrl::path::OwnedTargetPath; use vector_lib::{ diff --git a/src/internal_events/kubernetes_logs.rs b/src/internal_events/kubernetes_logs.rs index 44a7964070028..dece04e8bbdf5 100644 --- a/src/internal_events/kubernetes_logs.rs +++ b/src/internal_events/kubernetes_logs.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use crate::event::Event; diff --git a/src/internal_events/log_to_metric.rs b/src/internal_events/log_to_metric.rs index 800d2693a4d3b..dd6fa930a23c8 100644 --- a/src/internal_events/log_to_metric.rs +++ b/src/internal_events/log_to_metric.rs @@ -1,7 +1,7 @@ use std::num::ParseFloatError; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/logplex.rs b/src/internal_events/logplex.rs index 2d1e07cd8cad1..4c725e825ed65 100644 --- a/src/internal_events/logplex.rs +++ b/src/internal_events/logplex.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; use super::prelude::io_error_code; diff --git a/src/internal_events/loki.rs b/src/internal_events/loki.rs index ea88bf2207fbf..3290f8faf2761 100644 --- a/src/internal_events/loki.rs +++ b/src/internal_events/loki.rs @@ -1,7 +1,7 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; use vector_lib::internal_event::{error_stage, error_type}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; #[derive(Debug)] pub struct LokiEventUnlabeledError; diff --git a/src/internal_events/lua.rs b/src/internal_events/lua.rs index f9fb819af7557..dba6dc0a529fe 100644 --- a/src/internal_events/lua.rs +++ b/src/internal_events/lua.rs @@ -1,5 +1,5 @@ use metrics::{counter, gauge}; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use crate::transforms::lua::v2::BuildError; diff --git a/src/internal_events/metric_to_log.rs b/src/internal_events/metric_to_log.rs index efec0705507fa..f3c34d249363e 100644 --- a/src/internal_events/metric_to_log.rs +++ b/src/internal_events/metric_to_log.rs @@ -1,6 +1,6 @@ use metrics::counter; use serde_json::Error; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/mongodb_metrics.rs b/src/internal_events/mongodb_metrics.rs index 715a886ff48e2..6a4992cc627d5 100644 --- a/src/internal_events/mongodb_metrics.rs +++ b/src/internal_events/mongodb_metrics.rs @@ -1,6 +1,6 @@ use metrics::counter; use mongodb::{bson, error::Error as MongoError}; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::{ internal_event::{error_stage, error_type}, diff --git a/src/internal_events/nginx_metrics.rs b/src/internal_events/nginx_metrics.rs index 7d5fab1d272e3..9a975abe463c1 100644 --- a/src/internal_events/nginx_metrics.rs +++ b/src/internal_events/nginx_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::sources::nginx_metrics::parser::ParseError; use vector_lib::{ diff --git a/src/internal_events/open.rs b/src/internal_events/open.rs index e811014f05bfa..daf395394a567 100644 --- a/src/internal_events/open.rs +++ b/src/internal_events/open.rs @@ -7,7 +7,7 @@ use std::{ }; use metrics::gauge; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct ConnectionOpen { diff --git a/src/internal_events/parser.rs b/src/internal_events/parser.rs index fe29ccfc363be..ab1ffa466f8be 100644 --- a/src/internal_events/parser.rs +++ b/src/internal_events/parser.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/postgresql_metrics.rs b/src/internal_events/postgresql_metrics.rs index bc5ca8a230587..42bb8aa7d0047 100644 --- a/src/internal_events/postgresql_metrics.rs +++ b/src/internal_events/postgresql_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/process.rs b/src/internal_events/process.rs index 0ed898aa77297..c9712cbeecc77 100644 --- a/src/internal_events/process.rs +++ b/src/internal_events/process.rs @@ -1,6 +1,6 @@ use metrics::counter; use metrics::gauge; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::{built_info, config}; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/prometheus.rs b/src/internal_events/prometheus.rs index 4a85609ec7fca..4d5c0e3da24ca 100644 --- a/src/internal_events/prometheus.rs +++ b/src/internal_events/prometheus.rs @@ -5,7 +5,7 @@ use hyper::StatusCode; use metrics::counter; #[cfg(feature = "sources-prometheus-scrape")] use prometheus_parser::ParserError; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/pulsar.rs b/src/internal_events/pulsar.rs index f714e77d40a35..66fd8704bbacf 100644 --- a/src/internal_events/pulsar.rs +++ b/src/internal_events/pulsar.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/redis.rs b/src/internal_events/redis.rs index 998b81fc48a35..67ca84a59e886 100644 --- a/src/internal_events/redis.rs +++ b/src/internal_events/redis.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/reduce.rs b/src/internal_events/reduce.rs index af3eb2d141093..ae355696e17cb 100644 --- a/src/internal_events/reduce.rs +++ b/src/internal_events/reduce.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; #[derive(Debug)] pub struct ReduceStaleEventFlushed; diff --git a/src/internal_events/remap.rs b/src/internal_events/remap.rs index 66fbaa67b4212..3727069ff40a1 100644 --- a/src/internal_events/remap.rs +++ b/src/internal_events/remap.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{ error_stage, error_type, ComponentEventsDropped, INTENTIONAL, UNINTENTIONAL, diff --git a/src/internal_events/sample.rs b/src/internal_events/sample.rs index cded9a1a13343..23cfc35633a9d 100644 --- a/src/internal_events/sample.rs +++ b/src/internal_events/sample.rs @@ -1,5 +1,5 @@ use crate::emit; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; #[derive(Debug)] pub struct SampleEventDiscarded; diff --git a/src/internal_events/sematext_metrics.rs b/src/internal_events/sematext_metrics.rs index af14d78fa8367..49a1ef83fb892 100644 --- a/src/internal_events/sematext_metrics.rs +++ b/src/internal_events/sematext_metrics.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::{emit, event::metric::Metric}; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; diff --git a/src/internal_events/socket.rs b/src/internal_events/socket.rs index d68cb41cf1a88..f5b5cf2b3d36e 100644 --- a/src/internal_events/socket.rs +++ b/src/internal_events/socket.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; use vector_lib::{ internal_event::{error_stage, error_type}, json_size::JsonSize, diff --git a/src/internal_events/splunk_hec.rs b/src/internal_events/splunk_hec.rs index 5b155386db401..da73879da22eb 100644 --- a/src/internal_events/splunk_hec.rs +++ b/src/internal_events/splunk_hec.rs @@ -9,7 +9,7 @@ pub use self::source::*; mod sink { use metrics::{counter, decrement_gauge, increment_gauge}; use serde_json::Error; - use vector_core::internal_event::InternalEvent; + use vector_lib::internal_event::InternalEvent; use crate::{ emit, @@ -198,7 +198,7 @@ mod sink { #[cfg(feature = "sources-splunk_hec")] mod source { use metrics::counter; - use vector_core::internal_event::InternalEvent; + use vector_lib::internal_event::InternalEvent; use crate::sources::splunk_hec::ApiError; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/statsd_sink.rs b/src/internal_events/statsd_sink.rs index 73be541eeea23..c7c1dbfc498dc 100644 --- a/src/internal_events/statsd_sink.rs +++ b/src/internal_events/statsd_sink.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use crate::emit; use crate::event::metric::{MetricKind, MetricValue}; diff --git a/src/internal_events/tag_cardinality_limit.rs b/src/internal_events/tag_cardinality_limit.rs index c24e038eb5714..6e5dd89029152 100644 --- a/src/internal_events/tag_cardinality_limit.rs +++ b/src/internal_events/tag_cardinality_limit.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; pub struct TagCardinalityLimitRejectingEvent<'a> { pub metric_name: &'a str, diff --git a/src/internal_events/tcp.rs b/src/internal_events/tcp.rs index 1bd99e835172e..6b7607cbb6a4e 100644 --- a/src/internal_events/tcp.rs +++ b/src/internal_events/tcp.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; use crate::{emit, internal_events::SocketOutgoingConnectionError, tls::TlsError}; diff --git a/src/internal_events/template.rs b/src/internal_events/template.rs index c263e46250c4a..433422d7dc58c 100644 --- a/src/internal_events/template.rs +++ b/src/internal_events/template.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, UNINTENTIONAL}; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/throttle.rs b/src/internal_events/throttle.rs index 17ceeaac95590..d742ce5cc4a02 100644 --- a/src/internal_events/throttle.rs +++ b/src/internal_events/throttle.rs @@ -1,6 +1,6 @@ use crate::emit; use metrics::counter; -use vector_core::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; +use vector_lib::internal_event::{ComponentEventsDropped, InternalEvent, INTENTIONAL}; #[derive(Debug)] pub(crate) struct ThrottleEventDiscarded { diff --git a/src/internal_events/udp.rs b/src/internal_events/udp.rs index 0821107b19e01..bac40d963c29a 100644 --- a/src/internal_events/udp.rs +++ b/src/internal_events/udp.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; use crate::{emit, internal_events::SocketOutgoingConnectionError}; diff --git a/src/internal_events/unix.rs b/src/internal_events/unix.rs index 4affef0370ea9..1417e27630834 100644 --- a/src/internal_events/unix.rs +++ b/src/internal_events/unix.rs @@ -1,7 +1,7 @@ use std::{io::Error, path::Path}; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type, ComponentEventsDropped, UNINTENTIONAL}; use crate::{emit, internal_events::SocketOutgoingConnectionError}; diff --git a/src/internal_events/websocket.rs b/src/internal_events/websocket.rs index acc7c25203b0e..604f627940866 100644 --- a/src/internal_events/websocket.rs +++ b/src/internal_events/websocket.rs @@ -2,7 +2,7 @@ use std::error::Error; use std::fmt::Debug; use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/internal_events/windows.rs b/src/internal_events/windows.rs index 3634ab99af1f8..42636888bca14 100644 --- a/src/internal_events/windows.rs +++ b/src/internal_events/windows.rs @@ -1,5 +1,5 @@ use metrics::counter; -use vector_core::internal_event::InternalEvent; +use vector_lib::internal_event::InternalEvent; use vector_lib::internal_event::{error_stage, error_type}; diff --git a/src/lib.rs b/src/lib.rs index 8b726b0144b7a..0657aeb65dccc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,7 +121,7 @@ pub mod validate; pub mod vector_windows; pub use source_sender::SourceSender; -pub use vector_core::{event, metrics, schema, tcp, tls}; +pub use vector_lib::{event, metrics, schema, tcp, tls}; pub use vector_lib::{shutdown, Error, Result}; static APP_NAME_SLUG: std::sync::OnceLock = std::sync::OnceLock::new(); diff --git a/src/serde.rs b/src/serde.rs index 1e43bf8d1120c..284ecb6bc2fcf 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -6,7 +6,7 @@ use codecs::{ use indexmap::map::IndexMap; use serde::{Deserialize, Serialize}; use vector_config::configurable_component; -pub use vector_core::serde::{bool_or_struct, skip_serializing_if_default}; +pub use vector_lib::serde::{bool_or_struct, skip_serializing_if_default}; pub const fn default_true() -> bool { true diff --git a/src/sinks/amqp/encoder.rs b/src/sinks/amqp/encoder.rs index a1af7ec54e77b..7529fa12b6ffa 100644 --- a/src/sinks/amqp/encoder.rs +++ b/src/sinks/amqp/encoder.rs @@ -3,7 +3,7 @@ use crate::sinks::prelude::*; use bytes::BytesMut; use std::io; use tokio_util::codec::Encoder as _; -use vector_core::config::telemetry; +use vector_lib::config::telemetry; #[derive(Clone, Debug)] pub(super) struct AmqpEncoder { diff --git a/src/sinks/amqp/integration_tests.rs b/src/sinks/amqp/integration_tests.rs index 7ac1d9caa78dc..b5f1bdd320d6d 100644 --- a/src/sinks/amqp/integration_tests.rs +++ b/src/sinks/amqp/integration_tests.rs @@ -12,7 +12,7 @@ use crate::{ }; use futures::StreamExt; use std::{collections::HashSet, sync::Arc, time::Duration}; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; pub fn make_config() -> AmqpSinkConfig { let mut config = AmqpSinkConfig { diff --git a/src/sinks/appsignal/config.rs b/src/sinks/appsignal/config.rs index 94bcf770c32b7..6a33f75968286 100644 --- a/src/sinks/appsignal/config.rs +++ b/src/sinks/appsignal/config.rs @@ -3,11 +3,11 @@ use http::{header::AUTHORIZATION, Request, Uri}; use hyper::Body; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::sensitive_string::SensitiveString; +use vector_lib::{ config::{proxy::ProxyConfig, AcknowledgementsConfig, DataType, Input}, tls::{MaybeTlsSettings, TlsEnableableConfig}, }; -use vector_lib::sensitive_string::SensitiveString; use crate::{ codecs::Transformer, diff --git a/src/sinks/appsignal/encoder.rs b/src/sinks/appsignal/encoder.rs index 59731316ab66f..2a3ff5ead28b7 100644 --- a/src/sinks/appsignal/encoder.rs +++ b/src/sinks/appsignal/encoder.rs @@ -1,6 +1,6 @@ use serde_json::{json, Value}; -use vector_core::{config::telemetry, event::Event, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, event::Event, EstimatedJsonEncodedSizeOf}; use crate::{ codecs::Transformer, diff --git a/src/sinks/appsignal/integration_tests.rs b/src/sinks/appsignal/integration_tests.rs index 8054da4eb92cc..773d9fb6eae8e 100644 --- a/src/sinks/appsignal/integration_tests.rs +++ b/src/sinks/appsignal/integration_tests.rs @@ -3,7 +3,7 @@ use futures::{channel::mpsc::Receiver, stream, StreamExt}; use http::header::AUTHORIZATION; use hyper::StatusCode; use indoc::indoc; -use vector_core::event::{ +use vector_lib::event::{ BatchNotifier, BatchStatus, Event, LogEvent, Metric, MetricKind, MetricValue, }; diff --git a/src/sinks/appsignal/normalizer.rs b/src/sinks/appsignal/normalizer.rs index 0108de6516b3f..e1b6db4d1d680 100644 --- a/src/sinks/appsignal/normalizer.rs +++ b/src/sinks/appsignal/normalizer.rs @@ -1,4 +1,4 @@ -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use crate::sinks::util::buffer::metrics::{MetricNormalize, MetricSet}; diff --git a/src/sinks/appsignal/request_builder.rs b/src/sinks/appsignal/request_builder.rs index 83e9923461d2a..7a2dddd0f9852 100644 --- a/src/sinks/appsignal/request_builder.rs +++ b/src/sinks/appsignal/request_builder.rs @@ -1,6 +1,6 @@ use bytes::Bytes; -use vector_core::event::Event; +use vector_lib::event::Event; use vector_lib::{ byte_size_of::ByteSizeOf, finalization::{EventFinalizers, Finalizable}, diff --git a/src/sinks/appsignal/tests.rs b/src/sinks/appsignal/tests.rs index 8bc5fd94e0143..10afdbcdd4b74 100644 --- a/src/sinks/appsignal/tests.rs +++ b/src/sinks/appsignal/tests.rs @@ -1,7 +1,7 @@ use futures::{future::ready, stream}; use serde::Deserialize; use vector_config::component::GenerateConfig; -use vector_core::event::{Event, LogEvent}; +use vector_lib::event::{Event, LogEvent}; use crate::{ config::{SinkConfig, SinkContext}, diff --git a/src/sinks/aws_cloudwatch_logs/config.rs b/src/sinks/aws_cloudwatch_logs/config.rs index 0be371f8b67cd..f55c0cdd24c81 100644 --- a/src/sinks/aws_cloudwatch_logs/config.rs +++ b/src/sinks/aws_cloudwatch_logs/config.rs @@ -4,7 +4,7 @@ use codecs::JsonSerializerConfig; use futures::FutureExt; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::schema; +use vector_lib::schema; use vrl::value::Kind; use crate::{ diff --git a/src/sinks/aws_cloudwatch_logs/request_builder.rs b/src/sinks/aws_cloudwatch_logs/request_builder.rs index ac8d6a0367833..44ac6d562e4f5 100644 --- a/src/sinks/aws_cloudwatch_logs/request_builder.rs +++ b/src/sinks/aws_cloudwatch_logs/request_builder.rs @@ -3,11 +3,11 @@ use std::num::NonZeroUsize; use bytes::BytesMut; use chrono::Utc; use tokio_util::codec::Encoder as _; -use vector_core::{ +use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::{ event::{EventFinalizers, Finalizable}, ByteSizeOf, }; -use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; use super::TemplateRenderingError; use crate::{ @@ -138,8 +138,8 @@ impl ByteSizeOf for CloudwatchRequest { #[cfg(test)] mod tests { use chrono::Utc; - use vector_core::config::log_schema; - use vector_core::event::LogEvent; + use vector_lib::config::log_schema; + use vector_lib::event::LogEvent; use super::CloudwatchRequestBuilder; diff --git a/src/sinks/aws_cloudwatch_logs/sink.rs b/src/sinks/aws_cloudwatch_logs/sink.rs index ff4e65bf9bc8c..5d50294b08dc2 100644 --- a/src/sinks/aws_cloudwatch_logs/sink.rs +++ b/src/sinks/aws_cloudwatch_logs/sink.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use chrono::{Duration, Utc}; use futures::{future, stream::BoxStream, StreamExt}; use tower::Service; -use vector_core::{partition::Partitioner, sink::StreamSink}; use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::{partition::Partitioner, sink::StreamSink}; use vector_stream::{BatcherSettings, DriverResponse}; use crate::{ diff --git a/src/sinks/aws_cloudwatch_metrics/integration_tests.rs b/src/sinks/aws_cloudwatch_metrics/integration_tests.rs index 3af1c28597fc3..636210b2fb0ec 100644 --- a/src/sinks/aws_cloudwatch_metrics/integration_tests.rs +++ b/src/sinks/aws_cloudwatch_metrics/integration_tests.rs @@ -1,6 +1,6 @@ use chrono::{offset::TimeZone, Timelike, Utc}; use rand::seq::SliceRandom; -use vector_core::metric_tags; +use vector_lib::metric_tags; use super::*; use crate::{ @@ -75,7 +75,7 @@ async fn cloudwatch_metrics_put_data() { format!("distribution-{}", distribution_name), MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![i as f64 => 100], + samples: vector_lib::samples![i as f64 => 100], statistic: StatisticKind::Histogram, }, ) diff --git a/src/sinks/aws_cloudwatch_metrics/mod.rs b/src/sinks/aws_cloudwatch_metrics/mod.rs index 9a507d91a3795..86a77f78effbe 100644 --- a/src/sinks/aws_cloudwatch_metrics/mod.rs +++ b/src/sinks/aws_cloudwatch_metrics/mod.rs @@ -15,7 +15,7 @@ use futures_util::{future, future::BoxFuture}; use std::task::{Context, Poll}; use tower::Service; use vector_config::configurable_component; -use vector_core::{sink::VectorSink, ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::{sink::VectorSink, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ aws::{ diff --git a/src/sinks/aws_cloudwatch_metrics/tests.rs b/src/sinks/aws_cloudwatch_metrics/tests.rs index d8d8e2d2cc209..ef5ecf773af2c 100644 --- a/src/sinks/aws_cloudwatch_metrics/tests.rs +++ b/src/sinks/aws_cloudwatch_metrics/tests.rs @@ -1,7 +1,7 @@ use aws_sdk_cloudwatch::types::DateTime; use chrono::{offset::TimeZone, Timelike, Utc}; use similar_asserts::assert_eq; -use vector_core::metric_tags; +use vector_lib::metric_tags; use super::*; use crate::event::metric::{Metric, MetricKind, MetricValue, StatisticKind}; @@ -114,7 +114,7 @@ async fn encode_events_distribution() { "latency", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![11.0 => 100, 12.0 => 50], + samples: vector_lib::samples![11.0 => 100, 12.0 => 50], statistic: StatisticKind::Histogram, }, )]; diff --git a/src/sinks/aws_kinesis/request_builder.rs b/src/sinks/aws_kinesis/request_builder.rs index 9e3d271e2388c..b2cfaa202fc90 100644 --- a/src/sinks/aws_kinesis/request_builder.rs +++ b/src/sinks/aws_kinesis/request_builder.rs @@ -1,8 +1,8 @@ use std::{io, marker::PhantomData}; use bytes::Bytes; -use vector_core::ByteSizeOf; use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::ByteSizeOf; use super::{ record::Record, diff --git a/src/sinks/aws_s3/config.rs b/src/sinks/aws_s3/config.rs index 6123ee737d22f..b31f9391afc17 100644 --- a/src/sinks/aws_s3/config.rs +++ b/src/sinks/aws_s3/config.rs @@ -7,7 +7,7 @@ use codecs::{ }; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::sink::VectorSink; +use vector_lib::sink::VectorSink; use super::sink::S3RequestOptions; use crate::{ diff --git a/src/sinks/aws_s3/integration_tests.rs b/src/sinks/aws_s3/integration_tests.rs index 5a5cfeb3248df..ee66a346c2886 100644 --- a/src/sinks/aws_s3/integration_tests.rs +++ b/src/sinks/aws_s3/integration_tests.rs @@ -21,7 +21,7 @@ use flate2::read::MultiGzDecoder; use futures::{stream, Stream}; use similar_asserts::assert_eq; use tokio_stream::StreamExt; -use vector_core::{ +use vector_lib::{ config::proxy::ProxyConfig, event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, EventArray, LogEvent}, }; diff --git a/src/sinks/aws_s3/sink.rs b/src/sinks/aws_s3/sink.rs index 4c4f745fedd32..8223b3bfcd0fb 100644 --- a/src/sinks/aws_s3/sink.rs +++ b/src/sinks/aws_s3/sink.rs @@ -4,7 +4,7 @@ use bytes::Bytes; use chrono::Utc; use codecs::encoding::Framer; use uuid::Uuid; -use vector_core::event::Finalizable; +use vector_lib::event::Finalizable; use vector_lib::request_metadata::RequestMetadata; use crate::{ diff --git a/src/sinks/aws_s_s/request_builder.rs b/src/sinks/aws_s_s/request_builder.rs index afb4f1bf882f7..4d64ebe85f7ea 100644 --- a/src/sinks/aws_s_s/request_builder.rs +++ b/src/sinks/aws_s_s/request_builder.rs @@ -1,6 +1,6 @@ use bytes::Bytes; -use vector_core::ByteSizeOf; use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::ByteSizeOf; use crate::codecs::EncodingConfig; use crate::{ diff --git a/src/sinks/aws_s_s/service.rs b/src/sinks/aws_s_s/service.rs index 5d02d0e2fff49..0049a52ac4f96 100644 --- a/src/sinks/aws_s_s/service.rs +++ b/src/sinks/aws_s_s/service.rs @@ -4,8 +4,8 @@ use std::task::{Context, Poll}; use aws_sdk_sqs::types::SdkError; use futures::future::BoxFuture; use tower::Service; -use vector_core::{event::EventStatus, ByteSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{event::EventStatus, ByteSizeOf}; use vector_stream::DriverResponse; use super::{client::Client, request_builder::SendMessageEntry}; diff --git a/src/sinks/axiom.rs b/src/sinks/axiom.rs index 2e33da17b2071..7281e70246091 100644 --- a/src/sinks/axiom.rs +++ b/src/sinks/axiom.rs @@ -145,7 +145,7 @@ mod integration_tests { use futures::stream; use serde::{Deserialize, Serialize}; use std::env; - use vector_core::event::{BatchNotifier, BatchStatus, Event, LogEvent}; + use vector_lib::event::{BatchNotifier, BatchStatus, Event, LogEvent}; use super::*; use crate::{ diff --git a/src/sinks/azure_blob/integration_tests.rs b/src/sinks/azure_blob/integration_tests.rs index 352e6ce313bdb..c810b8017c456 100644 --- a/src/sinks/azure_blob/integration_tests.rs +++ b/src/sinks/azure_blob/integration_tests.rs @@ -13,7 +13,7 @@ use codecs::{ use flate2::read::GzDecoder; use futures::{stream, Stream, StreamExt}; use http::StatusCode; -use vector_core::ByteSizeOf; +use vector_lib::ByteSizeOf; use super::config::AzureBlobSinkConfig; use crate::{ diff --git a/src/sinks/azure_blob/request_builder.rs b/src/sinks/azure_blob/request_builder.rs index a12417ec5c684..60fe5758418ff 100644 --- a/src/sinks/azure_blob/request_builder.rs +++ b/src/sinks/azure_blob/request_builder.rs @@ -2,8 +2,8 @@ use bytes::Bytes; use chrono::Utc; use codecs::encoding::Framer; use uuid::Uuid; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::request_metadata::RequestMetadata; +use vector_lib::EstimatedJsonEncodedSizeOf; use crate::{ codecs::{Encoder, Transformer}, diff --git a/src/sinks/azure_blob/test.rs b/src/sinks/azure_blob/test.rs index 3733a9b992926..a0f93fb1d6584 100644 --- a/src/sinks/azure_blob/test.rs +++ b/src/sinks/azure_blob/test.rs @@ -4,8 +4,8 @@ use codecs::{ encoding::{Framer, FramingConfig}, NewlineDelimitedEncoder, TextSerializerConfig, }; -use vector_core::{partition::Partitioner, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{partition::Partitioner, EstimatedJsonEncodedSizeOf}; use super::config::AzureBlobSinkConfig; use super::request_builder::AzureBlobRequestOptions; diff --git a/src/sinks/azure_monitor_logs/config.rs b/src/sinks/azure_monitor_logs/config.rs index 44a3ee2afd485..a5a57d2e5275c 100644 --- a/src/sinks/azure_monitor_logs/config.rs +++ b/src/sinks/azure_monitor_logs/config.rs @@ -2,8 +2,8 @@ use lookup::{lookup_v2::OptionalValuePath, OwnedValuePath}; use openssl::{base64, pkey}; use vector_config::configurable_component; -use vector_core::{config::log_schema, schema}; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::{config::log_schema, schema}; use vrl::value::Kind; use crate::{ diff --git a/src/sinks/azure_monitor_logs/mod.rs b/src/sinks/azure_monitor_logs/mod.rs index e025b912f9b13..8033d892d0740 100644 --- a/src/sinks/azure_monitor_logs/mod.rs +++ b/src/sinks/azure_monitor_logs/mod.rs @@ -1,7 +1,7 @@ -//! The Azure Monitor Logs [`vector_core::sink::VectorSink`] +//! The Azure Monitor Logs [`vector_lib::sink::VectorSink`] //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`] instances and forwarding them to the Azure +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`] instances and forwarding them to the Azure //! Monitor Logs service. mod config; diff --git a/src/sinks/azure_monitor_logs/tests.rs b/src/sinks/azure_monitor_logs/tests.rs index a28e84e47b3be..9050297eebc9d 100644 --- a/src/sinks/azure_monitor_logs/tests.rs +++ b/src/sinks/azure_monitor_logs/tests.rs @@ -5,7 +5,7 @@ use http::Response; use hyper::body; use openssl::{base64, hash, pkey, sign}; use tokio::time::timeout; -use vector_core::config::log_schema; +use vector_lib::config::log_schema; use super::{ config::{default_host, AzureMonitorLogsConfig}, diff --git a/src/sinks/blackhole/sink.rs b/src/sinks/blackhole/sink.rs index 9ed7164e44309..514e3e3071a8d 100644 --- a/src/sinks/blackhole/sink.rs +++ b/src/sinks/blackhole/sink.rs @@ -13,10 +13,10 @@ use tokio::{ sync::watch, time::{interval, sleep_until}, }; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{ ByteSize, BytesSent, CountByteSize, EventsSent, InternalEventHandle as _, Output, Protocol, }; +use vector_lib::EstimatedJsonEncodedSizeOf; use crate::{ event::{EventArray, EventContainer}, diff --git a/src/sinks/clickhouse/integration_tests.rs b/src/sinks/clickhouse/integration_tests.rs index 2408a892999f2..1a1bf060d1f18 100644 --- a/src/sinks/clickhouse/integration_tests.rs +++ b/src/sinks/clickhouse/integration_tests.rs @@ -15,7 +15,7 @@ use http::StatusCode; use serde::Deserialize; use serde_json::Value; use tokio::time::{timeout, Duration}; -use vector_core::event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, LogEvent}; +use vector_lib::event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, LogEvent}; use warp::Filter; use super::*; diff --git a/src/sinks/clickhouse/mod.rs b/src/sinks/clickhouse/mod.rs index 488df9181a8bf..b03eb89417691 100644 --- a/src/sinks/clickhouse/mod.rs +++ b/src/sinks/clickhouse/mod.rs @@ -1,7 +1,7 @@ -//! The Clickhouse [`vector_core::sink::VectorSink`] +//! The Clickhouse [`vector_lib::sink::VectorSink`] //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`] instances and forwarding them to Clickhouse. +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`] instances and forwarding them to Clickhouse. //! //! Events are sent to Clickhouse using the HTTP interface with a query of the following structure: //! `INSERT INTO my_db.my_table FORMAT JSONEachRow`. The event payload is encoded as new-line diff --git a/src/sinks/console/sink.rs b/src/sinks/console/sink.rs index ddf870333da7d..788630eda5e93 100644 --- a/src/sinks/console/sink.rs +++ b/src/sinks/console/sink.rs @@ -4,7 +4,7 @@ use codecs::encoding::Framer; use futures::{stream::BoxStream, StreamExt}; use tokio::{io, io::AsyncWriteExt}; use tokio_util::codec::Encoder as _; -use vector_core::{ +use vector_lib::{ internal_event::{ ByteSize, BytesSent, CountByteSize, EventsSent, InternalEventHandle as _, Output, Protocol, }, @@ -68,7 +68,7 @@ mod test { use codecs::{JsonSerializerConfig, NewlineDelimitedEncoder}; use futures::future::ready; use futures_util::stream; - use vector_core::sink::VectorSink; + use vector_lib::sink::VectorSink; use super::*; use crate::{ diff --git a/src/sinks/databend/config.rs b/src/sinks/databend/config.rs index 69a464090c445..5029f7b650699 100644 --- a/src/sinks/databend/config.rs +++ b/src/sinks/databend/config.rs @@ -4,7 +4,7 @@ use codecs::encoding::{Framer, FramingConfig}; use futures::future::FutureExt; use tower::ServiceBuilder; use vector_config::{component::GenerateConfig, configurable_component}; -use vector_core::tls::TlsSettings; +use vector_lib::tls::TlsSettings; use crate::{ codecs::{Encoder, EncodingConfig}, diff --git a/src/sinks/databend/integration_tests.rs b/src/sinks/databend/integration_tests.rs index 7bc592c843274..ccb7ed2878dbc 100644 --- a/src/sinks/databend/integration_tests.rs +++ b/src/sinks/databend/integration_tests.rs @@ -3,8 +3,8 @@ use std::collections::BTreeMap; use futures::future::ready; use futures::stream; -use vector_core::config::proxy::ProxyConfig; -use vector_core::event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, LogEvent}; +use vector_lib::config::proxy::ProxyConfig; +use vector_lib::event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event, LogEvent}; use vector_lib::sensitive_string::SensitiveString; use crate::sinks::util::test::load_sink; diff --git a/src/sinks/databend/request_builder.rs b/src/sinks/databend/request_builder.rs index ddbbff1e1f6e4..db5eebc1adf6d 100644 --- a/src/sinks/databend/request_builder.rs +++ b/src/sinks/databend/request_builder.rs @@ -2,7 +2,7 @@ use std::io; use bytes::Bytes; use codecs::encoding::Framer; -use vector_core::event::Event; +use vector_lib::event::Event; use vector_lib::finalization::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; diff --git a/src/sinks/datadog/events/config.rs b/src/sinks/datadog/events/config.rs index 606d364b32ec8..71f431d0ce9c0 100644 --- a/src/sinks/datadog/events/config.rs +++ b/src/sinks/datadog/events/config.rs @@ -1,8 +1,8 @@ use indoc::indoc; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::config::proxy::ProxyConfig; -use vector_core::schema; +use vector_lib::config::proxy::ProxyConfig; +use vector_lib::schema; use vrl::value::Kind; use crate::{ diff --git a/src/sinks/datadog/events/request_builder.rs b/src/sinks/datadog/events/request_builder.rs index ab770b0d8dc56..3a0fbf92fc17b 100644 --- a/src/sinks/datadog/events/request_builder.rs +++ b/src/sinks/datadog/events/request_builder.rs @@ -3,8 +3,8 @@ use std::{io, sync::Arc}; use bytes::Bytes; use codecs::JsonSerializerConfig; use lookup::lookup_v2::ConfigValuePath; -use vector_core::ByteSizeOf; use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::ByteSizeOf; use crate::{ codecs::{Encoder, TimestampFormat, Transformer}, diff --git a/src/sinks/datadog/events/tests.rs b/src/sinks/datadog/events/tests.rs index ea006829327f1..b15ce6c68bdf8 100644 --- a/src/sinks/datadog/events/tests.rs +++ b/src/sinks/datadog/events/tests.rs @@ -9,7 +9,7 @@ use futures::{ use hyper::StatusCode; use indoc::indoc; use similar_asserts::assert_eq; -use vector_core::event::{BatchNotifier, BatchStatus}; +use vector_lib::event::{BatchNotifier, BatchStatus}; use super::*; use crate::{ diff --git a/src/sinks/datadog/logs/config.rs b/src/sinks/datadog/logs/config.rs index 13050d3a87da8..d58cd6b106edf 100644 --- a/src/sinks/datadog/logs/config.rs +++ b/src/sinks/datadog/logs/config.rs @@ -3,7 +3,7 @@ use std::{convert::TryFrom, sync::Arc}; use indoc::indoc; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::{config::proxy::ProxyConfig, schema::meaning}; +use vector_lib::{config::proxy::ProxyConfig, schema::meaning}; use vrl::value::Kind; use super::{service::LogApiRetry, sink::LogSinkBuilder}; diff --git a/src/sinks/datadog/logs/integration_tests.rs b/src/sinks/datadog/logs/integration_tests.rs index 0d34486ec0897..b5308ac926c62 100644 --- a/src/sinks/datadog/logs/integration_tests.rs +++ b/src/sinks/datadog/logs/integration_tests.rs @@ -1,5 +1,5 @@ use indoc::indoc; -use vector_core::event::{BatchNotifier, BatchStatus}; +use vector_lib::event::{BatchNotifier, BatchStatus}; use super::config::DatadogLogsConfig; use crate::{ diff --git a/src/sinks/datadog/logs/mod.rs b/src/sinks/datadog/logs/mod.rs index 0f99ee8dc8947..f9b489ab3fa10 100644 --- a/src/sinks/datadog/logs/mod.rs +++ b/src/sinks/datadog/logs/mod.rs @@ -1,7 +1,7 @@ -//! The Datadog Logs [`vector_core::sink::VectorSink`] +//! The Datadog Logs [`vector_lib::sink::VectorSink`] //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`] instances and getting them flung out to the +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`] instances and getting them flung out to the //! Datadog Log API. The log API is relatively generous in terms of its //! constraints, except that: //! diff --git a/src/sinks/datadog/logs/service.rs b/src/sinks/datadog/logs/service.rs index 94cdb6b276797..4cc1f80fea69d 100644 --- a/src/sinks/datadog/logs/service.rs +++ b/src/sinks/datadog/logs/service.rs @@ -14,7 +14,7 @@ use hyper::Body; use indexmap::IndexMap; use tower::Service; use tracing::Instrument; -use vector_core::event::{EventFinalizers, EventStatus, Finalizable}; +use vector_lib::event::{EventFinalizers, EventStatus, Finalizable}; use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vector_stream::DriverResponse; diff --git a/src/sinks/datadog/logs/tests.rs b/src/sinks/datadog/logs/tests.rs index ce2a828bd84f9..eedabc7493224 100644 --- a/src/sinks/datadog/logs/tests.rs +++ b/src/sinks/datadog/logs/tests.rs @@ -11,7 +11,7 @@ use futures::{ use http::request::Parts; use hyper::StatusCode; use indoc::indoc; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, LogEvent}, }; diff --git a/src/sinks/datadog/metrics/config.rs b/src/sinks/datadog/metrics/config.rs index bfddadd64d6d9..81eeb48028288 100644 --- a/src/sinks/datadog/metrics/config.rs +++ b/src/sinks/datadog/metrics/config.rs @@ -4,7 +4,7 @@ use http::Uri; use snafu::ResultExt; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::config::proxy::ProxyConfig; +use vector_lib::config::proxy::ProxyConfig; use super::{ request_builder::DatadogMetricsRequestBuilder, diff --git a/src/sinks/datadog/metrics/encoder.rs b/src/sinks/datadog/metrics/encoder.rs index fdc4914e65aae..dec74803d0c77 100644 --- a/src/sinks/datadog/metrics/encoder.rs +++ b/src/sinks/datadog/metrics/encoder.rs @@ -9,13 +9,13 @@ use bytes::{BufMut, Bytes}; use chrono::{DateTime, Utc}; use once_cell::sync::Lazy; use snafu::{ResultExt, Snafu}; -use vector_core::{ +use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{ config::{log_schema, telemetry, LogSchema}, event::{metric::MetricSketch, DatadogMetricOriginMetadata, Metric, MetricTags, MetricValue}, metrics::AgentDDSketch, EstimatedJsonEncodedSizeOf, }; -use vector_lib::request_metadata::GroupedCountByteSize; use super::config::{ DatadogMetricsEndpoint, SeriesApiVersion, MAXIMUM_PAYLOAD_COMPRESSED_SIZE, MAXIMUM_PAYLOAD_SIZE, @@ -1014,7 +1014,7 @@ mod tests { proptest, strategy::Strategy, string::string_regex, }; use prost::Message; - use vector_core::{ + use vector_lib::{ config::{log_schema, LogSchema}, event::{ metric::{MetricSketch, TagValue}, diff --git a/src/sinks/datadog/metrics/integration_tests.rs b/src/sinks/datadog/metrics/integration_tests.rs index 8c993b22bca04..761d9f1693b32 100644 --- a/src/sinks/datadog/metrics/integration_tests.rs +++ b/src/sinks/datadog/metrics/integration_tests.rs @@ -10,7 +10,7 @@ use indoc::indoc; use prost::Message; use rand::{thread_rng, Rng}; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, Metric, MetricKind, MetricValue}, metric_tags, diff --git a/src/sinks/datadog/metrics/normalizer.rs b/src/sinks/datadog/metrics/normalizer.rs index 6b6d27b1c0649..2c5df07cd108f 100644 --- a/src/sinks/datadog/metrics/normalizer.rs +++ b/src/sinks/datadog/metrics/normalizer.rs @@ -1,4 +1,4 @@ -use vector_core::{ +use vector_lib::{ event::{Metric, MetricValue}, metrics::AgentDDSketch, }; @@ -38,7 +38,7 @@ impl MetricNormalize for DatadogMetricsNormalizer { #[cfg(test)] mod tests { - use vector_core::{ + use vector_lib::{ event::{metric::MetricSketch, Metric, MetricKind, MetricValue}, metrics::AgentDDSketch, }; diff --git a/src/sinks/datadog/metrics/request_builder.rs b/src/sinks/datadog/metrics/request_builder.rs index e4fb34a9fa0c3..e9b2fcb1514c6 100644 --- a/src/sinks/datadog/metrics/request_builder.rs +++ b/src/sinks/datadog/metrics/request_builder.rs @@ -1,7 +1,7 @@ use bytes::Bytes; use snafu::Snafu; use std::sync::Arc; -use vector_core::event::{EventFinalizers, Finalizable, Metric}; +use vector_lib::event::{EventFinalizers, Finalizable, Metric}; use vector_lib::request_metadata::RequestMetadata; use super::{ diff --git a/src/sinks/datadog/metrics/service.rs b/src/sinks/datadog/metrics/service.rs index e73f85c0c70ed..dd7eb7c69ffbe 100644 --- a/src/sinks/datadog/metrics/service.rs +++ b/src/sinks/datadog/metrics/service.rs @@ -10,7 +10,7 @@ use http::{ use hyper::Body; use snafu::ResultExt; use tower::Service; -use vector_core::event::{EventFinalizers, EventStatus, Finalizable}; +use vector_lib::event::{EventFinalizers, EventStatus, Finalizable}; use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vector_stream::DriverResponse; diff --git a/src/sinks/datadog/metrics/sink.rs b/src/sinks/datadog/metrics/sink.rs index 329b46ea9745c..ebe925e752da4 100644 --- a/src/sinks/datadog/metrics/sink.rs +++ b/src/sinks/datadog/metrics/sink.rs @@ -8,7 +8,7 @@ use futures_util::{ StreamExt, }; use tower::Service; -use vector_core::{ +use vector_lib::{ event::{Event, Metric, MetricValue}, partition::Partitioner, sink::StreamSink, @@ -233,7 +233,7 @@ mod tests { use chrono::{DateTime, Utc}; use proptest::prelude::*; - use vector_core::{ + use vector_lib::{ event::{Metric, MetricKind, MetricValue}, metric_tags, }; diff --git a/src/sinks/datadog/mod.rs b/src/sinks/datadog/mod.rs index 745495dcc3a16..98df036b05243 100644 --- a/src/sinks/datadog/mod.rs +++ b/src/sinks/datadog/mod.rs @@ -3,8 +3,8 @@ use http::{Request, StatusCode, Uri}; use hyper::body::Body; use snafu::Snafu; use vector_config::configurable_component; -use vector_core::{config::AcknowledgementsConfig, tls::TlsEnableableConfig}; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::{config::AcknowledgementsConfig, tls::TlsEnableableConfig}; use crate::{ common::datadog::{get_api_base_endpoint, get_base_domain_region, Region, DD_US_SITE}, diff --git a/src/sinks/datadog/traces/apm_stats/mod.rs b/src/sinks/datadog/traces/apm_stats/mod.rs index 58ec6c26bbcae..e778b9af7064a 100644 --- a/src/sinks/datadog/traces/apm_stats/mod.rs +++ b/src/sinks/datadog/traces/apm_stats/mod.rs @@ -8,7 +8,7 @@ use std::sync::{Arc, Mutex}; use serde::{Deserialize, Serialize}; -use vector_core::event::TraceEvent; +use vector_lib::event::TraceEvent; pub use self::aggregation::Aggregator; pub use self::flusher::flush_apm_stats_thread; diff --git a/src/sinks/datadog/traces/config.rs b/src/sinks/datadog/traces/config.rs index bb8f4d183d63d..08f43ba4c95c7 100644 --- a/src/sinks/datadog/traces/config.rs +++ b/src/sinks/datadog/traces/config.rs @@ -6,7 +6,7 @@ use snafu::ResultExt; use tokio::sync::oneshot::{channel, Sender}; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::config::{proxy::ProxyConfig, AcknowledgementsConfig}; +use vector_lib::config::{proxy::ProxyConfig, AcknowledgementsConfig}; use super::{ apm_stats::{flush_apm_stats_thread, Aggregator}, diff --git a/src/sinks/datadog/traces/integration_tests.rs b/src/sinks/datadog/traces/integration_tests.rs index 5b4f55b94eafd..dbfcbcdc7c691 100644 --- a/src/sinks/datadog/traces/integration_tests.rs +++ b/src/sinks/datadog/traces/integration_tests.rs @@ -13,7 +13,7 @@ use crate::{ map_event_batch_stream, }, }; -use vector_core::event::{BatchNotifier, BatchStatus}; +use vector_lib::event::{BatchNotifier, BatchStatus}; #[tokio::test] async fn to_real_traces_endpoint() { diff --git a/src/sinks/datadog/traces/mod.rs b/src/sinks/datadog/traces/mod.rs index af175bcd10086..dd490499cecf1 100644 --- a/src/sinks/datadog/traces/mod.rs +++ b/src/sinks/datadog/traces/mod.rs @@ -1,7 +1,7 @@ -//! The Datadog Traces [`vector_core::sink::VectorSink`] +//! The Datadog Traces [`vector_lib::sink::VectorSink`] //! -//! This module contains the [`vector_core::sink::VectorSink`] instance responsible for taking -//! a stream of [`vector_core::event::Event`], partition them following the right directions and +//! This module contains the [`vector_lib::sink::VectorSink`] instance responsible for taking +//! a stream of [`vector_lib::event::Event`], partition them following the right directions and //! sending them to the Datadog Trace intake. //! This module use the same protocol as the official Datadog trace-agent to //! submit traces to the Datadog intake. diff --git a/src/sinks/datadog/traces/request_builder.rs b/src/sinks/datadog/traces/request_builder.rs index 4fea8d4468724..dc176e8cdb08a 100644 --- a/src/sinks/datadog/traces/request_builder.rs +++ b/src/sinks/datadog/traces/request_builder.rs @@ -8,7 +8,7 @@ use std::{ use bytes::Bytes; use prost::Message; use snafu::Snafu; -use vector_core::event::{EventFinalizers, Finalizable}; +use vector_lib::event::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; use vrl::event_path; diff --git a/src/sinks/datadog/traces/service.rs b/src/sinks/datadog/traces/service.rs index 5e305e906952c..ecda3c93c23ce 100644 --- a/src/sinks/datadog/traces/service.rs +++ b/src/sinks/datadog/traces/service.rs @@ -9,7 +9,7 @@ use http::{Request, StatusCode, Uri}; use hyper::Body; use snafu::ResultExt; use tower::Service; -use vector_core::event::{EventFinalizers, EventStatus, Finalizable}; +use vector_lib::event::{EventFinalizers, EventStatus, Finalizable}; use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vector_stream::DriverResponse; diff --git a/src/sinks/datadog/traces/sink.rs b/src/sinks/datadog/traces/sink.rs index 57735ca1699d1..b907759f5cd8d 100644 --- a/src/sinks/datadog/traces/sink.rs +++ b/src/sinks/datadog/traces/sink.rs @@ -7,7 +7,7 @@ use futures_util::{ }; use tokio::sync::oneshot::{channel, Sender}; use tower::Service; -use vector_core::{config::log_schema, event::Event, partition::Partitioner, sink::StreamSink}; +use vector_lib::{config::log_schema, event::Event, partition::Partitioner, sink::StreamSink}; use vector_stream::{BatcherSettings, DriverResponse}; use vrl::event_path; use vrl::path::PathPrefix; diff --git a/src/sinks/datadog/traces/tests.rs b/src/sinks/datadog/traces/tests.rs index af9723c236970..ed9c19378830b 100644 --- a/src/sinks/datadog/traces/tests.rs +++ b/src/sinks/datadog/traces/tests.rs @@ -8,7 +8,7 @@ use indoc::indoc; use ordered_float::NotNan; use prost::Message; use rmp_serde; -use vector_core::event::{BatchNotifier, BatchStatus, Event}; +use vector_lib::event::{BatchNotifier, BatchStatus, Event}; use vrl::event_path; use super::{apm_stats::StatsPayload, dd_proto, ddsketch_full, DatadogTracesConfig}; diff --git a/src/sinks/elasticsearch/common.rs b/src/sinks/elasticsearch/common.rs index fc6be16ea42a1..27b71e527dae1 100644 --- a/src/sinks/elasticsearch/common.rs +++ b/src/sinks/elasticsearch/common.rs @@ -5,8 +5,8 @@ use http::{Response, StatusCode, Uri}; use hyper::{body, Body}; use serde::Deserialize; use snafu::ResultExt; -use vector_core::config::proxy::ProxyConfig; -use vector_core::config::LogNamespace; +use vector_lib::config::proxy::ProxyConfig; +use vector_lib::config::LogNamespace; use super::{ request_builder::ElasticsearchRequestBuilder, ElasticsearchApiVersion, ElasticsearchEncoder, diff --git a/src/sinks/elasticsearch/config.rs b/src/sinks/elasticsearch/config.rs index 6df73422ee1cd..5f175f8f57530 100644 --- a/src/sinks/elasticsearch/config.rs +++ b/src/sinks/elasticsearch/config.rs @@ -33,7 +33,7 @@ use crate::{ }; use lookup::event_path; use lookup::lookup_v2::ConfigValuePath; -use vector_core::schema::Requirement; +use vector_lib::schema::Requirement; use vrl::value::Kind; /// The field name for the timestamp required by data stream mode diff --git a/src/sinks/elasticsearch/encoder.rs b/src/sinks/elasticsearch/encoder.rs index 53925277295f3..3fec60ba1c1b8 100644 --- a/src/sinks/elasticsearch/encoder.rs +++ b/src/sinks/elasticsearch/encoder.rs @@ -2,7 +2,7 @@ use std::{io, io::Write}; use serde::Serialize; use vector_buffers::EventCount; -use vector_core::{config::telemetry, event::Event, ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::{config::telemetry, event::Event, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::{ internal_event::TaggedEventsSent, json_size::JsonSize, diff --git a/src/sinks/elasticsearch/integration_tests.rs b/src/sinks/elasticsearch/integration_tests.rs index 85d603724be28..c218d3069bc50 100644 --- a/src/sinks/elasticsearch/integration_tests.rs +++ b/src/sinks/elasticsearch/integration_tests.rs @@ -7,7 +7,7 @@ use futures::StreamExt; use futures::{future::ready, stream}; use http::{Request, StatusCode}; use serde_json::{json, Value}; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, log_schema, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, LogEvent}, }; diff --git a/src/sinks/elasticsearch/request_builder.rs b/src/sinks/elasticsearch/request_builder.rs index 0fbbf465e1e74..9d80539a50931 100644 --- a/src/sinks/elasticsearch/request_builder.rs +++ b/src/sinks/elasticsearch/request_builder.rs @@ -1,5 +1,5 @@ use bytes::Bytes; -use vector_core::EstimatedJsonEncodedSizeOf; +use vector_lib::EstimatedJsonEncodedSizeOf; use vector_lib::{json_size::JsonSize, request_metadata::RequestMetadata}; use crate::{ diff --git a/src/sinks/elasticsearch/service.rs b/src/sinks/elasticsearch/service.rs index 9f466e582230c..dad9c51c90f07 100644 --- a/src/sinks/elasticsearch/service.rs +++ b/src/sinks/elasticsearch/service.rs @@ -9,7 +9,7 @@ use futures::future::BoxFuture; use http::{Response, Uri}; use hyper::{service::Service, Body, Request}; use tower::ServiceExt; -use vector_core::ByteSizeOf; +use vector_lib::ByteSizeOf; use vector_lib::{ json_size::JsonSize, request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}, diff --git a/src/sinks/file/mod.rs b/src/sinks/file/mod.rs index 3a2261e517b3e..9dadb7a9a6f31 100644 --- a/src/sinks/file/mod.rs +++ b/src/sinks/file/mod.rs @@ -20,7 +20,7 @@ use tokio::{ }; use tokio_util::codec::Encoder as _; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ internal_event::{CountByteSize, EventsSent, InternalEventHandle as _, Output, Registered}, EstimatedJsonEncodedSizeOf, }; @@ -427,7 +427,7 @@ mod tests { use futures::{stream, SinkExt}; use similar_asserts::assert_eq; - use vector_core::{event::LogEvent, sink::VectorSink}; + use vector_lib::{event::LogEvent, sink::VectorSink}; use super::*; use crate::{ diff --git a/src/sinks/gcp/chronicle_unstructured.rs b/src/sinks/gcp/chronicle_unstructured.rs index 76ce1324d18fc..30e6277105e35 100644 --- a/src/sinks/gcp/chronicle_unstructured.rs +++ b/src/sinks/gcp/chronicle_unstructured.rs @@ -13,13 +13,13 @@ use std::io; use tokio_util::codec::Encoder as _; use tower::{Service, ServiceBuilder}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; +use vector_lib::{ config::{telemetry, AcknowledgementsConfig, Input}, event::{Event, EventFinalizers, Finalizable}, sink::VectorSink, EstimatedJsonEncodedSizeOf, }; -use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vrl::value::Kind; use crate::{ @@ -512,7 +512,7 @@ impl Service for ChronicleService { mod integration_tests { use reqwest::{Client, Method, Response}; use serde::{Deserialize, Serialize}; - use vector_core::event::{BatchNotifier, BatchStatus}; + use vector_lib::event::{BatchNotifier, BatchStatus}; use super::*; use crate::test_util::{ diff --git a/src/sinks/gcp/cloud_storage.rs b/src/sinks/gcp/cloud_storage.rs index 9d2185f53ad79..1c2c0e0acea5e 100644 --- a/src/sinks/gcp/cloud_storage.rs +++ b/src/sinks/gcp/cloud_storage.rs @@ -11,7 +11,7 @@ use snafu::Snafu; use tower::ServiceBuilder; use uuid::Uuid; use vector_config::configurable_component; -use vector_core::event::{EventFinalizers, Finalizable}; +use vector_lib::event::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; use crate::sinks::util::metadata::RequestMetadataBuilder; @@ -410,9 +410,9 @@ mod tests { use codecs::encoding::FramingConfig; use codecs::{JsonSerializerConfig, NewlineDelimitedEncoderConfig, TextSerializerConfig}; use futures_util::{future::ready, stream}; - use vector_core::partition::Partitioner; - use vector_core::EstimatedJsonEncodedSizeOf; + use vector_lib::partition::Partitioner; use vector_lib::request_metadata::GroupedCountByteSize; + use vector_lib::EstimatedJsonEncodedSizeOf; use crate::event::LogEvent; use crate::test_util::{ diff --git a/src/sinks/gcp/pubsub.rs b/src/sinks/gcp/pubsub.rs index c7c562999d1e9..4660e32040a7d 100644 --- a/src/sinks/gcp/pubsub.rs +++ b/src/sinks/gcp/pubsub.rs @@ -272,7 +272,7 @@ mod integration_tests { use reqwest::{Client, Method, Response}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; - use vector_core::event::{BatchNotifier, BatchStatus}; + use vector_lib::event::{BatchNotifier, BatchStatus}; use super::*; use crate::gcp; diff --git a/src/sinks/gcp/stackdriver/logs/mod.rs b/src/sinks/gcp/stackdriver/logs/mod.rs index 5f5ca2cf03ae5..86ebb3802a220 100644 --- a/src/sinks/gcp/stackdriver/logs/mod.rs +++ b/src/sinks/gcp/stackdriver/logs/mod.rs @@ -1,7 +1,7 @@ -//! The GCP Stackdriver Logs [`vector_core::sink::VectorSink`]. +//! The GCP Stackdriver Logs [`vector_lib::sink::VectorSink`]. //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`]s and forwarding them to the GCP +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`]s and forwarding them to the GCP //! Stackdriver service. mod config; diff --git a/src/sinks/gcp/stackdriver/metrics/request_builder.rs b/src/sinks/gcp/stackdriver/metrics/request_builder.rs index 12e4526f055f5..ababa8c598cc5 100644 --- a/src/sinks/gcp/stackdriver/metrics/request_builder.rs +++ b/src/sinks/gcp/stackdriver/metrics/request_builder.rs @@ -2,7 +2,7 @@ use std::io; use bytes::Bytes; use chrono::Utc; -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use crate::sinks::{gcp, prelude::*, util::http::HttpRequest}; diff --git a/src/sinks/gcp/stackdriver/metrics/sink.rs b/src/sinks/gcp/stackdriver/metrics/sink.rs index 91ba22a640824..e87e69dcbe1b7 100644 --- a/src/sinks/gcp/stackdriver/metrics/sink.rs +++ b/src/sinks/gcp/stackdriver/metrics/sink.rs @@ -1,4 +1,4 @@ -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use crate::sinks::{ prelude::*, diff --git a/src/sinks/gcp/stackdriver/metrics/tests.rs b/src/sinks/gcp/stackdriver/metrics/tests.rs index a27194f1900e4..391803a741ae9 100644 --- a/src/sinks/gcp/stackdriver/metrics/tests.rs +++ b/src/sinks/gcp/stackdriver/metrics/tests.rs @@ -1,7 +1,7 @@ use chrono::Utc; use futures::{future::ready, stream}; use serde::Deserialize; -use vector_core::event::{Metric, MetricKind, MetricValue}; +use vector_lib::event::{Metric, MetricKind, MetricValue}; use super::config::StackdriverConfig; use crate::{ diff --git a/src/sinks/greptimedb/batch.rs b/src/sinks/greptimedb/batch.rs index d5bf70c47505f..e69bc17157001 100644 --- a/src/sinks/greptimedb/batch.rs +++ b/src/sinks/greptimedb/batch.rs @@ -1,4 +1,4 @@ -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use vector_stream::batcher::limiter::ItemBatchSize; use super::request_builder::{ diff --git a/src/sinks/greptimedb/integration_tests.rs b/src/sinks/greptimedb/integration_tests.rs index 598c49e1b1e23..6b342a0e455fa 100644 --- a/src/sinks/greptimedb/integration_tests.rs +++ b/src/sinks/greptimedb/integration_tests.rs @@ -1,7 +1,7 @@ use chrono::{DateTime, Duration, Utc}; use futures::stream; -use vector_core::event::{Event, Metric, MetricKind, MetricValue}; -use vector_core::metric_tags; +use vector_lib::event::{Event, Metric, MetricKind, MetricValue}; +use vector_lib::metric_tags; use crate::sinks::util::test::load_sink; use crate::{ diff --git a/src/sinks/greptimedb/request_builder.rs b/src/sinks/greptimedb/request_builder.rs index 06c92059c6f4e..350aaaa6c9b1f 100644 --- a/src/sinks/greptimedb/request_builder.rs +++ b/src/sinks/greptimedb/request_builder.rs @@ -1,9 +1,9 @@ use chrono::Utc; use greptimedb_client::api::v1::column::*; use greptimedb_client::api::v1::*; -use vector_core::event::metric::{Bucket, MetricSketch, Quantile, Sample}; -use vector_core::event::{Metric, MetricValue}; -use vector_core::metrics::AgentDDSketch; +use vector_lib::event::metric::{Bucket, MetricSketch, Quantile, Sample}; +use vector_lib::event::{Metric, MetricValue}; +use vector_lib::metrics::AgentDDSketch; use crate::sinks::util::statistic::DistributionStatistic; @@ -253,7 +253,7 @@ mod tests { "cpu_seconds_total", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 2, 2.0 => 4, 3.0 => 2], + samples: vector_lib::samples![1.0 => 2, 2.0 => 4, 3.0 => 2], statistic: StatisticKind::Histogram, }, ); @@ -277,7 +277,7 @@ mod tests { #[test] fn test_histogram() { - let buckets = vector_core::buckets![1.0 => 1, 2.0 => 2, 3.0 => 1]; + let buckets = vector_lib::buckets![1.0 => 1, 2.0 => 2, 3.0 => 1]; let buckets_len = buckets.len(); let metric = Metric::new( "cpu_seconds_total", @@ -303,7 +303,7 @@ mod tests { #[test] fn test_summary() { - let quantiles = vector_core::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0]; + let quantiles = vector_lib::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0]; let quantiles_len = quantiles.len(); let metric = Metric::new( "cpu_seconds_total", diff --git a/src/sinks/greptimedb/service.rs b/src/sinks/greptimedb/service.rs index 6f8278b55d598..6045ed2ff2271 100644 --- a/src/sinks/greptimedb/service.rs +++ b/src/sinks/greptimedb/service.rs @@ -6,7 +6,7 @@ use greptimedb_client::api::v1::auth_header::AuthScheme; use greptimedb_client::api::v1::*; use greptimedb_client::channel_manager::*; use greptimedb_client::{Client, Database, Error as GreptimeError}; -use vector_core::event::Metric; +use vector_lib::event::Metric; use crate::sinks::prelude::*; diff --git a/src/sinks/greptimedb/sink.rs b/src/sinks/greptimedb/sink.rs index b4b36a10bf5db..8268fd341c7c0 100644 --- a/src/sinks/greptimedb/sink.rs +++ b/src/sinks/greptimedb/sink.rs @@ -2,7 +2,7 @@ use async_trait::async_trait; use futures::StreamExt; use futures_util::stream::BoxStream; -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use crate::sinks::prelude::*; use crate::sinks::util::buffer::metrics::MetricNormalize; diff --git a/src/sinks/honeycomb/mod.rs b/src/sinks/honeycomb/mod.rs index e93745194e92d..4debfe1e7a741 100644 --- a/src/sinks/honeycomb/mod.rs +++ b/src/sinks/honeycomb/mod.rs @@ -1,7 +1,7 @@ -//! The Honeycomb [`vector_core::sink::VectorSink`]. +//! The Honeycomb [`vector_lib::sink::VectorSink`]. //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`]s and forwarding them to the Honeycomb service. +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`]s and forwarding them to the Honeycomb service. mod config; mod encoder; diff --git a/src/sinks/http/batch.rs b/src/sinks/http/batch.rs index 244d90e20df44..19ee7230b39bd 100644 --- a/src/sinks/http/batch.rs +++ b/src/sinks/http/batch.rs @@ -1,7 +1,7 @@ //! Batch settings for the `http` sink. use codecs::encoding::Framer; -use vector_core::{event::Event, ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::{event::Event, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_stream::batcher::limiter::ItemBatchSize; use crate::codecs::Encoder; diff --git a/src/sinks/http/mod.rs b/src/sinks/http/mod.rs index 8b4680e9f41cb..d3b8c6a83d33a 100644 --- a/src/sinks/http/mod.rs +++ b/src/sinks/http/mod.rs @@ -1,7 +1,7 @@ -//! The HTTP [`vector_core::sink::VectorSink`]. +//! The HTTP [`vector_lib::sink::VectorSink`]. //! -//! This module contains the [`vector_core::sink::VectorSink`] instance that is responsible for -//! taking a stream of [`vector_core::event::Event`]s and forwarding them to an HTTP server. +//! This module contains the [`vector_lib::sink::VectorSink`] instance that is responsible for +//! taking a stream of [`vector_lib::event::Event`]s and forwarding them to an HTTP server. mod batch; mod config; diff --git a/src/sinks/http/tests.rs b/src/sinks/http/tests.rs index 4cda846156d64..4953c1d86ff2e 100644 --- a/src/sinks/http/tests.rs +++ b/src/sinks/http/tests.rs @@ -17,7 +17,7 @@ use http::request::Parts; use hyper::{Body, Method, Response, StatusCode}; use serde::{de, Deserialize}; -use vector_core::event::{BatchNotifier, BatchStatus, Event, LogEvent}; +use vector_lib::event::{BatchNotifier, BatchStatus, Event, LogEvent}; use crate::{ assert_downcast_matches, diff --git a/src/sinks/humio/metrics.rs b/src/sinks/humio/metrics.rs index 2b9248eb26f85..e7a11424b4df3 100644 --- a/src/sinks/humio/metrics.rs +++ b/src/sinks/humio/metrics.rs @@ -5,8 +5,8 @@ use futures_util::stream::BoxStream; use indoc::indoc; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; use vector_config::configurable_component; -use vector_core::sink::StreamSink; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::sink::StreamSink; use super::{ config_host_key, @@ -227,7 +227,7 @@ mod tests { use futures::stream; use indoc::indoc; use similar_asserts::assert_eq; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::{ @@ -305,7 +305,7 @@ mod tests { "metric2", MetricKind::Absolute, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 100, 2.0 => 200, 3.0 => 300], + samples: vector_lib::samples![1.0 => 100, 2.0 => 200, 3.0 => 300], statistic: StatisticKind::Histogram, }, ) diff --git a/src/sinks/influxdb/logs.rs b/src/sinks/influxdb/logs.rs index f84b75daef9a6..30cbf6e1fd79a 100644 --- a/src/sinks/influxdb/logs.rs +++ b/src/sinks/influxdb/logs.rs @@ -11,8 +11,8 @@ use vrl::value::Kind; use lookup::lookup_v2::OptionalValuePath; use lookup::PathPrefix; use vector_config::configurable_component; -use vector_core::config::log_schema; -use vector_core::schema; +use vector_lib::config::log_schema; +use vector_lib::schema; use crate::{ codecs::Transformer, @@ -404,7 +404,7 @@ mod tests { use indoc::indoc; use lookup::owned_value_path; - use vector_core::event::{BatchNotifier, BatchStatus, Event, LogEvent}; + use vector_lib::event::{BatchNotifier, BatchStatus, Event, LogEvent}; use crate::{ sinks::{ @@ -883,8 +883,8 @@ mod integration_tests { use codecs::BytesDeserializerConfig; use lookup::{owned_value_path, path}; - use vector_core::config::{LegacyKey, LogNamespace}; - use vector_core::event::{BatchNotifier, BatchStatus, Event, LogEvent}; + use vector_lib::config::{LegacyKey, LogNamespace}; + use vector_lib::event::{BatchNotifier, BatchStatus, Event, LogEvent}; use crate::{ config::SinkContext, diff --git a/src/sinks/influxdb/metrics.rs b/src/sinks/influxdb/metrics.rs index 31faab4ffe644..0b8669a66c175 100644 --- a/src/sinks/influxdb/metrics.rs +++ b/src/sinks/influxdb/metrics.rs @@ -5,7 +5,7 @@ use futures::{future::BoxFuture, stream, SinkExt}; use serde::Serialize; use tower::Service; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ event::metric::{MetricSketch, MetricTags, Quantile}, ByteSizeOf, EstimatedJsonEncodedSizeOf, }; @@ -543,7 +543,7 @@ mod tests { "requests", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![1.0 => 1, 2.1 => 2, 3.0 => 3], + buckets: vector_lib::buckets![1.0 => 1, 2.1 => 2, 3.0 => 3], count: 6, sum: 12.5, }, @@ -584,7 +584,7 @@ mod tests { "requests", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![1.0 => 1, 2.1 => 2, 3.0 => 3], + buckets: vector_lib::buckets![1.0 => 1, 2.1 => 2, 3.0 => 3], count: 6, sum: 12.5, }, @@ -625,7 +625,7 @@ mod tests { "requests_sum", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], + quantiles: vector_lib::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], count: 6, sum: 12.0, }, @@ -666,7 +666,7 @@ mod tests { "requests_sum", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], + quantiles: vector_lib::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], count: 6, sum: 12.0, }, @@ -708,7 +708,7 @@ mod tests { "requests", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], + samples: vector_lib::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], statistic: StatisticKind::Histogram, }, ) @@ -835,7 +835,7 @@ mod tests { "requests", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 0, 2.0 => 0], + samples: vector_lib::samples![1.0 => 0, 2.0 => 0], statistic: StatisticKind::Histogram, }, ) @@ -853,7 +853,7 @@ mod tests { "requests", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], + samples: vector_lib::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], statistic: StatisticKind::Summary, }, ) @@ -953,7 +953,7 @@ mod integration_tests { use chrono::{SecondsFormat, Utc}; use futures::stream; use similar_asserts::assert_eq; - use vector_core::metric_tags; + use vector_lib::metric_tags; use crate::{ config::{SinkConfig, SinkContext}, diff --git a/src/sinks/influxdb/mod.rs b/src/sinks/influxdb/mod.rs index 090fdc4f46518..9928d32797885 100644 --- a/src/sinks/influxdb/mod.rs +++ b/src/sinks/influxdb/mod.rs @@ -10,7 +10,7 @@ use http::{StatusCode, Uri}; use snafu::{ResultExt, Snafu}; use tower::Service; use vector_config::configurable_component; -use vector_core::event::MetricTags; +use vector_lib::event::MetricTags; use vector_lib::sensitive_string::SensitiveString; use crate::http::HttpClient; @@ -380,7 +380,7 @@ pub mod test_util { use std::{fs::File, io::Read}; use chrono::{offset::TimeZone, DateTime, SecondsFormat, Timelike, Utc}; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::tls; diff --git a/src/sinks/kafka/tests.rs b/src/sinks/kafka/tests.rs index fee36ca9af5eb..e7cd3d221db48 100644 --- a/src/sinks/kafka/tests.rs +++ b/src/sinks/kafka/tests.rs @@ -19,7 +19,7 @@ mod integration_test { message::Headers, Message, Offset, TopicPartitionList, }; - use vector_core::{ + use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus}, }; diff --git a/src/sinks/loki/event.rs b/src/sinks/loki/event.rs index bae1fa3d2448e..45239a57efbf0 100644 --- a/src/sinks/loki/event.rs +++ b/src/sinks/loki/event.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, io}; use crate::sinks::{prelude::*, util::encoding::Encoder}; use bytes::Bytes; use serde::{ser::SerializeSeq, Serialize}; -use vector_core::config::telemetry; +use vector_lib::config::telemetry; pub type Labels = Vec<(String, String)>; diff --git a/src/sinks/loki/integration_tests.rs b/src/sinks/loki/integration_tests.rs index 20d4e2441a50e..3fb9f66ca6481 100644 --- a/src/sinks/loki/integration_tests.rs +++ b/src/sinks/loki/integration_tests.rs @@ -5,11 +5,11 @@ use bytes::Bytes; use chrono::{DateTime, Duration, Utc}; use futures::stream; use lookup::owned_value_path; -use vector_core::{ +use vector_lib::encode_logfmt; +use vector_lib::{ config::{init_telemetry, LogNamespace, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, LogEvent}, }; -use vector_lib::encode_logfmt; use vrl::value::{kind::Collection, Kind}; use super::config::{LokiConfig, OutOfOrderAction}; diff --git a/src/sinks/loki/sink.rs b/src/sinks/loki/sink.rs index 1b0d45bb3092b..b2362b16fa956 100644 --- a/src/sinks/loki/sink.rs +++ b/src/sinks/loki/sink.rs @@ -522,7 +522,7 @@ mod tests { use codecs::JsonSerializerConfig; use futures::stream::StreamExt; - use vector_core::event::{Event, LogEvent, Value}; + use vector_lib::event::{Event, LogEvent, Value}; use super::{EventEncoder, KeyPartitioner, RecordFilter}; use crate::{ diff --git a/src/sinks/loki/tests.rs b/src/sinks/loki/tests.rs index cf34b729684c1..281e61682c7f1 100644 --- a/src/sinks/loki/tests.rs +++ b/src/sinks/loki/tests.rs @@ -1,4 +1,4 @@ -use vector_core::config::proxy::ProxyConfig; +use vector_lib::config::proxy::ProxyConfig; use super::{config::LokiConfig, healthcheck::healthcheck, sink::LokiSink}; use crate::{ diff --git a/src/sinks/mezmo.rs b/src/sinks/mezmo.rs index b25864db37134..599201d01702d 100644 --- a/src/sinks/mezmo.rs +++ b/src/sinks/mezmo.rs @@ -402,7 +402,7 @@ mod tests { use futures_util::stream; use http::{request::Parts, StatusCode}; use serde_json::json; - use vector_core::event::{BatchNotifier, BatchStatus, Event, LogEvent}; + use vector_lib::event::{BatchNotifier, BatchStatus, Event, LogEvent}; use super::*; use crate::{ diff --git a/src/sinks/mod.rs b/src/sinks/mod.rs index 1a5b03e06c63e..2ccd4c3f9818a 100644 --- a/src/sinks/mod.rs +++ b/src/sinks/mod.rs @@ -100,7 +100,7 @@ pub mod webhdfs; #[cfg(feature = "sinks-websocket")] pub mod websocket; -pub use vector_core::{config::Input, sink::VectorSink}; +pub use vector_lib::{config::Input, sink::VectorSink}; pub type Healthcheck = BoxFuture<'static, crate::Result<()>>; diff --git a/src/sinks/nats/config.rs b/src/sinks/nats/config.rs index 4ce334cda070a..28f5b1a08e251 100644 --- a/src/sinks/nats/config.rs +++ b/src/sinks/nats/config.rs @@ -1,7 +1,7 @@ use codecs::JsonSerializerConfig; use futures_util::TryFutureExt; use snafu::ResultExt; -use vector_core::tls::TlsEnableableConfig; +use vector_lib::tls::TlsEnableableConfig; use crate::{ nats::{from_tls_auth_config, NatsAuthConfig, NatsConfigError}, diff --git a/src/sinks/nats/request_builder.rs b/src/sinks/nats/request_builder.rs index 6ff785b15a28e..0709d391b060d 100644 --- a/src/sinks/nats/request_builder.rs +++ b/src/sinks/nats/request_builder.rs @@ -2,7 +2,7 @@ use std::io; use bytes::{Bytes, BytesMut}; use tokio_util::codec::Encoder as _; -use vector_core::config::telemetry; +use vector_lib::config::telemetry; use crate::sinks::prelude::*; diff --git a/src/sinks/new_relic/encoding.rs b/src/sinks/new_relic/encoding.rs index f103369c89cde..8ad282b47f462 100644 --- a/src/sinks/new_relic/encoding.rs +++ b/src/sinks/new_relic/encoding.rs @@ -1,8 +1,8 @@ use std::{io, sync::Arc}; use serde::Serialize; -use vector_core::{config::telemetry, event::Event, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, event::Event, EstimatedJsonEncodedSizeOf}; use super::{ EventsApiModel, LogsApiModel, MetricsApiModel, NewRelicApi, NewRelicApiModel, diff --git a/src/sinks/new_relic/tests.rs b/src/sinks/new_relic/tests.rs index c433e9dd27a78..69fd59898df78 100644 --- a/src/sinks/new_relic/tests.rs +++ b/src/sinks/new_relic/tests.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, convert::TryFrom, num::NonZeroU32, time::SystemT use chrono::{DateTime, Utc}; use futures::{future::ready, stream}; use serde::Deserialize; -use vector_core::config::{init_telemetry, Tags, Telemetry}; +use vector_lib::config::{init_telemetry, Tags, Telemetry}; use super::*; use crate::{ diff --git a/src/sinks/papertrail.rs b/src/sinks/papertrail.rs index bf2c45c6710b1..557eb0c339c01 100644 --- a/src/sinks/papertrail.rs +++ b/src/sinks/papertrail.rs @@ -189,7 +189,7 @@ mod tests { use codecs::JsonSerializerConfig; use futures::{future::ready, stream}; use tokio_util::codec::Encoder as _; - use vector_core::event::{Event, LogEvent}; + use vector_lib::event::{Event, LogEvent}; use crate::test_util::{ components::{run_and_assert_sink_compliance, SINK_TAGS}, diff --git a/src/sinks/prelude.rs b/src/sinks/prelude.rs index 1d20c67edfc7b..5139bcb2f353d 100644 --- a/src/sinks/prelude.rs +++ b/src/sinks/prelude.rs @@ -6,7 +6,7 @@ pub use futures::{future, future::BoxFuture, stream::BoxStream, FutureExt, Strea pub use tower::{Service, ServiceBuilder}; pub use vector_buffers::EventCount; pub use vector_config::configurable_component; -pub use vector_core::{ +pub use vector_lib::{ config::{telemetry, AcknowledgementsConfig, Input}, event::Value, partition::Partitioner, diff --git a/src/sinks/prometheus/collector.rs b/src/sinks/prometheus/collector.rs index d5429259e8dee..7d26b21d58429 100644 --- a/src/sinks/prometheus/collector.rs +++ b/src/sinks/prometheus/collector.rs @@ -3,7 +3,7 @@ use std::{collections::BTreeMap, fmt::Write as _}; use chrono::Utc; use indexmap::map::IndexMap; use prometheus_parser::{proto, METRIC_NAME_LABEL}; -use vector_core::event::metric::{samples_to_buckets, MetricSketch, MetricTags, Quantile}; +use vector_lib::event::metric::{samples_to_buckets, MetricSketch, MetricTags, Quantile}; use crate::{ event::metric::{Metric, MetricKind, MetricValue, StatisticKind}, @@ -440,7 +440,7 @@ mod tests { use chrono::{DateTime, TimeZone, Timelike}; use indoc::indoc; use similar_asserts::assert_eq; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::{super::default_summary_quantiles, *}; use crate::{ @@ -668,7 +668,7 @@ mod tests { "requests".to_owned(), MetricKind::Absolute, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], + samples: vector_lib::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], statistic: StatisticKind::Histogram, }, ) @@ -803,7 +803,7 @@ mod tests { "requests".to_owned(), MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], + quantiles: vector_lib::quantiles![0.01 => 1.5, 0.5 => 2.0, 0.99 => 3.0], count: 6, sum: 12.0, }, @@ -860,7 +860,7 @@ mod tests { "requests".to_owned(), MetricKind::Absolute, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], + samples: vector_lib::samples![1.0 => 3, 2.0 => 3, 3.0 => 2], statistic: StatisticKind::Summary, }, ) diff --git a/src/sinks/prometheus/exporter.rs b/src/sinks/prometheus/exporter.rs index f71ad1c42fa85..e047b53043c46 100644 --- a/src/sinks/prometheus/exporter.rs +++ b/src/sinks/prometheus/exporter.rs @@ -21,7 +21,7 @@ use snafu::Snafu; use stream_cancel::{Trigger, Tripwire}; use tracing::{Instrument, Span}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ internal_event::{ ByteSize, BytesSent, CountByteSize, EventsSent, InternalEventHandle as _, Output, Protocol, Registered, @@ -608,7 +608,7 @@ mod tests { use indoc::indoc; use similar_asserts::assert_eq; use tokio::{sync::oneshot::error::TryRecvError, time}; - use vector_core::{ + use vector_lib::{ event::{MetricTags, StatisticKind}, metric_tags, samples, }; diff --git a/src/sinks/prometheus/mod.rs b/src/sinks/prometheus/mod.rs index dc1b3f1991db8..1e8508ac935d1 100644 --- a/src/sinks/prometheus/mod.rs +++ b/src/sinks/prometheus/mod.rs @@ -1,5 +1,5 @@ #[cfg(test)] -use vector_core::event::Metric; +use vector_lib::event::Metric; use vector_lib::sensitive_string::SensitiveString; mod collector; diff --git a/src/sinks/prometheus/remote_write/mod.rs b/src/sinks/prometheus/remote_write/mod.rs index 3442c88de812f..3ebda7df8bf18 100644 --- a/src/sinks/prometheus/remote_write/mod.rs +++ b/src/sinks/prometheus/remote_write/mod.rs @@ -6,7 +6,7 @@ //! [remote_write]: https://prometheus.io/docs/concepts/remote_write_spec/ use snafu::prelude::*; -use vector_core::event::Metric; +use vector_lib::event::Metric; use crate::sinks::{ prelude::*, diff --git a/src/sinks/prometheus/remote_write/request_builder.rs b/src/sinks/prometheus/remote_write/request_builder.rs index a2e156c42cfb8..716923edd381b 100644 --- a/src/sinks/prometheus/remote_write/request_builder.rs +++ b/src/sinks/prometheus/remote_write/request_builder.rs @@ -2,7 +2,7 @@ use std::io; use bytes::{Bytes, BytesMut}; use prost::Message; -use vector_core::{config::telemetry, event::Metric}; +use vector_lib::{config::telemetry, event::Metric}; use crate::sinks::{ prelude::*, diff --git a/src/sinks/prometheus/remote_write/sink.rs b/src/sinks/prometheus/remote_write/sink.rs index 14545d58c4b57..fdff3b605db9c 100644 --- a/src/sinks/prometheus/remote_write/sink.rs +++ b/src/sinks/prometheus/remote_write/sink.rs @@ -1,7 +1,7 @@ use std::fmt; -use vector_core::event::Metric; use vector_lib::byte_size_of::ByteSizeOf; +use vector_lib::event::Metric; use vector_stream::batcher::{data::BatchData, limiter::ByteSizeOfItemSize}; use crate::sinks::{prelude::*, util::buffer::metrics::MetricSet}; diff --git a/src/sinks/prometheus/remote_write/tests.rs b/src/sinks/prometheus/remote_write/tests.rs index 190d3723bce6d..a9d00cd10a0fa 100644 --- a/src/sinks/prometheus/remote_write/tests.rs +++ b/src/sinks/prometheus/remote_write/tests.rs @@ -4,7 +4,7 @@ use http::HeaderMap; use indoc::indoc; use prometheus_parser::proto; use prost::Message; -use vector_core::metric_tags; +use vector_lib::metric_tags; use super::*; use crate::{ diff --git a/src/sinks/pulsar/config.rs b/src/sinks/pulsar/config.rs index 71ea7c6efb521..64f5d6afcbfe2 100644 --- a/src/sinks/pulsar/config.rs +++ b/src/sinks/pulsar/config.rs @@ -17,7 +17,7 @@ use pulsar::{ }; use pulsar::{error::AuthenticationError, OperationRetryOptions}; use snafu::ResultExt; -use vector_core::config::DataType; +use vector_lib::config::DataType; use vector_lib::sensitive_string::SensitiveString; use vrl::value::Kind; diff --git a/src/sinks/pulsar/encoder.rs b/src/sinks/pulsar/encoder.rs index fcd60dd2a4248..fd8fc8b9acd90 100644 --- a/src/sinks/pulsar/encoder.rs +++ b/src/sinks/pulsar/encoder.rs @@ -6,8 +6,8 @@ use crate::{ use bytes::BytesMut; use std::io; use tokio_util::codec::Encoder as _; -use vector_core::{config::telemetry, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, EstimatedJsonEncodedSizeOf}; #[derive(Clone, Debug)] pub(super) struct PulsarEncoder { diff --git a/src/sinks/pulsar/util.rs b/src/sinks/pulsar/util.rs index b14500252c8d4..120782f6af3f3 100644 --- a/src/sinks/pulsar/util.rs +++ b/src/sinks/pulsar/util.rs @@ -5,7 +5,7 @@ use crate::template::Template; use bytes::Bytes; use lookup::lookup_v2::OptionalTargetPath; use std::collections::HashMap; -use vector_core::event::Event; +use vector_lib::event::Event; use vrl::value::Value; /// Transforms an event into a Pulsar event by rendering the required template fields. diff --git a/src/sinks/redis/integration_tests.rs b/src/sinks/redis/integration_tests.rs index 577210555361c..38e04eb10776d 100644 --- a/src/sinks/redis/integration_tests.rs +++ b/src/sinks/redis/integration_tests.rs @@ -2,7 +2,7 @@ use codecs::JsonSerializerConfig; use futures::stream; use rand::Rng; use redis::AsyncCommands; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::LogEvent, }; diff --git a/src/sinks/redis/request_builder.rs b/src/sinks/redis/request_builder.rs index f38a1c7de7a81..e4504b0287394 100644 --- a/src/sinks/redis/request_builder.rs +++ b/src/sinks/redis/request_builder.rs @@ -1,6 +1,6 @@ use bytes::BytesMut; use tokio_util::codec::Encoder as _; -use vector_core::config::telemetry; +use vector_lib::config::telemetry; use crate::sinks::{prelude::*, util::EncodedLength}; diff --git a/src/sinks/redis/tests.rs b/src/sinks/redis/tests.rs index 5b0bcc6a33a69..e3c20a4e88787 100644 --- a/src/sinks/redis/tests.rs +++ b/src/sinks/redis/tests.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use codecs::{JsonSerializerConfig, TextSerializerConfig}; -use vector_core::event::LogEvent; +use vector_lib::event::LogEvent; use vector_lib::request_metadata::GroupedCountByteSize; use super::{config::RedisSinkConfig, request_builder::encode_event}; diff --git a/src/sinks/s3_common/partitioner.rs b/src/sinks/s3_common/partitioner.rs index 16d1e636e3d08..b367646982775 100644 --- a/src/sinks/s3_common/partitioner.rs +++ b/src/sinks/s3_common/partitioner.rs @@ -1,4 +1,4 @@ -use vector_core::{event::Event, partition::Partitioner}; +use vector_lib::{event::Event, partition::Partitioner}; use crate::{internal_events::TemplateRenderingError, template::Template}; diff --git a/src/sinks/s3_common/service.rs b/src/sinks/s3_common/service.rs index d29bde4ea0c07..f734928dc7f64 100644 --- a/src/sinks/s3_common/service.rs +++ b/src/sinks/s3_common/service.rs @@ -11,7 +11,7 @@ use futures::future::BoxFuture; use md5::Digest; use tower::Service; use tracing::Instrument; -use vector_core::event::{EventFinalizers, EventStatus, Finalizable}; +use vector_lib::event::{EventFinalizers, EventStatus, Finalizable}; use vector_lib::request_metadata::{GroupedCountByteSize, MetaDescriptive, RequestMetadata}; use vector_stream::DriverResponse; diff --git a/src/sinks/sematext/metrics.rs b/src/sinks/sematext/metrics.rs index 2a5d20f3ca22c..2ff9945d3260c 100644 --- a/src/sinks/sematext/metrics.rs +++ b/src/sinks/sematext/metrics.rs @@ -7,8 +7,8 @@ use hyper::{Body, Request}; use indoc::indoc; use tower::Service; use vector_config::configurable_component; -use vector_core::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use super::Region; use crate::{ @@ -310,7 +310,7 @@ mod tests { use chrono::{offset::TimeZone, Timelike, Utc}; use futures::StreamExt; use indoc::indoc; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::{ diff --git a/src/sinks/splunk_hec/common/acknowledgements.rs b/src/sinks/splunk_hec/common/acknowledgements.rs index 9ef7fb9e9bb09..7ca8ade82782d 100644 --- a/src/sinks/splunk_hec/common/acknowledgements.rs +++ b/src/sinks/splunk_hec/common/acknowledgements.rs @@ -9,7 +9,7 @@ use hyper::Body; use serde::{Deserialize, Serialize}; use tokio::sync::{mpsc::Receiver, oneshot::Sender}; use vector_config::configurable_component; -use vector_core::event::EventStatus; +use vector_lib::event::EventStatus; use super::service::{HttpRequestBuilder, MetadataFields}; use crate::{ @@ -287,7 +287,7 @@ mod tests { use futures_util::{stream::FuturesUnordered, StreamExt}; use tokio::sync::oneshot::{self, Receiver}; - use vector_core::{config::proxy::ProxyConfig, event::EventStatus}; + use vector_lib::{config::proxy::ProxyConfig, event::EventStatus}; use super::HecAckClient; use crate::{ diff --git a/src/sinks/splunk_hec/common/request.rs b/src/sinks/splunk_hec/common/request.rs index 9338f3fc883ab..f644107e46676 100644 --- a/src/sinks/splunk_hec/common/request.rs +++ b/src/sinks/splunk_hec/common/request.rs @@ -1,11 +1,11 @@ use std::sync::Arc; use bytes::Bytes; -use vector_core::{ +use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; +use vector_lib::{ event::{EventFinalizers, Finalizable}, ByteSizeOf, }; -use vector_lib::request_metadata::{MetaDescriptive, RequestMetadata}; use crate::sinks::util::ElementCount; diff --git a/src/sinks/splunk_hec/common/response.rs b/src/sinks/splunk_hec/common/response.rs index eb5e61153975c..745c45a9b882c 100644 --- a/src/sinks/splunk_hec/common/response.rs +++ b/src/sinks/splunk_hec/common/response.rs @@ -1,4 +1,4 @@ -use vector_core::event::EventStatus; +use vector_lib::event::EventStatus; use vector_lib::request_metadata::GroupedCountByteSize; use vector_stream::DriverResponse; diff --git a/src/sinks/splunk_hec/common/service.rs b/src/sinks/splunk_hec/common/service.rs index 9e1c99af7eb8e..592ec7e0293f4 100644 --- a/src/sinks/splunk_hec/common/service.rs +++ b/src/sinks/splunk_hec/common/service.rs @@ -13,7 +13,7 @@ use tokio::sync::{mpsc, oneshot, OwnedSemaphorePermit, Semaphore}; use tokio_util::sync::PollSemaphore; use tower::Service; use uuid::Uuid; -use vector_core::event::EventStatus; +use vector_lib::event::EventStatus; use vector_lib::request_metadata::MetaDescriptive; use super::{ @@ -282,11 +282,11 @@ mod tests { use bytes::Bytes; use futures_util::{poll, stream::FuturesUnordered, StreamExt}; use tower::{util::BoxService, Service, ServiceExt}; - use vector_core::{ + use vector_lib::internal_event::CountByteSize; + use vector_lib::{ config::proxy::ProxyConfig, event::{EventFinalizers, EventStatus}, }; - use vector_lib::internal_event::CountByteSize; use wiremock::{ matchers::{header, header_exists, method, path}, Mock, MockServer, Request, Respond, ResponseTemplate, diff --git a/src/sinks/splunk_hec/common/util.rs b/src/sinks/splunk_hec/common/util.rs index b81974e1d5288..6fc513b788143 100644 --- a/src/sinks/splunk_hec/common/util.rs +++ b/src/sinks/splunk_hec/common/util.rs @@ -6,7 +6,7 @@ use http::{Request, StatusCode, Uri}; use hyper::Body; use lookup::lookup_v2::OptionalValuePath; use snafu::{ResultExt, Snafu}; -use vector_core::{config::proxy::ProxyConfig, event::EventRef}; +use vector_lib::{config::proxy::ProxyConfig, event::EventRef}; use super::{ request::HecRequest, @@ -168,7 +168,7 @@ pub fn render_template_string<'a>( mod tests { use bytes::Bytes; use http::{HeaderValue, Uri}; - use vector_core::config::proxy::ProxyConfig; + use vector_lib::config::proxy::ProxyConfig; use wiremock::{ matchers::{header, method, path}, Mock, MockServer, ResponseTemplate, @@ -397,7 +397,7 @@ mod integration_tests { use http::StatusCode; use tokio::time::Duration; - use vector_core::config::proxy::ProxyConfig; + use vector_lib::config::proxy::ProxyConfig; use warp::Filter; use super::{ diff --git a/src/sinks/splunk_hec/logs/config.rs b/src/sinks/splunk_hec/logs/config.rs index 4d59ba1a20346..0c5eb42d26ee3 100644 --- a/src/sinks/splunk_hec/logs/config.rs +++ b/src/sinks/splunk_hec/logs/config.rs @@ -5,8 +5,8 @@ use futures_util::FutureExt; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::sink::VectorSink; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::sink::VectorSink; use super::{encoder::HecLogsEncoder, request_builder::HecLogsRequestBuilder, sink::HecLogsSink}; use crate::sinks::splunk_hec::common::config_timestamp_key; diff --git a/src/sinks/splunk_hec/logs/encoder.rs b/src/sinks/splunk_hec/logs/encoder.rs index 70fc861da9c73..9f8faa841fde6 100644 --- a/src/sinks/splunk_hec/logs/encoder.rs +++ b/src/sinks/splunk_hec/logs/encoder.rs @@ -3,8 +3,8 @@ use std::borrow::Cow; use bytes::BytesMut; use serde::Serialize; use tokio_util::codec::Encoder as _; -use vector_core::{config::telemetry, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, EstimatedJsonEncodedSizeOf}; use super::sink::HecProcessedEvent; use crate::{ diff --git a/src/sinks/splunk_hec/logs/integration_tests.rs b/src/sinks/splunk_hec/logs/integration_tests.rs index 63a3214265824..dca874ea73567 100644 --- a/src/sinks/splunk_hec/logs/integration_tests.rs +++ b/src/sinks/splunk_hec/logs/integration_tests.rs @@ -6,7 +6,7 @@ use futures::{future::ready, stream}; use lookup::lookup_v2::{ConfigValuePath, OptionalValuePath}; use serde_json::Value as JsonValue; use tokio::time::{sleep, Duration}; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, LogEvent}, }; diff --git a/src/sinks/splunk_hec/logs/request_builder.rs b/src/sinks/splunk_hec/logs/request_builder.rs index c03b13725f29a..91d37d7b5ebd1 100644 --- a/src/sinks/splunk_hec/logs/request_builder.rs +++ b/src/sinks/splunk_hec/logs/request_builder.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use bytes::Bytes; -use vector_core::event::{EventFinalizers, Finalizable}; +use vector_lib::event::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; use super::{ diff --git a/src/sinks/splunk_hec/logs/tests.rs b/src/sinks/splunk_hec/logs/tests.rs index 2cc982aed85f9..9e5851e151f92 100644 --- a/src/sinks/splunk_hec/logs/tests.rs +++ b/src/sinks/splunk_hec/logs/tests.rs @@ -6,7 +6,7 @@ use futures_util::StreamExt; use lookup::lookup_v2::OptionalValuePath; use lookup::{OwnedValuePath, PathPrefix}; use serde::Deserialize; -use vector_core::{ +use vector_lib::{ config::log_schema, event::{Event, LogEvent, Value}, }; diff --git a/src/sinks/splunk_hec/metrics/config.rs b/src/sinks/splunk_hec/metrics/config.rs index cf73e6102aea2..a8636da1487a5 100644 --- a/src/sinks/splunk_hec/metrics/config.rs +++ b/src/sinks/splunk_hec/metrics/config.rs @@ -4,8 +4,8 @@ use futures_util::FutureExt; use lookup::lookup_v2::OptionalValuePath; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::sink::VectorSink; use vector_lib::sensitive_string::SensitiveString; +use vector_lib::sink::VectorSink; use super::{request_builder::HecMetricsRequestBuilder, sink::HecMetricsSink}; use crate::{ diff --git a/src/sinks/splunk_hec/metrics/encoder.rs b/src/sinks/splunk_hec/metrics/encoder.rs index d96a801a96242..9a2430f48bfc9 100644 --- a/src/sinks/splunk_hec/metrics/encoder.rs +++ b/src/sinks/splunk_hec/metrics/encoder.rs @@ -1,8 +1,8 @@ use std::{collections::BTreeMap, iter}; use serde::Serialize; -use vector_core::{config::telemetry, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, EstimatedJsonEncodedSizeOf}; use super::sink::HecProcessedEvent; use crate::{internal_events::SplunkEventEncodeError, sinks::util::encoding::Encoder}; diff --git a/src/sinks/splunk_hec/metrics/integration_tests.rs b/src/sinks/splunk_hec/metrics/integration_tests.rs index 0cadb38084c02..74fb8ad45ed61 100644 --- a/src/sinks/splunk_hec/metrics/integration_tests.rs +++ b/src/sinks/splunk_hec/metrics/integration_tests.rs @@ -3,7 +3,7 @@ use std::convert::TryFrom; use futures::{future::ready, stream}; use lookup::lookup_v2::OptionalValuePath; use serde_json::Value as JsonValue; -use vector_core::{ +use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus, Event, MetricValue}, metric_tags, diff --git a/src/sinks/splunk_hec/metrics/request_builder.rs b/src/sinks/splunk_hec/metrics/request_builder.rs index aa1cc9aef48a7..d57f4634237ce 100644 --- a/src/sinks/splunk_hec/metrics/request_builder.rs +++ b/src/sinks/splunk_hec/metrics/request_builder.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use bytes::Bytes; -use vector_core::event::{EventFinalizers, Finalizable}; +use vector_lib::event::{EventFinalizers, Finalizable}; use vector_lib::request_metadata::RequestMetadata; use super::{encoder::HecMetricsEncoder, sink::HecProcessedEvent}; diff --git a/src/sinks/splunk_hec/metrics/sink.rs b/src/sinks/splunk_hec/metrics/sink.rs index 6f6ad5d74b9dd..5017fa8191c37 100644 --- a/src/sinks/splunk_hec/metrics/sink.rs +++ b/src/sinks/splunk_hec/metrics/sink.rs @@ -1,7 +1,7 @@ use std::{fmt, sync::Arc}; use serde::Serialize; -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use vrl::path::OwnedValuePath; use super::request_builder::HecMetricsRequestBuilder; diff --git a/src/sinks/splunk_hec/metrics/tests.rs b/src/sinks/splunk_hec/metrics/tests.rs index e068ee26b41fd..7eed102d43a70 100644 --- a/src/sinks/splunk_hec/metrics/tests.rs +++ b/src/sinks/splunk_hec/metrics/tests.rs @@ -3,7 +3,7 @@ use std::{collections::BTreeSet, sync::Arc}; use chrono::{DateTime, Utc}; use futures_util::StreamExt; use serde_json::{json, Value as JsonValue}; -use vector_core::{ +use vector_lib::{ event::{Event, Metric, MetricKind, MetricValue}, metric_tags, ByteSizeOf, }; diff --git a/src/sinks/statsd/batch.rs b/src/sinks/statsd/batch.rs index 9aefaed21f5e0..a3b73588f8133 100644 --- a/src/sinks/statsd/batch.rs +++ b/src/sinks/statsd/batch.rs @@ -1,4 +1,4 @@ -use vector_core::event::Metric; +use vector_lib::event::Metric; use vector_stream::batcher::limiter::ItemBatchSize; // This accounts for the separators, the metric type string, the length of the value itself. It can diff --git a/src/sinks/statsd/config.rs b/src/sinks/statsd/config.rs index f580ee77abff4..3cfaf5e7d0d20 100644 --- a/src/sinks/statsd/config.rs +++ b/src/sinks/statsd/config.rs @@ -2,11 +2,11 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use async_trait::async_trait; use vector_config::{component::GenerateConfig, configurable_component}; -use vector_core::{ +use vector_lib::internal_event::Protocol; +use vector_lib::{ config::{AcknowledgementsConfig, Input}, sink::VectorSink, }; -use vector_lib::internal_event::Protocol; use crate::{ config::{SinkConfig, SinkContext}, diff --git a/src/sinks/statsd/encoder.rs b/src/sinks/statsd/encoder.rs index fe3464b6caa1c..a9242a035f895 100644 --- a/src/sinks/statsd/encoder.rs +++ b/src/sinks/statsd/encoder.rs @@ -5,7 +5,7 @@ use std::{ use bytes::{BufMut, BytesMut}; use tokio_util::codec::Encoder; -use vector_core::event::{Metric, MetricKind, MetricTags, MetricValue, StatisticKind}; +use vector_lib::event::{Metric, MetricKind, MetricTags, MetricValue, StatisticKind}; use crate::{ internal_events::StatsdInvalidMetricError, @@ -153,7 +153,7 @@ fn encode_and_write_single_event( #[cfg(test)] mod tests { - use vector_core::{ + use vector_lib::{ event::{metric::TagValue, MetricTags}, metric_tags, }; @@ -161,7 +161,7 @@ mod tests { use super::encode_tags; #[cfg(feature = "sources-statsd")] - use vector_core::event::{Metric, MetricKind, MetricValue, StatisticKind}; + use vector_lib::event::{Metric, MetricKind, MetricValue, StatisticKind}; #[cfg(feature = "sources-statsd")] fn encode_metric(metric: &Metric) -> bytes::BytesMut { @@ -296,7 +296,7 @@ mod tests { "distribution", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.5 => 1, 1.5 => 1], + samples: vector_lib::samples![1.5 => 1, 1.5 => 1], statistic: StatisticKind::Histogram, }, ) @@ -306,7 +306,7 @@ mod tests { "distribution", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.5 => 2], + samples: vector_lib::samples![1.5 => 2], statistic: StatisticKind::Histogram, }, ) @@ -324,7 +324,7 @@ mod tests { "distribution", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![2.5 => 1, 1.5 => 1, 1.5 => 1], + samples: vector_lib::samples![2.5 => 1, 1.5 => 1, 1.5 => 1], statistic: StatisticKind::Histogram, }, ) @@ -334,7 +334,7 @@ mod tests { "distribution", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![1.5 => 2], + samples: vector_lib::samples![1.5 => 2], statistic: StatisticKind::Histogram, }, ) @@ -343,7 +343,7 @@ mod tests { "distribution", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![2.5 => 1], + samples: vector_lib::samples![2.5 => 1], statistic: StatisticKind::Histogram, }, ) diff --git a/src/sinks/statsd/normalizer.rs b/src/sinks/statsd/normalizer.rs index 2592292e7023c..994bcee316c74 100644 --- a/src/sinks/statsd/normalizer.rs +++ b/src/sinks/statsd/normalizer.rs @@ -1,4 +1,4 @@ -use vector_core::event::{Metric, MetricValue}; +use vector_lib::event::{Metric, MetricValue}; use crate::sinks::util::buffer::metrics::{MetricNormalize, MetricSet}; @@ -20,7 +20,7 @@ impl MetricNormalize for StatsdNormalizer { #[cfg(test)] mod tests { - use vector_core::event::MetricKind; + use vector_lib::event::MetricKind; use super::StatsdNormalizer; diff --git a/src/sinks/statsd/request_builder.rs b/src/sinks/statsd/request_builder.rs index 75aad1bdd2ce4..d1c90798f660d 100644 --- a/src/sinks/statsd/request_builder.rs +++ b/src/sinks/statsd/request_builder.rs @@ -3,12 +3,12 @@ use std::convert::Infallible; use bytes::BytesMut; use snafu::Snafu; use tokio_util::codec::Encoder; -use vector_core::{ +use vector_lib::request_metadata::RequestMetadata; +use vector_lib::{ config::telemetry, event::{EventFinalizers, Finalizable, Metric}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::request_metadata::RequestMetadata; use super::{encoder::StatsdEncoder, service::StatsdRequest}; use crate::{ diff --git a/src/sinks/statsd/sink.rs b/src/sinks/statsd/sink.rs index 9c6a24859529d..3c16d177458f0 100644 --- a/src/sinks/statsd/sink.rs +++ b/src/sinks/statsd/sink.rs @@ -6,8 +6,8 @@ use futures_util::{ StreamExt, }; use tower::Service; -use vector_core::{event::Event, sink::StreamSink}; use vector_lib::internal_event::Protocol; +use vector_lib::{event::Event, sink::StreamSink}; use vector_stream::{BatcherSettings, DriverResponse}; use crate::sinks::util::SinkBuilderExt; diff --git a/src/sinks/statsd/tests.rs b/src/sinks/statsd/tests.rs index b2311bd8fbec9..9284e54d8bd92 100644 --- a/src/sinks/statsd/tests.rs +++ b/src/sinks/statsd/tests.rs @@ -4,7 +4,7 @@ use futures_util::stream; use tokio::{net::UdpSocket, sync::mpsc}; use tokio_stream::wrappers::ReceiverStream; use tokio_util::{codec::BytesCodec, udp::UdpFramed}; -use vector_core::{ +use vector_lib::{ event::{metric::TagValue, Event, Metric, MetricKind, MetricTags, MetricValue, StatisticKind}, metric_tags, }; @@ -62,7 +62,7 @@ async fn test_send_to_statsd() { "histogram", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![2.0 => 100], + samples: vector_lib::samples![2.0 => 100], statistic: StatisticKind::Histogram, }, ) diff --git a/src/sinks/util/buffer/metrics/mod.rs b/src/sinks/util/buffer/metrics/mod.rs index e66b3c2364140..59c542aff5d85 100644 --- a/src/sinks/util/buffer/metrics/mod.rs +++ b/src/sinks/util/buffer/metrics/mod.rs @@ -1,6 +1,6 @@ use std::cmp::Ordering; -use vector_core::event::metric::{Metric, MetricValue, Sample}; +use vector_lib::event::metric::{Metric, MetricValue, Sample}; use crate::sinks::util::{ batch::{Batch, BatchConfig, BatchError, BatchSize, PushResult}, @@ -125,8 +125,8 @@ pub fn compress_distribution(samples: &mut Vec) -> Vec { #[cfg(test)] mod tests { use similar_asserts::assert_eq; - use vector_core::event::metric::{MetricKind, MetricKind::*, MetricValue, StatisticKind}; - use vector_core::metric_tags; + use vector_lib::event::metric::{MetricKind, MetricKind::*, MetricValue, StatisticKind}; + use vector_lib::metric_tags; use super::*; use crate::{ @@ -164,7 +164,7 @@ mod tests { format!("dist-{}", num), kind, MetricValue::Distribution { - samples: vector_core::samples![num as f64 => rate], + samples: vector_lib::samples![num as f64 => rate], statistic: StatisticKind::Histogram, }, ) @@ -181,7 +181,7 @@ mod tests { format!("buckets-{}", num), kind, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ + buckets: vector_lib::buckets![ 1.0 => cfactor, bpower.exp2() => cfactor * 2, 4.0f64.powf(bpower) => cfactor * 4 @@ -197,7 +197,7 @@ mod tests { format!("quantiles-{}", num), kind, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![ + quantiles: vector_lib::quantiles![ 0.0 => factor, 0.5 => factor * 2.0, 1.0 => factor * 4.0 @@ -565,7 +565,7 @@ mod tests { #[test] fn compress_distributions() { - let mut samples = vector_core::samples![ + let mut samples = vector_lib::samples![ 2.0 => 12, 2.0 => 12, 3.0 => 13, @@ -577,7 +577,7 @@ mod tests { assert_eq!( compress_distribution(&mut samples), - vector_core::samples![1.0 => 11, 2.0 => 48, 3.0 => 26] + vector_lib::samples![1.0 => 11, 2.0 => 48, 3.0 => 26] ); } diff --git a/src/sinks/util/buffer/metrics/normalize.rs b/src/sinks/util/buffer/metrics/normalize.rs index 16812fcd26333..41df185657684 100644 --- a/src/sinks/util/buffer/metrics/normalize.rs +++ b/src/sinks/util/buffer/metrics/normalize.rs @@ -1,5 +1,6 @@ use indexmap::IndexMap; -use vector_core::event::{ + +use vector_lib::event::{ metric::{MetricData, MetricSeries}, EventMetadata, Metric, MetricKind, }; diff --git a/src/sinks/util/buffer/metrics/split.rs b/src/sinks/util/buffer/metrics/split.rs index fa5f33477d97d..fb1a352ab3604 100644 --- a/src/sinks/util/buffer/metrics/split.rs +++ b/src/sinks/util/buffer/metrics/split.rs @@ -1,6 +1,6 @@ use std::collections::VecDeque; -use vector_core::event::{metric::MetricData, Metric, MetricValue}; +use vector_lib::event::{metric::MetricData, Metric, MetricValue}; #[allow(clippy::large_enum_variant)] enum SplitState { @@ -189,7 +189,7 @@ impl MetricSplit for AggregatedSummarySplitter { mod tests { use std::collections::BTreeSet; - use vector_core::event::{ + use vector_lib::event::{ metric::{Bucket, MetricTags, Quantile, Sample}, Metric, MetricKind, MetricValue, StatisticKind, }; diff --git a/src/sinks/util/buffer/partition.rs b/src/sinks/util/buffer/partition.rs index 20fb00f991645..2b673a2101822 100644 --- a/src/sinks/util/buffer/partition.rs +++ b/src/sinks/util/buffer/partition.rs @@ -1,4 +1,4 @@ -use vector_core::ByteSizeOf; +use vector_lib::ByteSizeOf; use super::super::{ batch::{Batch, BatchConfig, BatchError, PushResult}, diff --git a/src/sinks/util/builder.rs b/src/sinks/util/builder.rs index da74aeb20f6bf..50056941d1cf1 100644 --- a/src/sinks/util/builder.rs +++ b/src/sinks/util/builder.rs @@ -12,7 +12,7 @@ use std::{ use futures_util::{stream::Map, Stream, StreamExt}; use pin_project::pin_project; use tower::Service; -use vector_core::{ +use vector_lib::{ event::{Finalizable, Metric}, partition::Partitioner, ByteSizeOf, diff --git a/src/sinks/util/encoding.rs b/src/sinks/util/encoding.rs index 340183e547253..0f39f75887068 100644 --- a/src/sinks/util/encoding.rs +++ b/src/sinks/util/encoding.rs @@ -4,8 +4,8 @@ use bytes::BytesMut; use codecs::encoding::Framer; use itertools::{Itertools, Position}; use tokio_util::codec::Encoder as _; -use vector_core::{config::telemetry, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, EstimatedJsonEncodedSizeOf}; use crate::{codecs::Transformer, event::Event, internal_events::EncoderWriteError}; @@ -150,7 +150,7 @@ mod tests { CharacterDelimitedEncoder, JsonSerializerConfig, NewlineDelimitedEncoder, TextSerializerConfig, }; - use vector_core::event::LogEvent; + use vector_lib::event::LogEvent; use vector_lib::{internal_event::CountByteSize, json_size::JsonSize}; use vrl::value::Value; diff --git a/src/sinks/util/http.rs b/src/sinks/util/http.rs index 635618664fcd6..499f7640f497c 100644 --- a/src/sinks/util/http.rs +++ b/src/sinks/util/http.rs @@ -20,7 +20,7 @@ use snafu::{ResultExt, Snafu}; use tower::{Service, ServiceBuilder}; use tower_http::decompression::DecompressionLayer; use vector_config::configurable_component; -use vector_core::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_stream::batcher::limiter::ItemBatchSize; use super::{ diff --git a/src/sinks/util/metadata.rs b/src/sinks/util/metadata.rs index 6a3a77403ae4f..3089799421903 100644 --- a/src/sinks/util/metadata.rs +++ b/src/sinks/util/metadata.rs @@ -1,7 +1,7 @@ use std::num::NonZeroUsize; -use vector_core::{config, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::{GetEventCountTags, GroupedCountByteSize, RequestMetadata}; +use vector_lib::{config, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use super::request_builder::EncodeResult; diff --git a/src/sinks/util/normalizer.rs b/src/sinks/util/normalizer.rs index 7cc1dc76dd91e..c1ab6cd047913 100644 --- a/src/sinks/util/normalizer.rs +++ b/src/sinks/util/normalizer.rs @@ -5,7 +5,7 @@ use std::{ use futures_util::{stream::Fuse, Stream, StreamExt}; use pin_project::pin_project; -use vector_core::event::Metric; +use vector_lib::event::Metric; use super::buffer::metrics::{MetricNormalize, MetricNormalizer}; diff --git a/src/sinks/util/partitioner.rs b/src/sinks/util/partitioner.rs index c2f226544c9a0..67ccec3738909 100644 --- a/src/sinks/util/partitioner.rs +++ b/src/sinks/util/partitioner.rs @@ -1,4 +1,4 @@ -use vector_core::{event::Event, partition::Partitioner}; +use vector_lib::{event::Event, partition::Partitioner}; use crate::{internal_events::TemplateRenderingError, template::Template}; diff --git a/src/sinks/util/processed_event.rs b/src/sinks/util/processed_event.rs index 46fd04a3cf7e4..6ee0c30960d94 100644 --- a/src/sinks/util/processed_event.rs +++ b/src/sinks/util/processed_event.rs @@ -1,5 +1,5 @@ use serde::Serialize; -use vector_core::{ +use vector_lib::{ event::{EventFinalizers, Finalizable, LogEvent, MaybeAsLogMut}, ByteSizeOf, EstimatedJsonEncodedSizeOf, }; diff --git a/src/sinks/util/service/net/mod.rs b/src/sinks/util/service/net/mod.rs index bf571f46100f0..5dc7c34c93e6e 100644 --- a/src/sinks/util/service/net/mod.rs +++ b/src/sinks/util/service/net/mod.rs @@ -45,7 +45,7 @@ use tokio::{ }; use tower::Service; use vector_config::configurable_component; -use vector_core::tls::{MaybeTlsStream, TlsError}; +use vector_lib::tls::{MaybeTlsStream, TlsError}; /// Hostname and port tuple. /// diff --git a/src/sinks/util/service/net/tcp.rs b/src/sinks/util/service/net/tcp.rs index 5cf97cb2ca1e5..f90c28d673a1a 100644 --- a/src/sinks/util/service/net/tcp.rs +++ b/src/sinks/util/service/net/tcp.rs @@ -4,7 +4,7 @@ use snafu::ResultExt; use tokio::net::TcpStream; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ tcp::TcpKeepaliveConfig, tls::{MaybeTlsSettings, MaybeTlsStream, TlsEnableableConfig}, }; diff --git a/src/sinks/util/sink.rs b/src/sinks/util/sink.rs index b288eb20422fa..e8a31d13f1a1f 100644 --- a/src/sinks/util/sink.rs +++ b/src/sinks/util/sink.rs @@ -52,7 +52,7 @@ use vector_lib::internal_event::{ CallError, CountByteSize, EventsSent, InternalEventHandle as _, Output, }; // === StreamSink === -pub use vector_core::sink::StreamSink; +pub use vector_lib::sink::StreamSink; use super::{ batch::{Batch, EncodedBatch, FinalizersBatch, PushResult, StatefulBatch}, diff --git a/src/sinks/util/tcp.rs b/src/sinks/util/tcp.rs index b0372407f8890..417a884a6902c 100644 --- a/src/sinks/util/tcp.rs +++ b/src/sinks/util/tcp.rs @@ -18,8 +18,8 @@ use tokio::{ }; use tokio_util::codec::Encoder; use vector_config::configurable_component; -use vector_core::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::json_size::JsonSize; +use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ codecs::Transformer, diff --git a/src/sinks/util/udp.rs b/src/sinks/util/udp.rs index 1a31fb4d16569..87227c3ce6b89 100644 --- a/src/sinks/util/udp.rs +++ b/src/sinks/util/udp.rs @@ -11,8 +11,8 @@ use snafu::{ResultExt, Snafu}; use tokio::{net::UdpSocket, time::sleep}; use tokio_util::codec::Encoder; use vector_config::configurable_component; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{ByteSize, BytesSent, InternalEventHandle, Protocol, Registered}; +use vector_lib::EstimatedJsonEncodedSizeOf; use super::SinkBuildError; use crate::{ diff --git a/src/sinks/util/unix.rs b/src/sinks/util/unix.rs index 84c1b4746df83..d30d0c2a0a203 100644 --- a/src/sinks/util/unix.rs +++ b/src/sinks/util/unix.rs @@ -7,8 +7,8 @@ use snafu::{ResultExt, Snafu}; use tokio::{net::UnixStream, time::sleep}; use tokio_util::codec::Encoder; use vector_config::configurable_component; -use vector_core::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::json_size::JsonSize; +use vector_lib::{ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ codecs::Transformer, diff --git a/src/sinks/vector/mod.rs b/src/sinks/vector/mod.rs index e3a6b2b1b918a..78b170f38b429 100644 --- a/src/sinks/vector/mod.rs +++ b/src/sinks/vector/mod.rs @@ -45,7 +45,7 @@ mod tests { use http::request::Parts; use hyper::Method; use prost::Message; - use vector_core::{ + use vector_lib::{ config::{init_telemetry, Tags, Telemetry}, event::{BatchNotifier, BatchStatus}, }; diff --git a/src/sinks/vector/sink.rs b/src/sinks/vector/sink.rs index 89f8d93c90b2a..ef965f413431a 100644 --- a/src/sinks/vector/sink.rs +++ b/src/sinks/vector/sink.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use futures::{stream::BoxStream, StreamExt}; use prost::Message; use tower::Service; -use vector_core::{config::telemetry, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::request_metadata::GroupedCountByteSize; +use vector_lib::{config::telemetry, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_stream::{batcher::data::BatchReduce, BatcherSettings, DriverResponse}; use super::service::VectorRequest; diff --git a/src/sinks/webhdfs/config.rs b/src/sinks/webhdfs/config.rs index 05e4df4cbf901..df0d03d9e03ec 100644 --- a/src/sinks/webhdfs/config.rs +++ b/src/sinks/webhdfs/config.rs @@ -2,7 +2,7 @@ use codecs::{encoding::Framer, JsonSerializerConfig, NewlineDelimitedEncoderConf use opendal::{layers::LoggingLayer, services::Webhdfs, Operator}; use tower::ServiceBuilder; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{AcknowledgementsConfig, DataType, Input}, sink::VectorSink, }; diff --git a/src/sinks/webhdfs/integration_tests.rs b/src/sinks/webhdfs/integration_tests.rs index 419c3a7629bd5..935da81f226c5 100644 --- a/src/sinks/webhdfs/integration_tests.rs +++ b/src/sinks/webhdfs/integration_tests.rs @@ -7,7 +7,7 @@ use codecs::{encoding::FramingConfig, TextSerializerConfig}; use futures::{stream, StreamExt}; use opendal::{Entry, Metakey}; use similar_asserts::assert_eq; -use vector_core::event::{Event, LogEvent}; +use vector_lib::event::{Event, LogEvent}; use super::WebHdfsConfig; use crate::{ diff --git a/src/sinks/webhdfs/test.rs b/src/sinks/webhdfs/test.rs index 865980ae42b5b..3e2eed0697d27 100644 --- a/src/sinks/webhdfs/test.rs +++ b/src/sinks/webhdfs/test.rs @@ -1,6 +1,6 @@ use bytes::Bytes; use codecs::{encoding::Framer, JsonSerializerConfig, NewlineDelimitedEncoderConfig}; -use vector_core::partition::Partitioner; +use vector_lib::partition::Partitioner; use vector_lib::request_metadata::GroupedCountByteSize; use super::config::WebHdfsConfig; diff --git a/src/sinks/websocket/sink.rs b/src/sinks/websocket/sink.rs index 93590c6c4ba96..47fcf53f2b3d3 100644 --- a/src/sinks/websocket/sink.rs +++ b/src/sinks/websocket/sink.rs @@ -24,7 +24,7 @@ use tokio_tungstenite::{ WebSocketStream as WsStream, }; use tokio_util::codec::Encoder as _; -use vector_core::{ +use vector_lib::{ internal_event::{ ByteSize, BytesSent, CountByteSize, EventsSent, InternalEventHandle as _, Output, Protocol, }, diff --git a/src/source_sender/mod.rs b/src/source_sender/mod.rs index c13d56e96cabf..59d6e0902315d 100644 --- a/src/source_sender/mod.rs +++ b/src/source_sender/mod.rs @@ -8,8 +8,9 @@ use metrics::{register_histogram, Histogram}; use tracing::Span; use vector_buffers::topology::channel::{self, LimitedReceiver, LimitedSender}; #[cfg(test)] -use vector_core::event::{into_event_stream, EventStatus}; -use vector_core::{ +use vector_lib::event::{into_event_stream, EventStatus}; +use vector_lib::internal_event::{ComponentEventsDropped, UNINTENTIONAL}; +use vector_lib::{ config::{log_schema, SourceOutput}, event::{array, Event, EventArray, EventContainer, EventRef}, internal_event::{ @@ -17,7 +18,6 @@ use vector_core::{ }, ByteSizeOf, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{ComponentEventsDropped, UNINTENTIONAL}; use vrl::value::Value; mod errors; @@ -472,7 +472,7 @@ mod tests { use chrono::{DateTime, Duration}; use rand::{thread_rng, Rng}; use tokio::time::timeout; - use vector_core::event::{LogEvent, Metric, MetricKind, MetricValue, TraceEvent}; + use vector_lib::event::{LogEvent, Metric, MetricKind, MetricValue, TraceEvent}; use vrl::event_path; use super::*; diff --git a/src/sources/amqp.rs b/src/sources/amqp.rs index 64dcbaebe87a2..68333d0f47b98 100644 --- a/src/sources/amqp.rs +++ b/src/sources/amqp.rs @@ -25,7 +25,7 @@ use snafu::Snafu; use std::{io::Cursor, pin::Pin}; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{log_schema, LegacyKey, LogNamespace, SourceAcknowledgementsConfig}, event::Event, EstimatedJsonEncodedSizeOf, @@ -493,8 +493,8 @@ async fn handle_ack(status: BatchStatus, entry: FinalizerEntry) { #[cfg(test)] pub mod test { use lookup::OwnedTargetPath; - use vector_core::schema::Definition; - use vector_core::tls::TlsConfig; + use vector_lib::schema::Definition; + use vector_lib::tls::TlsConfig; use vrl::value::kind::Collection; use super::*; @@ -624,7 +624,7 @@ mod integration_test { use lapin::options::*; use lapin::BasicProperties; use tokio::time::Duration; - use vector_core::config::log_schema; + use vector_lib::config::log_schema; #[tokio::test] async fn amqp_source_create_ok() { diff --git a/src/sources/apache_metrics/mod.rs b/src/sources/apache_metrics/mod.rs index ebcabce4525e1..d44820e70d2a8 100644 --- a/src/sources/apache_metrics/mod.rs +++ b/src/sources/apache_metrics/mod.rs @@ -11,7 +11,7 @@ use serde_with::serde_as; use snafu::ResultExt; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::{metric_tags, EstimatedJsonEncodedSizeOf}; +use vector_lib::{metric_tags, EstimatedJsonEncodedSizeOf}; use crate::{ config::{GenerateConfig, ProxyConfig, SourceConfig, SourceContext, SourceOutput}, @@ -28,7 +28,7 @@ use crate::{ mod parser; pub use parser::ParseError; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; /// Configuration for the `apache_metrics` source. #[serde_as] diff --git a/src/sources/apache_metrics/parser.rs b/src/sources/apache_metrics/parser.rs index a782b718d70a2..1ebc3e3485afe 100644 --- a/src/sources/apache_metrics/parser.rs +++ b/src/sources/apache_metrics/parser.rs @@ -479,8 +479,8 @@ impl error::Error for ParseError { mod test { use chrono::{DateTime, Utc}; use similar_asserts::assert_eq; - use vector_core::metric_tags; use vector_lib::assert_event_data_eq; + use vector_lib::metric_tags; use super::*; use crate::event::metric::{Metric, MetricKind, MetricValue}; diff --git a/src/sources/aws_ecs_metrics/mod.rs b/src/sources/aws_ecs_metrics/mod.rs index 33f919ba084e3..c9dc51073132c 100644 --- a/src/sources/aws_ecs_metrics/mod.rs +++ b/src/sources/aws_ecs_metrics/mod.rs @@ -6,8 +6,8 @@ use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::{config::LogNamespace, EstimatedJsonEncodedSizeOf}; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; +use vector_lib::{config::LogNamespace, EstimatedJsonEncodedSizeOf}; use crate::{ config::{GenerateConfig, SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/aws_ecs_metrics/parser.rs b/src/sources/aws_ecs_metrics/parser.rs index 8dedf726d3458..f4a066d0b712e 100644 --- a/src/sources/aws_ecs_metrics/parser.rs +++ b/src/sources/aws_ecs_metrics/parser.rs @@ -560,8 +560,8 @@ pub(super) fn parse( #[cfg(test)] mod test { use chrono::{offset::TimeZone, DateTime, Timelike, Utc}; - use vector_core::metric_tags; use vector_lib::assert_event_data_eq; + use vector_lib::metric_tags; use super::parse; use crate::event::metric::{Metric, MetricKind, MetricValue}; diff --git a/src/sources/aws_kinesis_firehose/filters.rs b/src/sources/aws_kinesis_firehose/filters.rs index 5c4e566913336..afd3ec507f9f2 100644 --- a/src/sources/aws_kinesis_firehose/filters.rs +++ b/src/sources/aws_kinesis_firehose/filters.rs @@ -4,7 +4,7 @@ use bytes::{Buf, Bytes}; use chrono::Utc; use flate2::read::MultiGzDecoder; use snafu::ResultExt; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vector_lib::internal_event::{BytesReceived, Protocol}; use warp::{http::StatusCode, Filter}; diff --git a/src/sources/aws_kinesis_firehose/handlers.rs b/src/sources/aws_kinesis_firehose/handlers.rs index af1e82a634ff0..0a479f0af63ee 100644 --- a/src/sources/aws_kinesis_firehose/handlers.rs +++ b/src/sources/aws_kinesis_firehose/handlers.rs @@ -9,7 +9,7 @@ use futures::StreamExt; use lookup::{metadata_path, path, PathPrefix}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::FramedRead; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, event::BatchNotifier, EstimatedJsonEncodedSizeOf, diff --git a/src/sources/aws_kinesis_firehose/mod.rs b/src/sources/aws_kinesis_firehose/mod.rs index 3ef3730d67b35..a7df07b4bafe3 100644 --- a/src/sources/aws_kinesis_firehose/mod.rs +++ b/src/sources/aws_kinesis_firehose/mod.rs @@ -5,7 +5,7 @@ use futures::FutureExt; use lookup::owned_value_path; use tracing::Span; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vector_lib::sensitive_string::SensitiveString; use vrl::value::Kind; use warp::Filter; diff --git a/src/sources/aws_s3/mod.rs b/src/sources/aws_s3/mod.rs index 5338ba144bef4..d0dd76f3ee684 100644 --- a/src/sources/aws_s3/mod.rs +++ b/src/sources/aws_s3/mod.rs @@ -9,7 +9,7 @@ use lookup::owned_value_path; use snafu::Snafu; use tokio_util::io::StreamReader; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vrl::value::{kind::Collection, Kind}; use super::util::MultilineConfig; diff --git a/src/sources/aws_s3/sqs.rs b/src/sources/aws_s3/sqs.rs index 1a9154e6daffe..2960a6fecfff9 100644 --- a/src/sources/aws_s3/sqs.rs +++ b/src/sources/aws_s3/sqs.rs @@ -45,8 +45,8 @@ use crate::{ SourceSender, }; use lookup::{metadata_path, path, PathPrefix}; -use vector_core::config::{log_schema, LegacyKey, LogNamespace}; -use vector_core::event::MaybeAsLogMut; +use vector_lib::config::{log_schema, LegacyKey, LogNamespace}; +use vector_lib::event::MaybeAsLogMut; static SUPPORTED_S3_EVENT_VERSION: Lazy = Lazy::new(|| semver::VersionReq::parse("~2").unwrap()); diff --git a/src/sources/aws_sqs/config.rs b/src/sources/aws_sqs/config.rs index 604cb4a6bb3b4..a9cd3b31f613b 100644 --- a/src/sources/aws_sqs/config.rs +++ b/src/sources/aws_sqs/config.rs @@ -3,7 +3,7 @@ use std::num::NonZeroUsize; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::owned_value_path; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vrl::value::Kind; use crate::aws::create_client; diff --git a/src/sources/aws_sqs/source.rs b/src/sources/aws_sqs/source.rs index 28fc9dfc0cdef..c463e38cd7074 100644 --- a/src/sources/aws_sqs/source.rs +++ b/src/sources/aws_sqs/source.rs @@ -8,7 +8,7 @@ use chrono::{DateTime, TimeZone, Utc}; use futures::{FutureExt, StreamExt}; use tokio::{pin, select}; use tracing_futures::Instrument; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vector_lib::finalizer::UnorderedFinalizer; use vector_lib::internal_event::{EventsReceived, Registered}; diff --git a/src/sources/datadog_agent/logs.rs b/src/sources/datadog_agent/logs.rs index 47201917d986f..e9b59f40a71ac 100644 --- a/src/sources/datadog_agent/logs.rs +++ b/src/sources/datadog_agent/logs.rs @@ -6,8 +6,8 @@ use codecs::StreamDecodingError; use http::StatusCode; use lookup::path; use tokio_util::codec::Decoder; -use vector_core::{config::LegacyKey, EstimatedJsonEncodedSizeOf}; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; +use vector_lib::{config::LegacyKey, EstimatedJsonEncodedSizeOf}; use warp::{filters::BoxedFilter, path as warp_path, path::FullPath, reply::Response, Filter}; use crate::{ diff --git a/src/sources/datadog_agent/metrics.rs b/src/sources/datadog_agent/metrics.rs index 8912a2958e081..597eeb0f201bf 100644 --- a/src/sources/datadog_agent/metrics.rs +++ b/src/sources/datadog_agent/metrics.rs @@ -7,12 +7,12 @@ use prost::Message; use serde::{Deserialize, Serialize}; use warp::{filters::BoxedFilter, path, path::FullPath, reply::Response, Filter}; -use vector_core::{ +use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; +use vector_lib::{ event::{DatadogMetricOriginMetadata, EventMetadata}, metrics::AgentDDSketch, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; use crate::{ common::datadog::{DatadogMetricType, DatadogSeriesMetric}, diff --git a/src/sources/datadog_agent/mod.rs b/src/sources/datadog_agent/mod.rs index d95920456b984..1001c5fe040a6 100644 --- a/src/sources/datadog_agent/mod.rs +++ b/src/sources/datadog_agent/mod.rs @@ -31,8 +31,8 @@ use serde::{Deserialize, Serialize}; use snafu::Snafu; use tracing::Span; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; -use vector_core::event::{BatchNotifier, BatchStatus}; +use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::event::{BatchNotifier, BatchStatus}; use vector_lib::internal_event::{EventsReceived, Registered}; use vrl::path::OwnedTargetPath; use vrl::value::Kind; diff --git a/src/sources/datadog_agent/tests.rs b/src/sources/datadog_agent/tests.rs index c6a6fe6341218..9f98f83a0b662 100644 --- a/src/sources/datadog_agent/tests.rs +++ b/src/sources/datadog_agent/tests.rs @@ -19,7 +19,7 @@ use ordered_float::NotNan; use prost::Message; use quickcheck::{Arbitrary, Gen, QuickCheck, TestResult}; use similar_asserts::assert_eq; -use vector_core::{ +use vector_lib::{ config::LogNamespace, event::{metric::TagValue, MetricTags}, metric_tags, diff --git a/src/sources/datadog_agent/traces.rs b/src/sources/datadog_agent/traces.rs index 93f5be5208a69..47ac974307831 100644 --- a/src/sources/datadog_agent/traces.rs +++ b/src/sources/datadog_agent/traces.rs @@ -9,8 +9,8 @@ use prost::Message; use vrl::event_path; use warp::{filters::BoxedFilter, path, path::FullPath, reply::Response, Filter, Rejection, Reply}; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; +use vector_lib::EstimatedJsonEncodedSizeOf; use crate::{ event::{Event, TraceEvent, Value}, diff --git a/src/sources/demo_logs.rs b/src/sources/demo_logs.rs index afe1eba364e60..b98bbd755edd6 100644 --- a/src/sources/demo_logs.rs +++ b/src/sources/demo_logs.rs @@ -13,13 +13,13 @@ use std::task::Poll; use tokio::time::{self, Duration}; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ - config::{LegacyKey, LogNamespace}, - EstimatedJsonEncodedSizeOf, -}; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, }; +use vector_lib::{ + config::{LegacyKey, LogNamespace}, + EstimatedJsonEncodedSizeOf, +}; use vrl::value::Kind; use crate::{ diff --git a/src/sources/dnstap/mod.rs b/src/sources/dnstap/mod.rs index aa57d66bcb635..97cc464853bbc 100644 --- a/src/sources/dnstap/mod.rs +++ b/src/sources/dnstap/mod.rs @@ -25,7 +25,7 @@ use crate::sources::dnstap::schema::DNSTAP_VALUE_PATHS; use dnsmsg_parser::{dns_message, dns_message_parser}; use lookup::lookup_v2::OptionalValuePath; pub use schema::DnstapEventSchema; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, EstimatedJsonEncodedSizeOf, }; @@ -109,15 +109,12 @@ impl DnstapConfig { "protobuf:dnstap.Dnstap".to_string() //content-type for framestream } - pub fn schema_definition( - &self, - log_namespace: LogNamespace, - ) -> vector_core::schema::Definition { + pub fn schema_definition(&self, log_namespace: LogNamespace) -> vector_lib::schema::Definition { let event_schema = DnstapEventSchema; match log_namespace { LogNamespace::Legacy => { - let schema = vector_core::schema::Definition::empty_legacy_namespace(); + let schema = vector_lib::schema::Definition::empty_legacy_namespace(); if self.raw_data_only.unwrap_or(false) { if let Some(message_key) = log_schema().message_key() { @@ -131,7 +128,7 @@ impl DnstapConfig { event_schema.schema_definition(schema) } LogNamespace::Vector => { - let schema = vector_core::schema::Definition::new_with_default_metadata( + let schema = vector_lib::schema::Definition::new_with_default_metadata( Kind::object(Collection::empty()), [log_namespace], ) @@ -397,7 +394,7 @@ mod tests { event.as_mut_log().insert("timestamp", chrono::Utc::now()); let definition = DnstapEventSchema; - let schema = vector_core::schema::Definition::empty_legacy_namespace() + let schema = vector_lib::schema::Definition::empty_legacy_namespace() .with_standard_vector_source_metadata(); definition diff --git a/src/sources/dnstap/parser.rs b/src/sources/dnstap/parser.rs index 0a12f7426443a..ac2c1c0bf4b7b 100644 --- a/src/sources/dnstap/parser.rs +++ b/src/sources/dnstap/parser.rs @@ -35,7 +35,7 @@ use dnstap_proto::{ }; use lookup::lookup_v2::ValuePath; use lookup::PathPrefix; -use vector_core::config::log_schema; +use vector_lib::config::log_schema; use super::{ dns_message::{ diff --git a/src/sources/dnstap/schema.rs b/src/sources/dnstap/schema.rs index 23ce53cdbfd92..3d6919b08cee9 100644 --- a/src/sources/dnstap/schema.rs +++ b/src/sources/dnstap/schema.rs @@ -133,8 +133,8 @@ impl DnstapEventSchema { /// Schema definition for fields stored in the root. fn root_schema_definition( &self, - schema: vector_core::schema::Definition, - ) -> vector_core::schema::Definition { + schema: vector_lib::schema::Definition, + ) -> vector_lib::schema::Definition { schema .optional_field(&DNSTAP_VALUE_PATHS.server_identity, Kind::bytes(), None) .optional_field(&DNSTAP_VALUE_PATHS.server_version, Kind::bytes(), None) @@ -150,8 +150,8 @@ impl DnstapEventSchema { /// Schema definition from the message. pub fn message_schema_definition( &self, - schema: vector_core::schema::Definition, - ) -> vector_core::schema::Definition { + schema: vector_lib::schema::Definition, + ) -> vector_lib::schema::Definition { schema .optional_field(&DNSTAP_VALUE_PATHS.socket_family, Kind::bytes(), None) .optional_field(&DNSTAP_VALUE_PATHS.socket_protocol, Kind::bytes(), None) @@ -177,8 +177,8 @@ impl DnstapEventSchema { /// The schema definition for a dns tap message. pub fn schema_definition( &self, - schema: vector_core::schema::Definition, - ) -> vector_core::schema::Definition { + schema: vector_lib::schema::Definition, + ) -> vector_lib::schema::Definition { self.root_schema_definition(self.message_schema_definition(schema)) } } diff --git a/src/sources/docker_logs/mod.rs b/src/sources/docker_logs/mod.rs index 2cc85ec62724d..a2587b8122ade 100644 --- a/src/sources/docker_logs/mod.rs +++ b/src/sources/docker_logs/mod.rs @@ -21,7 +21,7 @@ use serde_with::serde_as; use tokio::sync::mpsc; use tracing_futures::Instrument; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vector_lib::internal_event::{ ByteSize, BytesReceived, InternalEventHandle as _, Protocol, Registered, }; diff --git a/src/sources/eventstoredb_metrics/mod.rs b/src/sources/eventstoredb_metrics/mod.rs index 2bd0e14c7f1a5..84bc793767a23 100644 --- a/src/sources/eventstoredb_metrics/mod.rs +++ b/src/sources/eventstoredb_metrics/mod.rs @@ -6,11 +6,11 @@ use hyper::{Body, Request}; use serde_with::serde_as; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::EstimatedJsonEncodedSizeOf; +use vector_lib::config::LogNamespace; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, }; +use vector_lib::EstimatedJsonEncodedSizeOf; use self::types::Stats; use crate::{ diff --git a/src/sources/exec/mod.rs b/src/sources/exec/mod.rs index 567b7a6ff131b..fd3ecab3cefe3 100644 --- a/src/sources/exec/mod.rs +++ b/src/sources/exec/mod.rs @@ -22,8 +22,8 @@ use tokio::{ use tokio_stream::wrappers::IntervalStream; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{config::LegacyKey, EstimatedJsonEncodedSizeOf}; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; +use vector_lib::{config::LegacyKey, EstimatedJsonEncodedSizeOf}; use vrl::path::OwnedValuePath; use vrl::value::Kind; @@ -40,7 +40,7 @@ use crate::{ SourceSender, }; use lookup::{owned_value_path, path}; -use vector_core::config::{log_schema, LogNamespace}; +use vector_lib::config::{log_schema, LogNamespace}; #[cfg(test)] mod tests; diff --git a/src/sources/exec/tests.rs b/src/sources/exec/tests.rs index e1f46e078f4a2..df8ac3017a452 100644 --- a/src/sources/exec/tests.rs +++ b/src/sources/exec/tests.rs @@ -3,7 +3,7 @@ use crate::{event::LogEvent, test_util::trace_init}; use bytes::Bytes; use std::ffi::OsStr; use std::io::Cursor; -use vector_core::event::EventMetadata; +use vector_lib::event::EventMetadata; use vrl::value; #[cfg(unix)] diff --git a/src/sources/file.rs b/src/sources/file.rs index c59a1d947efa4..1e1b38d453970 100644 --- a/src/sources/file.rs +++ b/src/sources/file.rs @@ -17,11 +17,11 @@ use snafu::{ResultExt, Snafu}; use tokio::{sync::oneshot, task::spawn_blocking}; use tracing::{Instrument, Span}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::finalizer::OrderedFinalizer; +use vector_lib::{ config::{LegacyKey, LogNamespace}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::finalizer::OrderedFinalizer; use vrl::value::Kind; use super::util::{EncodingConfig, MultilineConfig}; @@ -818,7 +818,7 @@ mod tests { use similar_asserts::assert_eq; use tempfile::tempdir; use tokio::time::{sleep, timeout, Duration}; - use vector_core::schema::Definition; + use vector_lib::schema::Definition; use vrl::value::kind::Collection; use super::*; diff --git a/src/sources/file_descriptors/file_descriptor.rs b/src/sources/file_descriptors/file_descriptor.rs index 908ea1e02a5f5..55767441d7e42 100644 --- a/src/sources/file_descriptors/file_descriptor.rs +++ b/src/sources/file_descriptors/file_descriptor.rs @@ -5,7 +5,7 @@ use codecs::decoding::{DeserializerConfig, FramingConfig}; use indoc::indoc; use lookup::lookup_v2::OptionalValuePath; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::{ config::{GenerateConfig, Resource, SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/file_descriptors/mod.rs b/src/sources/file_descriptors/mod.rs index 24c5fec623860..125cf69e16ede 100644 --- a/src/sources/file_descriptors/mod.rs +++ b/src/sources/file_descriptors/mod.rs @@ -11,14 +11,14 @@ use futures::{channel::mpsc, executor, SinkExt, StreamExt}; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path, OwnedValuePath}; use tokio_util::{codec::FramedRead, io::StreamReader}; use vector_config::NamedComponent; -use vector_core::{ +use vector_lib::internal_event::{ + ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, +}; +use vector_lib::{ config::{LegacyKey, LogNamespace}, event::Event, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{ - ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, -}; use vrl::value::Kind; use crate::{ @@ -200,7 +200,7 @@ async fn process_stream( } } -/// Builds the `vector_core::config::Outputs` for stdin and +/// Builds the `vector_lib::config::Outputs` for stdin and /// file_descriptor sources. fn outputs( log_namespace: LogNamespace, diff --git a/src/sources/file_descriptors/stdin.rs b/src/sources/file_descriptors/stdin.rs index c598758670afc..bf0497942b2de 100644 --- a/src/sources/file_descriptors/stdin.rs +++ b/src/sources/file_descriptors/stdin.rs @@ -3,7 +3,7 @@ use std::io; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::lookup_v2::OptionalValuePath; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::{ config::{Resource, SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/fluent/message.rs b/src/sources/fluent/message.rs index d3746839dd8b6..bb9e3326fd7b8 100644 --- a/src/sources/fluent/message.rs +++ b/src/sources/fluent/message.rs @@ -3,7 +3,7 @@ use std::{collections::BTreeMap, convert::TryInto}; use chrono::{serde::ts_seconds, DateTime, TimeZone, Utc}; use ordered_float::NotNan; use serde::{Deserialize, Serialize}; -use vector_core::event::Value; +use vector_lib::event::Value; /// Fluent msgpack messages can be encoded in one of three ways, each with and /// without options, all using arrays to encode the top-level fields. @@ -229,7 +229,7 @@ mod test { use approx::assert_relative_eq; use quickcheck::quickcheck; - use vector_core::event::Value; + use vector_lib::event::Value; use crate::sources::fluent::message::FluentValue; diff --git a/src/sources/fluent/mod.rs b/src/sources/fluent/mod.rs index 0e1ad42c08ce8..8dd1f23c6b496 100644 --- a/src/sources/fluent/mod.rs +++ b/src/sources/fluent/mod.rs @@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize}; use smallvec::{smallvec, SmallVec}; use tokio_util::codec::Decoder; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; -use vector_core::schema::Definition; +use vector_lib::config::{LegacyKey, LogNamespace}; +use vector_lib::schema::Definition; use vrl::value::kind::Collection; use vrl::value::{Kind, Value}; @@ -638,8 +638,8 @@ mod tests { time::{error::Elapsed, timeout, Duration}, }; use tokio_util::codec::Decoder; - use vector_core::{event::Value, schema::Definition}; use vector_lib::assert_event_data_eq; + use vector_lib::{event::Value, schema::Definition}; use vrl::value::kind::Collection; use super::{message::FluentMessageOptions, *}; @@ -1050,7 +1050,7 @@ mod integration_tests { use futures::Stream; use tokio::time::sleep; - use vector_core::event::{Event, EventStatus}; + use vector_lib::event::{Event, EventStatus}; use crate::{ config::{SourceConfig, SourceContext}, diff --git a/src/sources/gcp_pubsub.rs b/src/sources/gcp_pubsub.rs index 49a402f7e65ca..2dc1b3069fc46 100644 --- a/src/sources/gcp_pubsub.rs +++ b/src/sources/gcp_pubsub.rs @@ -21,7 +21,7 @@ use tonic::{ Code, Request, Status, }; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vector_lib::internal_event::{ ByteSize, BytesReceived, EventsReceived, InternalEventHandle as _, Protocol, Registered, }; @@ -68,7 +68,7 @@ type Finalizer = UnorderedFinalizer>; mod proto { include!(concat!(env!("OUT_DIR"), "/google.pubsub.v1.rs")); - use vector_core::ByteSizeOf; + use vector_lib::ByteSizeOf; impl ByteSizeOf for StreamingPullResponse { fn allocated_bytes(&self) -> usize { @@ -745,7 +745,7 @@ impl Future for Task { #[cfg(test)] mod tests { use lookup::OwnedTargetPath; - use vector_core::schema::Definition; + use vector_lib::schema::Definition; use super::*; diff --git a/src/sources/heroku_logs.rs b/src/sources/heroku_logs.rs index fd728def7b254..1664f887ef9fe 100644 --- a/src/sources/heroku_logs.rs +++ b/src/sources/heroku_logs.rs @@ -18,7 +18,7 @@ use vrl::value::{kind::Collection, Kind}; use warp::http::{HeaderMap, StatusCode}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, }; @@ -410,7 +410,7 @@ mod tests { use futures::Stream; use lookup::{owned_value_path, OwnedTargetPath}; use similar_asserts::assert_eq; - use vector_core::{ + use vector_lib::{ config::LogNamespace, event::{Event, EventStatus, Value}, schema::Definition, diff --git a/src/sources/host_metrics/cgroups.rs b/src/sources/host_metrics/cgroups.rs index 40636cbc3f788..2f88a4f164222 100644 --- a/src/sources/host_metrics/cgroups.rs +++ b/src/sources/host_metrics/cgroups.rs @@ -6,7 +6,7 @@ use tokio::{ fs::{self, File}, io::AsyncReadExt, }; -use vector_core::metric_tags; +use vector_lib::metric_tags; use super::{filter_result_sync, CGroupsConfig, HostMetrics, MetricsBuffer}; use crate::event::MetricTags; @@ -438,7 +438,7 @@ mod tests { use rand::{rngs::ThreadRng, Rng}; use similar_asserts::assert_eq; use tempfile::TempDir; - use vector_core::event::Metric; + use vector_lib::event::Metric; use super::{ super::{ diff --git a/src/sources/host_metrics/cpu.rs b/src/sources/host_metrics/cpu.rs index 108cd6d48c35e..1d7a276845b0f 100644 --- a/src/sources/host_metrics/cpu.rs +++ b/src/sources/host_metrics/cpu.rs @@ -3,7 +3,7 @@ use futures::StreamExt; #[cfg(target_os = "linux")] use heim::cpu::os::linux::CpuTimeExt; use heim::units::time::second; -use vector_core::{event::MetricTags, metric_tags}; +use vector_lib::{event::MetricTags, metric_tags}; use super::{filter_result, HostMetrics}; diff --git a/src/sources/host_metrics/disk.rs b/src/sources/host_metrics/disk.rs index 427125216f387..5c91cbb1faedf 100644 --- a/src/sources/host_metrics/disk.rs +++ b/src/sources/host_metrics/disk.rs @@ -2,7 +2,7 @@ use crate::internal_events::HostMetricsScrapeDetailError; use futures::StreamExt; use heim::units::information::byte; use vector_config::configurable_component; -use vector_core::metric_tags; +use vector_lib::metric_tags; use super::{default_all_devices, example_devices, filter_result, FilterList, HostMetrics}; diff --git a/src/sources/host_metrics/filesystem.rs b/src/sources/host_metrics/filesystem.rs index adb8423b249a2..3c066f7e07992 100644 --- a/src/sources/host_metrics/filesystem.rs +++ b/src/sources/host_metrics/filesystem.rs @@ -3,7 +3,7 @@ use heim::units::information::byte; #[cfg(not(windows))] use heim::units::ratio::ratio; use vector_config::configurable_component; -use vector_core::metric_tags; +use vector_lib::metric_tags; use crate::internal_events::{HostMetricsScrapeDetailError, HostMetricsScrapeFilesystemError}; diff --git a/src/sources/host_metrics/memory.rs b/src/sources/host_metrics/memory.rs index cbb5ce245cbaa..3c439113b5a4a 100644 --- a/src/sources/host_metrics/memory.rs +++ b/src/sources/host_metrics/memory.rs @@ -5,7 +5,7 @@ use heim::memory::os::macos::MemoryExt; #[cfg(not(windows))] use heim::memory::os::SwapExt; use heim::units::information::byte; -use vector_core::event::MetricTags; +use vector_lib::event::MetricTags; use crate::internal_events::HostMetricsScrapeDetailError; diff --git a/src/sources/host_metrics/mod.rs b/src/sources/host_metrics/mod.rs index 6f08abc45e01a..0894e1aa9222b 100644 --- a/src/sources/host_metrics/mod.rs +++ b/src/sources/host_metrics/mod.rs @@ -13,11 +13,11 @@ use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::EstimatedJsonEncodedSizeOf; +use vector_lib::config::LogNamespace; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, Registered, }; +use vector_lib::EstimatedJsonEncodedSizeOf; use crate::{ config::{SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/host_metrics/network.rs b/src/sources/host_metrics/network.rs index 02d38628a8873..158d70fb306d2 100644 --- a/src/sources/host_metrics/network.rs +++ b/src/sources/host_metrics/network.rs @@ -5,7 +5,7 @@ use heim::net::os::linux::IoCountersExt; use heim::net::os::windows::IoCountersExt; use heim::units::information::byte; use vector_config::configurable_component; -use vector_core::metric_tags; +use vector_lib::metric_tags; use crate::internal_events::HostMetricsScrapeDetailError; diff --git a/src/sources/http_client/client.rs b/src/sources/http_client/client.rs index 1f13c1dc1f490..98f805e990e6a 100644 --- a/src/sources/http_client/client.rs +++ b/src/sources/http_client/client.rs @@ -33,7 +33,7 @@ use codecs::{ StreamDecodingError, }; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{log_schema, LogNamespace, SourceOutput}, event::Event, }; diff --git a/src/sources/http_client/integration_tests.rs b/src/sources/http_client/integration_tests.rs index 68e4842ba99d5..256b31aa63713 100644 --- a/src/sources/http_client/integration_tests.rs +++ b/src/sources/http_client/integration_tests.rs @@ -16,7 +16,7 @@ use crate::{ SourceSender, }; use codecs::decoding::DeserializerConfig; -use vector_core::config::log_schema; +use vector_lib::config::log_schema; use super::{ tests::{run_compliance, INTERVAL, TIMEOUT}, diff --git a/src/sources/http_client/tests.rs b/src/sources/http_client/tests.rs index bb97289807fbd..99e12534d36c2 100644 --- a/src/sources/http_client/tests.rs +++ b/src/sources/http_client/tests.rs @@ -6,7 +6,7 @@ use warp::{http::HeaderMap, Filter}; use crate::sources::util::http::HttpMethod; use crate::{serde::default_decoding, serde::default_framing_message_based}; use codecs::decoding::{CharacterDelimitedDecoderOptions, DeserializerConfig, FramingConfig}; -use vector_core::event::Event; +use vector_lib::event::Event; use super::HttpClientConfig; use crate::test_util::{ diff --git a/src/sources/http_server.rs b/src/sources/http_server.rs index 479c02190f6da..a59e6a834cb3b 100644 --- a/src/sources/http_server.rs +++ b/src/sources/http_server.rs @@ -15,7 +15,7 @@ use codecs::{ }; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{DataType, LegacyKey, LogNamespace}, schema::Definition, }; @@ -495,9 +495,9 @@ mod tests { }; use lookup::lookup_v2::OptionalValuePath; use lookup::{event_path, owned_value_path, OwnedTargetPath}; - use vector_core::config::LogNamespace; - use vector_core::event::LogEvent; - use vector_core::schema::Definition; + use vector_lib::config::LogNamespace; + use vector_lib::event::LogEvent; + use vector_lib::schema::Definition; use crate::sources::http_server::HttpMethod; use crate::{ diff --git a/src/sources/internal_logs.rs b/src/sources/internal_logs.rs index 1034a37b508ef..dcb697e7ad726 100644 --- a/src/sources/internal_logs.rs +++ b/src/sources/internal_logs.rs @@ -4,8 +4,8 @@ use futures::{stream, StreamExt}; use lookup::lookup_v2::OptionalValuePath; use lookup::{owned_value_path, path, OwnedValuePath}; use vector_config::configurable_component; -use vector_core::config::log_schema; -use vector_core::{ +use vector_lib::config::log_schema; +use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, }; @@ -206,7 +206,7 @@ mod tests { use futures::Stream; use lookup::OwnedTargetPath; use tokio::time::{sleep, Duration}; - use vector_core::event::Value; + use vector_lib::event::Value; use vrl::value::kind::Collection; use super::*; diff --git a/src/sources/internal_metrics.rs b/src/sources/internal_metrics.rs index fe15e09d57ec2..d17a28d042777 100644 --- a/src/sources/internal_metrics.rs +++ b/src/sources/internal_metrics.rs @@ -6,8 +6,8 @@ use serde_with::serde_as; use tokio::time; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::{config::LogNamespace, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; +use vector_lib::{config::LogNamespace, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ config::{log_schema, SourceConfig, SourceContext, SourceOutput}, @@ -203,7 +203,7 @@ mod tests { use std::collections::BTreeMap; use metrics::{counter, gauge, histogram}; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::{ diff --git a/src/sources/journald.rs b/src/sources/journald.rs index a9d4fb7e9fa8a..3e59a5b472888 100644 --- a/src/sources/journald.rs +++ b/src/sources/journald.rs @@ -29,7 +29,7 @@ use tokio::{ }; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, EstimatedJsonEncodedSizeOf, diff --git a/src/sources/kafka.rs b/src/sources/kafka.rs index e8d5bdf019cfc..49d57878733ac 100644 --- a/src/sources/kafka.rs +++ b/src/sources/kafka.rs @@ -43,11 +43,11 @@ use tokio::{ use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::finalizer::OrderedFinalizer; +use vector_lib::{ config::{LegacyKey, LogNamespace}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::finalizer::OrderedFinalizer; use vrl::value::{kind::Collection, Kind}; use crate::{ @@ -1364,7 +1364,7 @@ impl ConsumerContext for KafkaSourceContext { #[cfg(test)] mod test { use lookup::OwnedTargetPath; - use vector_core::schema::Definition; + use vector_lib::schema::Definition; use super::*; @@ -1532,7 +1532,7 @@ mod integration_test { use stream_cancel::{Trigger, Tripwire}; use tokio::time::sleep; use vector_buffers::topology::channel::BufferReceiver; - use vector_core::event::EventStatus; + use vector_lib::event::EventStatus; use vrl::{event_path, value}; use super::{test::*, *}; diff --git a/src/sources/kubernetes_logs/mod.rs b/src/sources/kubernetes_logs/mod.rs index 9d5632a24aa76..a482b6115bcc6 100644 --- a/src/sources/kubernetes_logs/mod.rs +++ b/src/sources/kubernetes_logs/mod.rs @@ -27,7 +27,7 @@ use lifecycle::Lifecycle; use lookup::{lookup_v2::OptionalTargetPath, owned_value_path, path, OwnedTargetPath}; use serde_with::serde_as; use vector_config::configurable_component; -use vector_core::{config::LegacyKey, config::LogNamespace, EstimatedJsonEncodedSizeOf}; +use vector_lib::{config::LegacyKey, config::LogNamespace, EstimatedJsonEncodedSizeOf}; use vector_lib::{ internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}, TimeZone, @@ -1047,7 +1047,7 @@ fn prepare_label_selector(selector: &str) -> String { mod tests { use lookup::{owned_value_path, OwnedTargetPath}; use similar_asserts::assert_eq; - use vector_core::{config::LogNamespace, schema::Definition}; + use vector_lib::{config::LogNamespace, schema::Definition}; use vrl::value::{kind::Collection, Kind}; use crate::config::SourceConfig; diff --git a/src/sources/kubernetes_logs/namespace_metadata_annotator.rs b/src/sources/kubernetes_logs/namespace_metadata_annotator.rs index ab0ffe0e5c7c5..084dfa0593344 100644 --- a/src/sources/kubernetes_logs/namespace_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/namespace_metadata_annotator.rs @@ -7,7 +7,7 @@ use kube::runtime::reflector::{store::Store, ObjectRef}; use lookup::lookup_v2::OptionalTargetPath; use lookup::{lookup_v2::ValuePath, owned_value_path, path, OwnedTargetPath}; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use crate::event::{Event, LogEvent}; diff --git a/src/sources/kubernetes_logs/node_metadata_annotator.rs b/src/sources/kubernetes_logs/node_metadata_annotator.rs index 23e75d3c86f17..7e13cf5129ddd 100644 --- a/src/sources/kubernetes_logs/node_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/node_metadata_annotator.rs @@ -8,7 +8,7 @@ use kube::runtime::reflector::{store::Store, ObjectRef}; use lookup::lookup_v2::OptionalTargetPath; use lookup::{lookup_v2::ValuePath, owned_value_path, path, OwnedTargetPath}; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use super::Config; diff --git a/src/sources/kubernetes_logs/parser/cri.rs b/src/sources/kubernetes_logs/parser/cri.rs index 044c5a0463c9b..ee1d5f18a65ab 100644 --- a/src/sources/kubernetes_logs/parser/cri.rs +++ b/src/sources/kubernetes_logs/parser/cri.rs @@ -1,7 +1,7 @@ use chrono::{DateTime, Utc}; use derivative::Derivative; use lookup::path; -use vector_core::config::{log_schema, LegacyKey, LogNamespace}; +use vector_lib::config::{log_schema, LegacyKey, LogNamespace}; use vector_lib::conversion; use crate::sources::kubernetes_logs::transform_utils::get_message_path; diff --git a/src/sources/kubernetes_logs/parser/docker.rs b/src/sources/kubernetes_logs/parser/docker.rs index df29f444c68cb..ee19343f44993 100644 --- a/src/sources/kubernetes_logs/parser/docker.rs +++ b/src/sources/kubernetes_logs/parser/docker.rs @@ -3,7 +3,7 @@ use chrono::{DateTime, Utc}; use lookup::{path, OwnedTargetPath}; use serde_json::Value as JsonValue; use snafu::{OptionExt, ResultExt, Snafu}; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use crate::sources::kubernetes_logs::transform_utils::get_message_path; use crate::{ diff --git a/src/sources/kubernetes_logs/parser/mod.rs b/src/sources/kubernetes_logs/parser/mod.rs index bcfa1923a3bb0..263f26c069ead 100644 --- a/src/sources/kubernetes_logs/parser/mod.rs +++ b/src/sources/kubernetes_logs/parser/mod.rs @@ -2,7 +2,7 @@ mod cri; mod docker; mod test_util; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::sources::kubernetes_logs::transform_utils::get_message_path; use crate::{ diff --git a/src/sources/kubernetes_logs/parser/test_util.rs b/src/sources/kubernetes_logs/parser/test_util.rs index fb89b88d7ab65..25657fe7a1cc6 100644 --- a/src/sources/kubernetes_logs/parser/test_util.rs +++ b/src/sources/kubernetes_logs/parser/test_util.rs @@ -3,7 +3,7 @@ use similar_asserts::assert_eq; use chrono::{DateTime, Utc}; use lookup::{event_path, metadata_path}; -use vector_core::{config::LogNamespace, event}; +use vector_lib::{config::LogNamespace, event}; use vrl::value; use vrl::value::Value; diff --git a/src/sources/kubernetes_logs/partial_events_merger.rs b/src/sources/kubernetes_logs/partial_events_merger.rs index 1151993b9050b..d3effb22c1c62 100644 --- a/src/sources/kubernetes_logs/partial_events_merger.rs +++ b/src/sources/kubernetes_logs/partial_events_merger.rs @@ -5,7 +5,7 @@ use futures::{Stream, StreamExt}; use lookup::OwnedTargetPath; use std::collections::HashMap; use std::time::{Duration, Instant}; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vector_stream::expiration_map::{map_with_expiration, Emitter}; use vrl::owned_value_path; @@ -155,7 +155,7 @@ fn merge_partial_events_with_custom_expiration( #[cfg(test)] mod test { use super::*; - use vector_core::event::LogEvent; + use vector_lib::event::LogEvent; use vrl::value; #[tokio::test] diff --git a/src/sources/kubernetes_logs/pod_metadata_annotator.rs b/src/sources/kubernetes_logs/pod_metadata_annotator.rs index 04f253b16a59e..7cbdeefd708b6 100644 --- a/src/sources/kubernetes_logs/pod_metadata_annotator.rs +++ b/src/sources/kubernetes_logs/pod_metadata_annotator.rs @@ -12,7 +12,7 @@ use lookup::{ owned_value_path, path, OwnedTargetPath, }; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use super::{ path_helpers::{parse_log_file_path, LogFileInfo}, diff --git a/src/sources/kubernetes_logs/transform_utils/mod.rs b/src/sources/kubernetes_logs/transform_utils/mod.rs index 0a0bef487cd09..307d0f72d6fa8 100644 --- a/src/sources/kubernetes_logs/transform_utils/mod.rs +++ b/src/sources/kubernetes_logs/transform_utils/mod.rs @@ -1,4 +1,4 @@ -use vector_core::config::{log_schema, LogNamespace}; +use vector_lib::config::{log_schema, LogNamespace}; use vrl::owned_value_path; use vrl::path::OwnedTargetPath; diff --git a/src/sources/logstash.rs b/src/sources/logstash.rs index ec3a038bd9739..59739ef5b0681 100644 --- a/src/sources/logstash.rs +++ b/src/sources/logstash.rs @@ -14,7 +14,7 @@ use smallvec::{smallvec, SmallVec}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::Decoder; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, schema::Definition, }; diff --git a/src/sources/mod.rs b/src/sources/mod.rs index 332dccd7f5e82..cb23446a98217 100644 --- a/src/sources/mod.rs +++ b/src/sources/mod.rs @@ -86,7 +86,7 @@ pub mod vector; pub mod util; -pub use vector_core::source::Source; +pub use vector_lib::source::Source; /// Common build errors #[derive(Debug, Snafu)] diff --git a/src/sources/mongodb_metrics/mod.rs b/src/sources/mongodb_metrics/mod.rs index 6c0798ef2278f..d39ce6dbca91d 100644 --- a/src/sources/mongodb_metrics/mod.rs +++ b/src/sources/mongodb_metrics/mod.rs @@ -16,7 +16,7 @@ use snafu::{ResultExt, Snafu}; use tokio::time; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::{metric_tags, ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::{metric_tags, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ config::{SourceConfig, SourceContext, SourceOutput}, @@ -29,7 +29,7 @@ use crate::{ mod types; use types::{CommandBuildInfo, CommandIsMaster, CommandServerStatus, NodeType}; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; macro_rules! tags { ($tags:expr) => { $tags.clone() }; diff --git a/src/sources/nats.rs b/src/sources/nats.rs index d6654846e23df..a8cf1730a5026 100644 --- a/src/sources/nats.rs +++ b/src/sources/nats.rs @@ -5,13 +5,13 @@ use lookup::{lookup_v2::OptionalValuePath, owned_value_path}; use snafu::{ResultExt, Snafu}; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ - config::{LegacyKey, LogNamespace}, - EstimatedJsonEncodedSizeOf, -}; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, EventsReceived, InternalEventHandle as _, Protocol, }; +use vector_lib::{ + config::{LegacyKey, LogNamespace}, + EstimatedJsonEncodedSizeOf, +}; use vrl::value::Kind; use crate::{ @@ -271,7 +271,7 @@ mod tests { #![allow(clippy::print_stdout)] //tests use lookup::{owned_value_path, OwnedTargetPath}; - use vector_core::schema::Definition; + use vector_lib::schema::Definition; use vrl::value::{kind::Collection, Kind}; use super::*; @@ -346,7 +346,7 @@ mod integration_tests { #![allow(clippy::print_stdout)] //tests use bytes::Bytes; - use vector_core::config::log_schema; + use vector_lib::config::log_schema; use super::*; use crate::nats::{NatsAuthCredentialsFile, NatsAuthNKey, NatsAuthToken, NatsAuthUserPassword}; diff --git a/src/sources/nginx_metrics/mod.rs b/src/sources/nginx_metrics/mod.rs index b58c3e7d5416f..d010d8dbc7515 100644 --- a/src/sources/nginx_metrics/mod.rs +++ b/src/sources/nginx_metrics/mod.rs @@ -13,7 +13,7 @@ use snafu::{ResultExt, Snafu}; use tokio::time; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::{metric_tags, EstimatedJsonEncodedSizeOf}; +use vector_lib::{metric_tags, EstimatedJsonEncodedSizeOf}; use crate::{ config::{SourceConfig, SourceContext, SourceOutput}, @@ -28,7 +28,7 @@ use crate::{ pub mod parser; use parser::NginxStubStatus; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; macro_rules! counter { ($value:expr) => { diff --git a/src/sources/opentelemetry/grpc.rs b/src/sources/opentelemetry/grpc.rs index 06c400626ea6b..1fb04ca7d4748 100644 --- a/src/sources/opentelemetry/grpc.rs +++ b/src/sources/opentelemetry/grpc.rs @@ -3,12 +3,12 @@ use opentelemetry_proto::proto::collector::logs::v1::{ logs_service_server::LogsService, ExportLogsServiceRequest, ExportLogsServiceResponse, }; use tonic::{Request, Response, Status}; -use vector_core::{ +use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; +use vector_lib::{ config::LogNamespace, event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; use crate::{ internal_events::{EventsReceived, StreamClosedError}, diff --git a/src/sources/opentelemetry/http.rs b/src/sources/opentelemetry/http.rs index 8d914fb046281..86989f0efd55d 100644 --- a/src/sources/opentelemetry/http.rs +++ b/src/sources/opentelemetry/http.rs @@ -9,14 +9,14 @@ use opentelemetry_proto::proto::collector::logs::v1::{ use prost::Message; use snafu::Snafu; use tracing::Span; -use vector_core::{ +use vector_lib::internal_event::{ + ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Registered, +}; +use vector_lib::{ config::LogNamespace, event::{BatchNotifier, BatchStatus}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{ - ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Registered, -}; use warp::{filters::BoxedFilter, reject::Rejection, reply::Response, Filter, Reply}; use crate::{ diff --git a/src/sources/opentelemetry/mod.rs b/src/sources/opentelemetry/mod.rs index 24624ac470efb..c532577e26847 100644 --- a/src/sources/opentelemetry/mod.rs +++ b/src/sources/opentelemetry/mod.rs @@ -19,11 +19,11 @@ use opentelemetry_proto::convert::{ use opentelemetry_proto::proto::collector::logs::v1::logs_service_server::LogsServiceServer; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::internal_event::{BytesReceived, EventsReceived, Protocol}; +use vector_lib::{ config::{log_schema, LegacyKey, LogNamespace}, schema::Definition, }; -use vector_lib::internal_event::{BytesReceived, EventsReceived, Protocol}; use vrl::value::{kind::Collection, Kind}; use self::{ diff --git a/src/sources/opentelemetry/tests.rs b/src/sources/opentelemetry/tests.rs index fc538efad199d..30db2bbcfd264 100644 --- a/src/sources/opentelemetry/tests.rs +++ b/src/sources/opentelemetry/tests.rs @@ -12,7 +12,7 @@ use similar_asserts::assert_eq; use std::collections::BTreeMap; use std::sync::Arc; use tonic::Request; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vrl::value; use crate::config::OutputId; diff --git a/src/sources/postgresql_metrics.rs b/src/sources/postgresql_metrics.rs index 64bef39a5eaa4..9ab9de3613ad8 100644 --- a/src/sources/postgresql_metrics.rs +++ b/src/sources/postgresql_metrics.rs @@ -26,12 +26,12 @@ use tokio_postgres::{ }; use tokio_stream::wrappers::IntervalStream; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::{metric_tags, ByteSizeOf, EstimatedJsonEncodedSizeOf}; +use vector_lib::config::LogNamespace; use vector_lib::{ internal_event::{CountByteSize, InternalEventHandle as _, Registered}, json_size::JsonSize, }; +use vector_lib::{metric_tags, ByteSizeOf, EstimatedJsonEncodedSizeOf}; use crate::{ config::{SourceConfig, SourceContext, SourceOutput}, diff --git a/src/sources/prometheus/parser.rs b/src/sources/prometheus/parser.rs index 4fe8ea4e3131c..9f7b4a64904f0 100644 --- a/src/sources/prometheus/parser.rs +++ b/src/sources/prometheus/parser.rs @@ -137,8 +137,8 @@ mod test { use chrono::{TimeZone, Timelike, Utc}; use once_cell::sync::Lazy; use similar_asserts::assert_eq; - use vector_core::metric_tags; use vector_lib::assert_event_data_eq; + use vector_lib::metric_tags; use super::*; use crate::event::metric::{Metric, MetricKind, MetricValue}; @@ -658,7 +658,7 @@ mod test { "http_request_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ + buckets: vector_lib::buckets![ 0.05 => 24054, 0.1 => 9390, 0.2 => 66948, 0.5 => 28997, 1.0 => 4599 ], count: 144320, @@ -686,7 +686,7 @@ mod test { "duration", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![1.0 => 133988], + buckets: vector_lib::buckets![1.0 => 133988], count: 144320, sum: 53423.0, }, @@ -713,7 +713,7 @@ mod test { "duration", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![1.0 => 2000, 10.0 => 0], + buckets: vector_lib::buckets![1.0 => 2000, 10.0 => 0], count: 2000, sum: 2000.0, }, @@ -773,7 +773,7 @@ mod test { Ok(vec![ Metric::new( "gitlab_runner_job_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ + buckets: vector_lib::buckets![ 30.0 => 327, 60.0 => 147, 300.0 => 61, @@ -793,7 +793,7 @@ mod test { .with_timestamp(Some(*TIMESTAMP)), Metric::new( "gitlab_runner_job_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ + buckets: vector_lib::buckets![ 30.0 => 1, 60.0 => 0, 300.0 => 0, @@ -813,7 +813,7 @@ mod test { .with_timestamp(Some(*TIMESTAMP)), Metric::new( "gitlab_runner_job_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ + buckets: vector_lib::buckets![ 30.0 => 285, 60.0 => 880, 300.0 => 1906, 600.0 => 80, 1800.0 => 101, 3600.0 => 3, 7200.0 => 0, 10800.0 => 0, 18000.0 => 0, 36000.0 => 0 ], @@ -857,7 +857,7 @@ mod test { "rpc_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![ + quantiles: vector_lib::quantiles![ 0.01 => 3102.0, 0.05 => 3272.0, 0.5 => 4773.0, @@ -874,7 +874,7 @@ mod test { "go_gc_duration_seconds", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![ + quantiles: vector_lib::quantiles![ 0.0 => 0.009460965, 0.25 => 0.009793382, 0.5 => 0.009870205, diff --git a/src/sources/prometheus/remote_write.rs b/src/sources/prometheus/remote_write.rs index dcec68ade1e30..54b568c381b98 100644 --- a/src/sources/prometheus/remote_write.rs +++ b/src/sources/prometheus/remote_write.rs @@ -4,7 +4,7 @@ use bytes::Bytes; use prometheus_parser::proto; use prost::Message; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use warp::http::{HeaderMap, StatusCode}; use super::parser; @@ -146,7 +146,7 @@ impl HttpSource for RemoteWriteSource { #[cfg(test)] mod test { use chrono::{SubsecRound as _, Utc}; - use vector_core::{ + use vector_lib::{ event::{EventStatus, Metric, MetricKind, MetricValue}, metric_tags, }; @@ -244,7 +244,7 @@ mod test { "histogram_3", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![ 2.3 => 11, 4.2 => 85 ], + buckets: vector_lib::buckets![ 2.3 => 11, 4.2 => 85 ], count: 96, sum: 156.2, }, @@ -255,7 +255,7 @@ mod test { "summary_4", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![ 0.1 => 1.2, 0.5 => 3.6, 0.9 => 5.2 ], + quantiles: vector_lib::quantiles![ 0.1 => 1.2, 0.5 => 3.6, 0.9 => 5.2 ], count: 23, sum: 8.6, }, diff --git a/src/sources/prometheus/scrape.rs b/src/sources/prometheus/scrape.rs index 2d6135348a198..62cf5bd10e600 100644 --- a/src/sources/prometheus/scrape.rs +++ b/src/sources/prometheus/scrape.rs @@ -7,7 +7,7 @@ use http::{response::Parts, Uri}; use serde_with::serde_as; use snafu::{ResultExt, Snafu}; use vector_config::configurable_component; -use vector_core::{config::LogNamespace, event::Event}; +use vector_lib::{config::LogNamespace, event::Event}; use super::parser; use crate::sources::util::http::HttpMethod; @@ -534,7 +534,7 @@ mod test { .await; assert!(!events.is_empty()); - let metrics: Vec = events + let metrics: Vec = events .into_iter() .map(|event| event.into_metric()) .collect(); diff --git a/src/sources/redis/mod.rs b/src/sources/redis/mod.rs index 568a84701268c..066ec8ddc8f83 100644 --- a/src/sources/redis/mod.rs +++ b/src/sources/redis/mod.rs @@ -9,13 +9,13 @@ use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path, OwnedValuePat use snafu::{ResultExt, Snafu}; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ - config::{LegacyKey, LogNamespace}, - EstimatedJsonEncodedSizeOf, -}; use vector_lib::internal_event::{ ByteSize, BytesReceived, CountByteSize, InternalEventHandle as _, Protocol, Registered, }; +use vector_lib::{ + config::{LegacyKey, LogNamespace}, + EstimatedJsonEncodedSizeOf, +}; use vrl::value::Kind; use crate::{ diff --git a/src/sources/socket/mod.rs b/src/sources/socket/mod.rs index 896d1f374b968..d62b3d57d6ce6 100644 --- a/src/sources/socket/mod.rs +++ b/src/sources/socket/mod.rs @@ -6,7 +6,7 @@ mod unix; use codecs::decoding::DeserializerConfig; use lookup::{lookup_v2::OptionalValuePath, owned_value_path}; use vector_config::configurable_component; -use vector_core::config::{log_schema, LegacyKey, LogNamespace}; +use vector_lib::config::{log_schema, LegacyKey, LogNamespace}; use vrl::value::{kind::Collection, Kind}; #[cfg(unix)] @@ -343,7 +343,7 @@ mod test { task::JoinHandle, time::{timeout, Duration, Instant}, }; - use vector_core::event::EventContainer; + use vector_lib::event::EventContainer; use vrl::btreemap; use vrl::value; use vrl::value::Value; diff --git a/src/sources/socket/tcp.rs b/src/sources/socket/tcp.rs index 1c0fb4574b101..d3d1a9c5f849b 100644 --- a/src/sources/socket/tcp.rs +++ b/src/sources/socket/tcp.rs @@ -6,7 +6,7 @@ use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; use serde_with::serde_as; use smallvec::SmallVec; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use crate::{ codecs::Decoder, diff --git a/src/sources/socket/udp.rs b/src/sources/socket/udp.rs index 4add14a1694e8..e44e5abc3cdd7 100644 --- a/src/sources/socket/udp.rs +++ b/src/sources/socket/udp.rs @@ -9,11 +9,11 @@ use listenfd::ListenFd; use lookup::{lookup_v2::OptionalValuePath, owned_value_path, path}; use tokio_util::codec::FramedRead; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; +use vector_lib::{ config::{LegacyKey, LogNamespace}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; use crate::{ codecs::Decoder, diff --git a/src/sources/socket/unix.rs b/src/sources/socket/unix.rs index 52a0b362dd6c2..3b697b80210c1 100644 --- a/src/sources/socket/unix.rs +++ b/src/sources/socket/unix.rs @@ -5,7 +5,7 @@ use chrono::Utc; use codecs::decoding::{DeserializerConfig, FramingConfig}; use lookup::{lookup_v2::OptionalValuePath, path}; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vector_lib::shutdown::ShutdownSignal; use crate::{ diff --git a/src/sources/splunk_hec/acknowledgements.rs b/src/sources/splunk_hec/acknowledgements.rs index 644bd2eecea03..87075d5247f20 100644 --- a/src/sources/splunk_hec/acknowledgements.rs +++ b/src/sources/splunk_hec/acknowledgements.rs @@ -283,7 +283,7 @@ mod tests { use std::num::NonZeroU64; use tokio::{time, time::sleep}; - use vector_core::event::{BatchNotifier, EventFinalizer, EventStatus}; + use vector_lib::event::{BatchNotifier, EventFinalizer, EventStatus}; use super::{Channel, HecAcknowledgementsConfig, IndexerAcknowledgement}; use crate::shutdown::ShutdownSignal; diff --git a/src/sources/splunk_hec/mod.rs b/src/sources/splunk_hec/mod.rs index 1326cb48a234b..7b358df13443b 100644 --- a/src/sources/splunk_hec/mod.rs +++ b/src/sources/splunk_hec/mod.rs @@ -17,14 +17,14 @@ use serde_json::{de::Read as JsonRead, Deserializer, Value as JsonValue}; use snafu::Snafu; use tracing::Span; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; +use vector_lib::sensitive_string::SensitiveString; +use vector_lib::{ config::{LegacyKey, LogNamespace}, event::BatchNotifier, schema::meaning, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; -use vector_lib::sensitive_string::SensitiveString; use vrl::value::{kind::Collection, Kind}; use warp::{filters::BoxedFilter, path, reject::Rejection, reply::Response, Filter, Reply}; @@ -182,7 +182,7 @@ impl SourceConfig for SplunkConfig { let schema_definition = match log_namespace { LogNamespace::Legacy => { - let definition = vector_core::schema::Definition::empty_legacy_namespace() + let definition = vector_lib::schema::Definition::empty_legacy_namespace() .with_event_field( &owned_value_path!("line"), Kind::object(Collection::empty()) @@ -201,7 +201,7 @@ impl SourceConfig for SplunkConfig { definition } } - LogNamespace::Vector => vector_core::schema::Definition::new_with_default_metadata( + LogNamespace::Vector => vector_lib::schema::Definition::new_with_default_metadata( Kind::bytes().or_object(Collection::empty()), [log_namespace], ), @@ -1213,8 +1213,8 @@ mod tests { use futures_util::Stream; use reqwest::{RequestBuilder, Response}; use serde::Deserialize; - use vector_core::{event::EventStatus, schema::Definition}; use vector_lib::sensitive_string::SensitiveString; + use vector_lib::{event::EventStatus, schema::Definition}; use vrl::path::PathPrefix; use super::*; diff --git a/src/sources/statsd/mod.rs b/src/sources/statsd/mod.rs index df9227a3be956..8f4090c1e1a03 100644 --- a/src/sources/statsd/mod.rs +++ b/src/sources/statsd/mod.rs @@ -14,8 +14,8 @@ use serde_with::serde_as; use smallvec::{smallvec, SmallVec}; use tokio_util::udp::UdpFramed; use vector_config::configurable_component; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _, Registered}; +use vector_lib::EstimatedJsonEncodedSizeOf; use self::parser::ParseError; use super::util::net::{try_bind_udp_socket, SocketListenAddr, TcpNullAcker, TcpSource}; @@ -41,7 +41,7 @@ mod unix; use parser::parse; #[cfg(unix)] use unix::{statsd_unix, UnixConfig}; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; /// Configuration for the `statsd` source. #[configurable_component(source("statsd", "Collect metrics emitted by the StatsD aggregator."))] @@ -341,7 +341,7 @@ mod test { net::UdpSocket, time::{sleep, Duration, Instant}, }; - use vector_core::{ + use vector_lib::{ config::ComponentKey, event::{metric::TagValue, EventContainer}, }; diff --git a/src/sources/statsd/parser.rs b/src/sources/statsd/parser.rs index 8696726177dc2..a5c6f46c0d5a9 100644 --- a/src/sources/statsd/parser.rs +++ b/src/sources/statsd/parser.rs @@ -68,7 +68,7 @@ pub fn parse(packet: &str) -> Result { let val: f64 = parts[0].parse()?; Metric::new( name, MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![convert_to_base_units(unit, val) => sample_rate as u32], + samples: vector_lib::samples![convert_to_base_units(unit, val) => sample_rate as u32], statistic: convert_to_statistic(unit), }, ).with_tags(tags) @@ -215,8 +215,8 @@ impl From for ParseError { #[cfg(test)] mod test { - use vector_core::{event::metric::TagValue, metric_tags}; use vector_lib::assert_event_data_eq; + use vector_lib::{event::metric::TagValue, metric_tags}; use super::{parse, sanitize_key, sanitize_sampling}; use crate::event::metric::{Metric, MetricKind, MetricValue, StatisticKind}; @@ -301,7 +301,7 @@ mod test { "glork", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![0.320 => 10], + samples: vector_lib::samples![0.320 => 10], statistic: StatisticKind::Histogram }, )), @@ -316,7 +316,7 @@ mod test { "glork", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![320.0 => 10], + samples: vector_lib::samples![320.0 => 10], statistic: StatisticKind::Histogram }, ) @@ -336,7 +336,7 @@ mod test { "glork", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![320.0 => 10], + samples: vector_lib::samples![320.0 => 10], statistic: StatisticKind::Summary }, ) diff --git a/src/sources/syslog.rs b/src/sources/syslog.rs index 7ab6c5586fa3b..36a50291d80f9 100644 --- a/src/sources/syslog.rs +++ b/src/sources/syslog.rs @@ -14,7 +14,7 @@ use lookup::{lookup_v2::OptionalValuePath, path, OwnedValuePath}; use smallvec::SmallVec; use tokio_util::udp::UdpFramed; use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vrl::event_path; #[cfg(unix)] @@ -448,8 +448,8 @@ mod test { use serde::Deserialize; use tokio::time::{sleep, Duration, Instant}; use tokio_util::codec::BytesCodec; - use vector_core::{config::ComponentKey, schema::Definition}; use vector_lib::assert_event_data_eq; + use vector_lib::{config::ComponentKey, schema::Definition}; use vrl::value::{kind::Collection, Kind, Value}; use super::*; diff --git a/src/sources/util/framestream.rs b/src/sources/util/framestream.rs index 48555cc908a9e..0583c0413cf4b 100644 --- a/src/sources/util/framestream.rs +++ b/src/sources/util/framestream.rs @@ -603,7 +603,7 @@ mod test { time::{Duration, Instant}, }; use tokio_util::codec::{length_delimited, Framed}; - use vector_core::config::{LegacyKey, LogNamespace}; + use vector_lib::config::{LegacyKey, LogNamespace}; use super::{ build_framestream_unix_source, spawn_event_handling_tasks, ControlField, ControlHeader, diff --git a/src/sources/util/http/prelude.rs b/src/sources/util/http/prelude.rs index 3d96d1971c2f2..42482ef00aea4 100644 --- a/src/sources/util/http/prelude.rs +++ b/src/sources/util/http/prelude.rs @@ -1,11 +1,11 @@ use std::{collections::HashMap, convert::TryFrom, fmt, net::SocketAddr}; -use vector_core::EstimatedJsonEncodedSizeOf; +use vector_lib::EstimatedJsonEncodedSizeOf; use async_trait::async_trait; use bytes::Bytes; use futures::{FutureExt, TryFutureExt}; use tracing::Span; -use vector_core::{ +use vector_lib::{ config::SourceAcknowledgementsConfig, event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event}, }; diff --git a/src/sources/util/http/query.rs b/src/sources/util/http/query.rs index 59a0bcb02c117..53dbf4fbf51c8 100644 --- a/src/sources/util/http/query.rs +++ b/src/sources/util/http/query.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use lookup::path; -use vector_core::{ +use vector_lib::{ config::{LegacyKey, LogNamespace}, event::Event, }; diff --git a/src/sources/util/http_client.rs b/src/sources/util/http_client.rs index 2ec764f47b859..bc460851769c1 100644 --- a/src/sources/util/http_client.rs +++ b/src/sources/util/http_client.rs @@ -27,8 +27,8 @@ use crate::{ tls::TlsSettings, SourceSender, }; -use vector_core::{config::proxy::ProxyConfig, event::Event, EstimatedJsonEncodedSizeOf}; use vector_lib::shutdown::ShutdownSignal; +use vector_lib::{config::proxy::ProxyConfig, event::Event, EstimatedJsonEncodedSizeOf}; /// Contains the inputs generic to any http client. pub(crate) struct GenericHttpClientInputs { diff --git a/src/sources/util/message_decoding.rs b/src/sources/util/message_decoding.rs index b1fdece0264a2..255d7391e2c76 100644 --- a/src/sources/util/message_decoding.rs +++ b/src/sources/util/message_decoding.rs @@ -5,10 +5,10 @@ use chrono::{DateTime, Utc}; use codecs::StreamDecodingError; use lookup::{metadata_path, path, PathPrefix}; use tokio_util::codec::Decoder as _; -use vector_core::{config::LogNamespace, EstimatedJsonEncodedSizeOf}; use vector_lib::internal_event::{ CountByteSize, EventsReceived, InternalEventHandle as _, Registered, }; +use vector_lib::{config::LogNamespace, EstimatedJsonEncodedSizeOf}; use crate::{codecs::Decoder, config::log_schema, event::BatchNotifier, event::Event}; diff --git a/src/sources/util/mod.rs b/src/sources/util/mod.rs index db8660fb05f94..779f42f149f32 100644 --- a/src/sources/util/mod.rs +++ b/src/sources/util/mod.rs @@ -74,8 +74,8 @@ pub use self::message_decoding::decode_message; #[cfg(any(feature = "sources-statsd", feature = "sources-datadog_agent"))] pub fn extract_tag_key_and_value>( tag_chunk: S, -) -> (String, vector_core::event::metric::TagValue) { - use vector_core::event::metric::TagValue; +) -> (String, vector_lib::event::metric::TagValue) { + use vector_lib::event::metric::TagValue; let tag_chunk = tag_chunk.as_ref(); diff --git a/src/sources/util/net/tcp/mod.rs b/src/sources/util/net/tcp/mod.rs index d72b8dd27d878..c9d049f224d7b 100644 --- a/src/sources/util/net/tcp/mod.rs +++ b/src/sources/util/net/tcp/mod.rs @@ -17,11 +17,11 @@ use tokio::{ }; use tokio_util::codec::{Decoder, FramedRead}; use tracing::Instrument; -use vector_core::{ +use vector_lib::finalization::AddBatchNotifier; +use vector_lib::{ config::{LegacyKey, LogNamespace, SourceAcknowledgementsConfig}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::finalization::AddBatchNotifier; use vrl::value::Value; use self::request_limiter::RequestLimiter; diff --git a/src/sources/util/unix_datagram.rs b/src/sources/util/unix_datagram.rs index f452dddf334d1..bc9371e06b109 100644 --- a/src/sources/util/unix_datagram.rs +++ b/src/sources/util/unix_datagram.rs @@ -6,8 +6,8 @@ use futures::StreamExt; use tokio::net::UnixDatagram; use tokio_util::codec::FramedRead; use tracing::field; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; +use vector_lib::EstimatedJsonEncodedSizeOf; use crate::{ codecs::Decoder, diff --git a/src/sources/util/unix_stream.rs b/src/sources/util/unix_stream.rs index 9a035b835d58e..8c1712477063d 100644 --- a/src/sources/util/unix_stream.rs +++ b/src/sources/util/unix_stream.rs @@ -11,8 +11,8 @@ use tokio::{ use tokio_stream::wrappers::UnixListenerStream; use tokio_util::codec::FramedRead; use tracing::{field, Instrument}; -use vector_core::EstimatedJsonEncodedSizeOf; use vector_lib::internal_event::{ByteSize, BytesReceived, InternalEventHandle as _, Protocol}; +use vector_lib::EstimatedJsonEncodedSizeOf; use super::AfterReadExt; use crate::{ diff --git a/src/sources/vector/mod.rs b/src/sources/vector/mod.rs index 45fdd5113e7dd..5780aff0638e4 100644 --- a/src/sources/vector/mod.rs +++ b/src/sources/vector/mod.rs @@ -6,12 +6,12 @@ use codecs::NativeDeserializerConfig; use futures::TryFutureExt; use tonic::{Request, Response, Status}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; +use vector_lib::{ config::LogNamespace, event::{BatchNotifier, BatchStatus, BatchStatusReceiver, Event}, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{CountByteSize, InternalEventHandle as _}; use crate::{ config::{ @@ -215,7 +215,7 @@ impl SourceConfig for VectorConfig { #[cfg(test)] mod test { use lookup::owned_value_path; - use vector_core::{config::LogNamespace, schema::Definition}; + use vector_lib::{config::LogNamespace, schema::Definition}; use vrl::value::{kind::Collection, Kind}; use crate::config::SourceConfig; @@ -281,8 +281,8 @@ mod tests { sinks::vector::VectorConfig as SinkConfig, test_util, SourceSender, }; - use vector_core::config::log_schema; use vector_lib::assert_event_data_eq; + use vector_lib::config::log_schema; async fn run_test(vector_source_config_str: &str, addr: SocketAddr) { let config = format!(r#"address = "{}""#, addr); diff --git a/src/template.rs b/src/template.rs index 570b27a55fa0a..f1db00d4792a4 100644 --- a/src/template.rs +++ b/src/template.rs @@ -374,7 +374,7 @@ fn render_timestamp(items: &ParsedStrftime, event: EventRef<'_>) -> String { mod tests { use chrono::TimeZone; use lookup::metadata_path; - use vector_core::metric_tags; + use vector_lib::metric_tags; use super::*; use crate::event::{Event, LogEvent, MetricKind, MetricValue}; diff --git a/src/test_util/components.rs b/src/test_util/components.rs index e819bee0352bf..8e08275a9bcb5 100644 --- a/src/test_util/components.rs +++ b/src/test_util/components.rs @@ -13,7 +13,7 @@ use futures::{stream, SinkExt, Stream, StreamExt}; use futures_util::Future; use once_cell::sync::Lazy; use tokio::{pin, select, time::sleep}; -use vector_core::event_test_util; +use vector_lib::event_test_util; use crate::{ config::{SourceConfig, SourceContext}, diff --git a/src/test_util/metrics.rs b/src/test_util/metrics.rs index 749df9d736ce9..fb9b82833d456 100644 --- a/src/test_util/metrics.rs +++ b/src/test_util/metrics.rs @@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Display; -use vector_core::event::{ +use vector_lib::event::{ metric::{Bucket, MetricData, MetricSeries, Sample}, Event, EventMetadata, Metric, MetricValue, StatisticKind, }; @@ -144,8 +144,8 @@ pub fn read_set_values(metrics: &SplitMetrics, series: MetricSeries) -> Option { - vector_core::event::metric::MetricSeries { - name: vector_core::event::metric::MetricName { + vector_lib::event::metric::MetricSeries { + name: vector_lib::event::metric::MetricName { name: $name.into(), namespace: None, }, @@ -153,12 +153,12 @@ macro_rules! series { } }; ($name:expr, $($tk:expr => $tv:expr),*) => { - vector_core::event::metric::MetricSeries { - name: vector_core::event::metric::MetricName { + vector_lib::event::metric::MetricSeries { + name: vector_lib::event::metric::MetricName { name: $name.into(), namespace: None, }, - tags: Some(vector_core::metric_tags!( $( $tk => $tv, )* )), + tags: Some(vector_lib::metric_tags!( $( $tk => $tv, )* )), } }; } diff --git a/src/test_util/mock/mod.rs b/src/test_util/mock/mod.rs index 3fb594b677e7a..e63a23fcdaf8b 100644 --- a/src/test_util/mock/mod.rs +++ b/src/test_util/mock/mod.rs @@ -3,7 +3,7 @@ use std::sync::{atomic::AtomicUsize, Arc}; use futures_util::Stream; use stream_cancel::Trigger; use tokio::sync::oneshot::Sender; -use vector_core::event::EventArray; +use vector_lib::event::EventArray; use crate::SourceSender; diff --git a/src/test_util/mock/sinks/basic.rs b/src/test_util/mock/sinks/basic.rs index abd7faefe7824..be772d7e6de38 100644 --- a/src/test_util/mock/sinks/basic.rs +++ b/src/test_util/mock/sinks/basic.rs @@ -3,12 +3,12 @@ use futures_util::{stream::BoxStream, FutureExt, StreamExt}; use snafu::Snafu; use tokio::sync::oneshot; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::finalization::Finalizable; +use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::Event, sink::{StreamSink, VectorSink}, }; -use vector_lib::finalization::Finalizable; use crate::{ config::{SinkConfig, SinkContext}, diff --git a/src/test_util/mock/sinks/error.rs b/src/test_util/mock/sinks/error.rs index bb6c7d6a9e323..94960d4f270cf 100644 --- a/src/test_util/mock/sinks/error.rs +++ b/src/test_util/mock/sinks/error.rs @@ -6,7 +6,7 @@ use std::{ use async_trait::async_trait; use futures_util::{future::ok, FutureExt, Sink}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::Event, sink::VectorSink, diff --git a/src/test_util/mock/sinks/oneshot.rs b/src/test_util/mock/sinks/oneshot.rs index 3ebc5a27e4b9e..045dc6d4e6f25 100644 --- a/src/test_util/mock/sinks/oneshot.rs +++ b/src/test_util/mock/sinks/oneshot.rs @@ -4,7 +4,7 @@ use async_trait::async_trait; use futures_util::{stream::BoxStream, StreamExt}; use tokio::sync::oneshot::Sender; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::EventArray, sink::{StreamSink, VectorSink}, diff --git a/src/test_util/mock/sinks/panic.rs b/src/test_util/mock/sinks/panic.rs index 22f56157679ed..75ba456fd10b3 100644 --- a/src/test_util/mock/sinks/panic.rs +++ b/src/test_util/mock/sinks/panic.rs @@ -6,7 +6,7 @@ use std::{ use async_trait::async_trait; use futures_util::{future::ok, FutureExt, Sink}; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{AcknowledgementsConfig, Input}, event::Event, sink::VectorSink, diff --git a/src/test_util/mock/sources/backpressure.rs b/src/test_util/mock/sources/backpressure.rs index 146a3b6d2a828..67598b87e42f6 100644 --- a/src/test_util/mock/sources/backpressure.rs +++ b/src/test_util/mock/sources/backpressure.rs @@ -6,12 +6,12 @@ use std::sync::{ use async_trait::async_trait; use futures_util::FutureExt; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::LogNamespace, event::{Event, LogEvent}, schema::Definition, }; -use vector_core::{ +use vector_lib::{ config::{DataType, SourceOutput}, source::Source, }; diff --git a/src/test_util/mock/sources/basic.rs b/src/test_util/mock/sources/basic.rs index 7ffeb6d3d0da2..7ec4b50939116 100644 --- a/src/test_util/mock/sources/basic.rs +++ b/src/test_util/mock/sources/basic.rs @@ -6,8 +6,8 @@ use std::sync::{ use async_trait::async_trait; use vector_buffers::topology::channel::{limited, LimitedReceiver}; use vector_config::configurable_component; -use vector_core::{config::LogNamespace, schema::Definition}; -use vector_core::{ +use vector_lib::{config::LogNamespace, schema::Definition}; +use vector_lib::{ config::{DataType, SourceOutput}, event::{EventArray, EventContainer}, source::Source, diff --git a/src/test_util/mock/sources/error.rs b/src/test_util/mock/sources/error.rs index 360f15632c1e4..daedd17e9cdbf 100644 --- a/src/test_util/mock/sources/error.rs +++ b/src/test_util/mock/sources/error.rs @@ -1,9 +1,9 @@ use async_trait::async_trait; use futures_util::{future::err, FutureExt}; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::schema::Definition; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::schema::Definition; +use vector_lib::{ config::{DataType, SourceOutput}, source::Source, }; diff --git a/src/test_util/mock/sources/panic.rs b/src/test_util/mock/sources/panic.rs index 65f895f9eaf6d..2ca6cf402174f 100644 --- a/src/test_util/mock/sources/panic.rs +++ b/src/test_util/mock/sources/panic.rs @@ -1,8 +1,8 @@ use async_trait::async_trait; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::schema::Definition; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::schema::Definition; +use vector_lib::{ config::{DataType, SourceOutput}, source::Source, }; diff --git a/src/test_util/mock/sources/tripwire.rs b/src/test_util/mock/sources/tripwire.rs index 5a8d91a143a62..81b2cb05d84d8 100644 --- a/src/test_util/mock/sources/tripwire.rs +++ b/src/test_util/mock/sources/tripwire.rs @@ -4,9 +4,9 @@ use async_trait::async_trait; use futures_util::{future, FutureExt}; use stream_cancel::{Trigger, Tripwire}; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::schema::Definition; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::schema::Definition; +use vector_lib::{ config::{DataType, SourceOutput}, source::Source, }; diff --git a/src/test_util/mock/transforms/basic.rs b/src/test_util/mock/transforms/basic.rs index e7906351706f9..4aecc2398f76d 100644 --- a/src/test_util/mock/transforms/basic.rs +++ b/src/test_util/mock/transforms/basic.rs @@ -2,8 +2,8 @@ use std::collections::BTreeSet; use async_trait::async_trait; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::{ config::{DataType, Input, TransformOutput}, event::{ metric::{MetricData, Sample}, diff --git a/src/test_util/mock/transforms/error_definitions.rs b/src/test_util/mock/transforms/error_definitions.rs index 00c2a40223e3a..2b9a4333589f3 100644 --- a/src/test_util/mock/transforms/error_definitions.rs +++ b/src/test_util/mock/transforms/error_definitions.rs @@ -1,7 +1,7 @@ use async_trait::async_trait; use snafu::Snafu; use vector_config::configurable_component; -use vector_core::{ +use vector_lib::{ config::{DataType, Input, LogNamespace, TransformOutput}, schema::Definition, transform::Transform, diff --git a/src/test_util/mock/transforms/noop.rs b/src/test_util/mock/transforms/noop.rs index b1d23002734e9..7e19e020602ef 100644 --- a/src/test_util/mock/transforms/noop.rs +++ b/src/test_util/mock/transforms/noop.rs @@ -3,8 +3,8 @@ use std::pin::Pin; use async_trait::async_trait; use futures_util::Stream; use vector_config::configurable_component; -use vector_core::config::LogNamespace; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::{ config::{DataType, Input, TransformOutput}, event::{Event, EventContainer}, schema::Definition, diff --git a/src/test_util/mod.rs b/src/test_util/mod.rs index b91c2ffb0dd97..a58ef0bcf5369 100644 --- a/src/test_util/mod.rs +++ b/src/test_util/mod.rs @@ -35,7 +35,7 @@ use tokio_stream::wrappers::TcpListenerStream; use tokio_stream::wrappers::UnixListenerStream; use tokio_util::codec::{Encoder, FramedRead, FramedWrite, LinesCodec}; use vector_buffers::topology::channel::LimitedReceiver; -use vector_core::event::{BatchNotifier, Event, EventArray, LogEvent}; +use vector_lib::event::{BatchNotifier, Event, EventArray, LogEvent}; #[cfg(test)] use zstd::Decoder as ZstdDecoder; @@ -133,7 +133,7 @@ pub fn trace_init() { trace::init(color, false, &levels, 10); // Initialize metrics as well - vector_core::metrics::init_test(); + vector_lib::metrics::init_test(); } pub async fn send_lines( diff --git a/src/test_util/stats.rs b/src/test_util/stats.rs index b05e7d3b9d9fc..6e09de735df90 100644 --- a/src/test_util/stats.rs +++ b/src/test_util/stats.rs @@ -7,7 +7,7 @@ use std::{ }; use ordered_float::OrderedFloat; -use vector_core::event::metric::Bucket; +use vector_lib::event::metric::Bucket; #[derive(Copy, Clone, Debug, Default)] pub struct HistogramStats { diff --git a/src/top/state.rs b/src/top/state.rs index bf478e43dea8c..09026bbde13f8 100644 --- a/src/top/state.rs +++ b/src/top/state.rs @@ -6,7 +6,7 @@ use ratatui::{ text::Span, }; use tokio::sync::mpsc; -use vector_core::internal_event::DEFAULT_OUTPUT; +use vector_lib::internal_event::DEFAULT_OUTPUT; use crate::config::ComponentKey; diff --git a/src/topology/builder.rs b/src/topology/builder.rs index df40da7c25e83..dc8f268258b1c 100644 --- a/src/topology/builder.rs +++ b/src/topology/builder.rs @@ -16,9 +16,12 @@ use tokio::{ time::{timeout, Duration}, }; use tracing::Instrument; -use vector_core::config::LogNamespace; -use vector_core::transform::update_runtime_schema_definition; -use vector_core::{ +use vector_lib::config::LogNamespace; +use vector_lib::internal_event::{ + self, CountByteSize, EventsSent, InternalEventHandle as _, Registered, +}; +use vector_lib::transform::update_runtime_schema_definition; +use vector_lib::{ buffers::{ topology::{ builder::TopologyBuilder, @@ -29,9 +32,6 @@ use vector_core::{ schema::Definition, EstimatedJsonEncodedSizeOf, }; -use vector_lib::internal_event::{ - self, CountByteSize, EventsSent, InternalEventHandle as _, Registered, -}; use super::{ fanout::{self, Fanout}, diff --git a/src/topology/mod.rs b/src/topology/mod.rs index 06adb8d63bd39..8d3b2c604f24f 100644 --- a/src/topology/mod.rs +++ b/src/topology/mod.rs @@ -7,7 +7,7 @@ //! part contains config related items including config traits for //! each type of component. -pub(super) use vector_core::fanout; +pub(super) use vector_lib::fanout; pub mod schema; pub mod builder; diff --git a/src/topology/schema.rs b/src/topology/schema.rs index bd0974a5adeaf..47380fbf13e94 100644 --- a/src/topology/schema.rs +++ b/src/topology/schema.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use snafu::Snafu; -use vector_core::config::SourceOutput; +use vector_lib::config::SourceOutput; pub(super) use crate::schema::Definition; @@ -444,7 +444,7 @@ mod tests { use indexmap::IndexMap; use lookup::owned_value_path; use similar_asserts::assert_eq; - use vector_core::config::{DataType, SourceOutput, TransformOutput}; + use vector_lib::config::{DataType, SourceOutput, TransformOutput}; use vrl::value::Kind; use super::*; diff --git a/src/topology/task.rs b/src/topology/task.rs index c09b3a25e1c4f..85175d236db00 100644 --- a/src/topology/task.rs +++ b/src/topology/task.rs @@ -10,7 +10,7 @@ use pin_project::pin_project; use snafu::Snafu; use tokio::task::JoinError; use vector_buffers::topology::channel::BufferReceiverStream; -use vector_core::event::EventArray; +use vector_lib::event::EventArray; use crate::{config::ComponentKey, utilization::Utilization}; diff --git a/src/topology/test/backpressure.rs b/src/topology/test/backpressure.rs index bf16f93611e04..08d3043da4cd1 100644 --- a/src/topology/test/backpressure.rs +++ b/src/topology/test/backpressure.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use tokio::time::Duration; use vector_buffers::{BufferConfig, BufferType, WhenFull}; -use vector_core::config::MEMORY_BUFFER_DEFAULT_MAX_EVENTS; +use vector_lib::config::MEMORY_BUFFER_DEFAULT_MAX_EVENTS; use crate::{config::Config, test_util, test_util::start_topology}; use crate::{config::SinkOuter, test_util::mock::backpressure_source}; diff --git a/src/topology/test/compliance.rs b/src/topology/test/compliance.rs index 001fbbc422643..537418d155878 100644 --- a/src/topology/test/compliance.rs +++ b/src/topology/test/compliance.rs @@ -1,9 +1,9 @@ use std::sync::Arc; use tokio::sync::oneshot::{channel, Receiver}; -use vector_core::config::OutputId; -use vector_core::event::{Event, EventArray, EventContainer, LogEvent}; use vector_lib::config::ComponentKey; +use vector_lib::config::OutputId; +use vector_lib::event::{Event, EventArray, EventContainer, LogEvent}; use crate::config::schema::Definition; use crate::{ diff --git a/src/topology/test/mod.rs b/src/topology/test/mod.rs index 79388ee5f83cf..53c7b84e471e7 100644 --- a/src/topology/test/mod.rs +++ b/src/topology/test/mod.rs @@ -27,8 +27,8 @@ use tokio::{ time::{sleep, Duration}, }; use vector_buffers::{BufferConfig, BufferType, WhenFull}; -use vector_core::config::OutputId; use vector_lib::config::ComponentKey; +use vector_lib::config::OutputId; mod backpressure; mod compliance; diff --git a/src/topology/test/reload.rs b/src/topology/test/reload.rs index 165a93b52f1a1..4c05a5d00a9b2 100644 --- a/src/topology/test/reload.rs +++ b/src/topology/test/reload.rs @@ -8,7 +8,7 @@ use futures::StreamExt; use tokio::time::sleep; use tokio_stream::wrappers::UnboundedReceiverStream; use vector_buffers::{BufferConfig, BufferType, WhenFull}; -use vector_core::config::ComponentKey; +use vector_lib::config::ComponentKey; use crate::{ config::Config, diff --git a/src/transforms/aggregate.rs b/src/transforms/aggregate.rs index bea73ed8dae0f..3b6c78988a1c5 100644 --- a/src/transforms/aggregate.rs +++ b/src/transforms/aggregate.rs @@ -7,7 +7,7 @@ use std::{ use async_stream::stream; use futures::{Stream, StreamExt}; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use crate::{ config::{DataType, Input, OutputId, TransformConfig, TransformContext, TransformOutput}, diff --git a/src/transforms/aws_ec2_metadata.rs b/src/transforms/aws_ec2_metadata.rs index 0353ba846a97d..995fbafe9b4c5 100644 --- a/src/transforms/aws_ec2_metadata.rs +++ b/src/transforms/aws_ec2_metadata.rs @@ -15,7 +15,7 @@ use snafu::ResultExt as _; use tokio::time::{sleep, Duration, Instant}; use tracing::Instrument; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vrl::value::kind::Collection; use vrl::value::Kind; diff --git a/src/transforms/dedupe.rs b/src/transforms/dedupe.rs index a24e2c81cea0d..16794b5ff8f78 100644 --- a/src/transforms/dedupe.rs +++ b/src/transforms/dedupe.rs @@ -5,7 +5,7 @@ use futures::{Stream, StreamExt}; use lookup::lookup_v2::ConfigTargetPath; use lru::LruCache; use vector_config::configurable_component; -use vector_core::config::{clone_input_definitions, LogNamespace}; +use vector_lib::config::{clone_input_definitions, LogNamespace}; use vrl::path::OwnedTargetPath; use crate::{ @@ -298,8 +298,8 @@ mod tests { use lookup::lookup_v2::ConfigTargetPath; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; - use vector_core::config::OutputId; use vector_lib::config::ComponentKey; + use vector_lib::config::OutputId; use crate::config::schema::Definition; use crate::{ diff --git a/src/transforms/filter.rs b/src/transforms/filter.rs index 7a195b3be1e68..ec6013d18037c 100644 --- a/src/transforms/filter.rs +++ b/src/transforms/filter.rs @@ -1,5 +1,5 @@ use vector_config::configurable_component; -use vector_core::config::{clone_input_definitions, LogNamespace}; +use vector_lib::config::{clone_input_definitions, LogNamespace}; use vector_lib::internal_event::{Count, InternalEventHandle as _, Registered}; use crate::{ @@ -100,8 +100,8 @@ mod test { use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; - use vector_core::event::{Metric, MetricKind, MetricValue}; use vector_lib::config::ComponentKey; + use vector_lib::event::{Metric, MetricKind, MetricValue}; use super::*; use crate::config::schema::Definition; diff --git a/src/transforms/log_to_metric.rs b/src/transforms/log_to_metric.rs index 8bc0ed531a5e1..95e6a7f25cc57 100644 --- a/src/transforms/log_to_metric.rs +++ b/src/transforms/log_to_metric.rs @@ -4,7 +4,7 @@ use std::{collections::HashMap, num::ParseFloatError}; use chrono::Utc; use indexmap::IndexMap; use vector_config::configurable_component; -use vector_core::{config::LogNamespace, event::DatadogMetricOriginMetadata}; +use vector_lib::{config::LogNamespace, event::DatadogMetricOriginMetadata}; use vrl::path::parse_target_path; use crate::config::schema::Definition; @@ -324,7 +324,7 @@ fn to_metric(config: &MetricConfig, event: &Event) -> Result 1], + samples: vector_lib::samples![value => 1], statistic: StatisticKind::Histogram, }, ) @@ -340,7 +340,7 @@ fn to_metric(config: &MetricConfig, event: &Event) -> Result 1], + samples: vector_lib::samples![value => 1], statistic: StatisticKind::Summary, }, ) @@ -436,8 +436,8 @@ mod tests { use std::time::Duration; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; - use vector_core::metric_tags; use vector_lib::config::ComponentKey; + use vector_lib::metric_tags; #[test] fn generate_config() { @@ -1084,7 +1084,7 @@ mod tests { "response_time", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![2.5 => 1], + samples: vector_lib::samples![2.5 => 1], statistic: StatisticKind::Histogram }, metadata @@ -1127,7 +1127,7 @@ mod tests { "response_time", MetricKind::Incremental, MetricValue::Distribution { - samples: vector_core::samples![2.5 => 1], + samples: vector_lib::samples![2.5 => 1], statistic: StatisticKind::Summary }, metadata diff --git a/src/transforms/lua/mod.rs b/src/transforms/lua/mod.rs index ee9767f9f20b2..b3b543162fa3c 100644 --- a/src/transforms/lua/mod.rs +++ b/src/transforms/lua/mod.rs @@ -2,7 +2,7 @@ pub mod v1; pub mod v2; use vector_config::configurable_component; -use vector_core::config::{ComponentKey, LogNamespace}; +use vector_lib::config::{ComponentKey, LogNamespace}; use crate::{ config::{GenerateConfig, Input, OutputId, TransformConfig, TransformContext, TransformOutput}, diff --git a/src/transforms/lua/v2/mod.rs b/src/transforms/lua/v2/mod.rs index 787e69731f301..d4be1e88ab6aa 100644 --- a/src/transforms/lua/v2/mod.rs +++ b/src/transforms/lua/v2/mod.rs @@ -4,8 +4,8 @@ use codecs::MetricTagValues; use serde_with::serde_as; use snafu::{ResultExt, Snafu}; use vector_config::configurable_component; -pub use vector_core::event::lua; -use vector_core::transform::runtime_transform::{RuntimeTransform, Timer}; +pub use vector_lib::event::lua; +use vector_lib::transform::runtime_transform::{RuntimeTransform, Timer}; use crate::config::{ComponentKey, OutputId}; use crate::event::lua::event::LuaEvent; diff --git a/src/transforms/metric_to_log.rs b/src/transforms/metric_to_log.rs index a36ee54dea5d3..ac67ba0850e8b 100644 --- a/src/transforms/metric_to_log.rs +++ b/src/transforms/metric_to_log.rs @@ -4,7 +4,7 @@ use lookup::{event_path, owned_value_path, path, PathPrefix}; use serde_json::Value; use std::collections::{BTreeMap, BTreeSet}; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vector_lib::TimeZone; use vrl::path::OwnedValuePath; use vrl::value::kind::Collection; @@ -353,8 +353,8 @@ mod tests { use similar_asserts::assert_eq; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; - use vector_core::{event::EventMetadata, metric_tags}; use vector_lib::config::ComponentKey; + use vector_lib::{event::EventMetadata, metric_tags}; use super::*; use crate::event::{ @@ -511,7 +511,7 @@ mod tests { "distro", MetricKind::Absolute, MetricValue::Distribution { - samples: vector_core::samples![1.0 => 10, 2.0 => 20], + samples: vector_lib::samples![1.0 => 10, 2.0 => 20], statistic: StatisticKind::Histogram, }, event_metadata(), @@ -562,7 +562,7 @@ mod tests { "histo", MetricKind::Absolute, MetricValue::AggregatedHistogram { - buckets: vector_core::buckets![1.0 => 10, 2.0 => 20], + buckets: vector_lib::buckets![1.0 => 10, 2.0 => 20], count: 30, sum: 50.0, }, @@ -612,7 +612,7 @@ mod tests { "summary", MetricKind::Absolute, MetricValue::AggregatedSummary { - quantiles: vector_core::quantiles![50.0 => 10.0, 90.0 => 20.0], + quantiles: vector_lib::quantiles![50.0 => 10.0, 90.0 => 20.0], count: 30, sum: 50.0, }, diff --git a/src/transforms/mod.rs b/src/transforms/mod.rs index 361e5d68db413..46c53c8ccf158 100644 --- a/src/transforms/mod.rs +++ b/src/transforms/mod.rs @@ -31,7 +31,7 @@ pub mod tag_cardinality_limit; #[cfg(feature = "transforms-throttle")] pub mod throttle; -pub use vector_core::transform::{ +pub use vector_lib::transform::{ FunctionTransform, OutputBuffer, SyncTransform, TaskTransform, Transform, TransformOutputs, TransformOutputsBuf, }; @@ -51,7 +51,7 @@ mod test { use futures_util::SinkExt; use tokio::sync::mpsc; use tokio_util::sync::PollSender; - use vector_core::transform::FunctionTransform; + use vector_lib::transform::FunctionTransform; use crate::{ config::{ diff --git a/src/transforms/reduce/mod.rs b/src/transforms/reduce/mod.rs index d1f318b990218..c8d0d851f1aeb 100644 --- a/src/transforms/reduce/mod.rs +++ b/src/transforms/reduce/mod.rs @@ -27,7 +27,7 @@ mod merge_strategy; use crate::config::schema::Definition; use crate::event::Value; pub use merge_strategy::*; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; use vector_stream::expiration_map::{map_with_expiration, Emitter}; use vrl::value::kind::Collection; use vrl::value::Kind; diff --git a/src/transforms/remap.rs b/src/transforms/remap.rs index ef5aa18b0c518..bd2535f011c0b 100644 --- a/src/transforms/remap.rs +++ b/src/transforms/remap.rs @@ -10,9 +10,9 @@ use codecs::MetricTagValues; use lookup::{metadata_path, owned_value_path, PathPrefix}; use snafu::{ResultExt, Snafu}; use vector_config::configurable_component; -use vector_core::compile_vrl; -use vector_core::config::LogNamespace; -use vector_core::schema::Definition; +use vector_lib::compile_vrl; +use vector_lib::config::LogNamespace; +use vector_lib::schema::Definition; use vector_lib::TimeZone; use vector_vrl_functions::set_semantic_meaning::MeaningList; use vrl::compiler::runtime::{Runtime, Terminate}; @@ -608,7 +608,7 @@ mod tests { use std::sync::Arc; use indoc::{formatdoc, indoc}; - use vector_core::{config::GlobalOptions, event::EventMetadata, metric_tags}; + use vector_lib::{config::GlobalOptions, event::EventMetadata, metric_tags}; use vrl::value::kind::Collection; use vrl::{btreemap, event_path}; diff --git a/src/transforms/route.rs b/src/transforms/route.rs index a7d71c4fc4696..4370a098e6a69 100644 --- a/src/transforms/route.rs +++ b/src/transforms/route.rs @@ -1,7 +1,7 @@ use indexmap::IndexMap; use vector_config::configurable_component; -use vector_core::config::{clone_input_definitions, LogNamespace}; -use vector_core::transform::SyncTransform; +use vector_lib::config::{clone_input_definitions, LogNamespace}; +use vector_lib::transform::SyncTransform; use crate::{ conditions::{AnyCondition, Condition}, @@ -37,11 +37,7 @@ impl Route { } impl SyncTransform for Route { - fn transform( - &mut self, - event: Event, - output: &mut vector_core::transform::TransformOutputsBuf, - ) { + fn transform(&mut self, event: Event, output: &mut vector_lib::transform::TransformOutputsBuf) { let mut check_failed: usize = 0; for (output_name, condition) in &self.conditions { let (result, event) = condition.check(event.clone()); @@ -155,7 +151,7 @@ mod test { use std::collections::HashMap; use indoc::indoc; - use vector_core::transform::TransformOutputsBuf; + use vector_lib::transform::TransformOutputsBuf; use super::*; use crate::{ diff --git a/src/transforms/sample.rs b/src/transforms/sample.rs index 1d06ef96dcb98..5e51e063f3209 100644 --- a/src/transforms/sample.rs +++ b/src/transforms/sample.rs @@ -1,5 +1,5 @@ use vector_config::configurable_component; -use vector_core::config::{LegacyKey, LogNamespace}; +use vector_lib::config::{LegacyKey, LogNamespace}; use vrl::value::Kind; use vrl::{event_path, owned_value_path}; diff --git a/src/transforms/tag_cardinality_limit/config.rs b/src/transforms/tag_cardinality_limit/config.rs index 4ea1833fb216d..e4ede27afb734 100644 --- a/src/transforms/tag_cardinality_limit/config.rs +++ b/src/transforms/tag_cardinality_limit/config.rs @@ -7,7 +7,7 @@ use crate::schema; use crate::transforms::tag_cardinality_limit::TagCardinalityLimit; use crate::transforms::Transform; use vector_config::configurable_component; -use vector_core::config::LogNamespace; +use vector_lib::config::LogNamespace; /// Configuration for the `tag_cardinality_limit` transform. #[configurable_component(transform( diff --git a/src/transforms/tag_cardinality_limit/tests.rs b/src/transforms/tag_cardinality_limit/tests.rs index 67018e329e561..d4e63b0820ec8 100644 --- a/src/transforms/tag_cardinality_limit/tests.rs +++ b/src/transforms/tag_cardinality_limit/tests.rs @@ -1,9 +1,9 @@ use std::sync::Arc; -use vector_core::config::OutputId; -use vector_core::event::EventMetadata; -use vector_core::metric_tags; use vector_lib::config::ComponentKey; +use vector_lib::config::OutputId; +use vector_lib::event::EventMetadata; +use vector_lib::metric_tags; use super::*; use crate::config::schema::Definition; diff --git a/src/transforms/throttle.rs b/src/transforms/throttle.rs index 9c64f95a7d3cc..dff11c6f50bdd 100644 --- a/src/transforms/throttle.rs +++ b/src/transforms/throttle.rs @@ -6,7 +6,7 @@ use governor::{clock, Quota, RateLimiter}; use serde_with::serde_as; use snafu::Snafu; use vector_config::configurable_component; -use vector_core::config::{clone_input_definitions, LogNamespace}; +use vector_lib::config::{clone_input_definitions, LogNamespace}; use crate::{ conditions::{AnyCondition, Condition},