From f6983f4ca69da6faf9a41f9e3dfd0cd8bb16e3d2 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Mon, 1 Aug 2022 16:52:04 +0800 Subject: [PATCH 1/3] Update opentelemetry-collector modules to v0.56.0 --- NOTICE.txt | 537 ++++----- go.mod | 46 +- go.sum | 1032 ++--------------- internal/otel_collector/CHANGELOG.md | 757 +++++++++--- internal/otel_collector/CONTRIBUTING.md | 67 +- internal/otel_collector/Makefile | 179 ++- internal/otel_collector/Makefile.Common | 24 +- internal/otel_collector/README.md | 138 ++- internal/otel_collector/VERSIONING.md | 14 + internal/otel_collector/client/client.go | 15 +- .../otel_collector/component/build_info.go | 6 +- .../otel_collector/component/component.go | 110 +- .../component/componenthelper/component.go | 78 -- .../component/componenthelper/doc.go | 16 - .../doc.go => componenttest/nop_component.go} | 13 +- .../component/componenttest/nop_exporter.go | 57 +- .../component/componenttest/nop_extension.go | 44 +- .../component/componenttest/nop_host.go | 4 +- .../component/componenttest/nop_processor.go | 60 +- .../component/componenttest/nop_receiver.go | 59 +- .../componenttest/shutdown_verifier.go | 6 +- .../componenttest/testdata/invalid_go.txt | 6 - .../componenttest/testdata/valid_go.txt | 9 - internal/otel_collector/component/exporter.go | 132 ++- .../otel_collector/component/extension.go | 40 +- .../otel_collector/component/processor.go | 139 ++- internal/otel_collector/component/receiver.go | 147 ++- internal/otel_collector/config/common.go | 59 + .../configauth/default_clientauthenticator.go | 104 ++ .../configauth/default_serverauthenticator.go | 9 +- .../config/configgrpc/README.md | 2 +- .../config/configgrpc/configgrpc.go | 75 +- .../config/configgrpc/testdata/ca.crt | 36 +- .../config/configgrpc/testdata/client.crt | 38 +- .../config/configgrpc/testdata/client.key | 50 +- .../config/configgrpc/testdata/server.crt | 38 +- .../config/configgrpc/testdata/server.key | 50 +- .../configgrpc}/wrappedstream.go | 25 +- .../config/confighttp/README.md | 18 +- .../config/confighttp/compression.go | 20 +- .../config/confighttp/confighttp.go | 56 +- .../config/confighttp/testdata/ca.crt | 36 +- .../config/confighttp/testdata/client.crt | 38 +- .../config/confighttp/testdata/client.key | 50 +- .../config/confighttp/testdata/server.crt | 38 +- .../config/confighttp/testdata/server.key | 50 +- internal/otel_collector/config/configmap.go | 221 ---- .../config/configmapprovider/env.go | 58 - .../config/configmapprovider/file.go | 73 -- .../config/configmapprovider/retrieved.go | 93 -- .../testdata/invalid-yaml.yaml | 1 - .../config/configtelemetry/configtelemetry.go | 48 +- .../config/configtest/configtest.go | 14 - .../otel_collector/config/configtest/doc.go | 3 +- .../otel_collector/config/configtls/README.md | 12 +- .../config/configtls/configtls.go | 88 +- .../config/configtls/testdata/ca-1.crt | 20 + .../config/configtls/testdata/ca-2.crt | 20 + .../config/configtls/testdata/client-1.crt | 21 + .../config/configtls/testdata/client-1.key | 27 + .../config/configtls/testdata/client-2.crt | 21 + .../config/configtls/testdata/client-2.key | 27 + .../config/configtls/testdata/server-1.crt | 21 + .../config/configtls/testdata/server-1.key | 27 + .../config/configtls/testdata/server-2.crt | 21 + .../config/configtls/testdata/server-2.key | 27 + .../config/configtls/testdata/test-cert.pem | 25 - .../config/configtls/testdata/test-key.pem | 28 - .../config/configtls/testdata/testCA.pem | 13 - .../testdata/duplicate-exporter.yaml | 13 - .../testdata/duplicate-extension.yaml | 3 - .../testdata/duplicate-processor.yaml | 13 - .../testdata/duplicate-receiver.yaml | 13 - .../testdata/invalid-exporter-section.yaml | 20 - .../testdata/invalid-exporter-sub-config.yaml | 13 - .../testdata/invalid-exporter-type.yaml | 12 - .../invalid-extension-name-after-slash.yaml | 14 - .../invalid-extension-sub-config.yaml | 16 - .../testdata/invalid-extension-type.yaml | 14 - .../testdata/invalid-logs-level.yaml | 19 - .../invalid-pipeline-name-after-slash.yaml | 13 - .../testdata/invalid-pipeline-section.yaml | 20 - .../testdata/invalid-pipeline-type.yaml | 13 - .../invalid-processor-name-after-slash.yaml | 13 - .../invalid-processor-sub-config.yaml | 13 - .../testdata/invalid-processor-type.yaml | 13 - .../invalid-receiver-name-after-slash.yaml | 13 - .../testdata/invalid-receiver-sub-config.yaml | 13 - .../testdata/invalid-receiver-type.yaml | 13 - .../testdata/invalid-sequence-value.yaml | 14 - .../invalid-service-extensions-section.yaml | 18 - .../testdata/unknown-exporter-type.yaml | 12 - .../testdata/unknown-pipeline-type.yaml | 13 - .../testdata/unknown-processor-type.yaml | 12 - .../testdata/valid-config.yaml | 43 - .../experimental/configsource/component.go | 4 +- internal/otel_collector/config/exporter.go | 10 + internal/otel_collector/config/extension.go | 10 + .../config/internal/configsource/manager.go | 32 +- .../config/{config.go => moved_config.go} | 34 +- internal/otel_collector/config/processor.go | 10 + internal/otel_collector/config/receiver.go | 10 + internal/otel_collector/confmap/README.md | 88 ++ internal/otel_collector/confmap/confmap.go | 210 ++++ .../confmaptest/configtest.go} | 19 +- .../confmaptest}/doc.go | 4 +- .../confmap/confmaptest/testdata/simple.yaml | 1 + .../doc.go => confmap/converter.go} | 15 +- .../converter/expandconverter}/expand.go | 23 +- .../testdata/default-config.yaml | 0 .../testdata/expand-escaped-env.yaml | 0 .../testdata/expand-with-all-env.yaml | 0 .../testdata/expand-with-no-env.yaml | 0 .../testdata/expand-with-partial-env.yaml | 0 .../properties.go | 24 +- .../configmapprovider => confmap}/provider.go | 76 +- .../confmap/provider/envprovider/provider.go | 53 + .../confmap/provider/fileprovider/provider.go | 69 ++ .../fileprovider/testdata/default-config.yaml | 5 + .../fileprovider/testdata/invalid-yaml.yaml | 1 + .../confmap/provider/internal/provider.go | 32 + .../confmap/provider/yamlprovider/provider.go | 56 + internal/otel_collector/confmap/resolver.go | 189 +++ .../testdata/basic_types.yaml | 0 .../{config => confmap}/testdata/config.yaml | 0 .../testdata/embedded_keys.yaml | 0 internal/otel_collector/consumer/consumer.go | 50 +- .../consumer/consumererror/signalerrors.go | 22 +- .../consumer/consumerhelper/common.go | 55 - .../consumer/consumertest/consumer.go | 10 +- .../consumer/consumertest/err.go | 10 +- .../consumer/consumertest/nop.go | 10 +- .../consumer/consumertest/sink.go | 28 +- .../consumer/{consumerhelper => }/logs.go | 25 +- .../consumer/{consumerhelper => }/metrics.go | 25 +- .../consumer/{consumerhelper => }/traces.go | 25 +- .../examples/k8s/otel-config.yaml | 4 +- .../examples/local/otel-config.yaml | 2 +- internal/otel_collector/exporter/README.md | 8 +- .../exporter/exporterhelper/README.md | 13 +- .../exporter/exporterhelper/common.go | 24 +- .../exporter/exporterhelper/factory.go | 128 -- .../internal/bounded_memory_queue.go | 61 +- .../internal/persistent_queue.go | 6 - .../internal/persistent_storage.go | 15 +- .../internal/producer_consumer_queue.go | 2 - .../exporter/exporterhelper/logs.go | 20 +- .../exporter/exporterhelper/metrics.go | 20 +- .../exporter/exporterhelper/obsreport.go | 7 + .../exporter/exporterhelper/queued_retry.go | 6 +- .../queued_retry_experimental.go | 25 +- .../exporterhelper/queued_retry_inmemory.go | 26 +- .../exporter/exporterhelper/traces.go | 20 +- .../exporter/loggingexporter/README.md | 10 + .../exporter/loggingexporter/factory.go | 60 +- .../internal/otlptext/databuffer.go | 154 +-- .../internal/otlptext/logs.go | 26 +- .../internal/otlptext/metrics.go | 24 +- .../internal/otlptext/traces.go | 24 +- .../loggingexporter/known_sync_error.go | 29 +- .../loggingexporter/logging_exporter.go | 57 +- .../exporter/otlpexporter/README.md | 43 +- .../exporter/otlpexporter/config.go | 6 + .../exporter/otlpexporter/factory.go | 24 +- .../exporter/otlpexporter/otlp.go | 85 +- .../exporter/otlphttpexporter/README.md | 36 +- .../exporter/otlphttpexporter/config.go | 5 + .../exporter/otlphttpexporter/factory.go | 16 +- .../exporter/otlphttpexporter/otlp.go | 31 +- .../testdata/bad_empty_config.yaml | 15 + .../otlphttpexporter/testdata/config.yaml | 3 +- .../extension/ballastextension/README.md | 9 + .../extension/ballastextension/config.go | 4 +- .../extension/ballastextension/factory.go | 6 +- .../extension/extensionhelper/factory.go | 74 -- .../extension/zpagesextension/README.md | 23 +- .../extension/zpagesextension/factory.go | 8 +- .../zpagesextension/zpagesextension.go | 67 +- internal/otel_collector/go.mod | 87 +- internal/otel_collector/go.sum | 429 ++----- .../internal/buildscripts/gen-certs.sh | 51 +- .../err_or_sink_consumer.go | 7 +- .../internalinterface/internalinterface.go | 30 - .../obsreportconfig/obsreportconfig.go | 9 +- .../testcomponents/example_exporter.go | 103 +- .../testcomponents/example_extension.go | 53 - .../testcomponents/example_factories.go | 75 +- .../testcomponents/example_processor.go | 46 +- .../testcomponents/example_receiver.go | 56 +- .../internal/testdata/common.go | 61 +- .../otel_collector/internal/testdata/log.go | 117 +- .../internal/testdata/metric.go | 275 ++--- .../internal/testdata/resource.go | 10 +- .../otel_collector/internal/testdata/trace.go | 115 +- .../internal/testutil/testutil.go | 56 +- .../internal/version/version.go | 69 -- .../obsreport/obsreport_scraper.go | 4 +- .../processor/batchprocessor/README.md | 14 +- .../batchprocessor/batch_processor.go | 114 +- .../processor/batchprocessor/config.go | 6 +- .../processor/batchprocessor/factory.go | 9 +- .../processor/batchprocessor/splitlogs.go | 28 +- .../processor/batchprocessor/splitmetrics.go | 76 +- .../processor/batchprocessor/splittraces.go | 28 +- .../memorylimiterprocessor/README.md | 10 +- .../memorylimiterprocessor/factory.go | 66 +- .../memorylimiterprocessor/memorylimiter.go | 73 +- .../processor/processorhelper/factory.go | 134 --- .../processor/processorhelper/logs.go | 15 +- .../processor/processorhelper/metrics.go | 15 +- .../processor/processorhelper/processor.go | 17 +- .../processor/processorhelper/traces.go | 15 +- internal/otel_collector/proto_patch.sed | 14 +- .../receiver/otlpreceiver/README.md | 21 +- .../receiver/otlpreceiver/config.go | 13 +- .../receiver/otlpreceiver/encoder.go | 70 +- .../receiver/otlpreceiver/factory.go | 16 +- .../otlpreceiver/internal/logs/otlp.go | 8 +- .../otlpreceiver/internal/metrics/otlp.go | 8 +- .../otlpreceiver/internal/trace/otlp.go | 8 +- .../receiver/otlpreceiver/mixin.go | 21 +- .../receiver/otlpreceiver/otlp.go | 119 +- .../otlpreceiver/testdata/config.yaml | 8 + .../receiver/receiverhelper/factory.go | 132 --- .../receiver/scraperhelper/scraper.go | 17 +- .../scraperhelper/scrapercontroller.go | 11 +- internal/otel_collector/service/README.md | 36 + internal/otel_collector/service/collector.go | 142 +-- .../service/collector_windows.go | 41 +- internal/otel_collector/service/command.go | 21 +- .../doc.go => service/config.go} | 25 +- .../otel_collector/service/config_provider.go | 218 +--- .../service/featuregate/README.md | 4 - .../service/featuregate/flags.go | 28 +- .../service/featuregate/gates.go | 87 +- internal/otel_collector/service/flags.go | 26 +- internal/otel_collector/service/host.go | 62 + .../internal/builder/exporters_builder.go | 269 ----- .../internal/builder/pipelines_builder.go | 323 ------ .../internal/builder/receivers_builder.go | 294 ----- .../not_supported_processor_logs.yaml | 13 - .../not_supported_processor_metrics.yaml | 13 - .../not_supported_processor_traces.yaml | 13 - .../builder/testdata/pipelines_builder.yaml | 40 - .../builder/testdata/unused_receiver.yaml | 12 - .../service/internal/components/components.go | 32 + .../service/internal/components/constants.go | 16 +- .../configunmarshaler/defaultunmarshaler.go | 64 +- .../testdata/duplicate-exporter.yaml | 13 + .../testdata/duplicate-extension.yaml | 3 + .../testdata/duplicate-pipeline.yaml | 16 + .../testdata/duplicate-processor.yaml | 13 + .../testdata/duplicate-receiver.yaml | 13 + .../testdata/empty-all-sections.yaml | 0 .../testdata/empty-config.yaml | 0 .../invalid-exporter-name-after-slash.yaml | 8 +- .../testdata/invalid-exporter-section.yaml | 20 + .../testdata/invalid-exporter-sub-config.yaml | 13 + .../testdata/invalid-exporter-type.yaml | 12 + .../invalid-extension-name-after-slash.yaml | 14 + .../testdata/invalid-extension-section.yaml | 14 +- .../invalid-extension-sub-config.yaml | 16 + .../testdata/invalid-extension-type.yaml | 14 + .../testdata/invalid-logs-level.yaml | 19 + .../testdata/invalid-metrics-level.yaml | 19 + .../invalid-pipeline-name-after-slash.yaml | 13 + .../testdata/invalid-pipeline-section.yaml | 20 + .../testdata/invalid-pipeline-sub-config.yaml | 6 +- .../testdata/invalid-pipeline-type.yaml | 13 + .../invalid-processor-name-after-slash.yaml | 13 + .../testdata/invalid-processor-section.yaml | 14 +- .../invalid-processor-sub-config.yaml | 13 + .../testdata/invalid-processor-type.yaml | 13 + .../invalid-receiver-name-after-slash.yaml | 13 + .../testdata/invalid-receiver-section.yaml | 14 +- .../testdata/invalid-receiver-sub-config.yaml | 13 + .../testdata/invalid-receiver-type.yaml | 13 + .../testdata/invalid-sequence-value.yaml | 14 + .../invalid-service-extensions-section.yaml | 18 + .../testdata/invalid-service-section.yaml | 14 +- .../testdata/invalid-top-level-section.yaml | 14 +- .../testdata/unknown-exporter-type.yaml | 12 + .../testdata/unknown-extension-type.yaml | 0 .../testdata/unknown-pipeline-type.yaml | 13 + .../testdata/unknown-processor-type.yaml | 12 + .../testdata/unknown-receiver-type.yaml | 10 +- .../testdata/valid-config.yaml | 38 + .../service/internal/extensions/extensions.go | 190 +-- .../service/internal/fanoutconsumer/logs.go | 6 +- .../internal/fanoutconsumer/metrics.go | 6 +- .../service/internal/fanoutconsumer/traces.go | 6 +- .../internal/pipelines/capabilities.go | 58 + .../service/internal/pipelines/pipelines.go | 567 +++++++++ .../testdata/not_supported_exporter_logs.yaml | 4 +- .../not_supported_exporter_metrics.yaml | 4 +- .../not_supported_exporter_traces.yaml | 4 +- .../not_supported_processor_logs.yaml | 13 + .../not_supported_processor_metrics.yaml | 13 + .../not_supported_processor_traces.yaml | 13 + .../testdata/not_supported_receiver_logs.yaml | 4 +- .../not_supported_receiver_metrics.yaml | 4 +- .../not_supported_receiver_traces.yaml | 4 +- .../pipelines_exporter_multi_pipeline.yaml | 37 + .../pipelines/testdata/pipelines_multi.yaml | 28 + .../testdata/pipelines_multi_no_proc.yaml | 21 + .../pipelines/testdata/pipelines_simple.yaml} | 18 +- .../testdata/pipelines_simple_multi_proc.yaml | 25 + .../testdata/pipelines_simple_no_proc.yaml} | 18 +- .../testdata/unknown_exporter_config.yaml | 10 + .../testdata/unknown_exporter_factory.yaml | 10 + .../testdata/unknown_processor_config.yaml | 13 + .../testdata/unknown_processor_factory.yaml | 13 + .../testdata/unknown_receiver_config.yaml | 10 + .../testdata/unknown_receiver_factory.yaml | 10 + .../internal/runtimeinfo/info.go} | 29 +- .../internal/telemetry/process_telemetry.go | 272 ++--- .../service/internal/telemetrylogs/logger.go | 4 +- .../service/internal/zpages/templates.go | 23 + .../zpages/templates/features_table.html | 19 + internal/otel_collector/service/service.go | 172 ++- .../service/servicetest/configprovider.go | 8 +- internal/otel_collector/service/settings.go | 26 +- internal/otel_collector/service/telemetry.go | 158 +-- .../telemetry/config.go} | 60 +- .../service/testdata/otelcol-config.yaml | 22 - .../service/testdata/otelcol-noaddress.yaml | 14 + .../service/testdata/otelcol-nometrics.yaml | 14 + internal/otel_collector/service/zpages.go | 129 +-- internal/otel_collector/versions.yaml | 8 +- 329 files changed, 7583 insertions(+), 7795 deletions(-) delete mode 100644 internal/otel_collector/component/componenthelper/component.go delete mode 100644 internal/otel_collector/component/componenthelper/doc.go rename internal/otel_collector/component/{componenterror/doc.go => componenttest/nop_component.go} (73%) delete mode 100644 internal/otel_collector/component/componenttest/testdata/invalid_go.txt delete mode 100644 internal/otel_collector/component/componenttest/testdata/valid_go.txt create mode 100644 internal/otel_collector/config/common.go create mode 100644 internal/otel_collector/config/configauth/default_clientauthenticator.go rename internal/otel_collector/{internal/middleware => config/configgrpc}/wrappedstream.go (55%) delete mode 100644 internal/otel_collector/config/configmap.go delete mode 100644 internal/otel_collector/config/configmapprovider/env.go delete mode 100644 internal/otel_collector/config/configmapprovider/file.go delete mode 100644 internal/otel_collector/config/configmapprovider/retrieved.go delete mode 100644 internal/otel_collector/config/configmapprovider/testdata/invalid-yaml.yaml create mode 100644 internal/otel_collector/config/configtls/testdata/ca-1.crt create mode 100644 internal/otel_collector/config/configtls/testdata/ca-2.crt create mode 100644 internal/otel_collector/config/configtls/testdata/client-1.crt create mode 100644 internal/otel_collector/config/configtls/testdata/client-1.key create mode 100644 internal/otel_collector/config/configtls/testdata/client-2.crt create mode 100644 internal/otel_collector/config/configtls/testdata/client-2.key create mode 100644 internal/otel_collector/config/configtls/testdata/server-1.crt create mode 100644 internal/otel_collector/config/configtls/testdata/server-1.key create mode 100644 internal/otel_collector/config/configtls/testdata/server-2.crt create mode 100644 internal/otel_collector/config/configtls/testdata/server-2.key delete mode 100644 internal/otel_collector/config/configtls/testdata/test-cert.pem delete mode 100644 internal/otel_collector/config/configtls/testdata/test-key.pem delete mode 100644 internal/otel_collector/config/configtls/testdata/testCA.pem delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/duplicate-exporter.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/duplicate-extension.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/duplicate-processor.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/duplicate-receiver.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-section.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-sub-config.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-logs-level.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-section.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-sub-config.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-sequence-value.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/invalid-service-extensions-section.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/unknown-exporter-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/unknown-pipeline-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/unknown-processor-type.yaml delete mode 100644 internal/otel_collector/config/configunmarshaler/testdata/valid-config.yaml rename internal/otel_collector/config/{config.go => moved_config.go} (83%) create mode 100644 internal/otel_collector/confmap/README.md create mode 100644 internal/otel_collector/confmap/confmap.go rename internal/otel_collector/{config/configunmarshaler/unmarshaler.go => confmap/confmaptest/configtest.go} (55%) rename internal/otel_collector/{receiver/receiverhelper => confmap/confmaptest}/doc.go (76%) create mode 100644 internal/otel_collector/confmap/confmaptest/testdata/simple.yaml rename internal/otel_collector/{consumer/consumerhelper/doc.go => confmap/converter.go} (59%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/expand.go (72%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/testdata/default-config.yaml (100%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/testdata/expand-escaped-env.yaml (100%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/testdata/expand-with-all-env.yaml (100%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/testdata/expand-with-no-env.yaml (100%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/expandconverter}/testdata/expand-with-partial-env.yaml (100%) rename internal/otel_collector/{config/configmapprovider => confmap/converter/overwritepropertiesconverter}/properties.go (70%) rename internal/otel_collector/{config/configmapprovider => confmap}/provider.go (54%) create mode 100644 internal/otel_collector/confmap/provider/envprovider/provider.go create mode 100644 internal/otel_collector/confmap/provider/fileprovider/provider.go create mode 100644 internal/otel_collector/confmap/provider/fileprovider/testdata/default-config.yaml create mode 100644 internal/otel_collector/confmap/provider/fileprovider/testdata/invalid-yaml.yaml create mode 100644 internal/otel_collector/confmap/provider/internal/provider.go create mode 100644 internal/otel_collector/confmap/provider/yamlprovider/provider.go create mode 100644 internal/otel_collector/confmap/resolver.go rename internal/otel_collector/{config => confmap}/testdata/basic_types.yaml (100%) rename internal/otel_collector/{config => confmap}/testdata/config.yaml (100%) rename internal/otel_collector/{config => confmap}/testdata/embedded_keys.yaml (100%) delete mode 100644 internal/otel_collector/consumer/consumerhelper/common.go rename internal/otel_collector/consumer/{consumerhelper => }/logs.go (54%) rename internal/otel_collector/consumer/{consumerhelper => }/metrics.go (59%) rename internal/otel_collector/consumer/{consumerhelper => }/traces.go (57%) delete mode 100644 internal/otel_collector/exporter/exporterhelper/factory.go rename internal/otel_collector/{ => exporter/loggingexporter}/internal/otlptext/databuffer.go (64%) rename internal/otel_collector/{ => exporter/loggingexporter}/internal/otlptext/logs.go (64%) rename internal/otel_collector/{ => exporter/loggingexporter}/internal/otlptext/metrics.go (61%) rename internal/otel_collector/{ => exporter/loggingexporter}/internal/otlptext/traces.go (68%) create mode 100644 internal/otel_collector/exporter/otlphttpexporter/testdata/bad_empty_config.yaml delete mode 100644 internal/otel_collector/extension/extensionhelper/factory.go delete mode 100644 internal/otel_collector/internal/internalinterface/internalinterface.go delete mode 100644 internal/otel_collector/internal/testcomponents/example_extension.go delete mode 100644 internal/otel_collector/internal/version/version.go delete mode 100644 internal/otel_collector/processor/processorhelper/factory.go delete mode 100644 internal/otel_collector/receiver/receiverhelper/factory.go create mode 100644 internal/otel_collector/service/README.md rename internal/otel_collector/{config/configunmarshaler/doc.go => service/config.go} (50%) create mode 100644 internal/otel_collector/service/host.go delete mode 100644 internal/otel_collector/service/internal/builder/exporters_builder.go delete mode 100644 internal/otel_collector/service/internal/builder/pipelines_builder.go delete mode 100644 internal/otel_collector/service/internal/builder/receivers_builder.go delete mode 100644 internal/otel_collector/service/internal/builder/testdata/not_supported_processor_logs.yaml delete mode 100644 internal/otel_collector/service/internal/builder/testdata/not_supported_processor_metrics.yaml delete mode 100644 internal/otel_collector/service/internal/builder/testdata/not_supported_processor_traces.yaml delete mode 100644 internal/otel_collector/service/internal/builder/testdata/pipelines_builder.yaml delete mode 100644 internal/otel_collector/service/internal/builder/testdata/unused_receiver.yaml create mode 100644 internal/otel_collector/service/internal/components/components.go rename internal/otel_collector/{config => service/internal}/configunmarshaler/defaultunmarshaler.go (84%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-exporter.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-extension.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-pipeline.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-processor.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-receiver.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/empty-all-sections.yaml (100%) rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/empty-config.yaml (100%) rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml (56%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-section.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-extension-section.yaml (56%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-logs-level.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-metrics-level.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-section.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml (53%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-processor-section.yaml (56%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-receiver-section.yaml (56%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-sequence-value.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-service-section.yaml (56%) rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/invalid-top-level-section.yaml (55%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-exporter-type.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/unknown-extension-type.yaml (100%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-pipeline-type.yaml create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-processor-type.yaml rename internal/otel_collector/{config => service/internal}/configunmarshaler/testdata/unknown-receiver-type.yaml (53%) create mode 100644 internal/otel_collector/service/internal/configunmarshaler/testdata/valid-config.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/capabilities.go create mode 100644 internal/otel_collector/service/internal/pipelines/pipelines.go rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_exporter_logs.yaml (60%) rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_exporter_metrics.yaml (61%) rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_exporter_traces.yaml (61%) create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_logs.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_metrics.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_traces.yaml rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_receiver_logs.yaml (68%) rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_receiver_metrics.yaml (69%) rename internal/otel_collector/service/internal/{builder => pipelines}/testdata/not_supported_receiver_traces.yaml (68%) create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/pipelines_exporter_multi_pipeline.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi_no_proc.yaml rename internal/otel_collector/{config/configunmarshaler/testdata/invalid-metrics-level.yaml => service/internal/pipelines/testdata/pipelines_simple.yaml} (52%) create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_multi_proc.yaml rename internal/otel_collector/{config/configunmarshaler/testdata/duplicate-pipeline.yaml => service/internal/pipelines/testdata/pipelines_simple_no_proc.yaml} (69%) create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_config.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_factory.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_config.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_factory.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_config.yaml create mode 100644 internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_factory.yaml rename internal/otel_collector/{component/componenterror/errors.go => service/internal/runtimeinfo/info.go} (53%) create mode 100644 internal/otel_collector/service/internal/zpages/templates/features_table.html rename internal/otel_collector/{config/service.go => service/telemetry/config.go} (65%) delete mode 100644 internal/otel_collector/service/testdata/otelcol-config.yaml create mode 100644 internal/otel_collector/service/testdata/otelcol-noaddress.yaml create mode 100644 internal/otel_collector/service/testdata/otelcol-nometrics.yaml diff --git a/NOTICE.txt b/NOTICE.txt index 72c11360138..6d88ecbb318 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -2677,11 +2677,11 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice -------------------------------------------------------------------------------- Dependency : github.com/jaegertracing/jaeger -Version: v1.30.0 +Version: v1.36.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/jaegertracing/jaeger@v1.30.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/jaegertracing/jaeger@v1.36.0/LICENSE: Apache License Version 2.0, January 2004 @@ -3152,11 +3152,11 @@ Contents of probable licence file $GOMODCACHE/github.com/modern-go/reflect2@v1.0 -------------------------------------------------------------------------------- Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger -Version: v0.44.0 +Version: v0.56.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger@v0.44.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger@v0.56.0/LICENSE: Apache License Version 2.0, January 2004 @@ -3456,11 +3456,11 @@ SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/spf13/cobra -Version: v1.3.0 +Version: v1.5.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/spf13/cobra@v1.3.0/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/spf13/cobra@v1.5.0/LICENSE.txt: Apache License Version 2.0, January 2004 @@ -4977,7 +4977,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/collector -Version: v0.44.0 +Version: v0.56.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- @@ -5188,12 +5188,224 @@ Contents of probable licence file LICENSE: -------------------------------------------------------------------------------- -Dependency : go.opentelemetry.io/collector/model -Version: v0.44.0 +Dependency : go.opentelemetry.io/collector/pdata +Version: v0.56.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/model@v0.44.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdata@v0.56.0/LICENSE: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------------------------------------------------------------------- +Dependency : go.opentelemetry.io/collector/semconv +Version: v0.56.0 +Licence type (autodetected): Apache-2.0 +-------------------------------------------------------------------------------- + +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/semconv@v0.56.0/LICENSE: Apache License @@ -5946,11 +6158,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/apache/thrift -Version: v0.15.0 +Version: v0.16.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/apache/thrift@v0.15.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/apache/thrift@v0.16.0/LICENSE: Apache License @@ -9833,11 +10045,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/felixge/httpsnoop -Version: v1.0.2 +Version: v1.0.3 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/felixge/httpsnoop@v1.0.2/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/felixge/httpsnoop@v1.0.3/LICENSE.txt: Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com) @@ -13252,11 +13464,11 @@ Apache License -------------------------------------------------------------------------------- Dependency : github.com/klauspost/compress -Version: v1.14.2 +Version: v1.15.8 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/klauspost/compress@v1.14.2/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/klauspost/compress@v1.15.8/LICENSE: Copyright (c) 2012 The Go Authors. All rights reserved. Copyright (c) 2019 Klaus Post. All rights reserved. @@ -13566,11 +13778,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI -------------------------------------------------------------------------------- Dependency : github.com/knadh/koanf -Version: v1.4.0 +Version: v1.4.2 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/knadh/koanf@v1.4.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/knadh/koanf@v1.4.2/LICENSE: The MIT License @@ -13728,11 +13940,11 @@ THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/mitchellh/mapstructure -Version: v1.4.3 +Version: v1.5.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/mitchellh/mapstructure@v1.4.3/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/mitchellh/mapstructure@v1.5.0/LICENSE: The MIT License (MIT) @@ -14213,11 +14425,11 @@ Contents of probable licence file $GOMODCACHE/github.com/mostynb/go-grpc-compres -------------------------------------------------------------------------------- Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal -Version: v0.44.0 +Version: v0.56.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal@v0.44.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal@v0.56.0/LICENSE: Apache License Version 2.0, January 2004 @@ -15393,11 +15605,11 @@ THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/shirou/gopsutil/v3 -Version: v3.21.12 +Version: v3.22.6 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/shirou/gopsutil/v3@v3.21.12/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/shirou/gopsutil/v3@v3.22.6/LICENSE: gopsutil is distributed under BSD license reproduced below. @@ -15429,7 +15641,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------- -internal/common/binary.go in the gopsutil is copied and modifid from golang/encoding/binary.go. +internal/common/binary.go in the gopsutil is copied and modified from golang/encoding/binary.go. @@ -15492,43 +15704,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------- -Dependency : github.com/spf13/cast -Version: v1.4.1 -Licence type (autodetected): MIT --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/github.com/spf13/cast@v1.4.1/LICENSE: - -The MIT License (MIT) - -Copyright (c) 2014 Steve Francia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- Dependency : github.com/tklauser/go-sysconf -Version: v0.3.9 +Version: v0.3.10 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/tklauser/go-sysconf@v0.3.9/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/tklauser/go-sysconf@v0.3.10/LICENSE: BSD 3-Clause License @@ -15563,11 +15745,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : github.com/tklauser/numcpus -Version: v0.3.0 +Version: v0.4.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/tklauser/numcpus@v0.3.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/tklauser/numcpus@v0.4.0/LICENSE: + Apache License Version 2.0, January 2004 @@ -15749,7 +15932,7 @@ Contents of probable licence file $GOMODCACHE/github.com/tklauser/numcpus@v0.3.0 APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -15757,7 +15940,7 @@ Contents of probable licence file $GOMODCACHE/github.com/tklauser/numcpus@v0.3.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} Authors of Cilium + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15772,7 +15955,6 @@ Contents of probable licence file $GOMODCACHE/github.com/tklauser/numcpus@v0.3.0 limitations under the License. - -------------------------------------------------------------------------------- Dependency : github.com/uber/jaeger-client-go Version: v2.30.0+incompatible @@ -17441,11 +17623,11 @@ Contents of probable licence file $GOMODCACHE/go.opencensus.io@v0.23.0/LICENSE: -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc -Version: v0.28.0 +Version: v0.33.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.28.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.33.0/LICENSE: Apache License Version 2.0, January 2004 @@ -17652,11 +17834,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instru -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp -Version: v0.28.0 +Version: v0.33.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.28.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.33.0/LICENSE: Apache License Version 2.0, January 2004 @@ -17863,222 +18045,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/contrib/instru -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel -Version: v1.3.0 -Licence type (autodetected): Apache-2.0 --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.3.0/LICENSE: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------------------------------------------------------------------- -Dependency : go.opentelemetry.io/otel/internal/metric -Version: v0.26.0 +Version: v1.8.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/internal/metric@v0.26.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.8.0/LICENSE: Apache License Version 2.0, January 2004 @@ -18285,11 +18256,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/internal/ -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/metric -Version: v0.26.0 +Version: v0.31.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v0.26.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v0.31.0/LICENSE: Apache License Version 2.0, January 2004 @@ -18496,11 +18467,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v0 -------------------------------------------------------------------------------- Dependency : go.opentelemetry.io/otel/trace -Version: v1.3.0 +Version: v1.8.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.3.0/LICENSE: +Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.8.0/LICENSE: Apache License Version 2.0, January 2004 diff --git a/go.mod b/go.mod index c743c4c77a3..ba33f57bbb3 100644 --- a/go.mod +++ b/go.mod @@ -23,17 +23,17 @@ require ( github.com/gorilla/mux v1.8.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/golang-lru v0.5.4 - github.com/jaegertracing/jaeger v1.30.0 + github.com/jaegertracing/jaeger v1.36.0 github.com/json-iterator/go v1.1.12 github.com/libp2p/go-reuseport v0.0.2 github.com/modern-go/reflect2 v1.0.2 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.44.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.56.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 github.com/ryanuber/go-glob v1.0.0 - github.com/spf13/cobra v1.3.0 + github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 github.com/tidwall/gjson v1.9.3 github.com/tidwall/sjson v1.1.1 github.com/xeipuuv/gojsonschema v1.2.0 @@ -44,8 +44,9 @@ require ( go.elastic.co/apm/module/apmzap/v2 v2.0.0 go.elastic.co/apm/v2 v2.1.0 go.elastic.co/fastjson v1.1.0 - go.opentelemetry.io/collector v0.44.0 - go.opentelemetry.io/collector/model v0.44.0 + go.opentelemetry.io/collector v0.56.0 + go.opentelemetry.io/collector/pdata v0.56.0 + go.opentelemetry.io/collector/semconv v0.56.0 go.uber.org/automaxprocs v1.5.1 go.uber.org/zap v1.21.0 golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 @@ -59,9 +60,9 @@ require ( require ( github.com/DataDog/zstd v1.4.4 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/Shopify/sarama v1.30.1 // indirect + github.com/Shopify/sarama v1.32.0 // indirect github.com/akavel/rsrc v0.10.2 // indirect - github.com/apache/thrift v0.15.0 // indirect + github.com/apache/thrift v0.16.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/containerd/containerd v1.6.1 // indirect @@ -91,7 +92,8 @@ require ( github.com/elastic/go-windows v1.0.1 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/frankban/quicktest v1.14.3 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -119,8 +121,8 @@ require ( github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect github.com/josephspurrier/goversioninfo v1.4.0 // indirect - github.com/klauspost/compress v1.14.2 // indirect - github.com/knadh/koanf v1.4.0 // indirect + github.com/klauspost/compress v1.15.8 // indirect + github.com/knadh/koanf v1.4.2 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magefile/mage v1.13.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect @@ -128,11 +130,11 @@ require ( github.com/miekg/dns v1.1.42 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/mostynb/go-grpc-compression v1.1.16 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.44.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.56.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -144,13 +146,12 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.2 // indirect github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect - github.com/shirou/gopsutil/v3 v3.21.12 // indirect + github.com/shirou/gopsutil/v3 v3.22.6 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/cast v1.4.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.9 // indirect - github.com/tklauser/numcpus v0.3.0 // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.4.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 // indirect @@ -162,12 +163,11 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.elastic.co/ecszap v1.0.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 // indirect - go.opentelemetry.io/otel v1.3.0 // indirect - go.opentelemetry.io/otel/internal/metric v0.26.0 // indirect - go.opentelemetry.io/otel/metric v0.26.0 // indirect - go.opentelemetry.io/otel/trace v1.3.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 // indirect + go.opentelemetry.io/otel v1.8.0 // indirect + go.opentelemetry.io/otel/metric v0.31.0 // indirect + go.opentelemetry.io/otel/trace v1.8.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect diff --git a/go.sum b/go.sum index b9a618196f7..f864b305a2d 100644 --- a/go.sum +++ b/go.sum @@ -4,13 +4,11 @@ bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -41,23 +39,18 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/kms v1.0.0/go.mod h1:nhUehi+w7zht2XrUfvTRNpxrfayBHqP4lu2NSywui/0= cloud.google.com/go/monitoring v1.1.0 h1:ZnyNdf/XRcynMmKzRSNTOdOyYPs6G7do1l2D2hIvIKo= -cloud.google.com/go/monitoring v1.1.0/go.mod h1:L81pzz7HKn14QCMaCs6NTQkdBnE87TElyanS95vIcl4= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.17.1 h1:s2UGTTphpnUQ0Wppkp2OprR4pS3nlBpPvyL2GV9cqdc= -cloud.google.com/go/pubsub v1.17.1/go.mod h1:4qDxMr1WsM9+aQAz36ltDwCIM+R0QdlseyFjBuNvnss= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -67,107 +60,53 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6 h1:tW+ztA4A9UT9xnco5wUjW1oNi35k22eUEn9tNpPYVwE= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee h1:iAAPf9s7/+BIiGf+RjgcXLm3NoZaLIJsBXJuUa63Lx8= -code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee/go.mod h1:Jzi+ccHgo/V/PLQUaQ6hnZcC1c4BS790gx21LRRui4g= code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunOIA4OODh7djZbk48qqbowNFI= -code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= -code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= -code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/prometheus v0.4.1 h1:oObVeKo2NxpdF/fIfrPsNj6K0Prg0R0mHM+uANlYMiM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/Azure/azure-amqp-common-go/v3 v3.2.1 h1:uQyDk81yn5hTP1pW4Za+zHzy97/f4vDz9o1d/exI4j4= -github.com/Azure/azure-amqp-common-go/v3 v3.2.1/go.mod h1:O6X1iYHP7s2x7NjUKsXVhkwWrQhxrd+d8/3rRadj4CI= github.com/Azure/azure-event-hubs-go/v3 v3.3.15 h1:2yAik9gS5Qjs4Z6EM1B6d0tfZJ506B/0oA08JlRQxb8= -github.com/Azure/azure-event-hubs-go/v3 v3.3.15/go.mod h1:xgDvUi1+8/bb11WTEaU7VwZREYufzKzjWE4YiPZixb0= -github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= -github.com/Azure/azure-pipeline-go v0.1.9/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v59.0.0+incompatible h1:I1ULJqny1qQhUBFy11yDXHhW3pLvbhwV0PTn7mjp9V0= -github.com/Azure/azure-sdk-for-go v59.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= -github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-amqp v0.16.0 h1:6mhxUxaKLjMtHlGqzeih/LKqjUPLZxbM6zwfz5/C4NQ= -github.com/Azure/go-amqp v0.16.0/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI= github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= -github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.15 h1:X+p2GF0GWyOiSmqohIaEeuNFNDY4I4EOlVuUQvFdWMk= -github.com/Azure/go-autorest/autorest/adal v0.9.15/go.mod h1:tGMin8I49Yij6AQ+rvV+Xa/zwxYQB5hmsd6DkfAx2+A= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= -github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.4 h1:+IawcoXhCBylN7ccwdwf8LOH2jKq7NavGpEPanrlTzE= github.com/DataDog/zstd v1.4.4/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw= -github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim v0.9.3 h1:k371PzBuRrz2b+ebGuI2nVgVhgsVX60jMfSw80NECxo= @@ -178,32 +117,20 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PaesslerAG/gval v1.0.0 h1:GEKnRwkWDdf9dOmKcNrar9EA1bz1z9DqPIO1+iLzhd8= -github.com/PaesslerAG/gval v1.0.0/go.mod h1:y/nm5yEyTeX6av0OfKJNp9rBNj2XrGhAf5+v24IBN1I= -github.com/PaesslerAG/jsonpath v0.1.0/go.mod h1:4BzmtoM/PI8fPO4aQGIusjGxGir2BzcV0grWtFzq1Y8= github.com/PaesslerAG/jsonpath v0.1.1 h1:c1/AToHQMVsduPAa4Vh6xp2U0evy4t8SWp8imEsylIk= -github.com/PaesslerAG/jsonpath v0.1.1/go.mod h1:lVboNxFGal/VwW6d9JzIy56bUsYAP6tH/x80vjnCseY= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adriansr/fsnotify v1.4.8-0.20211018144411-a81f2b630e7c h1:LpOCwE9oTg0+1Dm8rB06dKxQs7yu5tdnM6A/Zm/juQQ= github.com/adriansr/fsnotify v1.4.8-0.20211018144411-a81f2b630e7c/go.mod h1:onXS6zmTa1LJcurVsOkzywEV/Q3pdEqqu362/8OQzAI= github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc h1:9iW/Fbn/R/nyUOiqo6AgwBe8uirqUIoTGF3vKG8qjoc= -github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc/go.mod h1:zj8LBEnWBDOVEIJt8LvaRvDG5ARAoa5dBeHaB472NRc= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw= github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -213,147 +140,78 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alexflint/go-filemutex v1.1.0 h1:IAWuUuRYL2hETx5b8vCgwnD+xSdlsTQY6s2JjBsqLdg= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 h1:7rj9qZ63knnVo2ZeepYHvHuRdG76f3tRUTdIQDzRBeI= github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20/go.mod h1:cI59GRkC2FRaFYtgbYEqMlgnnfvAwXzjojyZKXwklNg= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 h1:WFwa9pqou0Nb4DdfBOyaBTH0GqLE74Qwdf61E7ITHwQ= -github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43/go.mod h1:tJPYQG4mnMeUtQvQKNkbsFrnmZOg59Qnf8CcctFv5v4= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antonmedv/expr v1.9.0 h1:j4HI3NHEdgDnN9p6oI6Ndr0G5QryMY0FNxT4ONrFDGU= -github.com/antonmedv/expr v1.9.0/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.15.0 h1:aGvdaR0v1t9XLgjtBYwxcBvBOTMqClzwE26CHOgjW1Y= -github.com/apache/thrift v0.15.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= +github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 h1:afT88tB6u9JCKQZVAAaa9ICz/uGn5Uw9ekn6P22mYKM= -github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= -github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= -github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.9.0 h1:dWtJKGRFv3UZkMBQaIzMsF0/y4ge3iQPWTzeC4r/vl4= github.com/aws/aws-sdk-go-v2 v0.9.0/go.mod h1:sa1GePZ/LfBGI4dSq30f6uR4Tthll8axxtEPvlpXZ8U= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 h1:S/ZBwevQkr7gv5YxONYpGQxlMFFYSRfz3RMcjsC9Qhk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3/go.mod h1:gNsR5CaXKmQSSzrmGxmwmct/r+ZBfbxorAuXYsj/M5Y= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/config v1.15.12 h1:D4mdf0cOSmZRgJe0DDOd1Qm6tkwHJ7r5i1lz0asa+AA= -github.com/aws/aws-sdk-go-v2/config v1.15.12/go.mod h1:oxRNnH11J580bxDEXyfTqfB3Auo2fxzhV052LD4HnyA= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= github.com/aws/aws-sdk-go-v2/credentials v1.12.7 h1:e2DcCR0gP+T2zVj5eQPMQoRdxo+vd2p9BkpJ72BdyzA= -github.com/aws/aws-sdk-go-v2/credentials v1.12.7/go.mod h1:8b1nSHdDaKLho9VEK+K8WivifA/2K5pPm4sfI21NlQ8= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.7 h1:8yi2ORCwXpXEPnj0vP3DjYhejwDQD/5klgBoxXcKOxY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.7/go.mod h1:81k6q0UUZj6AdQZ1E/VQ27cLrTUpJGraZR6/hVHRxjE= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.17 h1:9Y+OvoIvC8KocGNqbbBNDvMu0zsIgzKg3r+ZllSuH5Y= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.17/go.mod h1:z/7g6Z78jPG0l3HeShseUWzA+aBJDK4Mu5DkKkYdIW0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.10/go.mod h1:F+EZtuIwjlv35kRJPyBGcsA4f7bnSoz15zOQ2lJq1Z4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.13 h1:WuQ1yGs3TMJgxpGVLspcsU/5q1omSA0SG6Cu0yZ4jkM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.13/go.mod h1:wLLesU+LdMZDM3U0PP9vZXJW39zmD/7L4nY2pSrYZ/g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.4/go.mod h1:8glyUqVIM4AmeenIsPo0oVh3+NUwnsQml2OFupfQW+0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.7 h1:mCeDDYeDXp3loo/xKi7nkx34eeh7q3n1mUBtzptsj8c= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.7/go.mod h1:93Uot80ddyVzSl//xEJreNKMhxntr71WtR3v/A1cRYk= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.14 h1:bJv4Y9QOiW0GZPStgLgpGrpdfRDSR3XM4V4M3YCQRZo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.14/go.mod h1:R1HF8ZDdcRFfAGF+13En4LSHi2IrrNuPQCaxgWCeGyY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.4 h1:wusoY1MJ9JNrPoX3n4kxY4MTIUivCiXvTYQbYh59yxs= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.4/go.mod h1:cHTMyJVEXRUZ25f8V+pq6CAwoYARarJRFGf3XH4eIxE= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2 h1:5fez51yE//mtmaEkh9JTAcLl4xg60Ha86pE+FIqinGc= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.20.4 h1:faP794ma9ZY/24XAV8cm/lkQzRFSg3zBHCi5Nc8+CaM= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.20.4/go.mod h1:ybjChNDMfPtc7f8ILTb+ov6CpE/KtAae9fD8HHtYfzU= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.5.0/go.mod h1:acH3+MQoiMzozT/ivU+DbRg7Ooo2298RdRaWcOv+4vM= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.2 h1:UecVUEdx3xe80X+guNwR2hN1d4L4v4qX2SHLYd/4cIk= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.2/go.mod h1:UhlwJ2aI2pzirWzrcsoqvbv7Yao3dgB0AK+yyAWESkA= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.5 h1:aPK8IBVKeozo/pNGshT8xOJ2V3Y7ykOM49QcY0vhUSM= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.5/go.mod h1:ErjxucZaraVbYm66xxub00qmGBw7md2RFqy6624KbR8= github.com/aws/aws-sdk-go-v2/service/costexplorer v1.18.4 h1:jbfG3cbq1kiK1/OAfUh4zf1ADtAU8KoeOPfF94S96pU= -github.com/aws/aws-sdk-go-v2/service/costexplorer v1.18.4/go.mod h1:yC5cDNa3xzSh5NIU5x0NBBo6QkcsaM0tuPNCczeUPoU= github.com/aws/aws-sdk-go-v2/service/ec2 v1.36.1 h1:FS8Ja6LuLDVHcX+rmoNpOXqYb52N2A5DwQy7Dgduq4Q= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.36.1/go.mod h1:KOy1O7Fc2+GRgsbn/Kjr15vYDVXMEQALBaPRia3twSY= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.18.4 h1:ZBYifRGfN3dOKzvk0+XJiUKOFzqoJddYqCVsN5quCh4= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.18.4/go.mod h1:9wKR88sRRyxrUAw5iVSDTfcCz90BLEFcAiyzP4v39uY= github.com/aws/aws-sdk-go-v2/service/iam v1.18.4 h1:E41guA79mjEbwJdh0zXz1d8+Zt4zxRr+b1ipiVbKXzs= -github.com/aws/aws-sdk-go-v2/service/iam v1.18.4/go.mod h1:FpNvAfCZyIQ3qeNJUOw4CShKvdizHblXqAvSk0qmyL4= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 h1:4n4KCtv5SUoT5Er5XV41huuzrCqepxlW3SDI9qHQebc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3/go.mod h1:gkb2qADY+OHaGLKNTYxMaQNacfeyQpZ4csDTQMeFmcw= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.8 h1:BzBekDihMMeBexBhdK7xS3AIh2Jg/mECyLWO5RRwwHY= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.8/go.mod h1:a1BSeQI9IVr1j5Dwn73cdAKi4MdizTaV9YovUaHefGI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.4/go.mod h1:uKkN7qmSIsNJVyMtxNQoCEYMvFEXbOg9fwCJPdfp2u8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.7 h1:M7/BzQNsu0XXiJRe3gUn8UA8tExF6kLMAfvo5PT/KJY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.7/go.mod h1:HvVdEh/x4jsPBsjNvDy+MH3CDCPy4gTZEzFe2r4uJY8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.7 h1:imb0NhTQZaTDSAQvgFyiZbKTwl0F+AkZL1ZNoEHtuQc= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.7/go.mod h1:V952z/yIT247sKya+CB+Ls3sxpB9jeBj5TkLraCGKGU= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.6.0/go.mod h1:9O7UG2pELnP0hq35+Gd7XDjOLBkg7tmgRQ0y14ZjoJI= github.com/aws/aws-sdk-go-v2/service/kinesis v1.15.8 h1:iXRv1ZOF6riNcy5UR6LPTaGa64wZQH8tKj5LHsiajY8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.15.8/go.mod h1:oWvoK8MyYnXi6ZxSpgU7kFxIPGX8EfbCrdQCNgPnhCc= github.com/aws/aws-sdk-go-v2/service/organizations v1.15.2 h1:lwVNtW6wmwa9iIH017Y9qMoGCcEtvDYJQGUO/1jlRBc= -github.com/aws/aws-sdk-go-v2/service/organizations v1.15.2/go.mod h1:QV/cuhF5g2FEc7178E+mpmiqf7sS2aHCDGLNkVgHf2o= github.com/aws/aws-sdk-go-v2/service/rds v1.20.1 h1:5PrsAmuF3r9bvZMxKxHnJlHSh0IYDAWEzpRRnDlE7nM= -github.com/aws/aws-sdk-go-v2/service/rds v1.20.1/go.mod h1:PBfhG/hYU+oCP1uT7fNfaqaAvxQGbB0POqh1GE/7OdM= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.13.5 h1:nAHv/rx0pSqpECdrNtmKKb7RzYOpqXda+Dt8xBJifiM= -github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.13.5/go.mod h1:LQ8mizR4n/TdYBwmU4ZXfbKceeBSrdIzZBM7jZqMK0U= github.com/aws/aws-sdk-go-v2/service/s3 v1.26.12 h1:/JTTdNObz+GygQqnbdBzummuxFIcuB6hbra1mqS+Wic= -github.com/aws/aws-sdk-go-v2/service/s3 v1.26.12/go.mod h1:eas8WnpTDJtCvEjRXAINFuox9TmEGeevxiUKEKv2tQ8= github.com/aws/aws-sdk-go-v2/service/sqs v1.18.4 h1:/O5+Nzs3k9gVx7gGUblbGf7rHZz71tYaOq9czgBaQZs= -github.com/aws/aws-sdk-go-v2/service/sqs v1.18.4/go.mod h1:j65jgKI0Gnc6SO25l2q0qV+X3b9S40571AOZ53bEXRI= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= github.com/aws/aws-sdk-go-v2/service/sso v1.11.10 h1:icon5WWg9Yg5nkB0pJF6bfKw6M0xozukeGKSNKtnqzw= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.10/go.mod h1:UHxA35uPrCykRySBV5iSPZhZRlYnWSS2c/aaZVsoU94= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/aws-sdk-go-v2/service/sts v1.16.8 h1:GLGfpqX+1bmjNvUJkwB1ZaDpNFXQwJ3z9RkQDA58OBY= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.8/go.mod h1:50YdFq1WIuxA0AGrygvYGucnNYrG24WYzu5fNp7lMgY= -github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= github.com/aws/smithy-go v1.12.0 h1:gXpeZel/jPoWQ7OEmLIgCUnhkFftqNfwWUwAHSlp1v0= -github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/awslabs/goformation/v3 v3.1.0/go.mod h1:hQ5RXo3GNm2laHWKizDzU5DsDy+yNcenSca2UxN0850= github.com/awslabs/goformation/v4 v4.1.0 h1:JRxIW0IjhYpYDrIZOTJGMu2azXKI+OK5dP56ubpywGU= -github.com/awslabs/goformation/v4 v4.1.0/go.mod h1:MBDN7u1lMNDoehbFuO4uPvgwPeolTMA2TzX1yO6KlxI= github.com/awslabs/kinesis-aggregation/go/v2 v2.0.0-20220623125934-28468a6701b5 h1:lxW5Q6K2IisyF5tlr6Ts0W4POGWQZco05MJjFmoeIHs= -github.com/awslabs/kinesis-aggregation/go/v2 v2.0.0-20220623125934-28468a6701b5/go.mod h1:0Qr1uMHFmHsIYMcG4T7BJ9yrJtWadhOmpABCX69dwuc= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= -github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -362,37 +220,19 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bi-zone/go-winio v0.4.15 h1:viLHm+U7bzIkfVHuWgc3Wp/sT5zaLoRG7XdOEy1b12w= github.com/bi-zone/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI= -github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= -github.com/bsm/sarama-cluster v2.1.13+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible h1:4g18+HnTDwEtO0n7K8B1Kjq+04MEKJRkhJNQ/hb9d5A= -github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/casbin/casbin/v2 v2.31.6/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e h1:YYUjy5BRwO5zPtfk+aa2gw255FIIoi93zMmuy19o0bc= -github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e/go.mod h1:V284PjgVwSk4ETmz84rpu9ehpGg7swlIH8npP9k2bGw= github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e h1:Gbx+iVCXG/1m5WSnidDGuHgN+vbIwl+6fR092ANU+Y8= -github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e/go.mod h1:AZIh1CCnMrcVm6afFf96PBvE2MRpWFco91z8ObJtgDY= -github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -401,7 +241,6 @@ github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5P github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -420,15 +259,11 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyY github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f h1:fK3ikA1s77arBhpDwFuyO0hUZ2Aa8O6o2Uzy8Q6iLbs= -github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f/go.mod h1:RtIewdO+K/czvxvIFCMbPyx7jdxSLL1RZ+DA/Vk8Lwg= github.com/cloudfoundry/noaa v2.1.0+incompatible h1:hr6VnM5VlYRN3YD+NmAedQLW8686sUMknOSe0mFS2vo= -github.com/cloudfoundry/noaa v2.1.0+incompatible/go.mod h1:5LmacnptvxzrTvMfL9+EJhgkUfIgcwI61BVSTh47ECo= github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 h1:cWfya7mo/zbnwYVio6eWGsFJHqYw4/k/uhwIJ1eqRPI= -github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -441,42 +276,33 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY= github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA= github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.6 h1:xJNPhbrmz8xAMDNoVjHy9YHtWwEQNS+CDkcIRh7t8Y0= github.com/containerd/containerd v1.6.6/go.mod h1:ZoP1geJldzCVY3Tonoz7b1IXk8rIX0Nltt5QE4OMNk0= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= github.com/containerd/continuity v0.2.2 h1:QSqfxcn8c+12slxwu00AtzXrsami0MJb/MQs9lOLHLA= github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-cni v1.1.3/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= github.com/containerd/go-cni v1.1.6 h1:el5WPymG5nRRLQF1EfB97FWob4Tdc8INg8RZMaXWZlo= github.com/containerd/go-cni v1.1.6/go.mod h1:BWtoWl5ghVymxu6MBjg79W9NZrCRyHIdUtk4cauMe34= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/imgcrypt v1.1.4 h1:iKTstFebwy3Ak5UF0RHSeuCTahC5OIrPJa6vjMAM81s= @@ -485,11 +311,9 @@ github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/stargz-snapshotter/estargz v0.4.1 h1:5e7heayhB7CcgdTkqfZqrNaNv15gABwr3Q2jBTbLlt4= github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v1.0.0 h1:cXLJbx+4Jj7rNsTiqVfm6i+RNLx6FFA2fMmDlEf+Wm8= @@ -515,28 +339,24 @@ github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHo github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b h1:WR1qVJzbvrVywhAk4kMQKRPx09AZVI0NdEdYs59iHcA= -github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b/go.mod h1:v9FBN7gdVTpiD/+LZ7Po0UKvROyT87uLVxTHVky/dlQ= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -546,46 +366,28 @@ github.com/d2g/dhcp4client v1.0.0 h1:suYBsYZIkSlUMEz4TAYCczKf62IA2UWC+O8+KtdOhCo github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5 h1:+CpLbZIeUn94m02LdEKPcgErLJ347NUwxPKs5u8ieiY= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o= -github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= -github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk= -github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2 h1:6+hM8KeYKV0Z9EIINNqIEDyyIRAcNc2FW+/TUYNmWyw= -github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgraph-io/badger/v2 v2.2007.3-0.20201012072640-f5a7e0a1c83b h1:mUDs72Rlzv6A4YN8w3Ra3hU9x/plOQPcQjZYL/1f5SM= github.com/dgraph-io/badger/v2 v2.2007.3-0.20201012072640-f5a7e0a1c83b/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= -github.com/dgraph-io/badger/v3 v3.2103.1/go.mod h1:dULbq6ehJ5K0cGW/1TQ9iSfUk0gbSiToDWmWmTsJ53E= github.com/dgraph-io/badger/v3 v3.2103.2 h1:dpyM5eCJAtQCBcMCZcT4UBZchuTJgCywerHHgmxfxM8= -github.com/dgraph-io/badger/v3 v3.2103.2/go.mod h1:RHo4/GmYcKKh5Lxu63wLEMHJ70Pac2JqZRYGhlyAo2M= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1 h1:eG5K5GNAAHvQlFmfIuy0Ocjg5dvyX22g/KknwTpmBko= -github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1/go.mod h1:PRcPVAAma6zcLpFd4GZrjR/MRpood3TamjKI2m/z/Uw= -github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= -github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 h1:2HQmlpI3yI9deH18Q6xiSOIjXD4sLI55Y/gfpa8/558= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -602,44 +404,32 @@ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 h1:BzN9o4IS1Hj+AM5qDggsfMDQGFXau5KagipEFmnyIbc= -github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5/go.mod h1:cxc20xI7fOgsFHWgt+PenlDDnMcrvh7Ocuj5hEFIdEk= github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6 h1:RrkoB0pT3gnjXhL/t10BSP1mcr/0Ldea2uMyuBr2SWk= github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/eclipse/paho.mqtt.golang v1.3.5 h1:sWtmgNxYM9P2sP+xEItMozsR3w0cqZFlqnNN1bdl41Y= -github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0= -github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68= github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220729042438-db251f744b35 h1:E7cghslsOdEzY+cmw6lXe2WHfS2B5PEKKjeO7p00aPE= github.com/elastic/beats/v7 v7.0.0-alpha2.0.20220729042438-db251f744b35/go.mod h1:H9A0GJwZ4J0tCX4d2vKsjpLH3QzfySZK8j/jB3dkv44= github.com/elastic/ecs v1.12.0 h1:u6WZ2AWtxv5vHvTQ4EuVZdWZ51mKHQ2UIltRePcta5U= github.com/elastic/ecs v1.12.0/go.mod h1:pgiLbQsijLOJvFR8OTILLu0Ni/R/foUNg0L+T6mU9b4= github.com/elastic/elastic-agent-autodiscover v0.2.1 h1:Nbeayh3vq2FNm6xaFo34mhUdOu0EVlpj53CqCsbU0E4= github.com/elastic/elastic-agent-autodiscover v0.2.1/go.mod h1:gPnzzfdYNdgznAb+iG9eyyXaQXBbAMHa+Y6Z8hXfcGY= -github.com/elastic/elastic-agent-client/v7 v7.0.0-20210727140539-f0905d9377f6/go.mod h1:uh/Gj9a0XEbYoM4NYz4LvaBVARz3QXLmlNjsrKY9fTc= github.com/elastic/elastic-agent-client/v7 v7.0.0-20220607160924-1a71765a8bbe h1:knHO5fYAT3+sLf64NxcOxdjGysPxsSMkQGB27vMS8TE= github.com/elastic/elastic-agent-client/v7 v7.0.0-20220607160924-1a71765a8bbe/go.mod h1:fkvyUfFwyAG5OnMF0h+FV9sC0Xn9YLITwQpSuwungQs= -github.com/elastic/elastic-agent-libs v0.2.2/go.mod h1:1xDLBhIqBIjhJ7lr2s+xRFFkQHpitSp8q2zzv1Dqg+s= github.com/elastic/elastic-agent-libs v0.2.5/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE= -github.com/elastic/elastic-agent-libs v0.2.7/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE= github.com/elastic/elastic-agent-libs v0.2.9 h1:7jOCqNqEWG0kJb3fa8/SC6beSiys1TmAylH9+hWTnrM= github.com/elastic/elastic-agent-libs v0.2.9/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE= github.com/elastic/elastic-agent-shipper-client v0.2.0 h1:p+5ep48YCOe+3nICeWmiLwQV11yDLad2n4NunI66Shg= @@ -650,30 +440,24 @@ github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c/go github.com/elastic/elastic-transport-go/v8 v8.1.0 h1:NeqEz1ty4RQz+TVbUrpSU7pZ48XkzGWQj02k5koahIE= github.com/elastic/elastic-transport-go/v8 v8.1.0/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI= github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270 h1:cWPqxlPtir4RoQVCpGSRXmLqjEHpJKbR60rxh1nQZY4= -github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270/go.mod h1:Msl1pdboCbArMF/nSCDUXgQuWTeoMmE/z8607X+k7ng= github.com/elastic/gmux v0.2.0 h1:HzaJ6FQAZzKJ2RTrINIfDXN1voO5EEEJKLb1Hlrn8pw= github.com/elastic/gmux v0.2.0/go.mod h1:6+9rYPXZXAyCIb7g3WQ0OVWoLNpU/xHz2VXUrtw6BUg= github.com/elastic/go-concert v0.2.0 h1:GAQrhRVXprnNjtvTP9pWJ1d4ToEA4cU5ci7TwTa20xg= github.com/elastic/go-concert v0.2.0/go.mod h1:HWjpO3IAEJUxOeaJOWXWEp7imKd27foxz9V5vegC/38= -github.com/elastic/go-elasticsearch/v8 v8.2.0/go.mod h1:yY52i2Vj0unLz+N3Nwx1gM5LXwoj3h2dgptNGBYkMLA= github.com/elastic/go-elasticsearch/v8 v8.3.1-0.20220628162544-12728fd8a555 h1:Ni5YZ9708/hCTW5VHMEuTB+5MmphR3UqPsvpny99ngU= github.com/elastic/go-elasticsearch/v8 v8.3.1-0.20220628162544-12728fd8a555/go.mod h1:Usvydt+x0dv9a1TzEUaovqbJor8rmOHy5dSmPeMAE2k= github.com/elastic/go-hdrhistogram v0.1.0 h1:7UVeQ9MsO5c9h8RJeH2S2lXCGi9hQB/94W6Pjjqprc4= github.com/elastic/go-hdrhistogram v0.1.0/go.mod h1:NEl0wZTQXzwq7X2WBZGl5G3efcKbvv+r9mTZpXrIs78= github.com/elastic/go-libaudit/v2 v2.3.1 h1:BCPhB3BZTl2YBPJy3XHIu4DFfbbbWEmLMLlK/aJ7U/0= -github.com/elastic/go-libaudit/v2 v2.3.1/go.mod h1:+ZE0czqmbqtnRkl0fNgpI+HvVVRo/ZMJdcXv/PaKcOo= github.com/elastic/go-licenser v0.3.1/go.mod h1:D8eNQk70FOCVBl3smCGQt/lv7meBeQno2eI1S5apiHQ= github.com/elastic/go-licenser v0.4.0/go.mod h1:V56wHMpmdURfibNBggaSBfqgPxyT1Tldns1i87iTEvU= github.com/elastic/go-licenser v0.4.1 h1:1xDURsc8pL5zYT9R29425J3vkHdt4RT5TNEMeRN48x4= github.com/elastic/go-licenser v0.4.1/go.mod h1:V56wHMpmdURfibNBggaSBfqgPxyT1Tldns1i87iTEvU= github.com/elastic/go-lookslike v0.3.0 h1:HDI/DQ65V85ZqM7D/sbxcK2wFFnh3+7iFvBk2v2FTHs= -github.com/elastic/go-lookslike v0.3.0/go.mod h1:AhH+rdJux5RlVjs+6ej4jkvYyoNRkj2crxmqeHlj3hA= github.com/elastic/go-lumber v0.1.0 h1:HUjpyg36v2HoKtXlEC53EJ3zDFiDRn65d7B8dBHNius= github.com/elastic/go-lumber v0.1.0/go.mod h1:8YvjMIRYypWuPvpxx7WoijBYdbB7XIh/9FqSYQZTtxQ= github.com/elastic/go-perf v0.0.0-20191212140718-9c656876f595 h1:q8n4QjcLa4q39Q3fqHRknTBXBtegjriHFrB42YKgXGI= -github.com/elastic/go-perf v0.0.0-20191212140718-9c656876f595/go.mod h1:s09U1b4P1ZxnKx2OsqY7KlHdCesqZWIhyq0Gs/QC/Us= github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f h1:FvsqAVIFZtJtK+koSvFU+/KoNQo1m14kgV5qJ8ImN+U= -github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f/go.mod h1:OPGqFNdTS34kMReS5hPFtBhD9J8itmSDurs1ix2wx7c= github.com/elastic/go-seccomp-bpf v1.2.0 h1:K5fToUAMzm0pmdlYORmw0FP0DloRa1SfqRYkum647Yk= github.com/elastic/go-seccomp-bpf v1.2.0/go.mod h1:l+89Vy5BzjVcaX8USZRMOwmwwDScE+vxCFzzvQwN7T8= github.com/elastic/go-structform v0.0.9 h1:HpcS7xljL4kSyUfDJ8cXTJC6rU5ChL1wYb6cx3HLD+o= @@ -682,7 +466,6 @@ github.com/elastic/go-sysinfo v1.7.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6 github.com/elastic/go-sysinfo v1.8.1 h1:4Yhj+HdV6WjbCRgGdZpPJ8lZQlXZLKDAeIkmQ/VRvi4= github.com/elastic/go-sysinfo v1.8.1/go.mod h1:JfllUnzoQV/JRYymbH3dO1yggI3mV2oTKSXsDHM+uIM= github.com/elastic/go-ucfg v0.7.0/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo= -github.com/elastic/go-ucfg v0.8.4/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA= github.com/elastic/go-ucfg v0.8.5/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA= github.com/elastic/go-ucfg v0.8.6 h1:stUeyh2goTgGX+/wb9gzKvTv0YB0231LTpKUgCKj4U0= github.com/elastic/go-ucfg v0.8.6/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA= @@ -693,13 +476,11 @@ github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/ github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/sarama v1.19.1-0.20210823122811-11c3ef800752 h1:5/RUNg7rkIvayjPhAIoI3v8p45NfWcfWs5DZSElycis= github.com/elastic/sarama v1.19.1-0.20210823122811-11c3ef800752/go.mod h1:mdtqvCSg8JOxk8PmpTNGyo6wzd4BMm4QXSfDnTXmgkE= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -714,41 +495,31 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fearful-symmetry/gomsr v0.0.1 h1:m208RzdTApWVbv8a9kf78rdPLQe+BY9AxRb/nSbHxSA= -github.com/fearful-symmetry/gomsr v0.0.1/go.mod h1:Qb/0Y7zwobP7v8Sji+M5mlL4N7Voyz5WaKXXRFPnLio= github.com/fearful-symmetry/gorapl v0.0.4 h1:TMn4fhhtIAd+C3NrAl638oaYlX1vgcKNVVdad53oyiE= -github.com/fearful-symmetry/gorapl v0.0.4/go.mod h1:XoeZ+5v0tJX9WMvzqdPaaKAdX7y17mDN3pxDGemINR0= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= -github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/getkin/kin-openapi v0.76.0 h1:j77zg3Ec+k+r+GA3d8hBoXpAc6KX9TbBPrwQGBIy2sY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= @@ -756,11 +527,6 @@ github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49P github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -768,18 +534,15 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.11.0 h1:IGmIEl7aHTYh6E2HlT+ptILBotjo4xl8PMDl852etiI= -github.com/go-kit/kit v0.11.0/go.mod h1:73/6Ixaufkvb5Osvkls8C79vuQ49Ba1rUEUYNSf+FUw= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-ldap/ldap v3.0.2+incompatible h1:kD5HQcAzlQ7yrhfn+h+MSABeAy/jAJhvIJ/QDllP44g= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -791,203 +554,67 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc= -github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.1 h1:j23mMDtRxMwIobkpId7sWh7Ddcx4ivaoqUbfXx5P+a8= -github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= -github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= -github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= -github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.19.28/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/runtime v0.21.0 h1:giZ8eT26R+/rx6RX2MkYjZPY8vPYVKDhP/mOazrQHzM= -github.com/go-openapi/runtime v0.21.0/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= +github.com/go-openapi/runtime v0.23.3 h1:/dxjx4KCOQI5ImBMz036F6v/DzZ2NUjSRvbLJs1rgoE= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= -github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= -github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= +github.com/go-openapi/strfmt v0.21.2 h1:5NDNgadiX1Vhemth/TH4gCGopWSTdDjxl60H3B7f+os= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= -github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= -github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= -github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be h1:zXHeEEJ231bTf/IXqvCfeaqjLpXsq42ybLoT4ROSR6Y= -github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be/go.mod h1:/oj50ZdPq/cUjA02lMZhijk5kR31SEydKyqah1OgBuo= -github.com/gocql/gocql v0.0.0-20200228163523-cd4b606dd2fb h1:H3tisfjQwq9FTyWqlKsZpgoYrsvn2pmTWvAiDHa5pho= -github.com/gocql/gocql v0.0.0-20200228163523-cd4b606dd2fb/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= +github.com/gocql/gocql v0.0.0-20211222173705-d73e6b1002a7 h1:jmIMM+nEO+vjz9xaRIg9sZNtNLq5nsSbsxwe1OtRwv4= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.33.2 h1:7UBlS8sAfEQlV5CbkLOJQc90QM+kMthlyLbaAWhawHk= -github.com/godror/godror v0.33.2/go.mod h1:FbrZ7po7LyS3gUTdW/K1+kIoePvP/E044HpwptL4vqw= github.com/godror/knownpb v0.1.0 h1:dJPK8s/I3PQzGGaGcUStL2zIaaICNzKKAK8BzP1uLio= -github.com/godror/knownpb v0.1.0/go.mod h1:4nRFbQo1dDuwKnblRXDxrfCFYeT4hjg3GjMqef58eRE= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1004,7 +631,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -1023,8 +649,6 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -1035,10 +659,7 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -1056,13 +677,11 @@ github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1 h1:/+mFTs4AlwsJ/mJe8NDtKb7BxLtbZFpcn8vDsneEkwQ= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= -github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 h1:OggOMmdI0JLwg1FkOKH9S7fVHF0oEm8PX6S8kAdpOps= github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -1076,7 +695,6 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -1091,35 +709,25 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 h1:f0n1xnMSmBLzVfsMMvriDyA75NB/oBgILX2GcHXIQzY= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -1128,46 +736,30 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/h2non/filetype v1.1.1 h1:xvOwnXKAckvtLWsN398qS9QhlxlnVXBjXBydK2/UFB4= github.com/h2non/filetype v1.1.1/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= -github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/cronexpr v1.1.0 h1:dnNsWtH0V2ReN7JccYe8m//Bj14+PjJDntR1dz0Cixk= -github.com/hashicorp/cronexpr v1.1.0/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1177,31 +769,23 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.1.0 h1:QsGcniKx5/LuX2eYoeL+Np3UKYPNaN7YKpTh29h8rbw= -github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM= -github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= +github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.6 h1:HJunrbHTDDbBb/ay4kxa1n+dLmttUlnP3V9oNE4hmsM= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= @@ -1215,10 +799,8 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -1234,16 +816,11 @@ github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg github.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj34fMA= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8 h1:Yrz9yGVJf5Ce2KS7x8hS/MUTIeBmGEhF8nhzolRpSqY= -github.com/hashicorp/nomad/api v0.0.0-20201203164818-6318a8ac7bf8/go.mod h1:vYHP9jMXk4/T2qNUbWlQ1OHCA1hHLil3nvqSmz8mtgc= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= @@ -1254,51 +831,25 @@ github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvh github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d h1:W+SIwDdl3+jXWeidYySAgzytE3piq6GumXeBjFBG67c= -github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 h1:S4qyfL2sEm5Budr4KVMyEniCy+PbS55651I/a+Kn/NQ= -github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= -github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= -github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= -github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= -github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= -github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/insomniacslk/dhcp v0.0.0-20180716145214-633285ba52b2 h1:uJiWD+lXJ+WJ9kldTB6F4T4V+oGIhd0I1ktTXk3P6Ks= -github.com/insomniacslk/dhcp v0.0.0-20180716145214-633285ba52b2/go.mod h1:CfMdguCK66I5DAUJgGKyNz8aB6vO5dZzkm9Xep6WGvw= github.com/intel/goresctrl v0.2.0 h1:JyZjdMQu9Kl/wLXe9xA6s1X+tF6BWsQPFGJMEeCfWzE= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= -github.com/jaegertracing/jaeger v1.30.0 h1:Mehv04ZVMTdyayDrcepIEd125sDFa7RT8xb7OJp98+E= -github.com/jaegertracing/jaeger v1.30.0/go.mod h1:/SkmyLgoYfUkcEmE9mcXjYEiG+YiWSRaWKZrkYnroRw= +github.com/jaegertracing/jaeger v1.36.0 h1:2S7otDbeCUXvOBieTIcxHfuj3x+WvHYZzizr4wzQfOo= +github.com/jaegertracing/jaeger v1.36.0/go.mod h1:67uyR2zQgEk7EfguOR3eZOGvGDRzY5Yos6n2aaXxq1Y= github.com/jarcoal/httpmock v1.0.4 h1:jp+dy/+nonJE4g4xbVtl9QdrUNbn6/3hDT5R4nDIZnA= -github.com/jarcoal/httpmock v1.0.4/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jcchavezs/porto v0.1.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= github.com/jcchavezs/porto v0.4.0 h1:Zj7RligrxmDdKGo6fBO2xYAHxEgrVBfs1YAja20WbV4= github.com/jcchavezs/porto v0.4.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= @@ -1316,15 +867,9 @@ github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZ github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.3.1 h1:aLN7YINNZ7cYOPK3QC83dbM6KT0NMqVMw961TqrejlE= -github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/joefitzgerald/rainbow-reporter v0.1.0 h1:AuMG652zjdzI0YCCnXAqATtRBpGXMcAnrajcaTrSeuo= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= @@ -1334,17 +879,14 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE= github.com/josephspurrier/goversioninfo v1.4.0 h1:Puhl12NSHUSALHSuzYwPYQkqa2E1+7SrtAPJorKK0C8= github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1353,43 +895,27 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/karrick/godirwalk v1.15.6/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/karrick/godirwalk v1.15.8 h1:7+rWAZPn9zuRxaIqqT8Ohs2Q2Ac0msBqwRdxNCr2VVs= -github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.14.2 h1:S0OHlFk/Gbon/yauFJ4FfJJF5V0fc5HbBTJazi28pRw= -github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/knadh/koanf v1.4.0 h1:/k0Bh49SqLyLNfte9r6cvuZWrApOQhglOmhIU3L/zDw= -github.com/knadh/koanf v1.4.0/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/klauspost/compress v1.15.8 h1:JahtItbkWjf2jzm/T+qgMxkP9EMHsqEUA6vCMGmXvhA= +github.com/klauspost/compress v1.15.8/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/knadh/koanf v1.4.2 h1:2itp+cdC6miId4pO4Jw7c/3eiYD26Z/Sz3ATJMwHxIs= +github.com/knadh/koanf v1.4.2/go.mod h1:4NCo0q4pmU398vF9vq2jStF9MWQZ8JEDcDMHlDCr4h0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= @@ -1409,49 +935,31 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= -github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-reuseport v0.0.2 h1:XSG94b1FJfGA01BUrT82imejHQyTxO4jEWqheyCXYvU= github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3 h1:jUp75lepDg0phMUJBCmvaeFDldD2N3S1lBuPwUTszio= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3 h1:zSGLzsUew8RT+ZKPHc3jnf8XLaVyHzTcAFBzHtCNR20= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.12.1/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.13.0 h1:XtLJl8bcCM7EFoO8FyH8XK3t7G5hQAeK+i4tq+veT9M= github.com/magefile/mage v1.13.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/pkger v0.17.0 h1:RFfyBPufP2V6cddUyyEVSHBpaAnM1WzaMNyqomeT+iY= github.com/markbates/pkger v0.17.0/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11/go.mod h1:Ah2dBMoxZEqk118as2T4u4fjfXarE0pPnMJaArZQZsI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -1459,45 +967,30 @@ github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe h1:YioO2TiJyAHWHyCRQCP8jk5IzTqmsbGc5qQPIhHo6xs= -github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2 h1:g+4J5sZg6osfvEfkRZxJ1em0VT95/UOZgi/l7zi1/oE= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= -github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1518,21 +1011,16 @@ github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI= -github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= -github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -1546,7 +1034,6 @@ github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1556,14 +1043,12 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mostynb/go-grpc-compression v1.1.16 h1:D9tGUINmcII049pxOj9dl32Fzhp26TrDVQXECoKJqQg= github.com/mostynb/go-grpc-compression v1.1.16/go.mod h1:xxa6UoYynYS2h+5HB/Hglu81iYAp87ARaNmhhwi0s1s= github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1572,19 +1057,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.2/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats-server/v2 v2.2.6/go.mod h1:sEnFaxqe09cDmfMgACxZbziXnhQFhwk+aKkZjBBRYrI= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.11.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/networkplumbing/go-nft v0.2.0 h1:eKapmyVUt/3VGfhYaDos5yeprm+LPt881UeksmKKZHY= github.com/networkplumbing/go-nft v0.2.0/go.mod h1:HnnM+tYvlGAsMU7yoYwXEVLLiDW9gdMmb5HoGcwpuQs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= @@ -1594,118 +1066,70 @@ github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnu github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olivere/elastic v6.2.37+incompatible h1:UfSGJem5czY+x/LqxgeCBgjDn6St+z8OnsCuxwD3L0U= -github.com/olivere/elastic v6.2.37+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.5.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.2.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.44.0 h1:05QM/IGlZutP/8yIZKLoPZMvaCE1VIkTXN66lyLofbA= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.44.0/go.mod h1:QqAXyBEoGgnCS4s4KKvNt3Lklr8Z7vZRrk/IOOso3t4= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.44.0 h1:Da6KnkAOhoshuec7Wc1+ExW2K6nYNAEnBM1vewAorHs= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.44.0/go.mod h1:0oUtg+VU8o86ISbIrAi35Mh6pN9xmsf1IfHkh1CWw98= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.56.0 h1:gQRNxr5sW2kxwBAQWJYTcl8H3oW6V2M5fLsiCSOe61M= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.56.0/go.mod h1:26zJmolOTD2CqKCl1wJio+k6yEZpsaSsbWqcCIJ59Uc= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.56.0 h1:4OzAOHjNGaCaS166MYBVZN+3D3wH/GsD4IGbH9IekPo= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.56.0/go.mod h1:D3Z00WpV75kVnou9F6NdtGfHEOTxtnVHGUYcSbBIJSY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df h1:vdYtBU6zvL7v+Tr+0xFM/qhahw/EvY8DMMunZHKH6eE= -github.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/osquery/osquery-go v0.0.0-20210622151333-99b4efa62ec5 h1:E275nJIUAvIK/RSN8cq9MAcRLk23jaZq+s24B0I8bEw= -github.com/osquery/osquery-go v0.0.0-20210622151333-99b4efa62ec5/go.mod h1:JKR5QhjsYdnIPY7hakgas5sxf8qlA/9wQnLqaMfWdcg= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/cmdflag v0.0.2 h1:ybjGJnPr/aURn2IKWjO49znx9N0DL6YfGsIxN0PYuVY= github.com/pierrec/cmdflag v0.0.2/go.mod h1:a3zKGZ3cdQUfxjd0RGMLZr8xI3nvpJOB+m6o/1X5BmU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= @@ -1715,18 +1139,12 @@ github.com/pierrec/lz4/v3 v3.3.4/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbO github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 h1:i5VIxp6QB8oWZ8IkK8zrDgeT6ORGIUeiN+61iETwJbI= -github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -1737,90 +1155,55 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:Om github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= -github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= -github.com/prometheus/exporter-toolkit v0.6.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v1.8.2-0.20210701133801-b0944590a1c9 h1:If7jYp33vwa8ZQ7GGwrAs0SBjiW0aWeAB/oV1aG7bZ4= -github.com/prometheus/prometheus v1.8.2-0.20210701133801-b0944590a1c9/go.mod h1:A97P+iwS3Ffpxpejz4+ASZl6i9EqSJDzxObq8DjV2SU= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= -github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rhnvrm/simples3 v0.6.1 h1:H0DJwybR6ryQE+Odi9eqkHuzjYAeJgtGcGtuBwOhsH8= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= -github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= @@ -1837,23 +1220,12 @@ github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 h1:ZFfeKAhIQiiOrQ github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.3.0 h1:TV5DVog+pihN4Rr0rN1IClv4ePpkzdg9sPrw7WDofZ8= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e h1:hUGyBE/4CXRPThr4b6kt+f1CN90no4Fs5CNrYOKYSIg= -github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e/go.mod h1:Sb6li54lXV0yYEjI4wX8cucdQ9gqUJV3+Ngg3l9g30I= github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54 h1:jbchLJWyhKcmOjkbC4zDvT/n5EEd7g6hnnF760rEyRA= -github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54/go.mod h1:Vrkh1pnjV9Bl8c3P9zH0/D4NlOHWP5d4/hF4YTULaec= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b h1:jUK33OXuZP/l6babJtnLo1qsGvq6G9so9KMflGAm4YA= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b/go.mod h1:8458kAagoME2+LN5//WxE71ysZ3B7r22fdgb7qVmXSY= -github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= github.com/sanathkr/yaml v1.0.1-0.20170819201035-0056894fa522 h1:39BJIaZIhIBmXATIhdlTBlTQpAiGXHnz17CrO7vF2Ss= -github.com/sanathkr/yaml v1.0.1-0.20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= -github.com/sanity-io/litter v1.2.0/go.mod h1:JF6pZUFgu2Q0sBZ+HSV35P8TVPI1TTzEwyu9FXAw2W4= github.com/santhosh-tekuri/jsonschema v1.2.4 h1:hNhW8e7t+H1vgY+1QeEQpveR6D4+OwKPXCfD2aieJis= github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= -github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= github.com/schollz/progressbar/v2 v2.13.2 h1:3L9bP5KQOGEnFP8P5V8dz+U0yo5I29iY5Oa9s9EAwn0= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4= @@ -1864,23 +1236,15 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921 h1:58EBmR2dMNL2n/FnbQewK3D14nXr0V9CObDSvMJLq+Y= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= -github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= +github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ= +github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -1889,38 +1253,34 @@ github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1928,23 +1288,16 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= -github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= -github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1952,11 +1305,12 @@ github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= @@ -1973,38 +1327,25 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.1.1 h1:7h1vk049Jnd5EH9NyzNiEuwYW4b5qgreBbqRC19AS3U= github.com/tidwall/sjson v1.1.1/go.mod h1:yvVuSnpEQv5cYIrO+AT6kw4QVfd5SDZoGIS7/5+fZFs= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b h1:X/8hkb4rQq3+QuOxpJK7gWmAXmZucF0EI1s1BfBLq6U= -github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b/go.mod h1:jAqhj/JBVC1PwcLTWd6rjQyGyItxxrhpiBl8LSuAGmw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= -github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= -github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.8/go.mod h1:0lNM99SwWUIRhCXnigEMClngXBk/EmpTXa7mgiewYWA= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.8 h1:4dryPvxMP9OtkjIbuNeK2nb27M38XMHLGlfNSNph/5s= -github.com/ugorji/go/codec v1.1.8/go.mod h1:X00B19HDtwvKbQY2DcYjvZxKQp8mzrJoQ6EgoIY/D2E= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -2012,8 +1353,6 @@ github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 h1:OHNw/6pXODJAB32NujjdQ github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797/go.mod h1:pNWFTeQ+V1OYT/TzWpnWb6eQBdoXpdx+H+lrH97/Oyo= github.com/urso/sderr v0.0.0-20210525210834-52b04e8f5c71 h1:CehQeKbysHV8J2V7AD0w8NL2x1h04kmmo/Ft5su4lU0= github.com/urso/sderr v0.0.0-20210525210834-52b04e8f5c71/go.mod h1:Wp40HwmjM59FkDIVFfcCb9LzBbnc0XAMp8++hJuWvSU= -github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 h1:+UB2BJA852UkGH42H+Oee69djmxS3ANzl2b/JtT1YiA= @@ -2023,19 +1362,11 @@ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1 github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 h1:NeNpIvfvaFOh0BH7nMEljE5Rk/VJlxhm58M41SeOD20= -github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= +github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg/scram v1.0.3 h1:nTadYh2Fs4BK2xdldEa2g5bbaZp0/+1nJMMPtPxS/to= github.com/xdg/scram v1.0.3/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4= github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -2043,18 +1374,13 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMc github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -2063,9 +1389,7 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 h1:0gYLpmzecnaDCoeWxSfEJ7J1b6B/67+NV++4HKQXx+Y= -github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.elastic.co/apm/module/apmelasticsearch/v2 v2.0.0 h1:5UaI4agfuGoGRhpFVb6s63Hj/9xtqYxF7kd6T77tNAw= @@ -2090,10 +1414,8 @@ go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9v go.elastic.co/go-licence-detector v0.5.0 h1:YXPCyt9faKMdJ8uMrkcI4patk8WZ0ME5oaIhYBUsRU4= go.elastic.co/go-licence-detector v0.5.0/go.mod h1:fSJQU8au4SAgDK+UQFbgUPsXKYNBDv4E/dwWevrMpXU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -2111,16 +1433,9 @@ go.etcd.io/etcd/raft/v3 v3.5.0 h1:kw2TmO3yFTgE+F0mdKkG7xMxkit2duBDa2Hu6D/HMlw= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0 h1:jk8D/lwGEDlQU9kZXUFMSANkE22Sg5+mW27ip8xcF9E= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= +go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -2129,24 +1444,26 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.44.0 h1:S/uoPVGNhv0MT/UbEmb7AffehAUTfVhH8YS2zQlT6eU= -go.opentelemetry.io/collector v0.44.0/go.mod h1:JJbkoXqnUGAlxmPtbFzEVSVMaKIKAlzdbz8HE8Yo7Ew= -go.opentelemetry.io/collector/model v0.42.0/go.mod h1:uUgx84gI+G/tE87Oo84305q0MD8tUV9uWxg+ckAE7Ew= -go.opentelemetry.io/collector/model v0.44.0 h1:I+M6X2NANYChOGYrpbxCoEYJah3eHdMvumKjothIAtA= -go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= +go.opentelemetry.io/collector v0.56.0 h1:p9lLKYyWgX0PBdNP4EScZfMpk8XYSj+MuIhS0dSWzq8= +go.opentelemetry.io/collector v0.56.0/go.mod h1:zYv4Ds01+96vPhYIwhYb3unemGriZ4OQBWeMT6JoVEQ= +go.opentelemetry.io/collector/pdata v0.56.0 h1:JD8KjQ7dNZ441xMuVZVu5NRYmkA4vOYGV7w8tkCdyrE= +go.opentelemetry.io/collector/pdata v0.56.0/go.mod h1:mYcCREWiIJyHss0dbU+GSiz2tmGZ6u09vtfkKTciog4= +go.opentelemetry.io/collector/semconv v0.56.0 h1:zpQ6IBimBsiVsJibsSM2/13vKtaeteFFIx4bmIiOS6E= +go.opentelemetry.io/collector/semconv v0.56.0/go.mod h1:EH1wbDvTyqKpKBBpoMIe0KQk2plCcFS66Mo17WtR7CQ= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 h1:Ky1MObd188aGbgb5OgNnwGuEEwI9MVIcc7rBW6zk5Ak= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0 h1:z6rnla1Asjzn0FrhohzIbDi4bxbtc6EMmQ7f5ZPn+pA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0/go.mod h1:y/SlJpJQPd2UzfBCj0E9Flk9FDCtTyqUmaCB41qFrWI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4= -go.opentelemetry.io/contrib/zpages v0.28.0 h1:4ANASd9xZw1GtMfvtBuqSfnqpMC79wePb3dQLNWBrEw= -go.opentelemetry.io/contrib/zpages v0.28.0/go.mod h1:y5RYQQgfEQV6oASayfbUv5ye5bnnncor+Ln18jMrVKY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 h1:Z0lVKLXU+jxGf3ANoh+UWx9Ai5bjpQVnZXI1zEzvqS0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0/go.mod h1:U5rUt7Rw6zuORsWNfpMRy8XMNKLrmIlv/4HgLVW/d5M= +go.opentelemetry.io/contrib/zpages v0.33.0 h1:0JATTp4rT56Mrfrq1icN9GqrI+1uFjq2NwJJRl8m3fk= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.3.0 h1:APxLf0eiBwLl+SOXiJJCVYzA1OOJNyAoV8C5RNRyy7Y= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= +go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 h1:R/OBkMoGgfy2fLhs2QhkCI1w4HLEQX92GCcJB6SSdNk= @@ -2157,40 +1474,32 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 h1:VQbUHo go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0 h1:Ydage/P0fRrSPpZeCVxzjqGcI6iVmG2xb43+IR8cjqM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= -go.opentelemetry.io/otel/exporters/prometheus v0.26.0 h1:qsF1KFEE+dIRoQN0M0D/A9mdhu0TqQCNAzl0o1S2CIM= -go.opentelemetry.io/otel/exporters/prometheus v0.26.0/go.mod h1:0/uJZI7H2y0FgMVCgCWdPzZpxPx3X3F5uInY32I9foI= -go.opentelemetry.io/otel/internal/metric v0.26.0 h1:dlrvawyd/A+X8Jp0EBT4wWEe4k5avYaXsXrBr4dbfnY= -go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk= +go.opentelemetry.io/otel/exporters/prometheus v0.31.0 h1:jwtnOGBM8dIty5AVZ+9ZCzZexCea3aVKmUfZAQcHqxs= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v0.26.0 h1:VaPYBTvA13h/FsiWfxa3yZnZEm15BhStD8JZQSA773M= -go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg= +go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= +go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/export/metric v0.26.0 h1:eNseg5yyZqaAAY+Att3owR3Bl0Is5rCZywqO1OrGx18= -go.opentelemetry.io/otel/sdk/export/metric v0.26.0/go.mod h1:UpqzSnUOjFeSIVQLPp3pYIXfB/MiMFyXXzYT/bercxQ= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/sdk/metric v0.26.0 h1:7IKp3gc/ObieCtshBeYYVFp3ZP7xIH1OzODi1Wao90Y= -go.opentelemetry.io/otel/sdk/metric v0.26.0/go.mod h1:2VIeK0kS1YvRLFg3J58ptZTXYpiWlkq2n5RQt6w7He8= +go.opentelemetry.io/otel/sdk/metric v0.31.0 h1:2sZx4R43ZMhJdteKAlKoHvRgrMp53V1aRxvEf5lCq8Q= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1NOGY= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= +go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.11.0 h1:cLDgIBTf4lLOlztkhzAEdQsJ4Lj+i5Wc9k6Nn0K1VyU= go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -2200,66 +1509,37 @@ go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -2270,7 +1550,6 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2303,21 +1582,16 @@ golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -2327,15 +1601,8 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2343,14 +1610,11 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -2361,34 +1625,26 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 h1:UreQrH7DbFXSi9ZFox6FNT3WBooWmdANpU+IfkT1T4I= golang.org/x/net v0.0.0-20220728211354-c7608f3a8462/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2410,7 +1666,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2418,11 +1673,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2431,55 +1683,40 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2492,7 +1729,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2515,55 +1751,43 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211102192858-4dd72447c267/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -2572,7 +1796,6 @@ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2584,44 +1807,33 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2635,12 +1847,8 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2650,11 +1858,9 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -2663,7 +1869,6 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -2691,13 +1896,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -2727,12 +1925,10 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.62.0 h1:PhGymJMXfGBzc4lBRmrx9+1w4w2wEzURHNGF/sD/xGc= google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2742,24 +1938,19 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -2770,7 +1961,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2809,41 +1999,29 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211019152133-63b7e35f4404/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 h1:d3fKQZK+1rWQMg3xLKQbPMirUCo29I/NRdI2WarSzTg= google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -2863,9 +2041,6 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= @@ -2885,36 +2060,29 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/hjson/hjson-go.v3 v3.0.1 h1:sbWPfwXQa3FQOBM6DAqGxqIWgFeT9dVKbbHOXQhx+W0= gopkg.in/hjson/hjson-go.v3 v3.0.1/go.mod h1:X6zrTSVeImfwfZLfgQdInl9mWjqPqgH90jom9nym/lw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= @@ -2935,7 +2103,6 @@ gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -2950,15 +2117,14 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v1.7.0 h1:RwpqwwFKBAa2h+F6pMEGpE707Edld0etUD3GhqqhDNc= -gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= @@ -2974,21 +2140,15 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= -k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E= k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= -k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= -k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= k8s.io/apimachinery v0.23.4 h1:fhnuMd/xUL3Cjfl64j5ULKZ1/J9n8NuQEgNL+WXWfdM= k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.22.5 h1:71krQxCUz218ecb+nPhfDsNB6QgP1/4EMvi1a2uYBlg= k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ= -k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= -k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= k8s.io/client-go v0.23.4 h1:YVWvPeerA2gpUudLelvsolzH7c2sFoXXR5wM/sWqNFU= k8s.io/client-go v0.23.4/go.mod h1:PKnIL4pqLuvYUK1WU7RLTMYKPiIh7MYShLshtRY9cj0= @@ -2998,46 +2158,31 @@ k8s.io/component-base v0.22.5 h1:U0eHqZm7mAFE42hFwYhY6ze/MmVaW00JpMrzVsQmzYE= k8s.io/component-base v0.22.5/go.mod h1:VK3I+TjuF9eaa+Ln67dKxhGar5ynVbwnGrUiNF4MqCI= k8s.io/cri-api v0.23.1 h1:0DHL/hpTf4Fp+QkUXFefWcp1fhjXr9OlNdY9X99c+O8= k8s.io/cri-api v0.23.1/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c h1:GohjlNKauSai7gN4wsJkeZ3WAJx4Sh+oT/b5IYn5suA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kernel.org/pub/linux/libs/security/libcap/cap v1.2.57 h1:2nmqI+aw7EQZuelYktkQHBE4jESD2tOR+lOJEnv/Apo= -kernel.org/pub/linux/libs/security/libcap/cap v1.2.57/go.mod h1:uI99C3r4SXvJeuqoEtx/eWt7UbmfqqZ80H8q+9t/A7I= kernel.org/pub/linux/libs/security/libcap/psx v1.2.57 h1:NOFATXSf5z/cMR3HIwQ3Xrd3nwnWl5xThmNr5U/F0pI= -kernel.org/pub/linux/libs/security/libcap/psx v1.2.57/go.mod h1:+l6Ee2F59XiJ2I6WR5ObpC1utCQJZ/VLsEbQCD8RG24= rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= @@ -3046,14 +2191,11 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22 h1:fmRfl9WJ4ApJn sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/otel_collector/CHANGELOG.md b/internal/otel_collector/CHANGELOG.md index 7ca03626375..52e7fcacac6 100644 --- a/internal/otel_collector/CHANGELOG.md +++ b/internal/otel_collector/CHANGELOG.md @@ -2,30 +2,490 @@ ## Unreleased +### 🛑 Breaking changes 🛑 + +### 🚩 Deprecations 🚩 + +### 💡 Enhancements 💡 + +### 🧰 Bug fixes 🧰 + +## v0.56.0 Beta + +### 💡 Enhancements 💡 + +- Add `linux-ppc64le` architecture to cross build tests in CI (#5645) +- `client`: perform case insensitive lookups in case the requested metadata value isn't found (#5646) +- `loggingexporter`: Decouple `loglevel` field from level of logged messages (#5678) +- Expose `pcommon.NewSliceFromRaw` function (#5679) +- `loggingexporter`: create the exporter's logger from the service's logger (#5677) +- Add `otelcol_exporter_queue_capacity` metrics show the collector's exporter queue capacity (#5475) + +### 🧰 Bug fixes 🧰 + +- Fix Collector panic when disabling telemetry metrics (#5642) +- Fix Collector panic when featuregate value is empty (#5663) +- Fix confighttp.compression panic due to nil request.Body. (#5628) + +## v0.55.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated `config.ServiceTelemetry` (#5565) +- Remove deprecated `config.ServiceTelemetryLogs` (#5565) +- Remove deprecated `config.ServiceTelemetryMetrics` (#5565) + +### 🚩 Deprecations 🚩 + +- Deprecate `service.ConfigServiceTelemetry`, `service.ConfigServiceTelemetryLogs`, and `service.ConfigServiceTelemetryMetrics` (#5565) +- Deprecate the following component functions to ensure a stability level is set (#5580): + - `component.WithTracesExporter` -> `component.WithTracesExporterAndStabilityLevel` + - `component.WithMetricsExporter` -> `component.WithMetricsExporterAndStabilityLevel` + - `component.WithLogsExporter` -> `component.WithLogsExporterAndStabilityLevel` + - `component.WithTracesReceiver` -> `component.WithTracesReceiverAndStabilityLevel` + - `component.WithMetricsReceiver` -> `component.WithMetricsReceiverAndStabilityLevel` + - `component.WithLogsReceiver` -> `component.WithLogsReceiverAndStabilityLevel` + - `component.WithTracesProcessor` -> `component.WithTracesProcessorAndStabilityLevel` + - `component.WithMetricsProcessor` -> `component.WithMetricsProcessorAndStabilityLevel` + - `component.WithLogsProcessor` -> `component.WithLogsProcessorAndStabilityLevel` +- Deprecate `Registry.Apply` in `service.featuregate` (#5660) + +### 💡 Enhancements 💡 + +- Components stability levels are now logged. By default components which haven't defined their stability levels, or which are + unmaintained, deprecated or in development will log a message. (#5580) +- `exporter/logging`: Skip "bad file descriptor" sync errors (#5585) + +### 🧰 Bug fixes 🧰 + +- Fix initialization of the OpenTelemetry MetricProvider. (#5571) +- Set log level for `undefined` stability level to debug. (#5635) + +## v0.54.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated `GetLogger`. (#5504) +- Remove deprecated `configtest.LoadConfigMap` (#5505) +- Remove deprecated `config.Map` (#5505) +- Remove deprecated `config.MapProvider` (#5505) +- Remove deprecated `config.MapConverter` (#5505) +- Remove deprecated `config.Received` (#5505) +- Remove deprecated `config.CloseFunc` (#5505) +- Deprecated `pcommon.Value.NewValueBytes` is brought back taking `pcommon.ImmutableByteSlice` as an argument instead of `[]byte` (#5299) + +### 🚩 Deprecations 🚩 + +- Use immutable slices for primitive types slices to restrict mutations. (#5299) + - `Value.NewValueMBytes` func is deprecated in favor of `Value.NewValueBytes` func that takes + `ImmutableByteSlice` instead of `[]byte` + - `Value.SetMBytesVal` func is deprecated in favor of `Value.SetBytesVal` func that takes + `pcommon.ImmutableByteSlice` instead of []byte. + - `Value.BytesVal` func is deprecated in favor of `Value.BytesVal` func that returns `pcommon.ImmutableByteSlice` + instead of []byte. + - `.SetMBucketCounts` funcs are deprecated in favor of + `.SetBucketCounts` funcs that take `pcommon.ImmutableUInt64Slice` instead of []uint64. + - `.MBucketCounts` funcs are deprecated in favor of + `.BucketCounts` funcs that return `pcommon.ImmutableUInt64Slice` instead of []uint64. + - `HistogramDataPoint.SetMExplicitBounds` func is deprecated in favor of `HistogramDataPoint.SetExplicitBounds` func + that takes `pcommon.ImmutableFloat64Slice` instead of []float64. + - `HistogramDataPoint.MExplicitBounds` func func is deprecated in favor of `HistogramDataPoint.ExplicitBounds` + returns `pcommon.ImmutableFloat64Slice` instead of []float64. + +### 💡 Enhancements 💡 + +- Deprecate `HTTPClientSettings.ToClient` in favor of `HTTPClientSettings.ToClientWithHost` (#5584) +- Use OpenCensus `metric` package for process metrics instead of `stats` package (#5486) +- Update OTLP to v0.18.0 (#5530) +- Log histogram min/max fields with `logging` exporter (#5520) + +### 🧰 Bug fixes 🧰 + +- Update sum field of exponential histograms to make it optional (#5530) +- Remove redundant extension shutdown call (#5532) +- Refactor pipelines builder, fix some issues (#5512) + - Unconfigured receivers are not identified, this was not a real problem in final binaries since the validation of the config catch this. + - Allow configurations to contain "unused" receivers. Receivers that are configured but not used in any pipeline, this was possible already for exporters and processors. + - Remove the enforcement/check that Receiver factories create the same instance for the same config. + +## v0.53.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated `componenterror` package. (#5420) +- Remove deprecated `config.MapConverterFunc`. (#5419) +- Remove `AddCollectorVersionTag`, enabled for long time already. (#5471) + +### 🚩 Deprecations 🚩 + +- Move `config.Map` to its own package `confmap` which does not depend on any component concept (#5237) + - `config.Map` -> `confmap.ConfMap` + - `config.MapProvider` -> `confmap.Provider` + - `config.Received` -> `confmap.Received` + - `config.NewReceivedFromMap` -> `confmap.NewReceived` + - `config.CloseFunc` -> `confmap.CloseFunc` + - `config.ChangeEvent` -> `confmap.ChangeEvent` + - `config.MapConverter` -> `confmap.Converter` + - Package `envmapprovider` -> `envprovider` + - Package `filemapprovider` -> `fileprovider` + - Package `yamlmapprovider` -> `yamlprovider` + - Package `expandmapconverter` -> `expandconverter` + - Package `filemapprovider` -> `fileprovider` + - Package `overwritepropertiesmapconverter` -> `overwritepropertiesconverter` +- Deprecate `component.ExtensionDefaultConfigFunc` in favor of `component.ExtensionCreateDefaultConfigFunc` (#5451) +- Deprecate `confmap.Received.AsMap` in favor of `confmap.Received.AsConf` (#5465) +- Deprecate `confmap.Conf.Set`, not used anywhere for the moment (#5485) + +### 💡 Enhancements 💡 + +- Move `service.mapResolver` to `confmap.Resolver` (#5444) +- Add `linux-arm` architecture to cross build tests in CI (#5472) + +### 🧰 Bug fixes 🧰 + +- Fixes the "service.version" label value for internal metrics, always was "latest" in core/contrib distros. (#5449). +- Send correct batch stats when SendBatchMaxSize is set (#5385) +- TLS `MinVersion` and `MaxVersion` defaults will be handled by `crypto/tls` (#5480) + +## v0.52.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove `configunmarshaler.Unmarshaler` interface, per deprecation comment (#5348) +- Remove deprecated pdata funcs/structs from v0.50.0 (#5345) +- Remove deprecated pdata getters and setters of primitive slice values: `Value.BytesVal`, `Value.SetBytesVal`, + `Value.UpdateBytes`, `Value.InsertBytes`, `Value.UpsertBytes`, `.BucketCounts`, + `.SetBucketCounts`, `HistogramDataPoint.ExplicitBounds`, + `HistogramDataPoint.SetExplicitBounds` (#5347) +- Remove deprecated featuregate funcs/structs from v0.50.0 (#5346) +- Remove access to deprecated members of the config.Retrieved struct (#5363) +- Replace usage of `config.MapConverterFunc` with `config.MapConverter` (#5382) + +### 🚩 Deprecations 🚩 + +- Deprecate `config.Config` and `config.Service`, use `service.Config*` (#4608) +- Deprecate `componenterror` package, move everything to `component` (#5383) +- `pcommon.Value.NewValueBytes` is deprecated in favor of `Value.NewValueMBytes` in preparation of migration to + immutable slices (#5367) + +### 💡 Enhancements 💡 + +- Update OTLP to v0.17.0 (#5335) +- Add optional min/max fields to histograms (#5399) +- User-defined Resource attributes can be specified under `service.telemetry.resource` + configuration key and will be included as metric lables for own telemetry. + If `service.instance.id` is not specified it will be auto-generated. Previously + `service.instance.id` was always auto-generated, so the default of the new + behavior matches the old behavior. (#5402) + +## v0.51.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated model module, everything is available in `pdata` and `semconv`. (#5281) + - Old versions of the module are still available, but no new versions will be released. +- Remove deprecated LogRecord.Name field. (#5202) + +### 🚩 Deprecations 🚩 + +- In preparation of migration to immutable slices for primitive type items, the following methods are renamed (#5344) + - `Value.BytesVal` func is deprecated in favor of `Value.MBytesVal`. + - `Value.SetBytesVal` func is deprecated in favor of `Value.SetMBytesVal`. + - `Value.UpdateBytes` func is deprecated in favor of `Value.UpdateMBytes`. + - `Value.InsertBytes` func is deprecated in favor of `Value.InsertMBytes`. + - `Value.UpsertBytes` func is deprecated in favor of `Value.UpsertMBytes`. + - `.BucketCounts` funcs are deprecated in favor of + `.MBucketCounts`. + - `.SetBucketCounts` funcs are deprecated in favor of + `.SetMBucketCounts`. + - `HistogramDataPoint.ExplicitBounds` func is deprecated in favor of `HistogramDataPoint.MExplicitBounds`. + - `HistogramDataPoint.SetExplicitBounds` func is deprecated in favor of `HistogramDataPoint.SetMExplicitBounds`. + +### 💡 Enhancements 💡 + +- `pdata`: Expose `pcommon.NewSliceFromRaw` and `pcommon.Slice.AsRaw` functions (#5311) + +### 🧰 Bug fixes 🧰 + +- Fix Windows Event Logs ignoring user-specified logging options (#5298) + +## v0.50.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove pdata deprecated funcs from 2 versions (v0.48.0) ago. (#5219) +- Remove non pdata deprecated funcs/structs (#5220) +- `pmetric.Exemplar.ValueType()` now returns new type `ExemplarValueType` (#5233) +- Remove deprecated `Delete` pdata func in favor of `pdata.Remove` from (v0.47.0). (#5307) + +### 🚩 Deprecations 🚩 + +- Deprecate `configunmarshaler` package, move it to internal (#5151) +- Deprecate all API in `model/semconv`. The package is moved to a new `semcomv` module (#5196) +- Deprecate access to `config.Retrieved` fields, use the newly added funcs to interact with the internal fields (#5198) +- Deprecate `potlp.Request.Set` (#5234) + - `plogotlp.Request.SetLogs` func is deprecated in favor of `plogotlp.NewRequestFromLogs` + - `pmetricotlp.Request.SetMetrics` func is deprecated in favor of `pmetricotlp.NewRequestFromMetrics` + - `ptraceotlp.Request.SetTraces` func is deprecated in favor of `ptraceotlp.NewRequestFromTraces` +- `pmetric.NumberDataPoint.ValueType()` now returns new type `NumberDataPointValueType` (#5233) + - `pmetric.MetricValueType` is deprecated in favor of `NumberDataPointValueType` + - `pmetric.MetricValueTypeNone` is deprecated in favor of `NumberDataPointValueTypeNone` + - `pmetric.MetricValueTypeInt` is deprecated in favor of `NumberDataPointValueTypeInt` + - `pmetric.MetricValueTypeDouble` is deprecated in favor of `NumberDataPointValueTypeDouble` +- Deprecate `plog.LogRecord.SetName()` function (#5230) +- Deprecate global `featuregate` funcs in favor of `GetRegistry` and a public `Registry` type (#5160) + +### 💡 Enhancements 💡 +- Add `jsoniter` Unmarshaller (#4817) + +- Extend config.Map.Unmarshal hook to check map key string to any TextUnmarshaler not only ComponentID (#5244) +- Collector will no longer print error with stack trace when the collector is shutdown due to a context cancel. (#5258) + +### 🧰 Bug fixes 🧰 +- Fix translation from otlp.Request to pdata representation, changes to the returned pdata not all reflected to the otlp.Request (#5197) +- `exporterhelper` now properly consumes any remaining items on stop (#5203) +- `pdata`: Fix copying of `Value` with `ValueTypeBytes` type (#5267) +- `pdata`: Fix copying of metric fields of primitive items slice type (#5271) + +## v0.49.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated structs/funcs from previous versions (#5131) +- Do not set TraceProvider to global otel (#5138) +- Remove deprecated funcs from otlpgrpc (#5144) +- Add Scheme to MapProvider interface (#5068) +- Do not set MeterProvider to global otel (#5146) +- Make `InstrumentationLibraryToScope` helper functions unexported (#5164) +- Remove Log's "ShortName" from logging exporter output (#5172) +- `exporter/otlp`: Retry RESOURCE_EXHAUSTED only if the server returns RetryInfo (#5147) + +### 🚩 Deprecations 🚩 + +- All pdata related APIs from model (model/pdata, model/otlp and model/otlpgrpc) are deprecated in + favor of packages in the new pdata module separated by telemetry signal type (#5168) + - `model/pdata`, `model/otlp` -> `pdata/pcommon`, `pdata/plog`, `pdata/pmetric`, `pdata/ptrace` + - `model/otlpgrpc` -> `pdata/plog/plogotlp`, `pdata/pmetric/pmetricotlp`, `pdata/ptrace/ptraceotlp` +- Deprecate configmapprovider package, replace with mapconverter (#5167) +- Deprecate `service.MustNewConfigProvider` and `service.MustNewDefaultConfigProvider`in favor of `service.NewConfigProvider` (#4936) + +### 💡 Enhancements 💡 + +- OTLP HTTP receiver will use HTTP/2 over TLS if client supports it (#5109) +- Add `ObservedTimestamp` field to `pdata.LogRecord` (#5171) + +### 🧰 Bug fixes 🧰 + +- Setup the correct meter provider if telemetry.useOtelForInternalMetrics featuregate enabled (#5146) +- Fix pdata.Value.asRaw() to correctly return elements of Slice and Map type (#5153) +- Update pdata.Slice.asRaw() to return raw representation of Slice and Map elements (#5157) +- The codepath through the OTLP receiver for gRPC was not translating the InstrumentationLibrary* to Scope* (#5189) + +## v0.48.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated `consumerhelper` package (#5028) +- Remove pdata `InternalRep` deprecated funcs (#5018) +- Remove service/defaultcomponents deprecated package (#5019) +- Remove deprecated UseOpenTelemetryForInternalMetrics (#5026) +- Change outcome of `pdata.Value.MapVal()` and `pdata.Value.SliceVal()` functions misuse. In case of + type mismatch, they now return an invalid zero-initialized instance instead of a detached + collection (#5034) +- OTLP JSON field changes following upgrade to OTLP v0.15.0: + - "instrumentationLibraryLogs" is now "scopeLogs" + - "instrumentationLibraryMetrics" is now "scopeMetrics" + - "instrumentationLibrarySpans" is now "scopeSpans" + - "instrumentationLibrary" is now "scope" +- AsString for pdata.Value now returns the JSON-encoded string of floats. (#4934) + +### 🚩 Deprecations 🚩 + +- Move MapProvider to config, split providers in their own package (#5030) +- API related to `pdata.AttributeValue` is deprecated in favor of `pdata.Value` (#4978) + - `pdata.AttributeValue` struct is deprecated in favor of `pdata.Value` + - `pdata.AttributeValueType` type is deprecated in favor of `pdata.ValueType` + - `pdata.AttributeValueType...` constants are deprecated in favor of `pdata.ValueType...` + - `pdata.NewAttributeValue...` funcs are deprecated in favor of `pdata.NewValue...` +- Deprecate featureflags.FlagValue.SetSlice, unnecessary public (#5053) +- Remove "Attribute" part from common pdata collections names (#5001) + - Deprecate `pdata.AttributeMap` struct in favor of `pdata.Map` + - Deprecate `pdata.NewAttributeMap` func in favor of `pdata.NewMap` + - Deprecate `pdata.NewAttributeMapFromMap` func in favor of `pdata.NewMapFromRaw` + - Deprecate `pdata.AttributeValueSlice` struct in favor of `pdata.Slice` + - Deprecate `pdata.NewAttributeValueSlice` func in favor of `pdata.NewSlice` +- Deprecate LogRecord.Name(), it was deprecated in the data model (#5054) +- Rename `Array` type of `pdata.Value` to `Slice` (#5066) + - Deprecate `pdata.AttributeValueTypeArray` type in favor of `pdata.ValueTypeSlice` + - Deprecate `pdata.NewAttributeValueArray` func in favor of `pdata.NewValueSlice` +- Deprecate global flag in `featuregates` (#5060) +- Deprecate last funcs/structs in componenthelper (#5069) +- Change structs in otlpgrpc to follow standard go encoding interfaces (#5062) + - Deprecate UnmarshalJSON[Traces|Metrics|Logs][Reques|Response] in favor of `UnmarshalJSON`. + - Deprecate [Traces|Metrics|Logs][Reques|Response].Marshal in favor of `MarshalProto`. + - Deprecate UnmarshalJSON[Traces|Metrics|Logs][Reques|Response] in favor of `UnmarshalProto`. +- Deprecating following pdata methods/types following OTLP v0.15.0 upgrade (#5076): + - InstrumentationLibrary is now InstrumentationScope + - NewInstrumentationLibrary is now NewInstrumentationScope + - InstrumentationLibraryLogsSlice is now ScopeLogsSlice + - NewInstrumentationLibraryLogsSlice is now NewScopeLogsSlice + - InstrumentationLibraryLogs is now ScopeLogs + - NewInstrumentationLibraryLogs is now NewScopeLogs + - InstrumentationLibraryMetricsSlice is now ScopeMetricsSlice + - NewInstrumentationLibraryMetricsSlice is now NewScopeMetricsSlice + - InstrumentationLibraryMetrics is now ScopeMetrics + - NewInstrumentationLibraryMetrics is now NewScopeMetrics + - InstrumentationLibrarySpansSlice is now ScopeSpansSlice + - NewInstrumentationLibrarySpansSlice is now NewScopeSpansSlice + - InstrumentationLibrarySpans is now ScopeSpans + - NewInstrumentationLibrarySpans is now NewScopeSpans + +### 💡 Enhancements 💡 + +- Add semconv definitions for v1.9.0 (#5090) +- Change outcome of `pdata.Metric.()` functions misuse. + In case of type mismatch, they don't panic right away but return an invalid zero-initialized + instance for consistency with other OneOf field accessors (#5035) +- Update OTLP to v0.15.0 (#5064) +- Adding support for transition from older versions of OTLP to OTLP v0.15.0 (#5085) + +### 🧰 Bug fixes 🧰 + +- Add missing files for semconv definitions v1.7.0 and v1.8.0 (#5091) +- The `featuregates` were not configured from the "--feature-gates" flag on windows service (#5060) +- Fix Semantic Convention Schema URL definition for 1.5.0 and 1.6.1 versions (#5103) + +## v0.47.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove `Type` funcs in pdata (#4933) +- Remove all deprecated funcs/structs from v0.46.0 (#4995) + +### 🚩 Deprecations 🚩 + +- pdata: deprecate funcs working with InternalRep (#4957) +- Deprecate `pdata.AttributeMap.Delete` in favor of `pdata.AttributeMap.Remove` (#4914) +- Deprecate consumerhelper, move helpers to consumer (#5006) + +### 💡 Enhancements 💡 + +- Add `pdata.AttributeMap.RemoveIf`, which is a more performant way to remove multiple keys (#4914) +- Add `pipeline` key with pipeline identifier to processor loggers (#4968) +- Add a new yaml provider, allows providing yaml bytes (#4998) + +### 🧰 Bug fixes 🧰 + +- Collector `Run` will now exit when a context cancels (#4954) +- Add missing droppedAttributesCount to pdata generated resource (#4979) +- Collector `Run` will now set state to `Closed` if startup fails (#4974) + +## v0.46.0 Beta + +### 🛑 Breaking changes 🛑 + +- Change otel collector to enable open telemetry metrics through feature gate instead of a constant (#4912) +- Remove support for legacy otlp/http port. (#4916) +- Remove deprecated funcs in pdata (#4809) +- Remove deprecated Retrieve funcs/calls (#4922) +- Remove deprecated NewConfigProvider funcs (#4937) + +### 🚩 Deprecations 🚩 + +- Deprecated funcs `config.DefaultConfig`, `confighttp.DefaultHTTPSettings`, `exporterhelper.DefaultTimeoutSettings`, + `exporthelper.DefaultQueueSettings`, `exporterhelper.DefaultRetrySettings`, `testcomponents.DefaultFactories`, and + `scraperhelper.DefaultScraperControllerSettings` in favour for their `NewDefault` method to adhere to contribution guidelines (#4865) +- Deprecated funcs `componenthelper.StartFunc`, `componenthelper.ShutdownFunc` in favour of `component.StartFunc` and `component.ShutdownFunc` (#4803) +- Move helpers from extensionhelper to component (#4805) + - Deprecated `extensionhelper.CreateDefaultConfig` in favour of `component.ExtensionDefaultConfigFunc` + - Deprecated `extensionhelper.CreateServiceExtension` in favour of `component.CreateExtensionFunc` + - Deprecated `extensionhelper.NewFactory` in favour of `component.NewExtensionFactory` +- Move helpers from processorhelper to component (#4889) + - Deprecated `processorhelper.CreateDefaultConfig` in favour of `component.ProcessorDefaultConfigFunc` + - Deprecated `processorhelper.WithTraces` in favour of `component.WithTracesProcessor` + - Deprecated `processorhelper.WithMetrics` in favour of `component.WithMetricsProcessor` + - Deprecated `processorhelper.WithLogs` in favour of `component.WithLogsProcessor` + - Deprecated `processorhelper.NewFactory` in favour of `component.NewProcessorFactory` +- Move helpers from exporterhelper to component (#4899) + - Deprecated `exporterhelper.CreateDefaultConfig` in favour of `component.ExporterDefaultConfigFunc` + - Deprecated `exporterhelper.WithTraces` in favour of `component.WithTracesExporter` + - Deprecated `exporterhelper.WithMetrics` in favour of `component.WithMetricsExporter` + - Deprecated `exporterhelper.WithLogs` in favour of `component.WithLogsExporter` + - Deprecated `exporterhelper.NewFactory` in favour of `component.NewExporterFactory` +- Move helpers from receiverhelper to component (#4891) + - Deprecated `receiverhelper.CreateDefaultConfig` in favour of `component.ReceiverDefaultConfigFunc` + - Deprecated `receiverhelper.WithTraces` in favour of `component.WithTracesReceiver` + - Deprecated `receiverhelper.WithMetrics` in favour of `component.WithMetricsReceiver` + - Deprecated `receiverhelper.WithLogs` in favour of `component.WithLogsReceiver` + - Deprecated `receiverhelper.NewFactory` in favour of `component.NewReceiverFactory` + +### 💡 Enhancements 💡 + +- Add validation to check at least one endpoint is specified in otlphttpexporter's configuration (#4860) +- Implement default client authenticators (#4837) + +## 🧰 Bug fixes 🧰 + +- Initialized logger with collector to avoid potential race condition panic on `Shutdown` (#4827) +- In addition to traces, now logs and metrics processors will start the memory limiter. + Added thread-safe logic so only the first processor can launch the `checkMemLimits` go-routine and the last processor + that calls shutdown to terminate it; this is done per memory limiter instance. + Added memory limiter factory to cache initiated object and be reused by similar config. This guarantees a single + running `checkMemLimits` per config (#4886) +- Resolved race condition in collector when calling `Shutdown` (#4878) + +## v0.45.0 Beta + +### 🛑 Breaking changes 🛑 + +- Remove deprecated funcs in configtelemetry (#4808) +- `otlphttp` and `otlp` exporters enable gzip compression by default (#4632) + +### 🚩 Deprecations 🚩 + +- Deprecate `service/defaultcomponents` go package (#4622) +- Deprecate `pdata.NumberDataPoint.Type()` and `pdata.Exemplar.Type()` in favor of `NumberDataPoint.ValueType()` and + `Exemplar.ValueType()` (#4850) + +### 💡 Enhancements 💡 + +- Reject invalid queue size exporterhelper (#4799) +- Transform configmapprovider.Retrieved interface to a struct (#4789) +- Added feature gate summary to zpages extension (#4834) +- Add support for reloading TLS certificates (#4737) + +### 🧰 Bug fixes 🧰 + +- `confighttp`: Allow CORS requests with configured auth (#4869) + ## v0.44.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 -- Deprecate `service.NewConfigProvider`, and a new version `service.MustNewConfigProvider` (#4734). - Updated to OTLP 0.12.0. Deprecated traces and metrics messages that existed in 0.11.0 are no longer converted to the messages and fields that replaced the deprecated ones. Received deprecated messages and fields will be now ignored. In OTLP/JSON in the instrumentationLibraryLogs object the "logs" field is now named "logRecords" (#4724) +- Deprecate `service.NewWindowsService`, add `service.NewSvcHandler` (#4783). + +### 🚩 Deprecations 🚩 -## 💡 Enhancements 💡 +- Deprecate `service.NewConfigProvider`, and a new version `service.MustNewConfigProvider` (#4734). + +### 💡 Enhancements 💡 - Invalid requests now return an appropriate unsupported (`405`) or method not allowed (`415`) response (#4735) - `client.Info`: Add Host property for Metadata (#4736) ## v0.43.1 Beta -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - ExpandStringValues function support to map[string]interface{} (#4748) ## v0.43.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Change configmapprovider.Provider to accept a location for retrieve (#4657) - Change Properties Provider to be a Converter (#4666) @@ -39,17 +499,20 @@ - Usages of `--metrics-level={VALUE}` can be replaced by `--set=service.telemetry.metrics.level={VALUE}`; - Usages of `--metrics-addr={VALUE}` can be replaced by `--set=service.telemetry.metrics.address={VALUE}`; - Updated confighttp `ToClient` to support passing telemetry settings for instrumenting otlphttp exporter(#4449) -- Deprecate `configtelemetry.Level.Set()` (#4700) - Remove support to some arches and platforms from `ocb` (opentelemetry-collector-builder) (#4710) - Remove deprecated legacy path ("v1/trace") support for otlp http receiver (#4720) - Change the `service.NewDefaultConfigProvider` to accept a slice of location strings (#4727). -## 🧰 Bug fixes 🧰 +### 🚩 Deprecations 🚩 + +- Deprecate `configtelemetry.Level.Set()` (#4700) + +### 🧰 Bug fixes 🧰 - Ensure Windows path (e.g: C:) is recognized as a file path (#4726) - Fix structured logging issue for windows service (#4686) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Expose experimental API `configmapprovider.NewExpandConverter()` (#4672) - `service.NewConfigProvider`: copy slice argument, disallow changes from caller to the input slice (#4729) @@ -63,7 +526,7 @@ ## v0.42.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove `configmapprovider.NewInMemory()` (#4507) - Disallow direct implementation of `configmapprovider.Retrieved` (#4577) @@ -76,7 +539,7 @@ - Builder: Remove deprecated `include-core` flag (#4616) - Collector telemetry level must now be accessed through an atomic function. (#4549) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `confighttp`: add client-side compression support. (#4441) - Each exporter should remove `compression` field if they have and should use `confighttp.HTTPClientSettings` @@ -93,7 +556,7 @@ - Added support to expose gRPC framework's logs as part of collector logs (#4501) - Builder: Enable unmarshal exact to help finding hard to find typos #4644 -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix merge config map provider to close the watchers (#4570) - Fix expand map provider to call close on the base provider (#4571) @@ -102,7 +565,7 @@ ## v0.41.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove reference to `defaultcomponents` in core and deprecate `include_core` flag (#4087) - Remove `config.NewConfigMapFrom[File|Buffer]`, add testonly version (#4502) @@ -110,29 +573,29 @@ - `confighttp`: `ToServer` now accepts a `component.Host`, in line with gRPC's counterpart (#4514) - CORS configuration for OTLP/HTTP receivers has been moved into a `cors:` block, instead of individual `cors_allowed_origins` and `cors_allowed_headers` settings (#4492) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - OTLP/HTTP receivers now support setting the `Access-Control-Max-Age` header for CORS caching. (#4492) - `client.Info` pre-populated for all receivers using common helpers like `confighttp` and `configgrpc` (#4423) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix handling of corrupted records by persistent buffer (experimental) (#4475) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Extending the contribution guide to help clarify what is acceptable defaults and recommendations. ## v0.40.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Package `client` refactored (#4416) and auth data included in it (#4422). Final PR to be merged in the next release (#4423) - Remove `pdata.AttributeMap.InitFromMap` (#4429) - Updated configgrpc `ToDialOptions` to support passing providers to instrumentation library (#4451) - Make state information propagation non-blocking on the collector (#4460) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add semconv 1.7.0 and 1.8.0 (#4452) - Added `feature-gates` CLI flag for controlling feature gate state. (#4368) @@ -140,7 +603,7 @@ ## v0.39.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove deprecated config (already no-op) `ballast_size_mib` in memorylimiterprocessor (#4365) - Remove `config.Receivers`, `config.Exporters`, `config.Processors`, and `config.Extensions`. Use map directly (#4344) @@ -170,18 +633,18 @@ - Remove deprecated funcs `consumererror.As[Traces|Metrics|Logs]` (#4364) - Remove support to expand env variables in default configs (#4366) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Supports more compression methods(`snappy` and `zstd`) for configgrpc, in addition to current `gzip` (#4088) - Moved the OpenTelemetry Collector Builder to core (#4307) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix AggregationTemporality and IsMonotonic when metric descriptors are split in the batch processor (#4389) ## v0.38.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Removed `configauth.HTTPClientAuthenticator` and `configauth.GRPCClientAuthenticator` in favor of `configauth.ClientAuthenticator`. (#4255) - Rename `parserprovider.MapProvider` as `config.MapProvider`. (#4178) @@ -192,7 +655,7 @@ - Refactor configauth, getters use the map instead of iteration. (#4234) - Change scraperhelper to follow the recommended append model for pdata. (#4202) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Update proto to 0.11.0. (#4209) - Change pdata to use the newly added [Traces|Metrics|Logs]Data. (#4214) @@ -206,7 +669,7 @@ ## v0.37.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Move `configcheck.ValidateConfigFromFactories` as internal function in service package (#3876) - Rename `configparser.Parser` as `config.Map` (#4075) @@ -217,7 +680,7 @@ - Move `extension/storage` to `extension/experimental/storage` (#4082) - Rename `obsreporttest.SetupRecordedMetricsTest()` to `obsreporttest.SetupTelemetry()` and `obsreporttest.TestTelemetrySettings` to `obsreporttest.TestTelemetry` (#4157) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add Gen dependabot into CI (#4083) - Update OTLP to v0.10.0 (#4045). @@ -225,13 +688,13 @@ - Add feature gate library (#4108) - Add version to the internal telemetry metrics (#4140) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix panic when not using `service.NewCommand` (#4139) ## v0.36.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove deprecated pdata.AttributeMapToMap (#3994) - Move ValidateConfig from configcheck to configtest (#3956) @@ -243,7 +706,7 @@ - Split `service.Collector` from the `cobra.Command` (#4074) - Rename `memorylimiter` to `memorylimiterprocessor` (#4064) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Create new semconv package for v1.6.1 (#3948) - Add AttributeValueBytes support to AsString (#4002) @@ -253,7 +716,7 @@ ## v0.35.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove the legacy gRPC port(`55680`) support in OTLP receiver (#3966) - Rename configparser.Parser to configparser.ConfigMap (#3964) @@ -262,7 +725,7 @@ - Remove deprecated pdata.AttributeValueToString (#3953) - Remove deprecated pdata.TimestampFromTime. Closes: #3925 (#3935) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add TelemetryCreateSettings (#3984) - Only initialize collector telemetry once (#3918) @@ -271,13 +734,11 @@ ## v0.34.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Artifacts are no longer published in this repository, check [here](https://github.com/open-telemetry/opentelemetry-collector-releases) (#3941) - Remove deprecated `tracetranslator.AttributeValueToString` and `tracetranslator.AttributeMapToMap` (#3873) - Change semantic conventions for status (code, msg) as per specifications (#3872) -- Add `pdata.NewTimestampFromTime`, deprecate `pdata.TimestampFromTime` (#3868) -- Add `pdata.NewAttributeMapFromMap`, deprecate `pdata.AttributeMap.InitFromMap` (#3936) - Move `fileexporter` to contrib (#3474) - Move `jaegerexporter` to contrib (#3474) - Move `kafkaexporter` to contrib (#3474) @@ -308,15 +769,20 @@ - Move `processor/processorhelper/attraction` to contrib (#3474) - Move `translator/conventions` to `model/semconv` (#3901) +### 🚩 Deprecations 🚩 + +- Add `pdata.NewTimestampFromTime`, deprecate `pdata.TimestampFromTime` (#3868) +- Add `pdata.NewAttributeMapFromMap`, deprecate `pdata.AttributeMap.InitFromMap` (#3936) + ## v0.33.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename `configloader` interface to `configunmarshaler` (#3774) - Remove `LabelsMap` from all the metrics points (#3706) - Update generated K8S attribute labels to fix capitalization (#3823) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Collector has now full support for metrics proto v0.9.0. @@ -326,11 +792,11 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - See https://github.com/open-telemetry/opentelemetry-collector/issues/3824 -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename `CustomUnmarshable` interface to `Unmarshallable` (#3774) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Change default OTLP/HTTP port number from 55681 to 4318 (#3743) - Update OTLP proto to v0.9.0 (#3740) @@ -345,7 +811,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Make configsource `Watchable` an optional interface (#3792) - `obsreport` exporter: Change to accept `ExporterCreateSettings` (#3789) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `configgrpc`: Use chained interceptors in the gRPC server (#3744) - `prometheus` receiver: Use actual interval startTimeMs for cumulative types (#3694) @@ -353,7 +819,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.31.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove Resize() from pdata slice APIs (#3675) - Remove the ballast allocation when `mem-ballast-size-mib` is set in command line (#3626) @@ -361,7 +827,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Rename `DoubleDataPoint` to `NumberDataPoint` (#3633) - Remove `IntHistogram` (#3676) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Update to OTLP 0.8.0: - Translate `IntHistogram` to `Histogram` in `otlp_wrappers` (#3676) @@ -394,7 +860,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Enable `tracez` z-pages from otel-go, disable opencensus (#3698) - Convert temporality and monotonicity for deprecated sums (#3729) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `otlpexporter`: Allow endpoint to be configured with a scheme of `http` or `https` (#3575) - Handle errors when reloading the collector service (#3615) @@ -403,7 +869,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.30.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename `pdata.DoubleSum` to `pdata.Sum` (#3583) - Rename `pdata.DoubleGauge` to `pdata.Gauge` (#3599) @@ -414,10 +880,13 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - zipkinv1 implement directly Unmarshaler interface (#3504) - zipkinv2 implement directly Marshaler/Unmarshaler interface (#3505) - Change exporterhelper to accept ExporterCreateSettings instead of just logger (#3569) -- Deprecate Resize() from pdata slice APIs (#3573) - Use Func pattern in processorhelper, consistent with others (#3570) -## 💡 Enhancements 💡 +### 🚩 Deprecations 🚩 + +- Deprecate Resize() from pdata slice APIs (#3573) + +### 💡 Enhancements 💡 - Update OTLP to v0.8.0 (#3572) - Migrate from OpenCensus to OpenTelemetry for internal tracing (#3567) @@ -430,7 +899,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Pass a TracerProvider via construct settings to all the components (#3592) - Make graceful shutdown optional (#3577) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `scraperhelper`: Include the scraper name in log messages (#3487) - `scraperhelper`: fix case when returned pdata is empty (#3520) @@ -439,7 +908,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.29.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename `service.Application` to `service.Collector` (#3268) - Provide case sensitivity in config yaml mappings by using Koanf instead of Viper (#3337) @@ -448,7 +917,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Move cgroup and iruntime utils from memory_limiter to internal folder (#3448) - Move model pdata interfaces to pdata, expose them publicly (#3455) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Change obsreport helpers for scraper to use the same pattern as Processor/Exporter (#3327) - Convert `otlptext` to implement Marshaler interfaces (#3366) @@ -467,7 +936,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add store to track stale metrics (#3414) - Add `up` and `scrape_xxxx` internal metrics (#3116) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `prometheus` receiver: - Reject datapoints with duplicate label keys (#3408) @@ -477,7 +946,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.28.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove unused logstest package (#3222) - Introduce `AppSettings` instead of `Parameters` (#3163) @@ -503,7 +972,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Remove `GenerateSequentialTraceID` and `GenerateSequentialSpanIDin` functions in testbed (#3390) - Change "grpc" to "GRPC" in configauth function/type names (#3285) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add `doc.go` files to the consumer package and its subpackages (#3270) - Improve documentation of consumer package and subpackages (#3269, #3361) @@ -522,7 +991,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add support for markdown generation (#3100) - Refactor components for the Client Authentication Extensions (#3287) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Use dedicated `zapcore.Core` for Windows service (#3147) - Hook up start and shutdown functions in fileexporter (#3260) @@ -531,7 +1000,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.27.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Change `Marshal` signatures in kafkaexporter's Marshalers to directly convert pdata to `sarama.ProducerMessage` (#3162) - Remove `tracetranslator.DetermineValueType`, only used internally by Zipkin (#3114) @@ -545,7 +1014,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Move consumerfanout package to internal (#3207) - Canonicalize enum names in pdata. Fix usage of uppercase names (#3208) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Use `config.ComponentID` for obsreport receiver/scraper (#3098) - Add initial implementation of the consumerhelper (#3146) @@ -557,7 +1026,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Allow users to configure the Prometheus remote write queue (#3046) - Mark internaldata traces translation as deprecated for external usage (#3176) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix Prometheus receiver metric start time and reset determination logic. (#3047) - The receiver will no longer drop the first sample for `counter`, `summary`, and `histogram` metrics. @@ -575,7 +1044,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.26.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Change `With*Unmarshallers` signatures in Kafka exporter/receiver (#2973) - Rename `marshall` to `marshal` in all the occurrences (#2977) @@ -584,10 +1053,13 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Rename `ApplicationStartInfo.ExeName` to `BuildInfo.Command` - Rename `ApplicationStartInfo.LongName` to `BuildInfo.Description` -## 💡 Enhancements 💡 +### 🚩 Deprecations 🚩 -- `kafka` exporter: Add logs support (#2943) - Add AppendEmpty and deprecate Append for slices (#2970) + +### 💡 Enhancements 💡 + +- `kafka` exporter: Add logs support (#2943) - Update mdatagen to create factories of init instead of new (#2978) - `zipkin` receiver: Reduce the judgment of zipkin v1 version (#2990) - Custom authenticator logic to accept a `component.Host` which will extract the authenticator to use based on a new authenticator name property (#2767) @@ -596,7 +1068,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Format timestamps as strings instead of int in otlptext output (#3088) - Add darwin arm64 build (#3090) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix Jaeger receiver to honor TLS Settings (#2866) - `zipkin` translator: Handle missing starttime case for zipkin json v2 format spans (#2506) @@ -611,7 +1083,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.25.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename ForEach (in pdata) with Range to be consistent with sync.Map (#2931) - Rename `componenthelper.Start` to `componenthelper.StartFunc` (#2880) @@ -628,7 +1100,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Remove InitEmptyWithCapacity, add EnsureCapacity and Clear (#2845) - Rename traces methods/objects to include Traces in Kafka receiver (#2966) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add `validatable` interface with `Validate()` to all `config.` (#2898) - add the empty `Validate()` implementation for all component configs @@ -640,7 +1112,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - `prometheus` receiver: Optimize `dpgSignature` function (#2945) - `kafka` receiver: Add logs support (#2944) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `prometheus` receiver: - Treat Summary and Histogram metrics without "\_sum" counter as valid metric (#2812) @@ -653,7 +1125,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.24.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove legacy internal metrics for memorylimiter processor, `spans_dropped` and `trace_batches_dropped` (#2841) - For `spans_dropped` use `processor/refused_spans` with `processor=memorylimiter` @@ -679,13 +1151,16 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Move `configmodels` to `config` (#2808) - Move `fluentforward` receiver to contrib (#2723) -## 💡 Enhancements 💡 +### 🚩 Deprecations 🚩 + +- Deprecate `consumetest.New[${SIGNAL}]Nop` in favor of `consumetest.NewNop` (#2878) +- Deprecate `consumetest.New[${SIGNAL}]Err` in favor of `consumetest.NewErr` (#2878) + +### 💡 Enhancements 💡 - `batch` processor: - Support max batch size for logs (#2736) - Use `Endpoint` for health check extension (#2782) - Use `confignet.TCPAddr` for `pprof` and `zpages` extensions (#2829) -- Deprecate `consumetest.New[${SIGNAL}]Nop` in favor of `consumetest.NewNop` (#2878) -- Deprecate `consumetest.New[${SIGNAL}]Err` in favor of `consumetest.NewErr` (#2878) - Add watcher to values retrieved via config sources (#2803) - Updates for cloud semantic conventions (#2809) - `cloud.infrastructure_service` -> `cloud.platform` @@ -698,7 +1173,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Report metric about current size of the exporter retry queue (#2858) - Allow adding new signals in `ProcessorFactory` by forcing everyone to embed `BaseProcessorFactory` (#2885) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `pdata.TracesFromOtlpProtoBytes`: Fixes to handle backwards compatibility changes in proto (#2798) - `jaeger` receiver: Escape user input used in output (#2815) @@ -707,7 +1182,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.23.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Move fanout consumers to fanoutconsumer package (#2615) - Rename ExporterObsReport to Exporter (#2658) @@ -719,7 +1194,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Users of these structs for testing configs should use the newly added `componenttest.Nop*` (update all components name in the config `example*` -> `nop` and use `componenttest.NopComponents()`). - Users of these structs for sink like behavior should use `consumertest.*Sink`. -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `hostmetrics` receiver: List labels along with respective metrics in metadata (#2662) - `exporter` helper: Remove obsreport.ExporterContext, always add exporter name as a tag to the metrics (#2682) @@ -733,7 +1208,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add TracesWrapper to dissallow access to internal representation (#2721) - Allow multiple OTLP receivers to be created (#2743) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `prometheus` exporter: Fix to work with standard labels that follow the naming convention of using periods instead of underscores (#2707) - Propagate name and transport for `prometheus` receiver and exporter (#2680) @@ -741,7 +1216,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.22.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename ServiceExtension to just Extension (#2581) - Remove `consumerdata.TraceData` (#2551) @@ -752,13 +1227,13 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Remove deprecated componenterror.CombineErrors (#2598) - Rename `pdata.TimestampUnixNanos` to `pdata.Timestamp` (#2549) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `prometheus` exporter: Re-implement on top of `github.com/prometheus/client_golang/prometheus` and add `metric_expiration` option - `logging` exporter: Add support for AttributeMap (#2609) - Add semantic conventions for instrumentation library (#2602) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `otlp` receiver: Fix `Shutdown()` bug (#2564) - `batch` processor: Fix Shutdown behavior (#2537) @@ -767,19 +1242,19 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.21.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove deprecated function `IsValid` from trace/span ID (#2522) - Remove accessors for deprecated status code (#2521) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `otlphttp` exporter: Add `compression` option for gzip encoding of outgoing http requests (#2502) - Add `ScrapeErrors` struct to `consumererror` to simplify errors usage (#2414) - Add `cors_allowed_headers` option to `confighttp` (#2454) - Add SASL/SCRAM authentication mechanism on `kafka` receiver and exporter (#2503) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `otlp` receiver: Sets the correct deprecated status code before sending data to the pipeline (#2521) - Fix `IsPermanent` to account for wrapped errors (#2455) @@ -787,29 +1262,29 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.20.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename `samplingprocessor/probabilisticsamplerprocessor` to `probabilisticsamplerprocessor` (#2392) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `hostmetrics` receiver: Refactor to use metrics metadata utilities (#2405, #2406, #2421) - Add k8s.node semantic conventions (#2425) ## v0.19.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove deprecated `queued_retry` processor - Remove deprecated configs from `resource` processor: `type` (set "opencensus.type" key in "attributes.upsert" map instead) and `labels` (use "attributes.upsert" instead). -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `hostmetrics` receiver: Refactor load metrics to use generated metrics (#2375) - Add uptime to the servicez debug page (#2385) - Add new semantic conventions for AWS (#2365) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `jaeger` exporter: Improve connection state logging (#2239) - `pdatagen`: Fix slice of values generated code (#2403) @@ -817,31 +1292,31 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.18.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename host metrics according to metrics spec and rename `swap` scraper to `paging` (#2311) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add check for `NO_WINDOWS_SERVICE` environment variable to force interactive mode on Windows (#2272) - `hostmetrics` receiver: Add `disk/weighted_io_time` metric (Linux only) (#2312) - `opencensus` exporter: Add queue-retry (#2307) - `filter` processor: Filter metrics using resource attributes (#2251) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `fluentforward` receiver: Fix string conversions (#2314) - Fix zipkinv2 translation error tag handling (#2253) ## v0.17.0 Beta -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Default config environment variable expansion (#2231) - `prometheusremotewrite` exporter: Add batched exports (#2249) - `memorylimiter` processor: Introduce soft and hard limits (#2250) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix nits in pdata usage (#2235) - Convert status to not be a pointer in the Span (#2242) @@ -850,11 +1325,11 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.16.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename Push functions to be consistent across signals in `exporterhelper` (#2203) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Change default OTLP/gRPC port number to 4317, also continue receiving on legacy port 55680 during transition period (#2104). @@ -867,7 +1342,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Expose non-nullable metric types (#2208) - Expose non-nullable elements from slices of pointers (#2200) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Change InstrumentationLibrary to be non-nullable (#2196) - Add support for slices to non-pointers, use non-nullable AnyValue (#2192) @@ -875,11 +1350,11 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.15.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Remove legacy metrics, they were marked as legacy for ~12 months #2105 -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Implement conversion between OpenCensus and OpenTelemetry Summary Metric (#2048) - Add ability to generate non nullable messages (#2005) @@ -894,7 +1369,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Use net.SplitHostPort for IPv6 support in `prometheus` receiver (#2154) - Add --log-format command line option (default to "console") #2177. -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `logging` exporter: Add Logging for Summary Datapoint (#2084) - `hostmetrics` receiver: use correct TCP state labels on Unix systems (#2087) @@ -909,25 +1384,28 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.14.0 Beta -## 🚀 New components 🚀 +### 🚀 New components 🚀 - `otlphttp` exporter which implements OTLP over HTTP protocol. -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename consumer.TraceConsumer to consumer.TracesConsumer #1974 - Rename component.TraceReceiver to component.TracesReceiver #1975 - Rename component.TraceProcessor to component.TracesProcessor #1976 - Rename component.TraceExporter to component.TracesExporter #1975 -- Deprecate NopExporter, add NopConsumer (#1972) -- Deprecate SinkExporter, add SinkConsumer (#1973) - Move `tailsampling` processor to contrib (#2012) - Remove NewAttributeValueSlice (#2028) and mark NewAttributeValue as deprecated (#2022) - Remove pdata.StringValue (#2021) - Remove pdata.InitFromAttributeMap, use CopyTo if needed (#2042) - Remove SetMapVal and SetArrayVal for pdata.AttributeValue (#2039) -## 💡 Enhancements 💡 +### 🚩 Deprecations 🚩 + +- Deprecate NopExporter, add NopConsumer (#1972) +- Deprecate SinkExporter, add SinkConsumer (#1973) + +### 💡 Enhancements 💡 - `zipkin` exporter: Add queue retry to zipkin (#1971) - `prometheus` exporter: Add `send_timestamps` option (#1951) @@ -948,7 +1426,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Update OTLP to 0.6.0 and use the new Span Status code (#2031) - Add support of partial requests for logs and metrics to the exporterhelper (#2059) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - `logging` exporter: Added array serialization (#1994) - `zipkin` receiver: Allow receiver to parse string tags (#1893) @@ -957,7 +1435,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.13.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Host metric `system.disk.time` renamed to `system.disk.operation_time` (#1887) - Use consumer for sender interface, remove unnecessary receiver address from Runner (#1941) @@ -965,7 +1443,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Removed `groupbytraceprocessor` (#1891) - Remove ability to configure collection interval per scraper (#1947) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Host Metrics receiver now reports both `system.disk.io_time` and `system.disk.operation_time` (#1887) - Match spans against the instrumentation library and resource attributes (#928) @@ -975,7 +1453,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add unmarshalling for `pdata.Traces` (#1948) - Add debug-level message on error for `jaeger` exporter (#1964) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix bug where the service does not correctly start/stop the log exporters (#1943) - Fix Queued Retry Unusable without Batch Processor (#1813) - (#1930) @@ -986,12 +1464,12 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.12.0 Beta -## 🚀 New components 🚀 +### 🚀 New components 🚀 - `configauth` package with the auth settings that can be used by receivers (#1807, #1808, #1809, #1810) - `perfcounters` package that uses perflib for host metrics receiver (#1835, #1836, #1868, #1869, #1870) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Remove `queued_retry` and enable `otlp` metrics receiver in default config (#1823, #1838) - Add `limit_percentage` and `spike_limit_percentage` options to `memorylimiter` processor (#1622) @@ -1000,14 +1478,17 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add filters for mount point and filesystem type (#1866) - Add cloud.provider semantic conventions (#1865) - `attribute` processor: Add log support (#1783) -- Deprecate OpenCensus-based internal data structures (#1843) - Introduce SpanID data type, not yet used in Protobuf messages ($1854, #1855) - Enable `otlp` trace by default in the released docker image (#1883) - `tailsampling` processor: Combine batches of spans into a single batch (#1864) - `filter` processor: Update to use pdata (#1885) - Allow MSI upgrades (#1914) -## 🧰 Bug fixes 🧰 +### 🚩 Deprecations 🚩 + +- Deprecate OpenCensus-based internal data structures (#1843) + +### 🧰 Bug fixes 🧰 - `prometheus` receiver: Print a more informative message about 'up' metric value (#1826) - Use custom data type and custom JSON serialization for traceid (#1840) @@ -1018,7 +1499,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.11.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Rename service.Start() to Run() since it's a blocking call - Fix slice Append to accept by value the element in pdata @@ -1027,7 +1508,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Remove SetType from configmodels, ensure all registered factories set the type in config (#1798) - Move process telemetry to service/internal (#1794) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Add map and array attribute value type support (#1656) - Add authentication support to kafka (#1632) @@ -1037,7 +1518,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add configauth package (#1807) - Add config to docker image (#1792) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Use zap int argument for int values instead of conversion (#1779) - Add support for gzip encoded payload in OTLP/HTTP receiver (#1581) @@ -1045,20 +1526,20 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.10.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - **Update OTLP to v0.5.0, incompatible metrics protocol.** - Remove support for propagating summary metrics in OtelCollector. - This is a temporary change, and will affect mostly OpenCensus users who use metrics. -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Support zipkin proto in `kafka` receiver (#1646) - Prometheus Remote Write Exporter supporting Cortex (#1577, #1643) - Add deployment environment semantic convention (#1722) - Add logs support to `batch` and `resource` processors (#1723, #1729) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Identify config error when expected map is other value type (#1641) - Fix Kafka receiver closing ready channel multiple times (#1696) @@ -1067,7 +1548,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.9.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - **Remove old base factories**: - `ReceiverFactoryBase` (#1583) @@ -1077,12 +1558,12 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Remove `reconnection_delay` from OpenCensus exporter (#1516) - Remove `ConsumerOld` interfaces (#1631) -## 🚀 New components 🚀 +### 🚀 New components 🚀 - `prometheusremotewrite` exporter: Send metrics data in Prometheus TimeSeries format to Cortex or any Prometheus (#1544) - `kafka` receiver: Receive traces from Kafka (#1410) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `kafka` exporter: Enable queueing, retry, timeout (#1455) - Add `Headers` field in HTTPClientSettings (#1552) @@ -1093,7 +1574,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Access application version in components (#1559) - Make Kafka payload encoding configurable (#1584) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Stop further processing if `filterprocessor` filters all data (#1500) - `processscraper`: Use same scrape time for all data points coming from same process (#1539) @@ -1104,11 +1585,11 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.8.0 Beta -## 🚀 New components 🚀 +### 🚀 New components 🚀 - `groupbytrace` processor that waits for a trace to be completed (#1362) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Migrate `zipkin` receiver/exporter to the new interfaces (#1484) - Migrate `prometheus` receiver/exporter to the new interfaces (#1477, #1515) @@ -1121,7 +1602,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add new config StartTimeMetricRegex to `prometheus` receiver (#1511) - Convert Zipkin receiver and exporter to use OTLP (#1446) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Infer OpenCensus resource type based on OpenTelemetry's semantic conventions (#1462) - Fix log adapter in `prometheus` receiver (#1493) @@ -1129,7 +1610,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.7.0 Beta -## 🚀 New components 🚀 +### 🚀 New components 🚀 - Receivers - `fluentfoward` runs a TCP server that accepts events via the [Fluent Forward protocol](https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1) (#1173) @@ -1138,7 +1619,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Extensions - **Experimental** `fluentbit` facilitates running a FluentBit subprocess of the collector (#1381) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Updated `golang/protobuf` from v1.3.5 to v1.4.2 (#1308) - Updated `opencensus-proto` from v0.2.1 to v0.3.0 (#1308) @@ -1159,20 +1640,20 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Allow to configure read/write buffer sizes for http Client (#1447) - Update DB conventions to latest and add exception conventions (#1452) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fix `resource` processor for old metrics (#1412) - `jaeger` receiver: Do not try to stop if failed to start. Collector service will do that (#1434) ## v0.6.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - Renamed the metrics generated by `hostmetrics` receiver to match the (currently still pending) OpenTelemetry system metric conventions (#1261) (#1269) - Removed `vmmetrics` receiver (#1282) - Removed `cpu` scraper `report_per_cpu` config option (#1326) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - Added disk merged (#1267) and process count (#1268) metrics to `hostmetrics` - Log metric data points in `logging` exporter (#1258) @@ -1189,7 +1670,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Add `send_batch_max_size` config parameter to `batch` processor enforcing hard limit on batch size (#1310) - Add support for including a per-RPC authentication to gRPC settings (#1250) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Fixed OTLP waitForReady, not set from config (#1254) - Fixed all translation diffs between OTLP and Jaeger (#1222) @@ -1197,7 +1678,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat ## v0.5.0 Beta -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - **Update OTLP to v0.4.0 (#1142)**: Collector will be incompatible with any other sender or receiver of OTLP protocol of different versions @@ -1207,12 +1688,12 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - OTLP receiver config change for `protocols` to support mTLS (#1223) - Remove `export_resource_labels` flag from Zipkin exporter (#1163) -## 🚀 New components 🚀 +### 🚀 New components 🚀 - Receivers - Added process scraper to the `hostmetrics` receiver (#1047) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - otlpexporter: send configured headers in request (#1130) - Enable Collector to be run as a Windows service (#1120) @@ -1223,7 +1704,7 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat - Allow to tune the read/write buffers for gRPC clients (#1213) - Allow to tune the read/write buffers for gRPC server (#1218) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Handle overlapping metrics from different jobs in prometheus exporter (#1096) - Fix handling of SpanKind INTERNAL in OTLP OC translation (#1143) @@ -1237,12 +1718,12 @@ This release is marked as "bad" since the metrics pipelines will produce bad dat Released 2020-06-16 -## 🛑 Breaking changes 🛑 +### 🛑 Breaking changes 🛑 - `isEnabled` configuration option removed (#909) - `thrift_tchannel` protocol moved from `jaeger` receiver to `jaeger_legacy` in contrib (#636) -## ⚠️ Major changes ⚠️ +### ⚠️ Major changes ⚠️ - Switch from `localhost` to `0.0.0.0` by default for all receivers (#1006) - Internal API Changes (only impacts contributors) @@ -1251,7 +1732,7 @@ Released 2020-06-16 (other breaking changes in the internal trace data types) - Change entire repo to use the new vanityurl go.opentelemetry.io/collector (#977) -## 🚀 New components 🚀 +### 🚀 New components 🚀 - Receivers - `hostmetrics` receiver with CPU (#862), disk (#921), load (#974), filesystem (#926), memory (#911), network (#930), and virtual memory (#989) support @@ -1259,13 +1740,13 @@ Released 2020-06-16 - `batch` for batching received metrics (#1060) - `filter` for filtering (dropping) received metrics (#1001) -## 💡 Enhancements 💡 +### 💡 Enhancements 💡 - `otlp` receiver implement HTTP X-Protobuf (#1021) - Exporters: Support mTLS in gRPC exporters (#927) - Extensions: Add `zpages` for service (servicez, pipelinez, extensions) (#894) -## 🧰 Bug fixes 🧰 +### 🧰 Bug fixes 🧰 - Add missing logging for metrics at `debug` level (#1108) - Fix setting internal status code in `jaeger` receivers (#1105) @@ -1275,12 +1756,12 @@ Released 2020-06-16 - Fix resource attribute mutation bug when exporting in `jaeger` proto (#907) - Fix metric/spans count, add tests for nil entries in the slices (#787) -## 🧩 Components 🧩 +### 🧩 Components 🧩 -### Traces +#### Traces | Receivers | Processors | Exporters | -| :--------: | :------------: | :--------: | +|:----------:|:--------------:|:----------:| | Jaeger | Attributes | File | | OpenCensus | Batch | Jaeger | | OTLP | Memory Limiter | Logging | @@ -1289,17 +1770,17 @@ Released 2020-06-16 | | Sampling | Zipkin | | | Span | | -### Metrics +#### Metrics | Receivers | Processors | Exporters | -| :---------: | :------------: | :--------: | +|:-----------:|:--------------:|:----------:| | HostMetrics | Batch | File | | OpenCensus | Filter | Logging | | OTLP | Memory Limiter | OpenCensus | | Prometheus | | OTLP | | VM Metrics | | Prometheus | -### Extensions +#### Extensions - Health Check - Performance Profiler @@ -1323,7 +1804,7 @@ Released 2020-03-30 ### Components | Receivers / Exporters | Processors | Extensions | -| :-------------------: | :------------: | :------------------: | +|:---------------------:|:--------------:|:--------------------:| | Jaeger | Attributes | Health Check | | OpenCensus | Batch | Performance Profiler | | OpenTelemetry | Memory Limiter | zPages | diff --git a/internal/otel_collector/CONTRIBUTING.md b/internal/otel_collector/CONTRIBUTING.md index 0ca656683f1..de254728b59 100644 --- a/internal/otel_collector/CONTRIBUTING.md +++ b/internal/otel_collector/CONTRIBUTING.md @@ -41,8 +41,15 @@ reasonably fast reviews. ### When adding a new component -Consider submitting different PRs for (more details about adding new components -[here](#adding-new-components)) : +Components comprise of exporters, extensions, receivers, and processors. The key criteria to implementing a component is to: + +* Implement the `component.Component` interface +* Provide a configuration structure which defines the configuration of the component +* Provide the implementation which performs the component operation + +For more details on components, see the [Adding New Components](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-new-components) document and the tutorial [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) which provides a detailed example of building a component. + +When submitting a component to the community, consider breaking it down into separate PRs as follows: * First PR should include the overall structure of the new component: * Readme, configuration, and factory implementation usually using the helper @@ -180,12 +187,27 @@ $ git commit $ git push fork feature ``` +### Commit Messages + +Use descriptive commit messages. Here are [some recommendations](https://cbea.ms/git-commit/) +on how to write good commit messages. +When creating PRs GitHub will automatically copy commit messages into the PR description, +so it is a useful habit to write good commit messages before the PR is created. +Also, unless you actually want to tell a story with multiple commits make sure to squash +into a single commit before creating the PR. + +When maintainers merge PRs with multiple commits, they will be squashed and GitHub will +concatenate all commit messages right before you hit the "Confirm squash and merge" +button. Maintainers must make sure to edit this concatenated message to make it right before merging. +In some cases, if the commit messages are lacking the easiest approach to have at +least something useful is copy/pasting the PR description into the commit message box +before merging (but see above paragraph about writing good commit messages in the first place). + ## General Notes -This project uses Go 1.17.* and CircleCI. +This project uses Go 1.17.* and [Github Actions.](https://github.com/features/actions) -CircleCI uses the Makefile with the `ci` target, it is recommended to -run it before submitting your PR. It runs `gofmt -s` (simplify) and `golint`. +It is recommended to run `make gofmt all` before submitting your PR The dependencies are managed with `go mod` if you work with the sources under your `$GOPATH` you need to set the environment variable `GO111MODULE=on`. @@ -225,10 +247,10 @@ To keep naming patterns consistent across the project, naming patterns are enfor In order to simplify developing within the project, library recommendations have been set and should be followed. -| Scenario | Recommended | Rationale | -|---------- |---------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------- | -| Hashing | ["hashing/fnv"](https://pkg.go.dev/hash/fnv) | The project adopted this as the default hashing method due to the efficiency and is reasonable for non cryptographic use | -| Testing | Use `t.Parallel()` where possible | Enabling more test to be run in parallel will speed up the feedback process when working on the project. | +| Scenario | Recommended | Rationale | +|------------|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| Hashing | ["hashing/fnv"](https://pkg.go.dev/hash/fnv) | The project adopted this as the default hashing method due to the efficiency and is reasonable for non cryptographic use | +| Testing | Use `t.Parallel()` where possible | Enabling more test to be run in parallel will speed up the feedback process when working on the project. | Within the project, there are some packages that are yet to follow the recommendations and are being address, however, any new code should adhere to the recommendations. @@ -412,6 +434,16 @@ version (`vM.N+1`). - when a feature is being replaced in favor of an existing one, we MUST mark a feature as deprecated in one version, and MAY remove it in a subsequent one. +Deprecation notice SHOULD contain a version starting from which the deprecation takes effect for tracking purposes. For +example, if `GetFoo` function is going to be deprecated in `v0.45.0` version, it gets the following godoc line: + +```golang +package test + +// Deprecated: [v0.45.0] Use MustDoFoo instead. +func DoFoo() {} +``` + When deprecating a feature affecting end-users, consider first deprecating the feature in one version, then hiding it behind a [feature flag](https://github.com/open-telemetry/opentelemetry-collector/blob/6b5a3d08a96bfb41a5e121b34f592a1d5c6e0435/service/featuregate/) @@ -449,14 +481,6 @@ that each of the following steps is done in a separate version: 1. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if needed. -#### Exceptions - -While the above is what we strive to follow, we acknowledge that some changes might be unfeasible to achieve in a -non-breaking manner. Exceptions to the outlined rules are acceptable if consensus can be obtained from approvers in the -pull request they are proposed. A reason for requesting the exception MUST be given in the pull request. Until unanimity -is obtained, approvers and maintainers are encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be -obtained, the maintainers are then tasked in getting a decision using its regular means (voting, TC help, ...). - ## Updating Changelog An entry into the [Changelog](./CHANGELOG.md) is required for the following reasons: @@ -494,3 +518,12 @@ go: github.com/golangci/golangci-lint@v1.31.0 requires `go env GOPROXY` should return `https://proxy.golang.org,direct`. If it does not, set it as an environment variable: `export GOPROXY=https://proxy.golang.org,direct` + +## Exceptions + +While the rules in this and other documents in this repository is what we strive to follow, we acknowledge that rules may be +unfeasible to be applied in some situations. Exceptions to the rules +on this and other documents are acceptable if consensus can be obtained from approvers in the pull request they are proposed. +A reason for requesting the exception MUST be given in the pull request. Until unanimity is obtained, approvers and maintainers are +encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be obtained, the maintainers are then tasked in getting a +decision using its regular means (voting, TC help, ...). diff --git a/internal/otel_collector/Makefile b/internal/otel_collector/Makefile index e6a04decbbb..a5315964189 100644 --- a/internal/otel_collector/Makefile +++ b/internal/otel_collector/Makefile @@ -3,7 +3,7 @@ include ./Makefile.Common # This is the code that we want to run lint, etc. ALL_SRC := $(shell find . -name '*.go' \ -not -path './internal/tools/*' \ - -not -path './model/internal/data/protogen/*' \ + -not -path './pdata/internal/data/protogen/*' \ -not -path './service/internal/zpages/tmplgen/*' \ -type f | sort) @@ -17,16 +17,18 @@ ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort CMD?= TOOLS_MOD_DIR := ./internal/tools -GOOS=$(shell go env GOOS) -GOARCH=$(shell go env GOARCH) +GOOS=$(shell $(GOCMD) env GOOS) +GOARCH=$(shell $(GOCMD) env GOARCH) +GH := $(shell which gh) +# TODO: Find a way to configure this in the generated code, currently no effect. BUILD_INFO_IMPORT_PATH=go.opentelemetry.io/collector/internal/version VERSION=$(shell git describe --always --match "v[0-9]*" HEAD) BUILD_INFO=-ldflags "-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION)" RUN_CONFIG?=examples/local/otel-config.yaml CONTRIB_PATH=$(CURDIR)/../opentelemetry-collector-contrib -COMP_REL_PATH=service/defaultcomponents/defaults.go +COMP_REL_PATH=cmd/otelcorecol/components.go MOD_NAME=go.opentelemetry.io/collector ADDLICENSE=addlicense @@ -56,42 +58,44 @@ all-modules: .PHONY: gomoddownload gomoddownload: - @$(MAKE) for-all CMD="go mod download" + @$(MAKE) for-all-target TARGET="moddownload" .PHONY: gotest gotest: - @$(MAKE) for-all CMD="make test test-unstable" + @$(MAKE) for-all-target TARGET="test test-unstable" .PHONY: gobenchmark gobenchmark: - @$(MAKE) for-all CMD="make benchmark" + @$(MAKE) for-all-target TARGET="benchmark" .PHONY: gotest-with-cover gotest-with-cover: - @$(MAKE) for-all CMD="make test-with-cover" + @$(MAKE) for-all-target TARGET="test-with-cover" $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt .PHONY: goporto goporto: - @$(MAKE) for-all CMD="make porto" + porto -w --include-internal ./ .PHONY: golint golint: - @$(MAKE) for-all CMD="make lint lint-unstable" + @$(MAKE) for-all-target TARGET="lint lint-unstable" .PHONY: goimpi goimpi: - @$(MAKE) for-all CMD="make impi" + @$(MAKE) for-all-target TARGET="impi" .PHONY: gofmt gofmt: - @$(MAKE) for-all CMD="make fmt" + @$(MAKE) for-all-target TARGET="fmt" .PHONY: gotidy gotidy: - $(MAKE) for-all CMD="rm -fr go.sum" - $(MAKE) for-all CMD="go mod tidy -go=1.16" - $(MAKE) for-all CMD="go mod tidy -go=1.17" + @$(MAKE) for-all-target TARGET="tidy" + +.PHONY: gogenerate +gogenerate: + @$(MAKE) for-all-target TARGET="generate" .PHONY: addlicense addlicense: @@ -126,33 +130,36 @@ misspell-correction: .PHONY: install-tools install-tools: - cd $(TOOLS_MOD_DIR) && go install github.com/client9/misspell/cmd/misspell - cd $(TOOLS_MOD_DIR) && go install github.com/golangci/golangci-lint/cmd/golangci-lint - cd $(TOOLS_MOD_DIR) && go install github.com/google/addlicense - cd $(TOOLS_MOD_DIR) && go install github.com/ory/go-acc - cd $(TOOLS_MOD_DIR) && go install github.com/pavius/impi/cmd/impi - cd $(TOOLS_MOD_DIR) && go install github.com/tcnksm/ghr - cd $(TOOLS_MOD_DIR) && go install github.com/wadey/gocovmerge - cd $(TOOLS_MOD_DIR) && go install go.opentelemetry.io/build-tools/checkdoc - cd $(TOOLS_MOD_DIR) && go install go.opentelemetry.io/build-tools/semconvgen - cd $(TOOLS_MOD_DIR) && go install golang.org/x/exp/cmd/apidiff - cd $(TOOLS_MOD_DIR) && go install golang.org/x/tools/cmd/goimports - cd $(TOOLS_MOD_DIR) && go install github.com/jcchavezs/porto/cmd/porto - cd $(TOOLS_MOD_DIR) && go install go.opentelemetry.io/build-tools/multimod + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/client9/misspell/cmd/misspell + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/google/addlicense + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/ory/go-acc + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/pavius/impi/cmd/impi + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/tcnksm/ghr + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/wadey/gocovmerge + cd $(TOOLS_MOD_DIR) && $(GOCMD) install go.opentelemetry.io/build-tools/checkdoc + cd $(TOOLS_MOD_DIR) && $(GOCMD) install go.opentelemetry.io/build-tools/semconvgen + cd $(TOOLS_MOD_DIR) && $(GOCMD) install golang.org/x/exp/cmd/apidiff + cd $(TOOLS_MOD_DIR) && $(GOCMD) install golang.org/x/tools/cmd/goimports + cd $(TOOLS_MOD_DIR) && $(GOCMD) install github.com/jcchavezs/porto/cmd/porto + cd $(TOOLS_MOD_DIR) && $(GOCMD) install go.opentelemetry.io/build-tools/multimod .PHONY: run run: otelcorecol ./bin/otelcorecol_$(GOOS)_$(GOARCH) --config ${RUN_CONFIG} ${RUN_ARGS} -.PHONY: for-all -for-all: - @echo "running $${CMD} in root" - @$${CMD} - @set -e; for dir in $(ALL_MODULES); do \ - (cd "$${dir}" && \ - echo "running $${CMD} in $${dir}" && \ - $${CMD} ); \ - done +# Append root module to all modules +GOMODULES = $(ALL_MODULES) $(PWD) + +# Define a delegation target for each module +.PHONY: $(GOMODULES) +$(GOMODULES): + @echo "Running target '$(TARGET)' in module '$@'" + $(MAKE) -C $@ $(TARGET) + +# Triggers each module's delegation target +.PHONY: for-all-target +for-all-target: $(GOMODULES) .PHONY: check-component check-component: @@ -174,10 +181,10 @@ add-tag: push-tag: @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) @echo "Pushing tag ${TAG}" - @git push upstream ${TAG} + @git push git@github.com:open-telemetry/opentelemetry-collector.git ${TAG} @set -e; for dir in $(ALL_MODULES); do \ (echo Pushing tag "$${dir:2}/$${TAG}" && \ - git push upstream "$${dir:2}/$${TAG}"); \ + git push git@github.com:open-telemetry/opentelemetry-collector.git "$${dir:2}/$${TAG}"); \ done .PHONY: delete-tag @@ -193,16 +200,12 @@ delete-tag: # Build the Collector executable. .PHONY: otelcorecol otelcorecol: - pushd cmd/otelcorecol && GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ../../bin/otelcorecol_$(GOOS)_$(GOARCH) \ + pushd cmd/otelcorecol && GO111MODULE=on CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/otelcorecol_$(GOOS)_$(GOARCH) \ $(BUILD_INFO) -tags $(GO_BUILD_TAGS) ./cmd/otelcorecol && popd .PHONY: genotelcorecol genotelcorecol: - pushd cmd/builder/ && go run ./ --skip-compilation --config ../otelcorecol/builder-config.yaml --output-path ../otelcorecol && popd - -.PHONY: genmdata -genmdata: - $(MAKE) for-all CMD="go generate ./..." + pushd cmd/builder/ && $(GOCMD) run ./ --skip-compilation --config ../otelcorecol/builder-config.yaml --output-path ../otelcorecol && popd DEPENDABOT_PATH=".github/dependabot.yml" .PHONY: internal-gendependabot @@ -222,7 +225,6 @@ gendependabot: $(eval SHELL:=/bin/bash) @echo "version: 2" >> ${DEPENDABOT_PATH} @echo "updates:" >> ${DEPENDABOT_PATH} $(MAKE) internal-gendependabot DIR="/" PACKAGE="github-actions" - $(MAKE) internal-gendependabot DIR="/" PACKAGE="docker" $(MAKE) internal-gendependabot DIR="/" PACKAGE="gomod" @set -e; for dir in $(ALL_MODULES); do \ $(MAKE) internal-gendependabot DIR=$${dir:1} PACKAGE="gomod"; \ @@ -231,24 +233,24 @@ gendependabot: $(eval SHELL:=/bin/bash) # Definitions for ProtoBuf generation. # The source directory for OTLP ProtoBufs. -OPENTELEMETRY_PROTO_SRC_DIR=model/internal/opentelemetry-proto +OPENTELEMETRY_PROTO_SRC_DIR=pdata/internal/opentelemetry-proto # The SHA matching the current version of the proto to use -OPENTELEMETRY_PROTO_VERSION=v0.12.0 +OPENTELEMETRY_PROTO_VERSION=v0.18.0 # Find all .proto files. OPENTELEMETRY_PROTO_FILES := $(subst $(OPENTELEMETRY_PROTO_SRC_DIR)/,,$(wildcard $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/*/v1/*.proto $(OPENTELEMETRY_PROTO_SRC_DIR)/opentelemetry/proto/collector/*/v1/*.proto)) # Target directory to write generated files to. -PROTO_TARGET_GEN_DIR=model/internal/data/protogen +PROTO_TARGET_GEN_DIR=pdata/internal/data/protogen # Go package name to use for generated files. PROTO_PACKAGE=go.opentelemetry.io/collector/$(PROTO_TARGET_GEN_DIR) # Intermediate directory used during generation. -PROTO_INTERMEDIATE_DIR=model/internal/.patched-otlp-proto +PROTO_INTERMEDIATE_DIR=pdata/internal/.patched-otlp-proto -DOCKER_PROTOBUF ?= otel/build-protobuf:0.4.1 +DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0 PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD}/$(PROTO_INTERMEDIATE_DIR) ${DOCKER_PROTOBUF} --proto_path=${PWD} PROTO_INCLUDES := -I/usr/include/github.com/gogo/protobuf -I./ @@ -294,7 +296,7 @@ genproto_sub: # Generate structs, functions and tests for pdata package. Must be used after any changes # to proto and after running `make genproto` genpdata: - go run model/internal/cmd/pdatagen/main.go + $(GOCMD) run pdata/internal/cmd/pdatagen/main.go $(MAKE) fmt # Generate semantic convention constants. Requires a clone of the opentelemetry-specification repo @@ -302,30 +304,35 @@ gensemconv: @[ "${SPECPATH}" ] || ( echo ">> env var SPECPATH is not set"; exit 1 ) @[ "${SPECTAG}" ] || ( echo ">> env var SPECTAG is not set"; exit 1 ) @echo "Generating semantic convention constants from specification version ${SPECTAG} at ${SPECPATH}" - semconvgen -o model/semconv/${SPECTAG} -t model/internal/semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/resource -p conventionType=resource - semconvgen -o model/semconv/${SPECTAG} -t model/internal/semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/trace -p conventionType=trace + semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/resource -p conventionType=resource -f generated_resource.go + semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH}/semantic_conventions/trace -p conventionType=trace -f generated_trace.go # Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles # against the current version of this repo. .PHONY: check-contrib check-contrib: @echo Setting contrib at $(CONTRIB_PATH) to use this core checkout - make -C $(CONTRIB_PATH) for-all CMD="go mod edit -replace go.opentelemetry.io/collector=$(CURDIR)" - make -C $(CONTRIB_PATH) for-all CMD="go mod edit -replace go.opentelemetry.io/collector/model=$(CURDIR)/model" - make -C $(CONTRIB_PATH) for-all CMD="go mod tidy -go=1.16" - make -C $(CONTRIB_PATH) for-all CMD="go mod tidy -go=1.17" - make -C $(CONTRIB_PATH) test + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(CURDIR)" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/semconv=$(CURDIR)/semconv" + @$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy + @$(MAKE) -C $(CONTRIB_PATH) test @echo Restoring contrib to no longer use this core checkout - make -C $(CONTRIB_PATH) for-all CMD="go mod edit -dropreplace go.opentelemetry.io/collector" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector" # List of directories where certificates are stored for unit tests. -CERT_DIRS := config/configgrpc/testdata \ - config/confighttp/testdata +CERT_DIRS := localhost|""|config/configgrpc/testdata \ + localhost|""|config/confighttp/testdata \ + example1|"-1"|config/configtls/testdata \ + example2|"-2"|config/configtls/testdata +cert-domain = $(firstword $(subst |, ,$1)) +cert-suffix = $(word 2,$(subst |, ,$1)) +cert-dir = $(word 3,$(subst |, ,$1)) # Generate certificates for unit tests relying on certificates. .PHONY: certs certs: - $(foreach dir, $(CERT_DIRS), $(call exec-command, @internal/buildscripts/gen-certs.sh -o $(dir))) + $(foreach dir, $(CERT_DIRS), $(call exec-command, @internal/buildscripts/gen-certs.sh -o $(call cert-dir,$(dir)) -s $(call cert-suffix,$(dir)) -m $(call cert-domain,$(dir)))) # Generate certificates for unit tests relying on certificates without copying certs to specific test directories. .PHONY: certs-dryrun @@ -361,4 +368,48 @@ multimod-verify: install-tools .PHONY: multimod-prerelease multimod-prerelease: install-tools - multimod prerelease -v ./versions.yaml -m collector-base + multimod prerelease -v ./versions.yaml -m collector-core + $(MAKE) gotidy + +.PHONY: prepare-release +prepare-release: +ifdef PREVIOUS_VERSION + @echo "Previous version $(PREVIOUS_VERSION)" +else + @echo "PREVIOUS_VERSION not defined" + @echo "usage: make prepare-release RELEASE_CANDIDATE= PREVIOUS_VERSION=" + exit 1 +endif +ifdef RELEASE_CANDIDATE + @echo "Preparing release $(RELEASE_CANDIDATE)" +else + @echo "RELEASE_CANDIDATE not defined" + @echo "usage: make prepare-release RELEASE_CANDIDATE= PREVIOUS_VERSION=" + exit 1 +endif + # ensure a clean branch + git diff -s --exit-code || (echo "local repository not clean"; exit 1) + # TODO: update changelog + # update versions.yaml config.go builder-config.yaml + sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' versions.yaml + sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' ./cmd/builder/internal/builder/config.go + sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' ./cmd/otelcorecol/builder-config.yaml + sed -i.bak 's/$(PREVIOUS_VERSION)/$(RELEASE_CANDIDATE)/g' examples/k8s/otel-config.yaml + find . -name "*.bak" -type f -delete + # regenerate files + $(MAKE) genotelcorecol + # commit changes before running multimod + git checkout -b opentelemetry-collector-bot/release-$(RELEASE_CANDIDATE) + git add . + git commit -m "prepare release $(RELEASE_CANDIDATE)" + $(MAKE) multimod-prerelease + # commit multimod changes + git add . + git commit -m "add multimod changes" || (echo "no multimod changes to commit") + git push fork opentelemetry-collector-bot/release-$(RELEASE_CANDIDATE) + @if [ -z "$(GH)" ]; then \ + echo "'gh' command not found, can't submit the PR on your behalf."; \ + exit 1; \ + fi + gh pr create --title "[chore] prepare release $(RELEASE_CANDIDATE)" + diff --git a/internal/otel_collector/Makefile.Common b/internal/otel_collector/Makefile.Common index a77cc2bd0d4..2b31c5d405e 100644 --- a/internal/otel_collector/Makefile.Common +++ b/internal/otel_collector/Makefile.Common @@ -3,8 +3,9 @@ ALL_PKGS := $(sort $(shell go list ./...)) # Use a single process (-p 1) on go test to avoid tests clashing on machine # wide resources, e.g. ports. -GOTEST_OPT?= -v -p 1 -race -timeout 60s -GOTEST=go test +GOTEST_OPT?= -v -p 1 -race -timeout 120s +GOCMD?= go +GOTEST=$(GOCMD) test GO_ACC=go-acc LINT=golangci-lint IMPI=impi @@ -30,18 +31,27 @@ fmt: gofmt -w -s ./ goimports -w -local go.opentelemetry.io/collector ./ +.PHONY: tidy +tidy: + rm -fr go.sum + $(GOCMD) mod tidy -compat=1.17 + .PHONY: lint lint: - $(LINT) run --allow-parallel-runners + $(LINT) run .PHONY: lint-unstable lint-unstable: - $(LINT) run --allow-parallel-runners --build-tags enable_unstable + $(LINT) run --build-tags enable_unstable -.PHONY: porto -porto: - porto -w --include-internal ./ +.PHONY: generate +generate: + $(GOCMD) generate ./... .PHONY: impi impi: @$(IMPI) --local go.opentelemetry.io/collector --scheme stdThirdPartyLocal ./... + +.PHONY: moddownload +moddownload: + $(GOCMD) mod download diff --git a/internal/otel_collector/README.md b/internal/otel_collector/README.md index 1f6a91442af..ec131c477ab 100644 --- a/internal/otel_collector/README.md +++ b/internal/otel_collector/README.md @@ -6,19 +6,23 @@   •   Getting Involved   •   - Getting In Touch + Getting In Touch

+ + Build Status + - Go Report Card - - Build Status + Go Report Card + - Codecov Status + Codecov Status + - GitHub release (latest by date including pre-releases) + GitHub release (latest by date including pre-releases) +

@@ -48,7 +52,7 @@ The OpenTelemetry Collector offers a vendor-agnostic implementation on how to receive, process and export telemetry data. In addition, it removes the need to run, operate and maintain multiple agents/collectors in order to support -open-source telemetry data formats (e.g. Jaeger, Prometheus, etc.) sending to +open-source telemetry data formats (e.g. Jaeger, Prometheus, etc.) to multiple open-source or commercial back-ends. Objectives: @@ -59,59 +63,97 @@ Objectives: - Extensible: Customizable without touching the core code. - Unified: Single codebase, deployable as an agent or collector with support for traces, metrics and logs. -## Status +## Stability levels The collector components and implementation are in different stages of stability, and usually split between -functionality and configuration: - -| Signal | Component | Status | -|--------|-----------|--------| -|Trace | OTLP protocol | Stable | -|| OTLP receiver functionality | Stable | -|| OTLP receiver configuration | Beta | -|| OTLP exporter functionality | Stable | -|| OTLP exporter configuration | Beta | -|Metric | OTLP protocol | Stable | -|| OTLP receiver functionality | Stable | -|| OTLP receiver configuration | Beta | -|| OTLP exporter functionality | Stable | -|| OTLP exporter configuration | Beta | -|Logs | OTLP protocol | Beta | -|| OTLP receiver functionality | Beta | -|| OTLP receiver configuration | Beta | -|| OTLP exporter functionality | Beta | -|| OTLP exporter configuration | Beta | -|Common| Logging exporter | unstable | -|| Batch processor functionality | Beta | -|| Batch processor configuration | Beta | -|| MemoryLimiter processor functionality | Beta | -|| MemoryLimiter processor configuration | Beta | - -We follow the production maturity level defined [here](https://github.com/open-telemetry/community/blob/47813530864b9fe5a5146f466a58bd2bb94edc72/maturity-matrix.yaml#L31) +functionality and configuration. The status for each component is available in the README file for the component. While +we intend to provide high-quality components as part of this repository, we acknowledge that not all of them are ready +for prime time. As such, each component should list its current stability level for each telemetry signal, according to +the following definitions: + +### In development + +Not all pieces of the component are in place yet and it might not be available as part of any distributions yet. Bugs and performance issues should be reported, but it is likely that the component owners might not give them much attention. Your feedback is still desired, especially when it comes to the user-experience (configuration options, component observability, technical implementation details, ...). Configuration options might break often depending on how things evolve. The component should not be used in production. + +### Alpha + +The component is ready to be used for limited non-critical workloads and the authors of this component would welcome your feedback. Bugs and performance problems should be reported, but component owners might not work on them right away. The configuration options might change often without backwards compatibility guarantees. + +### Beta + +Same as Alpha, but the configuration options are deemed stable. While there might be breaking changes between releases, component owners should try to minimize them. A component at this stage is expected to have had exposure to non-critical production workloads already during its **Alpha** phase, making it suitable for broader usage. + +### Stable + +The component is ready for general availability. Bugs and performance problems should be reported and there's an expectation that the component owners will work on them. Breaking changes, including configuration options and the component's output are not expected to happen without prior notice, unless under special circumstances. + +### Deprecated + +The component is planned to be removed in a future version and no further support will be provided. Note that new issues will likely not be worked on. When a component enters "deprecated" mode, it is expected to exist for at least two minor releases. See the component's readme file for more details on when a component will cease to exist. + +### Unmaintained + +A component identified as unmaintained does not have an active code owner. Such component may have never been assigned a code owner or a previously active code owner has not responded to requests for feedback within 6 weeks of being contacted. Issues and pull requests for unmaintained components will be labelled as such. After 6 months of being unmaintained, these components will be removed from official distribution. Components that are unmaintained are actively seeking contributors to become code owners. + +## Compatibility + +When used as a library, the OpenTelemetry Collector attempts to track the currently supported versions of Go, as [defined by the Go team](https://go.dev/doc/devel/release#policy). +Removing support for an unsupported Go version is not considered a breaking change. + +Starting with the release of Go 1.18, support for Go versions on the OpenTelemetry Collector will be updated as follows: + +1. The first release after the release of a new Go minor version `N` will add build and tests steps for the new Go minor version. +2. The first release after the release of a new Go minor version `N` will remove support for Go version `N-2`. + +Official OpenTelemetry Collector distro binaries may be built with any supported Go version. ## Contributing -See [CONTRIBUTING.md](CONTRIBUTING.md). +See the [Contributing Guide](CONTRIBUTING.md) for details. + +Here is a list of community roles with current and previous members: + +- Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-telemetry/teams/collector-triagers)): + + - Actively seeking contributors to triage issues + +- Emeritus Triagers: + + - [Andrew Hsu](https://github.com/andrewhsu), Lightstep + - [Alolita Sharma](https://github.com/alolita), Apple + - [Punya Biswal](https://github.com/punya), Google + - [Steve Flanders](https://github.com/flands), Splunk + +- Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)): + + - [Anthony Mirabella](https://github.com/Aneurysm9), AWS + - [Dmitrii Anoshin](https://github.com/dmitryax), Splunk + - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs + - [Pablo Baeyens](https://github.com/mx-psi), DataDog -Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-telemetry/teams/collector-triagers)): +- Emeritus Approvers: -- [Alolita Sharma](https://github.com/alolita), AWS -- [Punya Biswal](https://github.com/punya), Google -- [Steve Flanders](https://github.com/flands), Splunk + - [James Bebbington](https://github.com/james-bebbington), Google + - [Jay Camp](https://github.com/jrcamp), Splunk + - [Nail Islamov](https://github.com/nilebox), Google + - [Owais Lone](https://github.com/owais), Splunk + - [Rahul Patel](https://github.com/rghetia), Google + - [Steven Karis](https://github.com/sjkaris), Splunk + - [Yang Song](https://github.com/songy23), Google -Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)): +- Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)): -- [Alex Boten](https://github.com/codeboten), Lightstep -- [Anthony Mirabella](https://github.com/Aneurysm9), AWS -- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk -- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs + - [Alex Boten](https://github.com/codeboten), Lightstep + - [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk + - [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk -Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)): +- Emeritus Maintainers: -- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk -- [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk + - [Paulo Janotti](https://github.com/pjanotti), Splunk -Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). +Learn more about roles in [Community membership](https://github.com/open-telemetry/community/blob/main/community-membership.md). +In addition to what is described at the organization-level, the SIG Collector requires all core approvers to take part in rotating +the role of the [release manager](./docs/release.md#release-manager). Thanks to all the people who already contributed! diff --git a/internal/otel_collector/VERSIONING.md b/internal/otel_collector/VERSIONING.md index f1d04d26ffe..08e1b9ca547 100644 --- a/internal/otel_collector/VERSIONING.md +++ b/internal/otel_collector/VERSIONING.md @@ -102,3 +102,17 @@ is designed so that the following goal can be achieved: * Contrib modules will be kept up to date with this project's releases. * GitHub releases will be made for all releases. * Go modules will be made available at Go package mirrors. +* Stability guaranties of modules versioned as `v1` or higher are aligned with [Go 1 compatibility + promise](https://go.dev/doc/go1compat). OpenTelemetry authors reserve the right to introduce API changes breaking + compatibility between minor versions in the following scenarios: + * **Struct literals.** It may be necessary to add new fields to exported structs in the API. Code that uses unkeyed + struct literals (such as pkg.T{3, "x"}) to create values of these types would fail to compile after such a change. + However, code that uses keyed literals (pkg.T{A: 3, B: "x"}) will continue to compile. We therefore recommend + using OpenTelemetry collector structs with the keyed literals only. + * **Methods.** As with struct fields, it may be necessary to add methods to types. Under some circumstances, + such as when the type is embedded in a struct along with another type, the addition of the new method may + break the struct by creating a conflict with an existing method of the other embedded type. We cannot protect + against this rare case and do not guarantee compatibility in such scenarios. + * **Dot imports.** If a program imports a package using `import .`, additional names defined in the imported package + in future releases may conflict with other names defined in the program. We do not recommend the use of + `import .` with OpenTelemetry Collector modules. diff --git a/internal/otel_collector/client/client.go b/internal/otel_collector/client/client.go index b5974e53a06..4b3f701badb 100644 --- a/internal/otel_collector/client/client.go +++ b/internal/otel_collector/client/client.go @@ -91,6 +91,7 @@ package client // import "go.opentelemetry.io/collector/client" import ( "context" "net" + "strings" ) type ctxKey struct{} @@ -160,7 +161,19 @@ func NewMetadata(md map[string][]string) Metadata { func (m Metadata) Get(key string) []string { vals := m.data[key] if len(vals) == 0 { - return nil + // we didn't find the key, but perhaps it just has different cases? + for k, v := range m.data { + if strings.EqualFold(key, k) { + vals = v + // we optimize for the next lookup + m.data[key] = v + } + } + + // if it's still not found, it's really not here + if len(vals) == 0 { + return nil + } } ret := make([]string, len(vals)) diff --git a/internal/otel_collector/component/build_info.go b/internal/otel_collector/component/build_info.go index 3ac0758205c..f89925a30a6 100644 --- a/internal/otel_collector/component/build_info.go +++ b/internal/otel_collector/component/build_info.go @@ -15,12 +15,12 @@ package component // import "go.opentelemetry.io/collector/component" // BuildInfo is the information that is logged at the application start and -// passed into each component. This information can be overridden in custom builds. +// passed into each component. This information can be overridden in custom build. type BuildInfo struct { - // Executable file name, e.g. "otelcol". + // Command is the executable file name, e.g. "otelcol". Command string - // Full name of the collector, e.g. "OpenTelemetry Collector". + // Description is the full name of the collector, e.g. "OpenTelemetry Collector". Description string // Version string. diff --git a/internal/otel_collector/component/component.go b/internal/otel_collector/component/component.go index 4678f83f620..8990baa8921 100644 --- a/internal/otel_collector/component/component.go +++ b/internal/otel_collector/component/component.go @@ -16,9 +16,19 @@ package component // import "go.opentelemetry.io/collector/component" import ( "context" + "errors" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/internal/internalinterface" +) + +var ( + // ErrNilNextConsumer can be returned by receiver, or processor Start factory funcs that create the Component if the + // expected next Consumer is nil. + ErrNilNextConsumer = errors.New("nil next Consumer") + + // ErrDataTypeIsNotSupported can be returned by receiver, exporter or processor factory funcs that create the + // Component if the particular telemetry data type is not supported by the receiver, exporter or processor. + ErrDataTypeIsNotSupported = errors.New("telemetry type is not supported") ) // Component is either a receiver, exporter, processor, or an extension. @@ -61,6 +71,28 @@ type Component interface { Shutdown(ctx context.Context) error } +// StartFunc specifies the function invoked when the component.Component is being started. +type StartFunc func(context.Context, Host) error + +// Start starts the component. +func (f StartFunc) Start(ctx context.Context, host Host) error { + if f == nil { + return nil + } + return f(ctx, host) +} + +// ShutdownFunc specifies the function invoked when the component.Component is being shutdown. +type ShutdownFunc func(context.Context) error + +// Shutdown shuts down the component. +func (f ShutdownFunc) Shutdown(ctx context.Context) error { + if f == nil { + return nil + } + return f(ctx) +} + // Kind represents component kinds. type Kind int @@ -72,12 +104,86 @@ const ( KindExtension ) +// StabilityLevel represents the stability level of the component created by the factory. +// The stability level is used to determine if the component should be used in production +// or not. For more details see: +// https://github.com/open-telemetry/opentelemetry-collector#stability-levels +type StabilityLevel int + +const ( + StabilityLevelUndefined = iota // skip 0, start types from 1. + StabilityLevelUnmaintained + StabilityLevelDeprecated + StabilityLevelInDevelopment + StabilityLevelAlpha + StabilityLevelBeta + StabilityLevelStable +) + +func (sl StabilityLevel) String() string { + switch sl { + case StabilityLevelUnmaintained: + return "unmaintained" + case StabilityLevelDeprecated: + return "deprecated" + case StabilityLevelInDevelopment: + return "in development" + case StabilityLevelAlpha: + return "alpha" + case StabilityLevelBeta: + return "beta" + case StabilityLevelStable: + return "stable" + } + return "undefined" +} + +func (sl StabilityLevel) LogMessage() string { + switch sl { + case StabilityLevelUnmaintained: + return "Unmaintained component. Actively looking for contributors. Component will become deprecated after 6 months of remaining unmaintained." + case StabilityLevelDeprecated: + return "Deprecated component. Will be removed in future releases." + case StabilityLevelInDevelopment: + return "In development component. May change in the future." + case StabilityLevelAlpha: + return "Alpha component. May change in the future." + case StabilityLevelBeta: + return "Beta component. May change in the future." + case StabilityLevelStable: + return "Stable component." + } + return "Stability level of component is undefined" +} + // Factory is implemented by all component factories. // // This interface cannot be directly implemented. Implementations must // use the factory helpers for the appropriate component type. type Factory interface { - internalinterface.InternalInterface // Type gets the type of the component created by this factory. Type() config.Type + + // StabilityLevel gets the stability level of the component. + StabilityLevel(config.DataType) StabilityLevel + + unexportedFactoryFunc() +} + +type baseFactory struct { + cfgType config.Type + stability map[config.Type]StabilityLevel +} + +func (baseFactory) unexportedFactoryFunc() {} + +func (bf baseFactory) Type() config.Type { + return bf.cfgType +} + +func (bf baseFactory) StabilityLevel(dt config.DataType) StabilityLevel { + if val, ok := bf.stability[dt]; ok { + return val + } + return StabilityLevelUndefined } diff --git a/internal/otel_collector/component/componenthelper/component.go b/internal/otel_collector/component/componenthelper/component.go deleted file mode 100644 index 6257654badd..00000000000 --- a/internal/otel_collector/component/componenthelper/component.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package componenthelper // import "go.opentelemetry.io/collector/component/componenthelper" - -import ( - "context" - - "go.opentelemetry.io/collector/component" -) - -// StartFunc specifies the function invoked when the component.Component is being started. -type StartFunc func(context.Context, component.Host) error - -// Start starts the component. -func (f StartFunc) Start(ctx context.Context, host component.Host) error { - if f == nil { - return nil - } - return f(ctx, host) -} - -// ShutdownFunc specifies the function invoked when the component.Component is being shutdown. -type ShutdownFunc func(context.Context) error - -// Shutdown shuts down the component. -func (f ShutdownFunc) Shutdown(ctx context.Context) error { - if f == nil { - return nil - } - return f(ctx) -} - -// Option represents the possible options for New. -type Option func(*baseComponent) - -// WithStart overrides the default `Start` function for a component.Component. -// The default always returns nil. -func WithStart(startFunc StartFunc) Option { - return func(o *baseComponent) { - o.StartFunc = startFunc - } -} - -// WithShutdown overrides the default `Shutdown` function for a component.Component. -// The default always returns nil. -func WithShutdown(shutdownFunc ShutdownFunc) Option { - return func(o *baseComponent) { - o.ShutdownFunc = shutdownFunc - } -} - -type baseComponent struct { - StartFunc - ShutdownFunc -} - -// New returns a component.Component configured with the provided options. -func New(options ...Option) component.Component { - bc := &baseComponent{} - - for _, op := range options { - op(bc) - } - - return bc -} diff --git a/internal/otel_collector/component/componenthelper/doc.go b/internal/otel_collector/component/componenthelper/doc.go deleted file mode 100644 index bd418113eab..00000000000 --- a/internal/otel_collector/component/componenthelper/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package componenthelper assists with the creation of a new component.Component. -package componenthelper // import "go.opentelemetry.io/collector/component/componenthelper" diff --git a/internal/otel_collector/component/componenterror/doc.go b/internal/otel_collector/component/componenttest/nop_component.go similarity index 73% rename from internal/otel_collector/component/componenterror/doc.go rename to internal/otel_collector/component/componenttest/nop_component.go index 90532968959..ac56476e768 100644 --- a/internal/otel_collector/component/componenterror/doc.go +++ b/internal/otel_collector/component/componenttest/nop_component.go @@ -12,6 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package componenterror provides helper functions to create and process -// OpenTelemetry component errors. -package componenterror // import "go.opentelemetry.io/collector/component/componenterror" +package componenttest // import "go.opentelemetry.io/collector/component/componenttest" + +import ( + "go.opentelemetry.io/collector/component" +) + +type nopComponent struct { + component.StartFunc + component.ShutdownFunc +} diff --git a/internal/otel_collector/component/componenttest/nop_exporter.go b/internal/otel_collector/component/componenttest/nop_exporter.go index 64e3cd3246d..82f5a3194b0 100644 --- a/internal/otel_collector/component/componenttest/nop_exporter.go +++ b/internal/otel_collector/component/componenttest/nop_exporter.go @@ -18,10 +18,8 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/internalinterface" ) // NewNopExporterCreateSettings returns a new nop settings for Create*Exporter functions. @@ -36,54 +34,30 @@ type nopExporterConfig struct { config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } -// nopExporterFactory is factory for nopExporter. -type nopExporterFactory struct { - internalinterface.BaseInternal -} - -var nopExporterFactoryInstance = &nopExporterFactory{} - // NewNopExporterFactory returns a component.ExporterFactory that constructs nop exporters. func NewNopExporterFactory() component.ExporterFactory { - return nopExporterFactoryInstance -} - -// Type gets the type of the Exporter config created by this factory. -func (f *nopExporterFactory) Type() config.Type { - return "nop" -} - -// CreateDefaultConfig creates the default configuration for the Exporter. -func (f *nopExporterFactory) CreateDefaultConfig() config.Exporter { - return &nopExporterConfig{ - ExporterSettings: config.NewExporterSettings(config.NewComponentID("nop")), - } + return component.NewExporterFactory( + "nop", + func() config.Exporter { + return &nopExporterConfig{ + ExporterSettings: config.NewExporterSettings(config.NewComponentID("nop")), + } + }, + component.WithTracesExporterAndStabilityLevel(createTracesExporter, component.StabilityLevelStable), + component.WithMetricsExporterAndStabilityLevel(createMetricsExporter, component.StabilityLevelStable), + component.WithLogsExporterAndStabilityLevel(createLogsExporter, component.StabilityLevelStable), + ) } -// CreateTracesExporter implements component.ExporterFactory interface. -func (f *nopExporterFactory) CreateTracesExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.TracesExporter, error) { +func createTracesExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.TracesExporter, error) { return nopExporterInstance, nil } -// CreateMetricsExporter implements component.ExporterFactory interface. -func (f *nopExporterFactory) CreateMetricsExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.MetricsExporter, error) { +func createMetricsExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.MetricsExporter, error) { return nopExporterInstance, nil } -// CreateLogsExporter implements component.ExporterFactory interface. -func (f *nopExporterFactory) CreateLogsExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.LogsExporter, error) { +func createLogsExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.LogsExporter, error) { return nopExporterInstance, nil } @@ -93,7 +67,6 @@ var nopExporterInstance = &nopExporter{ // nopExporter stores consumed traces and metrics for testing purposes. type nopExporter struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + nopComponent consumertest.Consumer } diff --git a/internal/otel_collector/component/componenttest/nop_extension.go b/internal/otel_collector/component/componenttest/nop_extension.go index 34838b9d8ed..c562c9c3f9a 100644 --- a/internal/otel_collector/component/componenttest/nop_extension.go +++ b/internal/otel_collector/component/componenttest/nop_extension.go @@ -18,9 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/internal/internalinterface" ) // NewNopExtensionCreateSettings returns a new nop settings for Create*Extension functions. @@ -35,43 +33,23 @@ type nopExtensionConfig struct { config.ExtensionSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } -// nopExtensionFactory is factory for nopExtension. -type nopExtensionFactory struct { - internalinterface.BaseInternal -} - -var nopExtensionFactoryInstance = &nopExtensionFactory{} - // NewNopExtensionFactory returns a component.ExtensionFactory that constructs nop extensions. func NewNopExtensionFactory() component.ExtensionFactory { - return nopExtensionFactoryInstance -} - -// Type gets the type of the Extension config created by this factory. -func (f *nopExtensionFactory) Type() config.Type { - return "nop" -} - -// CreateDefaultConfig creates the default configuration for the Extension. -func (f *nopExtensionFactory) CreateDefaultConfig() config.Extension { - return &nopExtensionConfig{ - ExtensionSettings: config.NewExtensionSettings(config.NewComponentID("nop")), - } -} - -// CreateExtension implements component.ExtensionFactory interface. -func (f *nopExtensionFactory) CreateExtension( - _ context.Context, - _ component.ExtensionCreateSettings, - _ config.Extension, -) (component.Extension, error) { - return nopExtensionInstance, nil + return component.NewExtensionFactory( + "nop", + func() config.Extension { + return &nopExtensionConfig{ + ExtensionSettings: config.NewExtensionSettings(config.NewComponentID("nop")), + } + }, + func(context.Context, component.ExtensionCreateSettings, config.Extension) (component.Extension, error) { + return nopExtensionInstance, nil + }) } var nopExtensionInstance = &nopExtension{} // nopExtension stores consumed traces and metrics for testing purposes. type nopExtension struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + nopComponent } diff --git a/internal/otel_collector/component/componenttest/nop_host.go b/internal/otel_collector/component/componenttest/nop_host.go index 8caa1979137..820a8d3ba6b 100644 --- a/internal/otel_collector/component/componenttest/nop_host.go +++ b/internal/otel_collector/component/componenttest/nop_host.go @@ -22,11 +22,9 @@ import ( // nopHost mocks a receiver.ReceiverHost for test purposes. type nopHost struct{} -var nopHostInstance component.Host = &nopHost{} - // NewNopHost returns a new instance of nopHost with proper defaults for most tests. func NewNopHost() component.Host { - return nopHostInstance + return &nopHost{} } func (nh *nopHost) ReportFatalError(_ error) {} diff --git a/internal/otel_collector/component/componenttest/nop_processor.go b/internal/otel_collector/component/componenttest/nop_processor.go index 3209a0dc2aa..60c4c4f3d62 100644 --- a/internal/otel_collector/component/componenttest/nop_processor.go +++ b/internal/otel_collector/component/componenttest/nop_processor.go @@ -18,11 +18,9 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/internalinterface" ) // NewNopProcessorCreateSettings returns a new nop settings for Create*Processor functions. @@ -37,57 +35,30 @@ type nopProcessorConfig struct { config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } -// nopProcessorFactory is factory for nopProcessor. -type nopProcessorFactory struct { - internalinterface.BaseInternal -} - -var nopProcessorFactoryInstance = &nopProcessorFactory{} - // NewNopProcessorFactory returns a component.ProcessorFactory that constructs nop processors. func NewNopProcessorFactory() component.ProcessorFactory { - return nopProcessorFactoryInstance -} - -// Type gets the type of the Processor config created by this factory. -func (f *nopProcessorFactory) Type() config.Type { - return "nop" -} - -// CreateDefaultConfig creates the default configuration for the Processor. -func (f *nopProcessorFactory) CreateDefaultConfig() config.Processor { - return &nopProcessorConfig{ - ProcessorSettings: config.NewProcessorSettings(config.NewComponentID("nop")), - } + return component.NewProcessorFactory( + "nop", + func() config.Processor { + return &nopProcessorConfig{ + ProcessorSettings: config.NewProcessorSettings(config.NewComponentID("nop")), + } + }, + component.WithTracesProcessorAndStabilityLevel(createTracesProcessor, component.StabilityLevelStable), + component.WithMetricsProcessorAndStabilityLevel(createMetricsProcessor, component.StabilityLevelStable), + component.WithLogsProcessorAndStabilityLevel(createLogsProcessor, component.StabilityLevelStable), + ) } -// CreateTracesProcessor implements component.ProcessorFactory interface. -func (f *nopProcessorFactory) CreateTracesProcessor( - _ context.Context, - _ component.ProcessorCreateSettings, - _ config.Processor, - _ consumer.Traces, -) (component.TracesProcessor, error) { +func createTracesProcessor(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Traces) (component.TracesProcessor, error) { return nopProcessorInstance, nil } -// CreateMetricsProcessor implements component.ProcessorFactory interface. -func (f *nopProcessorFactory) CreateMetricsProcessor( - _ context.Context, - _ component.ProcessorCreateSettings, - _ config.Processor, - _ consumer.Metrics, -) (component.MetricsProcessor, error) { +func createMetricsProcessor(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Metrics) (component.MetricsProcessor, error) { return nopProcessorInstance, nil } -// CreateLogsProcessor implements component.ProcessorFactory interface. -func (f *nopProcessorFactory) CreateLogsProcessor( - _ context.Context, - _ component.ProcessorCreateSettings, - _ config.Processor, - _ consumer.Logs, -) (component.LogsProcessor, error) { +func createLogsProcessor(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Logs) (component.LogsProcessor, error) { return nopProcessorInstance, nil } @@ -97,7 +68,6 @@ var nopProcessorInstance = &nopProcessor{ // nopProcessor stores consumed traces and metrics for testing purposes. type nopProcessor struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + nopComponent consumertest.Consumer } diff --git a/internal/otel_collector/component/componenttest/nop_receiver.go b/internal/otel_collector/component/componenttest/nop_receiver.go index db4d364df4b..c641c521558 100644 --- a/internal/otel_collector/component/componenttest/nop_receiver.go +++ b/internal/otel_collector/component/componenttest/nop_receiver.go @@ -18,10 +18,8 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/internalinterface" ) // NewNopReceiverCreateSettings returns a new nop settings for Create*Receiver functions. @@ -36,57 +34,29 @@ type nopReceiverConfig struct { config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } -// nopReceiverFactory is factory for nopReceiver. -type nopReceiverFactory struct { - internalinterface.BaseInternal -} - -var nopReceiverFactoryInstance = &nopReceiverFactory{} - // NewNopReceiverFactory returns a component.ReceiverFactory that constructs nop receivers. func NewNopReceiverFactory() component.ReceiverFactory { - return nopReceiverFactoryInstance -} - -// Type gets the type of the Receiver config created by this factory. -func (f *nopReceiverFactory) Type() config.Type { - return config.NewComponentID("nop").Type() -} - -// CreateDefaultConfig creates the default configuration for the Receiver. -func (f *nopReceiverFactory) CreateDefaultConfig() config.Receiver { - return &nopReceiverConfig{ - ReceiverSettings: config.NewReceiverSettings(config.NewComponentID("nop")), - } + return component.NewReceiverFactory( + "nop", + func() config.Receiver { + return &nopReceiverConfig{ + ReceiverSettings: config.NewReceiverSettings(config.NewComponentID("nop")), + } + }, + component.WithTracesReceiverAndStabilityLevel(createTracesReceiver, component.StabilityLevelStable), + component.WithMetricsReceiverAndStabilityLevel(createMetricsReceiver, component.StabilityLevelStable), + component.WithLogsReceiverAndStabilityLevel(createLogsReceiver, component.StabilityLevelStable)) } -// CreateTracesReceiver implements component.ReceiverFactory interface. -func (f *nopReceiverFactory) CreateTracesReceiver( - _ context.Context, - _ component.ReceiverCreateSettings, - _ config.Receiver, - _ consumer.Traces, -) (component.TracesReceiver, error) { +func createTracesReceiver(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Traces) (component.TracesReceiver, error) { return nopReceiverInstance, nil } -// CreateMetricsReceiver implements component.ReceiverFactory interface. -func (f *nopReceiverFactory) CreateMetricsReceiver( - _ context.Context, - _ component.ReceiverCreateSettings, - _ config.Receiver, - _ consumer.Metrics, -) (component.MetricsReceiver, error) { +func createMetricsReceiver(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Metrics) (component.MetricsReceiver, error) { return nopReceiverInstance, nil } -// CreateLogsReceiver implements component.ReceiverFactory interface. -func (f *nopReceiverFactory) CreateLogsReceiver( - _ context.Context, - _ component.ReceiverCreateSettings, - _ config.Receiver, - _ consumer.Logs, -) (component.LogsReceiver, error) { +func createLogsReceiver(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Logs) (component.LogsReceiver, error) { return nopReceiverInstance, nil } @@ -94,6 +64,5 @@ var nopReceiverInstance = &nopReceiver{} // nopReceiver stores consumed traces and metrics for testing purposes. type nopReceiver struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + nopComponent } diff --git a/internal/otel_collector/component/componenttest/shutdown_verifier.go b/internal/otel_collector/component/componenttest/shutdown_verifier.go index d2ce1a6ef21..249d3e08bf3 100644 --- a/internal/otel_collector/component/componenttest/shutdown_verifier.go +++ b/internal/otel_collector/component/componenttest/shutdown_verifier.go @@ -16,13 +16,13 @@ package componenttest // import "go.opentelemetry.io/collector/component/compone import ( "context" + "errors" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/internal/testdata" @@ -38,7 +38,7 @@ func verifyTracesProcessorDoesntProduceAfterShutdown(t *testing.T, factory compo nextSink, ) if err != nil { - if err == componenterror.ErrDataTypeIsNotSupported { + if errors.Is(err, component.ErrDataTypeIsNotSupported) { return } require.NoError(t, err) @@ -49,7 +49,7 @@ func verifyTracesProcessorDoesntProduceAfterShutdown(t *testing.T, factory compo // Send some traces to the processor. const generatedCount = 10 for i := 0; i < generatedCount; i++ { - require.NoError(t, processor.ConsumeTraces(context.Background(), testdata.GenerateTracesOneSpan())) + require.NoError(t, processor.ConsumeTraces(context.Background(), testdata.GenerateTraces(1))) } // Now shutdown the processor. diff --git a/internal/otel_collector/component/componenttest/testdata/invalid_go.txt b/internal/otel_collector/component/componenttest/testdata/invalid_go.txt deleted file mode 100644 index 50ecec8f181..00000000000 --- a/internal/otel_collector/component/componenttest/testdata/invalid_go.txt +++ /dev/null @@ -1,6 +0,0 @@ -package testdata - - -import ( - "import -) \ No newline at end of file diff --git a/internal/otel_collector/component/componenttest/testdata/valid_go.txt b/internal/otel_collector/component/componenttest/testdata/valid_go.txt deleted file mode 100644 index 2c88748717d..00000000000 --- a/internal/otel_collector/component/componenttest/testdata/valid_go.txt +++ /dev/null @@ -1,9 +0,0 @@ -package testdata - - -import ( - "go.opentelemetry.io/collector/exporter/exporter1" -) - -func main() { -} \ No newline at end of file diff --git a/internal/otel_collector/component/exporter.go b/internal/otel_collector/component/exporter.go index a753e74692c..fc89e71c5af 100644 --- a/internal/otel_collector/component/exporter.go +++ b/internal/otel_collector/component/exporter.go @@ -52,11 +52,10 @@ type ExporterCreateSettings struct { BuildInfo BuildInfo } -// ExporterFactory can create MetricsExporter, TracesExporter and -// LogsExporter. This is the new preferred factory type to create exporters. +// ExporterFactory is factory interface for exporters. // // This interface cannot be directly implemented. Implementations must -// use the exporterhelper.NewFactory to implement it. +// use the NewExporterFactory to implement it. type ExporterFactory interface { Factory @@ -72,18 +71,133 @@ type ExporterFactory interface { // CreateTracesExporter creates a trace exporter based on this config. // If the exporter type does not support tracing or if the config is not valid, // an error will be returned instead. - CreateTracesExporter(ctx context.Context, set ExporterCreateSettings, - cfg config.Exporter) (TracesExporter, error) + CreateTracesExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (TracesExporter, error) // CreateMetricsExporter creates a metrics exporter based on this config. // If the exporter type does not support metrics or if the config is not valid, // an error will be returned instead. - CreateMetricsExporter(ctx context.Context, set ExporterCreateSettings, - cfg config.Exporter) (MetricsExporter, error) + CreateMetricsExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (MetricsExporter, error) // CreateLogsExporter creates an exporter based on the config. // If the exporter type does not support logs or if the config is not valid, // an error will be returned instead. - CreateLogsExporter(ctx context.Context, set ExporterCreateSettings, - cfg config.Exporter) (LogsExporter, error) + CreateLogsExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (LogsExporter, error) +} + +// ExporterFactoryOption apply changes to ExporterOptions. +type ExporterFactoryOption interface { + // applyExporterFactoryOption applies the option. + applyExporterFactoryOption(o *exporterFactory) +} + +var _ ExporterFactoryOption = (*exporterFactoryOptionFunc)(nil) + +// exporterFactoryOptionFunc is an ExporterFactoryOption created through a function. +type exporterFactoryOptionFunc func(*exporterFactory) + +func (f exporterFactoryOptionFunc) applyExporterFactoryOption(o *exporterFactory) { + f(o) +} + +// ExporterCreateDefaultConfigFunc is the equivalent of ExporterFactory.CreateDefaultConfig(). +type ExporterCreateDefaultConfigFunc func() config.Exporter + +// CreateDefaultConfig implements ExporterFactory.CreateDefaultConfig(). +func (f ExporterCreateDefaultConfigFunc) CreateDefaultConfig() config.Exporter { + return f() +} + +// CreateTracesExporterFunc is the equivalent of ExporterFactory.CreateTracesExporter(). +type CreateTracesExporterFunc func(context.Context, ExporterCreateSettings, config.Exporter) (TracesExporter, error) + +// CreateTracesExporter implements ExporterFactory.CreateTracesExporter(). +func (f CreateTracesExporterFunc) CreateTracesExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (TracesExporter, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg) +} + +// CreateMetricsExporterFunc is the equivalent of ExporterFactory.CreateMetricsExporter(). +type CreateMetricsExporterFunc func(context.Context, ExporterCreateSettings, config.Exporter) (MetricsExporter, error) + +// CreateMetricsExporter implements ExporterFactory.CreateMetricsExporter(). +func (f CreateMetricsExporterFunc) CreateMetricsExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (MetricsExporter, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg) +} + +// CreateLogsExporterFunc is the equivalent of ExporterFactory.CreateLogsExporter(). +type CreateLogsExporterFunc func(context.Context, ExporterCreateSettings, config.Exporter) (LogsExporter, error) + +// CreateLogsExporter implements ExporterFactory.CreateLogsExporter(). +func (f CreateLogsExporterFunc) CreateLogsExporter(ctx context.Context, set ExporterCreateSettings, cfg config.Exporter) (LogsExporter, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg) +} + +type exporterFactory struct { + baseFactory + ExporterCreateDefaultConfigFunc + CreateTracesExporterFunc + CreateMetricsExporterFunc + CreateLogsExporterFunc +} + +// WithTracesExporter overrides the default "error not supported" implementation for CreateTracesExporter. +// Deprecated: [v0.55.0] Use WithTracesExporterAndStabilityLevel instead. +func WithTracesExporter(createTracesExporter CreateTracesExporterFunc) ExporterFactoryOption { + return WithTracesExporterAndStabilityLevel(createTracesExporter, StabilityLevelUndefined) +} + +// WithTracesExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesExporter and the default "undefined" stability level. +func WithTracesExporterAndStabilityLevel(createTracesExporter CreateTracesExporterFunc, sl StabilityLevel) ExporterFactoryOption { + return exporterFactoryOptionFunc(func(o *exporterFactory) { + o.stability[config.TracesDataType] = sl + o.CreateTracesExporterFunc = createTracesExporter + }) +} + +// WithMetricsExporter overrides the default "error not supported" implementation for CreateMetricsExporter. +// Deprecated: [v0.55.0] Use WithMetricsExporterAndStabilityLevel instead. +func WithMetricsExporter(createMetricsExporter CreateMetricsExporterFunc) ExporterFactoryOption { + return WithMetricsExporterAndStabilityLevel(createMetricsExporter, StabilityLevelUndefined) +} + +// WithMetricsExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsExporter and the default "undefined" stability level. +func WithMetricsExporterAndStabilityLevel(createMetricsExporter CreateMetricsExporterFunc, sl StabilityLevel) ExporterFactoryOption { + return exporterFactoryOptionFunc(func(o *exporterFactory) { + o.stability[config.MetricsDataType] = sl + o.CreateMetricsExporterFunc = createMetricsExporter + }) +} + +// WithLogsExporter overrides the default "error not supported" implementation for CreateLogsExporter. +// Deprecated: [v0.55.0] Use WithLogsExporterAndStabilityLevel instead. +func WithLogsExporter(createLogsExporter CreateLogsExporterFunc) ExporterFactoryOption { + return WithLogsExporterAndStabilityLevel(createLogsExporter, StabilityLevelUndefined) +} + +// WithLogsExporterAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsExporter and the default "undefined" stability level. +func WithLogsExporterAndStabilityLevel(createLogsExporter CreateLogsExporterFunc, sl StabilityLevel) ExporterFactoryOption { + return exporterFactoryOptionFunc(func(o *exporterFactory) { + o.stability[config.LogsDataType] = sl + o.CreateLogsExporterFunc = createLogsExporter + }) +} + +// NewExporterFactory returns a ExporterFactory. +func NewExporterFactory(cfgType config.Type, createDefaultConfig ExporterCreateDefaultConfigFunc, options ...ExporterFactoryOption) ExporterFactory { + f := &exporterFactory{ + baseFactory: baseFactory{cfgType: cfgType, stability: make(map[config.DataType]StabilityLevel)}, + ExporterCreateDefaultConfigFunc: createDefaultConfig, + } + for _, opt := range options { + opt.applyExporterFactoryOption(f) + } + return f } diff --git a/internal/otel_collector/component/extension.go b/internal/otel_collector/component/extension.go index 7bd0f8f3046..f7d51acadfe 100644 --- a/internal/otel_collector/component/extension.go +++ b/internal/otel_collector/component/extension.go @@ -52,10 +52,23 @@ type ExtensionCreateSettings struct { BuildInfo BuildInfo } -// ExtensionFactory is a factory interface for extensions to the service. -// -// This interface cannot be directly implemented. Implementations must -// use the extensionhelper.NewFactory to implement it. +// ExtensionCreateDefaultConfigFunc is the equivalent of component.ExtensionFactory.CreateDefaultConfig() +type ExtensionCreateDefaultConfigFunc func() config.Extension + +// CreateDefaultConfig implements ExtensionFactory.CreateDefaultConfig() +func (f ExtensionCreateDefaultConfigFunc) CreateDefaultConfig() config.Extension { + return f() +} + +// CreateExtensionFunc is the equivalent of component.ExtensionFactory.CreateExtension() +type CreateExtensionFunc func(context.Context, ExtensionCreateSettings, config.Extension) (Extension, error) + +// CreateExtension implements ExtensionFactory.CreateExtension. +func (f CreateExtensionFunc) CreateExtension(ctx context.Context, set ExtensionCreateSettings, cfg config.Extension) (Extension, error) { + return f(ctx, set, cfg) +} + +// ExtensionFactory is a factory for extensions to the service. type ExtensionFactory interface { Factory @@ -68,6 +81,23 @@ type ExtensionFactory interface { // tests of any implementation of the Factory interface. CreateDefaultConfig() config.Extension - // CreateExtension creates a service extension based on the given config. + // CreateExtension creates an extension based on the given config. CreateExtension(ctx context.Context, set ExtensionCreateSettings, cfg config.Extension) (Extension, error) } + +type extensionFactory struct { + baseFactory + ExtensionCreateDefaultConfigFunc + CreateExtensionFunc +} + +func NewExtensionFactory( + cfgType config.Type, + createDefaultConfig ExtensionCreateDefaultConfigFunc, + createServiceExtension CreateExtensionFunc) ExtensionFactory { + return &extensionFactory{ + baseFactory: baseFactory{cfgType: cfgType}, + ExtensionCreateDefaultConfigFunc: createDefaultConfig, + CreateExtensionFunc: createServiceExtension, + } +} diff --git a/internal/otel_collector/component/processor.go b/internal/otel_collector/component/processor.go index fc684073078..7ed227d551b 100644 --- a/internal/otel_collector/component/processor.go +++ b/internal/otel_collector/component/processor.go @@ -19,7 +19,6 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/internalinterface" ) // Processor defines the common functions that must be implemented by TracesProcessor @@ -54,13 +53,11 @@ type ProcessorCreateSettings struct { BuildInfo BuildInfo } -// ProcessorFactory is factory interface for processors. This is the -// new factory type that can create new style processors. +// ProcessorFactory is Factory interface for processors. // // This interface cannot be directly implemented. Implementations must -// use the processorhelper.NewFactory to implement it. +// use the NewProcessorFactory to implement it. type ProcessorFactory interface { - internalinterface.InternalInterface Factory // CreateDefaultConfig creates the default configuration for the Processor. @@ -102,3 +99,135 @@ type ProcessorFactory interface { nextConsumer consumer.Logs, ) (LogsProcessor, error) } + +// ProcessorCreateDefaultConfigFunc is the equivalent of ProcessorFactory.CreateDefaultConfig(). +type ProcessorCreateDefaultConfigFunc func() config.Processor + +// CreateDefaultConfig implements ProcessorFactory.CreateDefaultConfig(). +func (f ProcessorCreateDefaultConfigFunc) CreateDefaultConfig() config.Processor { + return f() +} + +// ProcessorFactoryOption apply changes to ProcessorOptions. +type ProcessorFactoryOption interface { + // applyProcessorFactoryOption applies the option. + applyProcessorFactoryOption(o *processorFactory) +} + +var _ ProcessorFactoryOption = (*processorFactoryOptionFunc)(nil) + +// processorFactoryOptionFunc is an ProcessorFactoryOption created through a function. +type processorFactoryOptionFunc func(*processorFactory) + +func (f processorFactoryOptionFunc) applyProcessorFactoryOption(o *processorFactory) { + f(o) +} + +// CreateTracesProcessorFunc is the equivalent of ProcessorFactory.CreateTracesProcessor(). +type CreateTracesProcessorFunc func(context.Context, ProcessorCreateSettings, config.Processor, consumer.Traces) (TracesProcessor, error) + +// CreateTracesProcessor implements ProcessorFactory.CreateTracesProcessor(). +func (f CreateTracesProcessorFunc) CreateTracesProcessor( + ctx context.Context, + set ProcessorCreateSettings, + cfg config.Processor, + nextConsumer consumer.Traces) (TracesProcessor, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateMetricsProcessorFunc is the equivalent of ProcessorFactory.CreateMetricsProcessor(). +type CreateMetricsProcessorFunc func(context.Context, ProcessorCreateSettings, config.Processor, consumer.Metrics) (MetricsProcessor, error) + +// CreateMetricsProcessor implements ProcessorFactory.CreateMetricsProcessor(). +func (f CreateMetricsProcessorFunc) CreateMetricsProcessor( + ctx context.Context, + set ProcessorCreateSettings, + cfg config.Processor, + nextConsumer consumer.Metrics, +) (MetricsProcessor, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateLogsProcessorFunc is the equivalent of ProcessorFactory.CreateLogsProcessor(). +type CreateLogsProcessorFunc func(context.Context, ProcessorCreateSettings, config.Processor, consumer.Logs) (LogsProcessor, error) + +// CreateLogsProcessor implements ProcessorFactory.CreateLogsProcessor(). +func (f CreateLogsProcessorFunc) CreateLogsProcessor( + ctx context.Context, + set ProcessorCreateSettings, + cfg config.Processor, + nextConsumer consumer.Logs, +) (LogsProcessor, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +type processorFactory struct { + baseFactory + ProcessorCreateDefaultConfigFunc + CreateTracesProcessorFunc + CreateMetricsProcessorFunc + CreateLogsProcessorFunc +} + +// WithTracesProcessor overrides the default "error not supported" implementation for CreateTracesProcessor. +// Deprecated: [v0.55.0] Use WithTracesProcessorAndStabilityLevel instead. +func WithTracesProcessor(createTracesProcessor CreateTracesProcessorFunc) ProcessorFactoryOption { + return WithTracesProcessorAndStabilityLevel(createTracesProcessor, StabilityLevelUndefined) +} + +// WithTracesProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesProcessor and the default "undefined" stability level. +func WithTracesProcessorAndStabilityLevel(createTracesProcessor CreateTracesProcessorFunc, sl StabilityLevel) ProcessorFactoryOption { + return processorFactoryOptionFunc(func(o *processorFactory) { + o.stability[config.TracesDataType] = sl + o.CreateTracesProcessorFunc = createTracesProcessor + }) +} + +// WithMetricsProcessor overrides the default "error not supported" implementation for CreateMetricsProcessor. +// Deprecated: [v0.55.0] Use WithMetricsProcessorAndStabilityLevel instead. +func WithMetricsProcessor(createMetricsProcessor CreateMetricsProcessorFunc) ProcessorFactoryOption { + return WithMetricsProcessorAndStabilityLevel(createMetricsProcessor, StabilityLevelUndefined) +} + +// WithMetricsProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsProcessor and the default "undefined" stability level. +func WithMetricsProcessorAndStabilityLevel(createMetricsProcessor CreateMetricsProcessorFunc, sl StabilityLevel) ProcessorFactoryOption { + return processorFactoryOptionFunc(func(o *processorFactory) { + o.stability[config.MetricsDataType] = sl + o.CreateMetricsProcessorFunc = createMetricsProcessor + }) +} + +// WithLogsProcessor overrides the default "error not supported" implementation for CreateLogsProcessor. +// Deprecated: [v0.55.0] Use WithLogsProcessorAndStabilityLevel instead. +func WithLogsProcessor(createLogsProcessor CreateLogsProcessorFunc) ProcessorFactoryOption { + return WithLogsProcessorAndStabilityLevel(createLogsProcessor, StabilityLevelUndefined) +} + +// WithLogsProcessorAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsProcessor and the default "undefined" stability level. +func WithLogsProcessorAndStabilityLevel(createLogsProcessor CreateLogsProcessorFunc, sl StabilityLevel) ProcessorFactoryOption { + return processorFactoryOptionFunc(func(o *processorFactory) { + o.stability[config.LogsDataType] = sl + o.CreateLogsProcessorFunc = createLogsProcessor + }) +} + +// NewProcessorFactory returns a ProcessorFactory. +func NewProcessorFactory(cfgType config.Type, createDefaultConfig ProcessorCreateDefaultConfigFunc, options ...ProcessorFactoryOption) ProcessorFactory { + f := &processorFactory{ + baseFactory: baseFactory{cfgType: cfgType, stability: make(map[config.DataType]StabilityLevel)}, + ProcessorCreateDefaultConfigFunc: createDefaultConfig, + } + for _, opt := range options { + opt.applyProcessorFactoryOption(f) + } + return f +} diff --git a/internal/otel_collector/component/receiver.go b/internal/otel_collector/component/receiver.go index 6143f0142d2..8fee91bc702 100644 --- a/internal/otel_collector/component/receiver.go +++ b/internal/otel_collector/component/receiver.go @@ -28,7 +28,7 @@ import ( // to by calling the nextConsumer.Consume*() function. // // Error Handling -// ============== +// // The nextConsumer.Consume*() function may return an error to indicate that the data // was not accepted. There are 2 types of possible errors: Permanent and non-Permanent. // The receiver must check the type of the error using IsPermanent() helper. @@ -49,7 +49,7 @@ import ( // is returned. // // Acknowledgment Handling -// ======================= +// // The receivers that receive data via a network protocol that support acknowledgments // MUST follow this order of operations: // - Receive data from some sender (typically from a network). @@ -66,7 +66,7 @@ type Receiver interface { // Its purpose is to translate data from any format to the collector's internal trace format. // TracesReceiver feeds a consumer.Traces with data. // -// For example it could be Zipkin data source which translates Zipkin spans into pdata.Traces. +// For example it could be Zipkin data source which translates Zipkin spans into ptrace.Traces. type TracesReceiver interface { Receiver } @@ -75,7 +75,7 @@ type TracesReceiver interface { // Its purpose is to translate data from any format to the collector's internal metrics format. // MetricsReceiver feeds a consumer.Metrics with data. // -// For example it could be Prometheus data source which translates Prometheus metrics into pdata.Metrics. +// For example it could be Prometheus data source which translates Prometheus metrics into pmetric.Metrics. type MetricsReceiver interface { Receiver } @@ -84,7 +84,7 @@ type MetricsReceiver interface { // Its purpose is to translate data from any format to the collector's internal logs data format. // LogsReceiver feeds a consumer.Logs with data. // -// For example a LogsReceiver can read syslogs and convert them into pdata.Logs. +// For example a LogsReceiver can read syslogs and convert them into plog.Logs. type LogsReceiver interface { Receiver } @@ -97,11 +97,10 @@ type ReceiverCreateSettings struct { BuildInfo BuildInfo } -// ReceiverFactory can create TracesReceiver, MetricsReceiver and -// and LogsReceiver. This is the new preferred factory type to create receivers. +// ReceiverFactory is factory interface for receivers. // // This interface cannot be directly implemented. Implementations must -// use the receiverhelper.NewFactory to implement it. +// use the NewReceiverFactory to implement it. type ReceiverFactory interface { Factory @@ -132,3 +131,135 @@ type ReceiverFactory interface { CreateLogsReceiver(ctx context.Context, set ReceiverCreateSettings, cfg config.Receiver, nextConsumer consumer.Logs) (LogsReceiver, error) } + +// ReceiverFactoryOption apply changes to ReceiverOptions. +type ReceiverFactoryOption interface { + // applyReceiverFactoryOption applies the option. + applyReceiverFactoryOption(o *receiverFactory) +} + +var _ ReceiverFactoryOption = (*receiverFactoryOptionFunc)(nil) + +// receiverFactoryOptionFunc is an ReceiverFactoryOption created through a function. +type receiverFactoryOptionFunc func(*receiverFactory) + +func (f receiverFactoryOptionFunc) applyReceiverFactoryOption(o *receiverFactory) { + f(o) +} + +// ReceiverCreateDefaultConfigFunc is the equivalent of ReceiverFactory.CreateDefaultConfig(). +type ReceiverCreateDefaultConfigFunc func() config.Receiver + +// CreateDefaultConfig implements ReceiverFactory.CreateDefaultConfig(). +func (f ReceiverCreateDefaultConfigFunc) CreateDefaultConfig() config.Receiver { + return f() +} + +// CreateTracesReceiverFunc is the equivalent of ReceiverFactory.CreateTracesReceiver(). +type CreateTracesReceiverFunc func(context.Context, ReceiverCreateSettings, config.Receiver, consumer.Traces) (TracesReceiver, error) + +// CreateTracesReceiver implements ReceiverFactory.CreateTracesReceiver(). +func (f CreateTracesReceiverFunc) CreateTracesReceiver( + ctx context.Context, + set ReceiverCreateSettings, + cfg config.Receiver, + nextConsumer consumer.Traces) (TracesReceiver, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateMetricsReceiverFunc is the equivalent of ReceiverFactory.CreateMetricsReceiver(). +type CreateMetricsReceiverFunc func(context.Context, ReceiverCreateSettings, config.Receiver, consumer.Metrics) (MetricsReceiver, error) + +// CreateMetricsReceiver implements ReceiverFactory.CreateMetricsReceiver(). +func (f CreateMetricsReceiverFunc) CreateMetricsReceiver( + ctx context.Context, + set ReceiverCreateSettings, + cfg config.Receiver, + nextConsumer consumer.Metrics, +) (MetricsReceiver, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +// CreateLogsReceiverFunc is the equivalent of ReceiverFactory.CreateLogsReceiver(). +type CreateLogsReceiverFunc func(context.Context, ReceiverCreateSettings, config.Receiver, consumer.Logs) (LogsReceiver, error) + +// CreateLogsReceiver implements ReceiverFactory.CreateLogsReceiver(). +func (f CreateLogsReceiverFunc) CreateLogsReceiver( + ctx context.Context, + set ReceiverCreateSettings, + cfg config.Receiver, + nextConsumer consumer.Logs, +) (LogsReceiver, error) { + if f == nil { + return nil, ErrDataTypeIsNotSupported + } + return f(ctx, set, cfg, nextConsumer) +} + +type receiverFactory struct { + baseFactory + ReceiverCreateDefaultConfigFunc + CreateTracesReceiverFunc + CreateMetricsReceiverFunc + CreateLogsReceiverFunc +} + +// WithTracesReceiver overrides the default "error not supported" implementation for CreateTracesReceiver. +// Deprecated: [v0.55.0] Use WithTracesReceiverAndStabilityLevel instead. +func WithTracesReceiver(createTracesReceiver CreateTracesReceiverFunc) ReceiverFactoryOption { + return WithTracesReceiverAndStabilityLevel(createTracesReceiver, StabilityLevelUndefined) +} + +// WithTracesReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateTracesReceiver and the default "undefined" stability level. +func WithTracesReceiverAndStabilityLevel(createTracesReceiver CreateTracesReceiverFunc, sl StabilityLevel) ReceiverFactoryOption { + return receiverFactoryOptionFunc(func(o *receiverFactory) { + o.stability[config.TracesDataType] = sl + o.CreateTracesReceiverFunc = createTracesReceiver + }) +} + +// WithMetricsReceiver overrides the default "error not supported" implementation for CreateMetricsReceiver. +// Deprecated: [v0.55.0] Use WithMetricsReceiverAndStabilityLevel instead. +func WithMetricsReceiver(createMetricsReceiver CreateMetricsReceiverFunc) ReceiverFactoryOption { + return WithMetricsReceiverAndStabilityLevel(createMetricsReceiver, StabilityLevelUndefined) +} + +// WithMetricsReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateMetricsReceiver and the default "undefined" stability level. +func WithMetricsReceiverAndStabilityLevel(createMetricsReceiver CreateMetricsReceiverFunc, sl StabilityLevel) ReceiverFactoryOption { + return receiverFactoryOptionFunc(func(o *receiverFactory) { + o.stability[config.MetricsDataType] = sl + o.CreateMetricsReceiverFunc = createMetricsReceiver + }) +} + +// WithLogsReceiver overrides the default "error not supported" implementation for CreateLogsReceiver. +// Deprecated: [v0.55.0] Use WithLogsReceiverAndStabilityLevel instead. +func WithLogsReceiver(createLogsReceiver CreateLogsReceiverFunc) ReceiverFactoryOption { + return WithLogsReceiverAndStabilityLevel(createLogsReceiver, StabilityLevelUndefined) +} + +// WithLogsReceiverAndStabilityLevel overrides the default "error not supported" implementation for CreateLogsReceiver and the default "undefined" stability level. +func WithLogsReceiverAndStabilityLevel(createLogsReceiver CreateLogsReceiverFunc, sl StabilityLevel) ReceiverFactoryOption { + return receiverFactoryOptionFunc(func(o *receiverFactory) { + o.stability[config.LogsDataType] = sl + o.CreateLogsReceiverFunc = createLogsReceiver + }) +} + +// NewReceiverFactory returns a ReceiverFactory. +func NewReceiverFactory(cfgType config.Type, createDefaultConfig ReceiverCreateDefaultConfigFunc, options ...ReceiverFactoryOption) ReceiverFactory { + f := &receiverFactory{ + baseFactory: baseFactory{cfgType: cfgType, stability: make(map[config.DataType]StabilityLevel)}, + ReceiverCreateDefaultConfigFunc: createDefaultConfig, + } + for _, opt := range options { + opt.applyReceiverFactoryOption(f) + } + return f +} diff --git a/internal/otel_collector/config/common.go b/internal/otel_collector/config/common.go new file mode 100644 index 00000000000..c02e38264ca --- /dev/null +++ b/internal/otel_collector/config/common.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config // import "go.opentelemetry.io/collector/config" +import ( + "go.opentelemetry.io/collector/confmap" +) + +// Type is the component type as it is used in the config. +type Type string + +// validatable defines the interface for the configuration validation. +type validatable interface { + // Validate validates the configuration and returns an error if invalid. + Validate() error +} + +// Unmarshallable defines an optional interface for custom configuration unmarshalling. +// A configuration struct can implement this interface to override the default unmarshalling. +type Unmarshallable interface { + // Unmarshal is a function that unmarshalls a confmap.Conf into the unmarshable struct in a custom way. + // The confmap.Conf for this specific component may be nil or empty if no config available. + Unmarshal(component *confmap.Conf) error +} + +// DataType is a special Type that represents the data types supported by the collector. We currently support +// collecting metrics, traces and logs, this can expand in the future. +type DataType = Type + +// Currently supported data types. Add new data types here when new types are supported in the future. +const ( + // TracesDataType is the data type tag for traces. + TracesDataType DataType = "traces" + + // MetricsDataType is the data type tag for metrics. + MetricsDataType DataType = "metrics" + + // LogsDataType is the data type tag for logs. + LogsDataType DataType = "logs" +) + +func unmarshal(componentSection *confmap.Conf, intoCfg interface{}) error { + if cu, ok := intoCfg.(Unmarshallable); ok { + return cu.Unmarshal(componentSection) + } + + return componentSection.UnmarshalExact(intoCfg) +} diff --git a/internal/otel_collector/config/configauth/default_clientauthenticator.go b/internal/otel_collector/config/configauth/default_clientauthenticator.go new file mode 100644 index 00000000000..c10f3398cc5 --- /dev/null +++ b/internal/otel_collector/config/configauth/default_clientauthenticator.go @@ -0,0 +1,104 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package configauth // import "go.opentelemetry.io/collector/config/configauth" + +import ( + "context" + "net/http" + + "google.golang.org/grpc/credentials" + + "go.opentelemetry.io/collector/component" +) + +var _ ClientAuthenticator = (*defaultClientAuthenticator)(nil) + +// Option represents the possible options for NewServerAuthenticator. +type ClientOption func(*defaultClientAuthenticator) + +type defaultClientAuthenticator struct { + component.StartFunc + component.ShutdownFunc + roundTripperFunc func(base http.RoundTripper) (http.RoundTripper, error) + perRPCCredentialsFunc func() (credentials.PerRPCCredentials, error) +} + +// WithClientStart overrides the default `Start` function for a component.Component. +// The default always returns nil. +func WithClientStart(startFunc component.StartFunc) ClientOption { + return func(o *defaultClientAuthenticator) { + o.StartFunc = startFunc + } +} + +// WithClientShutdown overrides the default `Shutdown` function for a component.Component. +// The default always returns nil. +func WithClientShutdown(shutdownFunc component.ShutdownFunc) ClientOption { + return func(o *defaultClientAuthenticator) { + o.ShutdownFunc = shutdownFunc + } +} + +// WithClientRoundTripper provides a `RoundTripper` function for this client authenticator. +// The default round tripper is no-op. +func WithClientRoundTripper(roundTripperFunc func(base http.RoundTripper) (http.RoundTripper, error)) ClientOption { + return func(o *defaultClientAuthenticator) { + o.roundTripperFunc = roundTripperFunc + } +} + +// WithPerRPCCredentials provides a `PerRPCCredentials` function for this client authenticator. +// There's no default. +func WithPerRPCCredentials(perRPCCredentialsFunc func() (credentials.PerRPCCredentials, error)) ClientOption { + return func(o *defaultClientAuthenticator) { + o.perRPCCredentialsFunc = perRPCCredentialsFunc + } +} + +// NewClientAuthenticator returns a ClientAuthenticator configured with the provided options. +func NewClientAuthenticator(options ...ClientOption) ClientAuthenticator { + bc := &defaultClientAuthenticator{ + StartFunc: func(ctx context.Context, host component.Host) error { return nil }, + ShutdownFunc: func(ctx context.Context) error { return nil }, + roundTripperFunc: func(base http.RoundTripper) (http.RoundTripper, error) { return base, nil }, + perRPCCredentialsFunc: func() (credentials.PerRPCCredentials, error) { return nil, nil }, + } + + for _, op := range options { + op(bc) + } + + return bc +} + +// Start the component. +func (a *defaultClientAuthenticator) Start(ctx context.Context, host component.Host) error { + return a.StartFunc(ctx, host) +} + +// Shutdown stops the component. +func (a *defaultClientAuthenticator) Shutdown(ctx context.Context) error { + return a.ShutdownFunc(ctx) +} + +// RoundTripper adds the base HTTP RoundTripper in this authenticator's round tripper. +func (a *defaultClientAuthenticator) RoundTripper(base http.RoundTripper) (http.RoundTripper, error) { + return a.roundTripperFunc(base) +} + +// PerRPCCredentials returns this authenticator's credentials.PerRPCCredentials implementation. +func (a *defaultClientAuthenticator) PerRPCCredentials() (credentials.PerRPCCredentials, error) { + return a.perRPCCredentialsFunc() +} diff --git a/internal/otel_collector/config/configauth/default_serverauthenticator.go b/internal/otel_collector/config/configauth/default_serverauthenticator.go index c11bd7674a4..d4123388c0e 100644 --- a/internal/otel_collector/config/configauth/default_serverauthenticator.go +++ b/internal/otel_collector/config/configauth/default_serverauthenticator.go @@ -18,7 +18,6 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" ) var _ ServerAuthenticator = (*defaultServerAuthenticator)(nil) @@ -28,8 +27,8 @@ type Option func(*defaultServerAuthenticator) type defaultServerAuthenticator struct { AuthenticateFunc - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc } // WithAuthenticate specifies which function to use to perform the authentication. @@ -41,7 +40,7 @@ func WithAuthenticate(authenticateFunc AuthenticateFunc) Option { // WithStart overrides the default `Start` function for a component.Component. // The default always returns nil. -func WithStart(startFunc componenthelper.StartFunc) Option { +func WithStart(startFunc component.StartFunc) Option { return func(o *defaultServerAuthenticator) { o.StartFunc = startFunc } @@ -49,7 +48,7 @@ func WithStart(startFunc componenthelper.StartFunc) Option { // WithShutdown overrides the default `Shutdown` function for a component.Component. // The default always returns nil. -func WithShutdown(shutdownFunc componenthelper.ShutdownFunc) Option { +func WithShutdown(shutdownFunc component.ShutdownFunc) Option { return func(o *defaultServerAuthenticator) { o.ShutdownFunc = shutdownFunc } diff --git a/internal/otel_collector/config/configgrpc/README.md b/internal/otel_collector/config/configgrpc/README.md index 519601e4f69..4ee6f541e67 100644 --- a/internal/otel_collector/config/configgrpc/README.md +++ b/internal/otel_collector/config/configgrpc/README.md @@ -16,7 +16,7 @@ configuration. For more information, see [configtls README](../configtls/README.md). - [`balancer_name`](https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md) -- `compression` Compression type to use among `gzip`, `snappy` and `zstd` +- `compression` Compression type to use among `gzip`, `snappy`, `zstd`, and `none`. - `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md) - [`tls`](../configtls/README.md) - `headers`: name/value pairs added to the request diff --git a/internal/otel_collector/config/configgrpc/configgrpc.go b/internal/otel_collector/config/configgrpc/configgrpc.go index dcde9b5b52c..13c198ade05 100644 --- a/internal/otel_collector/config/configgrpc/configgrpc.go +++ b/internal/otel_collector/config/configgrpc/configgrpc.go @@ -42,7 +42,6 @@ import ( "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtls" - "go.opentelemetry.io/collector/internal/middleware" ) var errMetadataNotFound = errors.New("no request metadata found") @@ -54,9 +53,9 @@ var allowedBalancerNames = []string{roundrobin.Name, grpc.PickFirstBalancerName} // Refer to the original data-structure for the meaning of each parameter: // https://godoc.org/google.golang.org/grpc/keepalive#ClientParameters type KeepaliveClientConfig struct { - Time time.Duration `mapstructure:"time,omitempty"` - Timeout time.Duration `mapstructure:"timeout,omitempty"` - PermitWithoutStream bool `mapstructure:"permit_without_stream,omitempty"` + Time time.Duration `mapstructure:"time"` + Timeout time.Duration `mapstructure:"timeout"` + PermitWithoutStream bool `mapstructure:"permit_without_stream"` } // GRPCClientSettings defines common settings for a gRPC client configuration. @@ -70,7 +69,7 @@ type GRPCClientSettings struct { Compression configcompression.CompressionType `mapstructure:"compression"` // TLSSetting struct exposes TLS client configuration. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + TLSSetting configtls.TLSClientSetting `mapstructure:"tls"` // The keepalive parameters for gRPC client. See grpc.WithKeepaliveParams. // (https://godoc.org/google.golang.org/grpc#WithKeepaliveParams). @@ -96,32 +95,32 @@ type GRPCClientSettings struct { BalancerName string `mapstructure:"balancer_name"` // Auth configuration for outgoing RPCs. - Auth *configauth.Authentication `mapstructure:"auth,omitempty"` + Auth *configauth.Authentication `mapstructure:"auth"` } // KeepaliveServerConfig is the configuration for keepalive. type KeepaliveServerConfig struct { - ServerParameters *KeepaliveServerParameters `mapstructure:"server_parameters,omitempty"` - EnforcementPolicy *KeepaliveEnforcementPolicy `mapstructure:"enforcement_policy,omitempty"` + ServerParameters *KeepaliveServerParameters `mapstructure:"server_parameters"` + EnforcementPolicy *KeepaliveEnforcementPolicy `mapstructure:"enforcement_policy"` } // KeepaliveServerParameters allow configuration of the keepalive.ServerParameters. // The same default values as keepalive.ServerParameters are applicable and get applied by the server. // See https://godoc.org/google.golang.org/grpc/keepalive#ServerParameters for details. type KeepaliveServerParameters struct { - MaxConnectionIdle time.Duration `mapstructure:"max_connection_idle,omitempty"` - MaxConnectionAge time.Duration `mapstructure:"max_connection_age,omitempty"` - MaxConnectionAgeGrace time.Duration `mapstructure:"max_connection_age_grace,omitempty"` - Time time.Duration `mapstructure:"time,omitempty"` - Timeout time.Duration `mapstructure:"timeout,omitempty"` + MaxConnectionIdle time.Duration `mapstructure:"max_connection_idle"` + MaxConnectionAge time.Duration `mapstructure:"max_connection_age"` + MaxConnectionAgeGrace time.Duration `mapstructure:"max_connection_age_grace"` + Time time.Duration `mapstructure:"time"` + Timeout time.Duration `mapstructure:"timeout"` } // KeepaliveEnforcementPolicy allow configuration of the keepalive.EnforcementPolicy. // The same default values as keepalive.EnforcementPolicy are applicable and get applied by the server. // See https://godoc.org/google.golang.org/grpc/keepalive#EnforcementPolicy for details. type KeepaliveEnforcementPolicy struct { - MinTime time.Duration `mapstructure:"min_time,omitempty"` - PermitWithoutStream bool `mapstructure:"permit_without_stream,omitempty"` + MinTime time.Duration `mapstructure:"min_time"` + PermitWithoutStream bool `mapstructure:"permit_without_stream"` } // GRPCServerSettings defines common settings for a gRPC server configuration. @@ -131,7 +130,7 @@ type GRPCServerSettings struct { // Configures the protocol to use TLS. // The default value is nil, which will cause the protocol to not use TLS. - TLSSetting *configtls.TLSServerSetting `mapstructure:"tls,omitempty"` + TLSSetting *configtls.TLSServerSetting `mapstructure:"tls"` // MaxRecvMsgSizeMiB sets the maximum size (in MiB) of messages accepted by the server. MaxRecvMsgSizeMiB uint64 `mapstructure:"max_recv_msg_size_mib"` @@ -149,14 +148,14 @@ type GRPCServerSettings struct { WriteBufferSize int `mapstructure:"write_buffer_size"` // Keepalive anchor for all the settings related to keepalive. - Keepalive *KeepaliveServerConfig `mapstructure:"keepalive,omitempty"` + Keepalive *KeepaliveServerConfig `mapstructure:"keepalive"` // Auth for this receiver - Auth *configauth.Authentication `mapstructure:"auth,omitempty"` + Auth *configauth.Authentication `mapstructure:"auth"` // Include propagates the incoming connection's metadata to downstream consumers. // Experimental: *NOTE* this option is subject to change or removal in the future. - IncludeMetadata bool `mapstructure:"include_metadata,omitempty"` + IncludeMetadata bool `mapstructure:"include_metadata"` } // SanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.GRPCClientSettings.Endpoint. @@ -221,7 +220,7 @@ func (gcs *GRPCClientSettings) ToDialOptions(host component.Host, settings compo if gcs.Auth != nil { if host.GetExtensions() == nil { - return nil, fmt.Errorf("no extensions configuration available") + return nil, errors.New("no extensions configuration available") } grpcAuthenticator, cerr := gcs.Auth.GetClientAuthenticator(host.GetExtensions()) @@ -244,9 +243,16 @@ func (gcs *GRPCClientSettings) ToDialOptions(host component.Host, settings compo opts = append(opts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingPolicy":"%s"}`, gcs.BalancerName))) } + otelOpts := []otelgrpc.Option{ + otelgrpc.WithTracerProvider(settings.TracerProvider), + // TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/4030 + // otelgrpc.WithMeterProvider(settings.MeterProvider), + otelgrpc.WithPropagators(otel.GetTextMapPropagator()), + } + // Enable OpenTelemetry observability plugin. - opts = append(opts, grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor(otelgrpc.WithTracerProvider(settings.TracerProvider)))) - opts = append(opts, grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(otelgrpc.WithTracerProvider(settings.TracerProvider)))) + opts = append(opts, grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor(otelOpts...))) + opts = append(opts, grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(otelOpts...))) return opts, nil } @@ -338,20 +344,17 @@ func (gss *GRPCServerSettings) ToServerOption(host component.Host, settings comp }) } - // Enable OpenTelemetry observability plugin. - // TODO: Pass construct settings to have access to Tracer. - uInterceptors = append(uInterceptors, otelgrpc.UnaryServerInterceptor( + otelOpts := []otelgrpc.Option{ otelgrpc.WithTracerProvider(settings.TracerProvider), // TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/4030 // otelgrpc.WithMeterProvider(settings.MeterProvider), otelgrpc.WithPropagators(otel.GetTextMapPropagator()), - )) - sInterceptors = append(sInterceptors, otelgrpc.StreamServerInterceptor( - otelgrpc.WithTracerProvider(settings.TracerProvider), - // TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/4030 - // otelgrpc.WithMeterProvider(settings.MeterProvider), - otelgrpc.WithPropagators(otel.GetTextMapPropagator()), - )) + } + + // Enable OpenTelemetry observability plugin. + // TODO: Pass construct settings to have access to Tracer. + uInterceptors = append(uInterceptors, otelgrpc.UnaryServerInterceptor(otelOpts...)) + sInterceptors = append(sInterceptors, otelgrpc.StreamServerInterceptor(otelOpts...)) uInterceptors = append(uInterceptors, enhanceWithClientInformation(gss.IncludeMetadata)) sInterceptors = append(sInterceptors, enhanceStreamWithClientInformation(gss.IncludeMetadata)) @@ -385,9 +388,7 @@ func enhanceWithClientInformation(includeMetadata bool) func(ctx context.Context func enhanceStreamWithClientInformation(includeMetadata bool) func(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error { return func(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error { - wrapped := middleware.WrapServerStream(ss) - wrapped.WrappedContext = contextWithClient(ss.Context(), includeMetadata) - return handler(srv, wrapped) + return handler(srv, wrapServerStream(contextWithClient(ss.Context(), includeMetadata), ss)) } } @@ -436,7 +437,5 @@ func authStreamServerInterceptor(srv interface{}, stream grpc.ServerStream, _ *g return err } - wrapped := middleware.WrapServerStream(stream) - wrapped.WrappedContext = ctx - return handler(srv, wrapped) + return handler(srv, wrapServerStream(ctx, stream)) } diff --git a/internal/otel_collector/config/configgrpc/testdata/ca.crt b/internal/otel_collector/config/configgrpc/testdata/ca.crt index 7a677e39a77..28a7c43324a 100644 --- a/internal/otel_collector/config/configgrpc/testdata/ca.crt +++ b/internal/otel_collector/config/configgrpc/testdata/ca.crt @@ -1,20 +1,20 @@ -----BEGIN CERTIFICATE----- -MIIDNjCCAh4CCQCYMh590xiOGzANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJB -VTESMBAGA1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoM -CU15T3JnTmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMB4XDTIwMDkyMjA1MjIx -MFoXDTMwMDkyMDA1MjIxMFowXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3Ry -YWxpYTEPMA0GA1UEBwwGU3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNV -BAMMDE15Q29tbW9uTmFtZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -AJdLtbEbPVuBQqh2MLDuyYB/zg3dMfl1jyE64UgW5AVRHrfAGXgP55yeEh3XGiO+ -i5PYNeEILoYcLXtMstA24OTgxeLjTZ0zEaja50/Ow9/NjZcTc0f/DErHI3GvWTxW -dCdosGe4qSwi9BbRGPfAat5fJMSTERXDcAcH2aaD3ekK3WTqtXsFsErF7+SpzJfL -PZw4aSFS9a26PkxO+Z5coqdYRC1CIpZGVFRg/PVcb7NNTrRf+Wu/hOncNkHDXKKz -qeBkhnHczQrPDzxhG2FvrahMgGSsRgBDdMwTBfmBhlbP+sM0HSPuCmKD95/osO03 -sG13nWMSDb7QYETVyg3E4t8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAfLGe9cAN -1WH09KVYIWWzu74tkaOIRFdkXzcx6fMq4Gpi49/lxG1INCrJ/4F8UyhHq0mmSsxb -UGs3KFfDsRctX7PNgOLYHxlUcAhQFzT3xqrRg7iqaiGWKTSGE1fXg29LKm/Ox/MC -npumt7rsSix5Viyb0/njcSX8CdSCirhKCiJklfd5J/Cwxqm+j/Pgaz2YrOj8Axa1 -/GJtPOtIpPYEBbXXUMpuijSikcfurZJL62WWxrzUGZjRsmSJAl5bvTJTOKGQb634 -Y0oehROKnkA2N0UVa4LM2M5C+CVZNl8vKAsdj1pywRGEOQoH42wBNu71Wob1f7jt -JOXWGJcoyEjbSg== +MIIDQTCCAikCFDY1yy9BDMlLjw0cSo+sLXw+lh7dMA0GCSqGSIb3DQEBCwUAMF0x +CzAJBgNVBAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5l +eTESMBAGA1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcN +MjIwMTI2MTAyMzE1WhcNMzIwMTI0MTAyMzE1WjBdMQswCQYDVQQGEwJBVTESMBAG +A1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3Jn +TmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAvetey0+KFDtkh3EZga9Clope0Qhe37z3lIghCoQLyffjUDg5 +OKJK8Bz3RLqTgXDC6638q+FcX21YoZSPAf1qyL4vtvVBGHDuuTKUaInhu+YKTQOB +9AQJFrNDcJiz1B99jCow23LHODc2r+wtQXmWJpmimuRomSEKFnHYns8o7dC5Y8fq +AX+tYC2vQkRH5eJR1m1+xeR61NT+JeWT8NzeChPsw2aQSWTiK5UQ62o/RcMJwiHe +XtqUqObcrEHemqyQvDWDsTHVLe8YeVv7QvK62aQkkO4YqOIH/zhV0msgFsJkg1N+ +pFfwuBKlAfum19+lpNvJrKVQMxnH16qF1rcdnwIDAQABMA0GCSqGSIb3DQEBCwUA +A4IBAQA6H6iPfc2h13bqk4SpcrRQTSLLH6sLqRa9BURpO5VlOWzUiNs0n3Fyn/Uz +r5u4EKIIxdH6rY/1fWmw0l+3wm4S5axoEbV7t5P2r7Ea90iKwdm1YSm8+QENbJyT +n7g26LKch29OYXijb13K05kFVgLDh9LpEMXjzSqxkl1Z7BM8967nNjn8i9n7PSCj +jmLvB/sSDsNODhwo+e+sVZ3k0LYEkPZs0eLIIMLuUn5DGrRCCN2DzyUFugRa013e +Mt3zi9XfVbqC3tscoDUzp8Z4KjnQMpCAKtWS3Dy8mjxXviE1Qn4eXEupS4EOSkWy +9yutGUKpTzZGsAXPYoJMAvD1TgHR -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configgrpc/testdata/client.crt b/internal/otel_collector/config/configgrpc/testdata/client.crt index 2fc037de49f..1092de91774 100644 --- a/internal/otel_collector/config/configgrpc/testdata/client.crt +++ b/internal/otel_collector/config/configgrpc/testdata/client.crt @@ -1,21 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIJANACN0VTlMdZMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV -BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG -A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjAwOTIy -MDUyMjEwWhcNMzAwOTIwMDUyMjEwWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ -QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV -MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAyMraDxgfr7DEShaRbpKnKnRm4xrh9StCpTWVxViCS4JmACrlNsDBggan -Xz4rQSsV1Z2lznYPdbpXVVDY/8Q87GDXQLmB48cff+DLdU2TAvsalraty4edlf1Q -j6WNi/jFca9XIqqS358bmBau3SlEEJVv0StE8fDiZpHQuYADtdXxWhXGcrNC3quu -GKBtTCaj01EiZU5Rdqzd/KFEUQ5ns5K8j1vXJJzEhbmOXRN4NM0vvEBnd3ObP+Lw -pFUSkhxgYYLga8L5432bg/BA7OSLhZoEZzuMivyyNVC7sIoyLBYR0/Nk53ICmKz4 -gR18lTmpDXnmFZv7D1HXhwvFQ/xvbwIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh -bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQAM -K90gY676JVzErSogCDn3XCsEkSLyBa90LK2FMogU7ZF0x2/Y6qf2yBLqYAjp4Br1 -CXmmQAXyLGsTs1ahobgZNVEvdvhVxc6CHBw4aBbXaUfVGq26xauPu47wWHtxEeAx -h9huRcZZKtTsJBJ1N6Yg7mJbzFT0nQ0FGWuoWd9HQP7ncOlfmlBfuAGRKRn1lXXr -na0thmOFQskzyAByijuGuaFvr+v4IVHYqO3JPXNpwp2LNHvD/f0OOS2XWpsUX6Vn -2IDdMgZSNLrHDZpemtl1QSaHemG8s67LEvuG0/fsfV38pKPlhKV1xrkojNN3kvPq -IyU5uT3m01KkJAMtRrMT +MIIDdjCCAl6gAwIBAgIUJC2mSZI1z+GFsx6EFvtkLqMf3ZEwDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTVaFw0zMjAxMjQxMDIzMTVaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDiJE97mHc7pdaeVnDEkwfu+jq2W+R9O/6h+8ufuIme +qCWQ0EsSd+dLAlJ7FpkE53KygomZmbBltVPJtQWEcHfSvISH+pLSpYafCaQUKst7 +SXXeYHNFQ5mTHOBVl+xxoOBpXI8crymjXwLFwQkA+xM/auvwYC4h5+fdqX2Vac4l +sP40pUVxsUr+oje58QT3DIW7X0LbWcZT0kxLWNJlEkuEClcuqp6j3yF9G7LW+By4 +ek+qhgpSPoqZR0T0PPHBxuCcGQZl9n8SLGVgW0X+yRnBV2PSeqdC5ay49YDh7Lzl +05q04QLnxc7B+MS5r0M+h1XIYM+RP51DBh9cmfCzOCC7AgMBAAGjLjAsMBQGA1Ud +EQQNMAuCCWxvY2FsaG9zdDAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcN +AQELBQADggEBADw4u59crG1sfX+12eljedcsRjC8e/L87Gg2w1z97/sjhkZXHrcE +fFrHGaUmdtPRG7RTgdi2+CggKiaeYreOkMZzOlnSu1z23lP16xhZPJInYaXJwrOV +PrlQEbpDRSgXgfUeOR0n7HznHoXzAMFkrSKeDiertpY7LzN7BKnDU5LEwOecF8yB +66rIEhKy1Cg3QGBQZPjFunaqu4KDDo1vpwf9Nc2nE2C2ktlrlVqwJGRcDleb5fXn +BYSsdoK//mcgqDDoPt8lKtyPuQ77rGfDOyI0b/xIZOlMhqMcEFOnNRn9fR2GEko7 +5me2cuz8frhbgcUKtWekAONojhrPUFPbstI= -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configgrpc/testdata/client.key b/internal/otel_collector/config/configgrpc/testdata/client.key index 4c77070cc03..c0c21f71787 100644 --- a/internal/otel_collector/config/configgrpc/testdata/client.key +++ b/internal/otel_collector/config/configgrpc/testdata/client.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAyMraDxgfr7DEShaRbpKnKnRm4xrh9StCpTWVxViCS4JmACrl -NsDBgganXz4rQSsV1Z2lznYPdbpXVVDY/8Q87GDXQLmB48cff+DLdU2TAvsalrat -y4edlf1Qj6WNi/jFca9XIqqS358bmBau3SlEEJVv0StE8fDiZpHQuYADtdXxWhXG -crNC3quuGKBtTCaj01EiZU5Rdqzd/KFEUQ5ns5K8j1vXJJzEhbmOXRN4NM0vvEBn -d3ObP+LwpFUSkhxgYYLga8L5432bg/BA7OSLhZoEZzuMivyyNVC7sIoyLBYR0/Nk -53ICmKz4gR18lTmpDXnmFZv7D1HXhwvFQ/xvbwIDAQABAoIBADHS1AUG0WYBENPp -gbDURxKry5Py6bqyP1lLUJyld79Q3gqQmkvZzKp9CC8D+Cu1izd0ZN40QWXPFTig -VRgyE4P8C62N2oMwt8o9d37l/uKweEqJjdqBDkNXlhPu2o6u7h9liNObS9KdYnV8 -u2s5gCA1VIesmvEF+sfEyuwcrc8ClHf4qs7VDqopZ6HZ3aT5ns4xXA5QoEZJlhDG -axwqWQ/jC4G+nGyrE2/AAGAgQtRhcs8aHTuEGBlNGlC9af/obyYLCqPm0A6ceyKz -PcZUDQCrsZnQpwqF7zsF7WmW8W5XqVHDFoJaNQt2/sp3OkOv9z78JodvB/MbGmNV -MkP1GeECgYEA9kbhLVsDDPA82wQuBsbK9u6A59ZPIXDfXJVNjcg1LKJkqJsKhY9z -uZ98rHlTI+FS5sCL/ixdM/tVNFI3EHaS7wOLJI9y2y+CVi2d5ffMKbPUtFJf5Q+A -zlJq1LseKdwsVT1jSah/jZ53YW1pOiJZPByUfLWIwLNHo0+fIEMfCTkCgYEA0LhC -sNb1W8GpMy6eTDfa4D90Wm0LvZgEyV8SCc09xdC6yp1bE4G19x037/YQsbLnE5vB -0YM8ILh977zCYHokC9qMdKDAxZx0RQD2IUDRbTymQ89uS5ednSg9dBxs9f/cxTlU -wQUxf4+yY/Rohyo0+mK4zkobG9lU1H83KKc1BecCgYEAkvQkdW3zWgsYJRBPbpe8 -kLAslypYOXoirhohFtM6d5HHQpyRILVCtqamPDyBEc3oK+0FG/vY+aWlZ/0PAnHe -p2ST6JL4VDX7LfU2XP0KBHBcIeVtdz9S+spPGPU2wH+yrIJe9prm0diXH7mrqpbI -bIgZSnkASwwvWRGvwA6NPHECgYBkD+JRG0zXp3lxgyj6y1BQb7tdWqflRgsNa1mf -f1jdDBtw5Y1zRZ0yEjzt+p64QleLzAFYaz0ZRrmBhJH/ZK8BS85IX4Trd/0506Ms -AAInB4uCOODctpwmatNDZhlKulZh6wFZ5B591CsmxlaSbkalv0xwAZELgd6sXSzZ -fYfrAwKBgQDM9StAiTdSjGn0Qk/YzkLlloEEebjJ7tRUpDGQgX3Z7YsCdfl/LeWU -yMV7UVDggPVjveT8TUJUm+ipD7CpesY1GTJovyRWKlyMpgAY2wKXV41oOnDD/0ef -AAa3FWMAf27ogbeXBxSUBN+1EhKBMKihQSD+Odnbu6SHUeiKskGU3Q== +MIIEowIBAAKCAQEA4iRPe5h3O6XWnlZwxJMH7vo6tlvkfTv+ofvLn7iJnqglkNBL +EnfnSwJSexaZBOdysoKJmZmwZbVTybUFhHB30ryEh/qS0qWGnwmkFCrLe0l13mBz +RUOZkxzgVZfscaDgaVyPHK8po18CxcEJAPsTP2rr8GAuIefn3al9lWnOJbD+NKVF +cbFK/qI3ufEE9wyFu19C21nGU9JMS1jSZRJLhApXLqqeo98hfRuy1vgcuHpPqoYK +Uj6KmUdE9DzxwcbgnBkGZfZ/EixlYFtF/skZwVdj0nqnQuWsuPWA4ey85dOatOEC +58XOwfjEua9DPodVyGDPkT+dQwYfXJnwszgguwIDAQABAoIBAHESmM+C57Nic5KO +RCp2HhRm9+5wuinIUsSpwyHkwqMbDlV/YNomK/c8fQNgxDhIhfgt/yFXUHU6ml+T +7ONQ3Qj5DAd1ye4bp9ljl7Ahycamb5I2hcyPRX3ihWUm5qnWN/9WsZQ1HUu72QYK +RDdCU1h1XO2/GbIIY85YzhtkYRhEm63w+hNrre9i5QfWNcTmsbVnyvrTXqQvQYPj +tLhAmBy4H88CzC9jEQIFcHcFM9hd3ZOcINvEQ222N5uvvkfDm+eECwKYNQDoY8FY +Fqd84qT8Tuhk6dQ7FDZV5RyUm0RZmMbnqTTSHjSndUJ13nGgbOG2LgJ//A8mRFc5 +qjt333kCgYEA+2OxHd4Cyz3YhuqqwSEeDd5+4tpDrFl+tM87l0T7O/oSj3z9Eaf9 +nbBqxub69ZsGQBei8j8TnxZFBP6xrRkGDOrn6HzaDflJbks1gCFoLigBxAW01X5D +Q0W9qAHIFhNsbCrffr9JcdikvQw1n2pBDGd133uCMYhFAvnBexgTGv8CgYEA5koT +5UtnjZiMWHSAfitA3//dGUJm5Gmi7Xcm09T7BQdsU7pQRVISVqDeXpwseQOs1z5g +WCjggbPik5EVWaWTErZzLle1JLVA9QWyNMVcB19gK+5F6lInfYY7e/PrD5Or8b96 +OP4cC5xrTasXZsnCoWP0ypCseL5ibiU47e/wJkUCgYEAzzsyQaXHddWozida1dRA +GzzEKqu0x7oK2nBO9nc2CA4xCLoHQGvUhQ5uJ0M3tAm0kFcryzi2KxnHkcOHomMT +esiWni917bkHkHVNSC/B2vK96eKuXKQ2PJmcK4g0cgZXBaAeFzUHDWODAhizh5Om +xdvv7me5Pq3P/hD3L0r8TO8CgYAE83jECD/8slfqGu8cR0/IwRZ+0Yemx4KiOlqS +WVTgQc2ZazsIkoAkbqb5P8BRBbw0kHm/y3kwMK7hX1AnMkEcOOH3EBmr5V21Jt8y +9T9KRUmrCB9mr0d8EmO7AX5/QjyDIQu+p+/wa/d+nvwM0K+nip+br0qV+fnhxlkX +/H2cRQKBgCuWehAGIkGrFhFg5Bmzd5DHAH3iBicBgGoz41WtbkCwUBqhIxZUebUU +8om6SupLmownsVNCA7PieaAN22Q1RRDUo11sBYGeJ0N12YcWNLkkpWwNurytcPb2 +Zlh2SOLmz/V8uFlBWCBRuHEpvnw6Q+KfuOOQmqAgTsgM0wxa4Rz6 -----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configgrpc/testdata/server.crt b/internal/otel_collector/config/configgrpc/testdata/server.crt index 70292eae048..2bef4165620 100644 --- a/internal/otel_collector/config/configgrpc/testdata/server.crt +++ b/internal/otel_collector/config/configgrpc/testdata/server.crt @@ -1,21 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIJANACN0VTlMdYMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV -BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG -A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjAwOTIy -MDUyMjEwWhcNMzAwOTIwMDUyMjEwWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ -QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV -MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEA0HqHHTXVljLlyknGttODUu675uGGJJWdUCmjr+I9+3BAxGgNG4xVjMao -IsgAHajXgfTgfLha0mnMCdAHL4OUmvAj7sJ6NZRIK9DASiu5NWLQhgjUDg1DY2K/ -nhCVGp3w/J6aFfN+qSIaHCQz7MN66mcPtsXxMMPUBlqjWCLFpR5vL2M6k5tZI1L2 -pP4jfkfEIdlHgs/AXftwiYsNo57Rlaj+O7DwPqmJdVGeeE6Wka4ANK/5svIAgW9h -mwKhSwaXwle8GDMYgtbfQCrIO/Z5ctMKG9KXEgOBpoANYmeAGT2OPaCc43710T9P -MONdj3TKc8Y5FsUA0/kwac7oGFl+hQIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh -bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQCP -5as7sDX2vcXbROg62Weyg6YCDd12LYRWS2UHBebxwDFKVj1GmkJM2eN5bZWlyULI -Sv0yXSIQuMXIZDECdg0+YWxk6ZV57iYkduhez61wqhqYu9H1h5jlOvdlevunfNZ3 -VlpIkE2vVRIpu+IiNRSkh08M5csAe7MsrgdUcgenjygwNM3wPaQtlQ7tZ+quWyYc -rHO2lByVexHwpN2ZPiMZ7eIyEs9W2kt6ohcr8jJdryfO+7Q2FR5vE8K1Uh1wNcFh -WLPMIl4InYmIFfUChHvHCEmLS0TLW4lD9srFmO7VrlrPqUOULzUIm5wuXWgvdxw9 -3XHsXLqvMOf79boGpkfv +MIIDdjCCAl6gAwIBAgIUJC2mSZI1z+GFsx6EFvtkLqMf3ZAwDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTVaFw0zMjAxMjQxMDIzMTVaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQC7cZxtajHyoLgum43YdIX3wP7cvCx6bWkNE9Uh88Z2 +5qiKCxha2GLOH5wMZE3qfi6qYsGWkoG8K7/g8ziXze4mbhwket+vP9VjVJfvNJiX +XUNt+vWyPA0RdtDLQ42hV9SvMWuFsen/AhyEAxrl4+feeyesb092zJyALzp5bIrM ++i8wimngyxDYCbbnGs2gYRCSXNMkHmJGQ/xiHJM0H6JHx0D9/1Ta/LJYE+4NPs6g +abVBMkASfXfQQK/+dU926bXg399dEEIXiUKOYClE843RpXPuNsXn5CAITn38oWQV ++M5ZBZBwGa8oyjglEjbb8qt3X5s7OaHOzGsdSGAz3gCTAgMBAAGjLjAsMBQGA1Ud +EQQNMAuCCWxvY2FsaG9zdDAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcN +AQELBQADggEBAEu79bWVDoOH+meME/epXoMuywpgoSwP/llYU1iDY9bdUtDzCJEp +1oLpBSlfBOcOZMmyV8Ruj4W3sHecKG7AHDubBH4//VDzd3M+QcLA1S/5e+fSlGwC +ndNG1HIQHp/O6bl2LaOThC8J0pM58AO/GEeHmfwRXxQgylrkaONGv36/zmvdy8b4 +7qoGPq8RnvYdDBFqf68LYaeLpYjh7VICyRNZE6QDJnd0o5RCxymWWeAe+6QIx6AA +QpQWngwB9W3fTsALZuVVE1YLMjGxpI168N7F6+eq1rg8uSqstuQ4ezeTPxqIiLpr +kqpY588O+001+HzoLnytZYiNGn3nChaUieg= -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configgrpc/testdata/server.key b/internal/otel_collector/config/configgrpc/testdata/server.key index 98fba4b9432..ac4c1034464 100644 --- a/internal/otel_collector/config/configgrpc/testdata/server.key +++ b/internal/otel_collector/config/configgrpc/testdata/server.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEA0HqHHTXVljLlyknGttODUu675uGGJJWdUCmjr+I9+3BAxGgN -G4xVjMaoIsgAHajXgfTgfLha0mnMCdAHL4OUmvAj7sJ6NZRIK9DASiu5NWLQhgjU -Dg1DY2K/nhCVGp3w/J6aFfN+qSIaHCQz7MN66mcPtsXxMMPUBlqjWCLFpR5vL2M6 -k5tZI1L2pP4jfkfEIdlHgs/AXftwiYsNo57Rlaj+O7DwPqmJdVGeeE6Wka4ANK/5 -svIAgW9hmwKhSwaXwle8GDMYgtbfQCrIO/Z5ctMKG9KXEgOBpoANYmeAGT2OPaCc -43710T9PMONdj3TKc8Y5FsUA0/kwac7oGFl+hQIDAQABAoIBAFTJD/wcMcIE7xlG -yc7+1FC9EKQEIgbs5e59ELnuG+EPNPfrjTEf8IbxH94NUqa9TO/oRAfU/fLG3hk7 -hkCXla8xbJukcgkqRfOz0RAZGhiRGFb6bitMz5Qyy9Ufz1Pk2eYTJn046tEkMlQx -kQCAO5Pq2CQv+jgn3Cm9YOLuOU0+CEpET2lNgdUbj7wo0k2jDbxuU/CGqrQua8uH -hwM2hBH3eZJzO7EwdBhdubImg9RsDrLUkltgdVMAROP5+m03+J653v4UbaAvG4jM -IxkVW11Wdh4caKJNQY5gnNhnNG79uDeikX/dLTnSnvaARQWay/XKhP9EyKp3zVVk -4S4GEyECgYEA8TjZiGLSbgERoigUpgMxECyUAi/+GffiAR4PARdaoCXLGlXYBAax -N8n+CF62VS7FY0IYeGuzDG9O/rEGS27OBVM2j+cCkqOT9+vNJe5iwGfAzwuBAuCA -m5eRysLG4jIwhw2XRCL2gGQM92XodKkShAhXuG05nUqcUdpgdpBdJK0CgYEA3UAn -YhbXvNKUHcpjvyyQpLrJHS+Z+key1e8FWJ8TzQDWldbgCeJZrm9xCNARKZEXFxNG -V3MJWehKl2mC8ctU6u1aTi83bA7MdVvDw57SGj0HMLa4CXtdWEOt57Z6HzFJLoQy -aAxvKwbeBfyRbt7f5HaHw/w3VjZN9HA7ip7EJDkCgYAFlWhLpOX0D+hFlaHsudQv -6KhAaLX8CeXcWsLEJrM9U8KgyG3oofMGNJHBxdd4n02IX6ZLW0rYtdbhRF2970Gr -k+KGcDV6CXlKWtXz09HLXFt1L3H8DBBOCbMhO2L5J2pCJgljVV/ZVveJ3n0D/knk -boEBTt3viyOVLXXgKLVPPQKBgEFtGzhScPGRg+NbWivKTeuooJhU3z+3vBavW/Fc -+UoCGXKt3AqQONzwb4ifnrOgCCf2tzJc/kLsAkLMHMDL1Ay0q6O7KrR1m9iIjldm -u9KugVXScpG7PVtAiEihGXPn6zAqP42tP6KFoVo72fXjSmoQ8wztpJ+F53+FQNY5 -JN9hAoGBALV/knUA5tVyMofCoZflHVM3E4pFJiKQII1dzxE4g/sLYtSWDfKXP64W -mc7PKy46vjeTeRE0B8sGQ7RIhnUpPaA6OS8sMPSeJtdvfAPK0KCukHXTsLJg5DZo -XuC2gsdqPFQJQ/VDnp3JO7rbj7A3uYgzRT5xKHMluJnDDuUg1UUr +MIIEpAIBAAKCAQEAu3GcbWox8qC4LpuN2HSF98D+3Lwsem1pDRPVIfPGduaoigsY +Wthizh+cDGRN6n4uqmLBlpKBvCu/4PM4l83uJm4cJHrfrz/VY1SX7zSYl11Dbfr1 +sjwNEXbQy0ONoVfUrzFrhbHp/wIchAMa5ePn3nsnrG9PdsycgC86eWyKzPovMIpp +4MsQ2Am25xrNoGEQklzTJB5iRkP8YhyTNB+iR8dA/f9U2vyyWBPuDT7OoGm1QTJA +En130ECv/nVPdum14N/fXRBCF4lCjmApRPON0aVz7jbF5+QgCE59/KFkFfjOWQWQ +cBmvKMo4JRI22/Krd1+bOzmhzsxrHUhgM94AkwIDAQABAoIBAQCqRv/yiWkMXyJR +/K9ztg7JTYJ45VyGbwPihGS2biyZcNokZQXf6PiBBUgOHcSGQ9CCqinwbfD7DsdF +Q83iYYl5UcexAApZumRP0tYe0CnaPzf1Hei63ECG3+e27wwnSJGGASALGN9X8AQV +jHiP5GSLwFb/FzMZ2bBF5iF5krfYkdHRxv7CRq9lvBmWZrQTKeidSEQE8W6ksS7z +QXo7ATfJ6eOBPr5/jW4tcD95tarwRfZMAcxbu6DZMbV28IU2KsA6XMCICGfhpAIG +WSHJaVDMNQ6N7q+7KlqnHcfnd3lozzdtavCARjTuemEICMsp8QNsCpd/BKBxTynO +aEMlIl7pAoGBAPLwCEfal6odcwXycz1fcq+CtrqHOpj79lFrgPLeV82u9f7qFLpy ++1rWM/u44+LzhGyXuOxz42kpHcn01rvdUbJMFExBW8sClpRHTPAual038tVGmK9k +0Kiw8M/jTSFzWhl6fNq4WfpNkhixjoeZ05H+R41C2DpWoBcMm5JJIB2XAoGBAMWF +uMd5TRHAKMcbadXGxu6V/45hT7wsu6v3tg+BRwIFgEdkWvRVw9X9/OhMPY62z9VB +McXw7fKUOPnoyxoyAu+V9emuTgkSFavWh95IY7o4KEgMdbvlBnJTUVoWxN53OMP+ +cVOrHvwbyVyKGCqw0L5Vn47SN7AfUvnouB2CEsxlAoGAITLkLs2UhE7Z9SoYzX5J +sepvBjaMr3NfSekjCg2Qei86tsdOZdxotRUorXGq0szsf9qMDuQXY7uWso6e+bVZ +AMCc1X7pCGkmIsVLolb1eh+3M6YeH3nreeIURpSNadDVsz2l6k3fHfGT0YQSMj23 +R/Az3v4Pholn/z5d1DPiC6kCgYEAmH0S2RSBdjm2gXhdbYenHpw4jg/8QZb7T9jN ++gxg6GOc1ADa4xSvOq55qFDrmRjzPHy3U0wcNxFNJ0ocOl3vvE02azCA2CnZBy94 +9xdFvocKOg08e1Fld69w967qT6EU9uKhVOmf4xwEiWenHpYgoUBzDQynp1WXdo2+ +TjGUF60CgYAXHV9UYWcFjBoBildbT3pt+yMwjXifMLmSAGCjLVNYMp8JuG2CH/11 +cs0mbsbqwNH++btQt9TOzYi769mU+ISLwjakASvGDsZbXlZr+bP+nmlnTNy5GmeA +PtYdzd3vqi66oXIOhmxV1dJG/KYkJtsdTkGd37mYXQijDtLZ2GBByQ== -----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/internal/middleware/wrappedstream.go b/internal/otel_collector/config/configgrpc/wrappedstream.go similarity index 55% rename from internal/otel_collector/internal/middleware/wrappedstream.go rename to internal/otel_collector/config/configgrpc/wrappedstream.go index ea42ade789d..210931b7125 100644 --- a/internal/otel_collector/internal/middleware/wrappedstream.go +++ b/internal/otel_collector/config/configgrpc/wrappedstream.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package middleware // import "go.opentelemetry.io/collector/internal/middleware" +package configgrpc // import "go.opentelemetry.io/collector/config/configgrpc" import ( "context" @@ -23,22 +23,23 @@ import ( // this functionality was originally copied from grpc-ecosystem/go-grpc-middleware project -// WrappedServerStream is a thin wrapper around grpc.ServerStream that allows modifying context. -type WrappedServerStream struct { +// wrappedServerStream is a thin wrapper around grpc.ServerStream that allows modifying context. +type wrappedServerStream struct { grpc.ServerStream - // WrappedContext is the wrapper's own Context. You can assign it. - WrappedContext context.Context + // wrappedContext is the wrapper's own Context. You can assign it. + wrappedCtx context.Context } -// Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context() -func (w *WrappedServerStream) Context() context.Context { - return w.WrappedContext +// Context returns the wrapper's wrappedContext, overwriting the nested grpc.ServerStream.Context() +func (w *wrappedServerStream) Context() context.Context { + return w.wrappedCtx } -// WrapServerStream returns a ServerStream that has the ability to overwrite context. -func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream { - if existing, ok := stream.(*WrappedServerStream); ok { +// wrapServerStream returns a ServerStream with the new context. +func wrapServerStream(wrappedCtx context.Context, stream grpc.ServerStream) *wrappedServerStream { + if existing, ok := stream.(*wrappedServerStream); ok { + existing.wrappedCtx = wrappedCtx return existing } - return &WrappedServerStream{ServerStream: stream, WrappedContext: stream.Context()} + return &wrappedServerStream{ServerStream: stream, wrappedCtx: wrappedCtx} } diff --git a/internal/otel_collector/config/confighttp/README.md b/internal/otel_collector/config/confighttp/README.md index b66ebe4845b..996a10c47b7 100644 --- a/internal/otel_collector/config/confighttp/README.md +++ b/internal/otel_collector/config/confighttp/README.md @@ -67,10 +67,7 @@ will not be enabled. - `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md) - [`tls`](../configtls/README.md) -[cors]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS -[cors-headers]: https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_request_header -[cors-cache]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age -[origin]: https://developer.mozilla.org/en-US/docs/Glossary/Origin +You can enable [`attribute processor`][attribute-processor] to append any http header to span's attribute using custom key. You also need to enable the "include_metadata" Example: @@ -79,6 +76,7 @@ receivers: otlp: protocols: http: + include_metadata: true cors: allowed_origins: - https://foo.bar.com @@ -87,4 +85,16 @@ receivers: - Example-Header max_age: 7200 endpoint: 0.0.0.0:55690 +processors: + attributes: + actions: + - key: http.client_ip + from_context: X-Forwarded-For + action: upsert ``` + +[cors]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS +[cors-headers]: https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_request_header +[cors-cache]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age +[origin]: https://developer.mozilla.org/en-US/docs/Glossary/Origin +[attribute-processor]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/attributesprocessor/README.md diff --git a/internal/otel_collector/config/confighttp/compression.go b/internal/otel_collector/config/confighttp/compression.go index 13537d599f1..e85b2cfa90c 100644 --- a/internal/otel_collector/config/confighttp/compression.go +++ b/internal/otel_collector/config/confighttp/compression.go @@ -82,19 +82,21 @@ func (r *compressRoundTripper) RoundTrip(req *http.Request) (*http.Response, err if writerErr != nil { return nil, writerErr } - _, copyErr := io.Copy(compressWriter, req.Body) - closeErr := req.Body.Close() + if req.Body != nil { + _, copyErr := io.Copy(compressWriter, req.Body) + closeErr := req.Body.Close() - if err := compressWriter.Close(); err != nil { - return nil, err - } + if copyErr != nil { + return nil, copyErr + } - if copyErr != nil { - return nil, copyErr + if closeErr != nil { + return nil, closeErr + } } - if closeErr != nil { - return nil, closeErr + if err := compressWriter.Close(); err != nil { + return nil, err } // Create a new request since the docs say that we cannot modify the "req" diff --git a/internal/otel_collector/config/confighttp/confighttp.go b/internal/otel_collector/config/confighttp/confighttp.go index 66c417fc305..04f1d27880d 100644 --- a/internal/otel_collector/config/confighttp/confighttp.go +++ b/internal/otel_collector/config/confighttp/confighttp.go @@ -16,7 +16,7 @@ package confighttp // import "go.opentelemetry.io/collector/config/confighttp" import ( "crypto/tls" - "fmt" + "errors" "net" "net/http" "time" @@ -24,6 +24,7 @@ import ( "github.com/rs/cors" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/otel" + "golang.org/x/net/http2" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" @@ -40,7 +41,7 @@ type HTTPClientSettings struct { Endpoint string `mapstructure:"endpoint"` // TLSSetting struct exposes TLS client configuration. - TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` + TLSSetting configtls.TLSClientSetting `mapstructure:"tls"` // ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize. ReadBufferSize int `mapstructure:"read_buffer_size"` @@ -49,17 +50,17 @@ type HTTPClientSettings struct { WriteBufferSize int `mapstructure:"write_buffer_size"` // Timeout parameter configures `http.Client.Timeout`. - Timeout time.Duration `mapstructure:"timeout,omitempty"` + Timeout time.Duration `mapstructure:"timeout"` // Additional headers attached to each HTTP request sent by the client. // Existing header values are overwritten if collision happens. - Headers map[string]string `mapstructure:"headers,omitempty"` + Headers map[string]string `mapstructure:"headers"` // Custom Round Tripper to allow for individual components to intercept HTTP requests CustomRoundTripper func(next http.RoundTripper) (http.RoundTripper, error) // Auth configuration for outgoing HTTP calls. - Auth *configauth.Authentication `mapstructure:"auth,omitempty"` + Auth *configauth.Authentication `mapstructure:"auth"` // The compression key for supported compression types within collector. Compression configcompression.CompressionType `mapstructure:"compression"` @@ -82,11 +83,11 @@ type HTTPClientSettings struct { IdleConnTimeout *time.Duration `mapstructure:"idle_conn_timeout"` } -// DefaultHTTPClientSettings returns HTTPClientSettings type object with +// NewDefaultHTTPClientSettings returns HTTPClientSettings type object with // the default values of 'MaxIdleConns' and 'IdleConnTimeout'. // Other config options are not added as they are initialized with 'zero value' by GoLang as default. // We encourage to use this function to create an object of HTTPClientSettings. -func DefaultHTTPClientSettings() HTTPClientSettings { +func NewDefaultHTTPClientSettings() HTTPClientSettings { // The default values are taken from the values of 'DefaultTransport' of 'http' package. maxIdleConns := 100 idleConnTimeout := 90 * time.Second @@ -98,6 +99,7 @@ func DefaultHTTPClientSettings() HTTPClientSettings { } // ToClient creates an HTTP client. +// Deprecated: [v0.55.0] Use ToClientWithHost instead. func (hcs *HTTPClientSettings) ToClient(ext map[config.ComponentID]component.Extension, settings component.TelemetrySettings) (*http.Client, error) { tlsCfg, err := hcs.TLSSetting.LoadTLSConfig() if err != nil { @@ -155,7 +157,7 @@ func (hcs *HTTPClientSettings) ToClient(ext map[config.ComponentID]component.Ext if hcs.Auth != nil { if ext == nil { - return nil, fmt.Errorf("extensions configuration not found") + return nil, errors.New("extensions configuration not found") } httpCustomAuthRoundTripper, aerr := hcs.Auth.GetClientAuthenticator(ext) @@ -182,6 +184,11 @@ func (hcs *HTTPClientSettings) ToClient(ext map[config.ComponentID]component.Ext }, nil } +// ToClientWithHost creates an HTTP client. +func (hcs *HTTPClientSettings) ToClientWithHost(host component.Host, settings component.TelemetrySettings) (*http.Client, error) { + return hcs.ToClient(host.GetExtensions(), settings) +} + // Custom RoundTripper that adds headers. type headerRoundTripper struct { transport http.RoundTripper @@ -203,20 +210,20 @@ type HTTPServerSettings struct { Endpoint string `mapstructure:"endpoint"` // TLSSetting struct exposes TLS client configuration. - TLSSetting *configtls.TLSServerSetting `mapstructure:"tls, omitempty"` + TLSSetting *configtls.TLSServerSetting `mapstructure:"tls"` // CORS configures the server for HTTP cross-origin resource sharing (CORS). - CORS *CORSSettings `mapstructure:"cors,omitempty"` + CORS *CORSSettings `mapstructure:"cors"` // Auth for this receiver - Auth *configauth.Authentication `mapstructure:"auth,omitempty"` + Auth *configauth.Authentication `mapstructure:"auth"` // MaxRequestBodySize sets the maximum request body size in bytes - MaxRequestBodySize int64 `mapstructure:"max_request_body_size,omitempty"` + MaxRequestBodySize int64 `mapstructure:"max_request_body_size"` // IncludeMetadata propagates the client metadata from the incoming requests to the downstream consumers // Experimental: *NOTE* this option is subject to change or removal in the future. - IncludeMetadata bool `mapstructure:"include_metadata,omitempty"` + IncludeMetadata bool `mapstructure:"include_metadata"` } // ToListener creates a net.Listener. @@ -232,6 +239,7 @@ func (hss *HTTPServerSettings) ToListener() (net.Listener, error) { if err != nil { return nil, err } + tlsCfg.NextProtos = []string{http2.NextProtoTLS, "http/1.1"} listener = tls.NewListener(listener, tlsCfg) } return listener, nil @@ -271,6 +279,15 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. handler = maxRequestBodySizeInterceptor(handler, hss.MaxRequestBodySize) } + if hss.Auth != nil { + authenticator, err := hss.Auth.GetServerAuthenticator(host.GetExtensions()) + if err != nil { + return nil, err + } + + handler = authInterceptor(handler, authenticator.Authenticate) + } + if hss.CORS != nil && len(hss.CORS.AllowedOrigins) > 0 { co := cors.Options{ AllowedOrigins: hss.CORS.AllowedOrigins, @@ -282,15 +299,6 @@ func (hss *HTTPServerSettings) ToServer(host component.Host, settings component. } // TODO: emit a warning when non-empty CorsHeaders and empty CorsOrigins. - if hss.Auth != nil { - authenticator, err := hss.Auth.GetServerAuthenticator(host.GetExtensions()) - if err != nil { - return nil, err - } - - handler = authInterceptor(handler, authenticator.Authenticate) - } - // Enable OpenTelemetry observability plugin. // TODO: Consider to use component ID string as prefix for all the operations. handler = otelhttp.NewHandler( @@ -329,12 +337,12 @@ type CORSSettings struct { // headers are implicitly allowed. If no headers are listed, // X-Requested-With will also be accepted by default. Include "*" to // allow any request header. - AllowedHeaders []string `mapstructure:"allowed_headers,omitempty"` + AllowedHeaders []string `mapstructure:"allowed_headers"` // MaxAge sets the value of the Access-Control-Max-Age response header. // Set it to the number of seconds that browsers should cache a CORS // preflight response for. - MaxAge int `mapstructure:"max_age,omitempty"` + MaxAge int `mapstructure:"max_age"` } func authInterceptor(next http.Handler, authenticate configauth.AuthenticateFunc) http.Handler { diff --git a/internal/otel_collector/config/confighttp/testdata/ca.crt b/internal/otel_collector/config/confighttp/testdata/ca.crt index 9ab794b7ffc..ea1859e8c97 100644 --- a/internal/otel_collector/config/confighttp/testdata/ca.crt +++ b/internal/otel_collector/config/confighttp/testdata/ca.crt @@ -1,20 +1,20 @@ -----BEGIN CERTIFICATE----- -MIIDNjCCAh4CCQDgJLdDKyhMRTANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJB -VTESMBAGA1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoM -CU15T3JnTmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMB4XDTIwMDkyMjA1MjIx -MFoXDTMwMDkyMDA1MjIxMFowXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3Ry -YWxpYTEPMA0GA1UEBwwGU3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNV -BAMMDE15Q29tbW9uTmFtZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -AMKJc2wz8eLzAPonO37JahdY1Rt1dkRzQuung2Fe5O8UnbtEnDc7N7fbRLBgSRl0 -F5+V2USHCtYfAJ0tLifmInLOfEgmxIB2HNnwVLwDAnyXzp6NQEVw51bsILMTuFfB -mgp8Jq8KokGGOOh6GmM9h0a3KVdpxqPD+088t8AAwZrO5dHNIxZ4Bq471Stvcm7Z -jAWAoRsjceVdGr82+iB9wTio/FIeygb5rO5Ju1GMisR1LgJ6apDv9FrtWdorRxnb -qFMXdPvMyM34oIRT6bxETSIYYHjozUz1/H0GB4NeGUbov0etnviTl+oMpRj0vZpT -DB8SD1XjHGOpbUZ6ibgUrWMCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEApBKbrk4g -Bd9/T1P3T3BBWOn8iMYLapBeapP6kVW9VtrpSvwKv6dchhh2Iizz5PnEEKBnU7ho -+GQXrKM0L/ejQeDqEo0lkZLJmovGNzXTNBGhgcVJ37qt0Bt58SoCA2Oc8dn4gtyR -eGi2lSVDUc+kiZWm9lUfTcwQeqTb8oS64DwJR8f11uX3NJn9N7fbwino60D5U7Na -ojO9ua4W3K5C8cuNEjssyE6qjSQ4lhXBlHxA9viSdQSQN0Lv/AH1s175jQ7G24jM -58v5DC7P0oodiOdr9Z0hndK8c1mgB2fTTme+h9iDYVttbMHoARYCWSy02/ZzHRah -tAEubJUHnzv5vA== +MIIDQTCCAikCFG9KSfPnZXvJyfPxq3vin8YOqn96MA0GCSqGSIb3DQEBCwUAMF0x +CzAJBgNVBAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5l +eTESMBAGA1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcN +MjIwMTI2MTAyMzE1WhcNMzIwMTI0MTAyMzE1WjBdMQswCQYDVQQGEwJBVTESMBAG +A1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3Jn +TmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAva3FHWUdEwbhE/iaaQbI9kl2OSMR0z5SX5zL2f+OFe69IiB5 +9XVM2SyWrre4VNoCHzziXQ5Q3zMlVmZBho3wJoCm6KY1hUTBEvng937nqkJ68oIs +i4xDNwuITObZUIz0NC/W5FRJBywhPaSXuZ+pLjmQRQnV5BGN7OzCKxbUOyxhz9bc +YyaDsPBtdoqXnuA8g+2SEtSp47e5X8aUWZifqzh2pjCmx+cFX18HZ4UH4leAE55N +hPUNXTI1uwo0pX33gf349a1Cm3wuMlVzLdH7IlQN5qg/s2OS5mlhdsV8/R6HslVA +X5AkRyPwmVr1Gd3gFOl/jkMkfCgiuRlcF4WZrwIDAQABMA0GCSqGSIb3DQEBCwUA +A4IBAQB3UZsKf7cTCr38DZrTvbSLzS0/Cm8t+aRgG6I1fzO9P44Uh7GU60+oue8v +Myf0Dnw0a3B8WRXLq/tt60YXU2hxKxZ530TCSJgc9mszHq/XyZbcnh+2Q51pVyJc +foJld7hPbBPsDrDJI5grjropsDqc9RGFYFf0ye+UbXwbFUSZtJ+w8Mh0rsFriYDs +2rD80BBHOnqj5kaELMOnsCABJD99PegyctWJ9D9vggKisTKiNzUKeWfOHt7SfuWH +ClT8VI8uW6bZ5LtnXGArXq45wUFb94yc3AuFIH+ubGFLEOiref+2i+XSnuuZbXMh +XUTlVkbYqTgNGbxDVxEttp1R0vg8 -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/confighttp/testdata/client.crt b/internal/otel_collector/config/confighttp/testdata/client.crt index ee5dab3c561..0eb59d6cebd 100644 --- a/internal/otel_collector/config/confighttp/testdata/client.crt +++ b/internal/otel_collector/config/confighttp/testdata/client.crt @@ -1,21 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIJANACN0VTlMdbMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV -BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG -A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjAwOTIy -MDUyMjEwWhcNMzAwOTIwMDUyMjEwWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ -QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV -MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEA0TJ19WUFfGqdkus7kOqFQkR570sncfM0oLWK3Jzrqf0LO18BKv3LKQ/N -vVVkKa4IXkGo+oopzb/I5GQuCkp0LFz+lIfPioiEF1DQ+MJAHBEvNerwSgezlYbh -2cg/NS+f7CTe98AaEIiA+UtXDCWq2mttBLSckkvDzFpB++WL5HjonUyzE03ijAli -CJvMZmVFY7Q/uP00S0tyvgskHkeQXxVQ7rBlg43OYKRs0lXyEOYypv+2i7vxb2NM -rZciZa9wNxdWHPukeMsY2HEpZPEAochE3zppfomjc2T+B2F3uBkB0YcK0K4ugO2+ -KuzpIhoQpmdFwXjmnLjaYUZ7s+XUrwIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh -bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQB6 -II9PnbwfjQPn5vx6vEnoe6HQV0V+xnh5zfD8DJ6hM42HbGSBAqD64z6odkx7jKdj -B0tdxgx9eN0/tp15ss3h5BRksVMf1k4fFG0MY/jS5GDX4V8G3e/4SbrkNjXdA2UR -i0QMB2nyPObkpCVIRDwtdv0E416Rpm1GDtcjjuyBRAfODkj/LZ3nmwzEtXwo2XG3 -hthyC/4x6LmK0g4siA0ru8vtwUHh7d7A7rcZDPGajA+B9ByBQT3GzCND8NVqbyiq -G/XpRVQ4XmE2Vdg05hDVpHzgmyii6eIrDnQd4XrHBWLV6JuUMGu1goQDTxKlyt0p -gPm/gT00VmSUUh4QLX91 +MIIDdjCCAl6gAwIBAgIUdTybbxIws1n7u0lNfCbSaztgav4wDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDAnMNf1eKT533iyWfDGDdO7A1Pzh5lNQLobIkFPMdI +RIjYXzDJ1tNTEpFdrWD6AMR2gwCdECyuAdA7mgnkWe4R/q3VD7w5cWFGiXl7eXSB +BQs6qKAhSgpTyNkzs2ibTrCZTJlW2+y8XTKmg5bN2yvXFBznHhaJpHlSWTPxt6ln +gSVC9QM60IrGuuJh6qRKk+92R+hP5k3mm9cDuyaOaBrUlhq1DQTc2REhYfRDZD1x +OQy42wCYo5DyC5qz4DX4AQSQpspGJ40PsVi1F2zn1Wy49cKQs70IJXKLB99+vHxc +9SlSMm6+dsUYVnWBZD7yqXwr9LEth8TZRJJEB3NYRCJvAgMBAAGjLjAsMBQGA1Ud +EQQNMAuCCWxvY2FsaG9zdDAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcN +AQELBQADggEBAC4avlySbodfdjCIAGl5d5vcb4tKaJMCon6eX0OqZWXLxh8ysuOd +Ya4QDMkeQRXdtXvpLwpauuI0bByecYListSGDdF3EzHj0K3RFlVSKGP6cf6Qs5LS ++y64UnwtPPd+HWRsjBFc/H3X4SCqfBiHoFrchK2aTAxW4Z9RNr53ud3uJiHBcDgW +0MBWDSVUX31N0m5/jIowWYqC1OJXhsDLbK6TaZGQRDfS0cR6fw+tn1D9RE4b2PP1 +H/2/8rkFW9vCUonJHW3hp6Q+aJuxA6YMOjZ+vkdQi44VJJFgbLy3yqzo1HZptdW5 +gign5JQLC+7tSIe96pMSxUrYNmPVHnz0X3E= -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/confighttp/testdata/client.key b/internal/otel_collector/config/confighttp/testdata/client.key index e5876e89835..57075d5e43f 100644 --- a/internal/otel_collector/config/confighttp/testdata/client.key +++ b/internal/otel_collector/config/confighttp/testdata/client.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEA0TJ19WUFfGqdkus7kOqFQkR570sncfM0oLWK3Jzrqf0LO18B -Kv3LKQ/NvVVkKa4IXkGo+oopzb/I5GQuCkp0LFz+lIfPioiEF1DQ+MJAHBEvNerw -SgezlYbh2cg/NS+f7CTe98AaEIiA+UtXDCWq2mttBLSckkvDzFpB++WL5HjonUyz -E03ijAliCJvMZmVFY7Q/uP00S0tyvgskHkeQXxVQ7rBlg43OYKRs0lXyEOYypv+2 -i7vxb2NMrZciZa9wNxdWHPukeMsY2HEpZPEAochE3zppfomjc2T+B2F3uBkB0YcK -0K4ugO2+KuzpIhoQpmdFwXjmnLjaYUZ7s+XUrwIDAQABAoIBAEH+CxwIbDydXWv1 -bOsAMF2BQH3uVVkrAZUY7988WVNckeh+xd2MBkTDyYFKqLhFQDqLuAShBSL0tyjl -OWjhp9g+1ciBN0VaX2EDi4iNrq+r9BqsLHUODObEkAalltruVSKnVvcM0Kwag6Ug -0Srxzv3sGY38c8/quq+CYYJXHVRLBX8vQ70rwp+BKEipce18/kVxywaYGYqjzwcA -iiG6QJlyl7BrOUK8KPpyvC0OhnDpDdCO875MuBLzvulFcqvGbGNHcgRqAEk1xH5b -SQoiZBaZGWK1Ns7+bwCtcVBhvxsWqIffIvXAG74DQqpIdgmR1hVLx1e4HxVBHpDQ -Z096yVECgYEA+9M2xKbzyUJCc4MfOjRG0V1lzECrBt0sv6GMY2o8PFj1+MRONmHV -G556oxeK1NT9r6KRxK8NKSxkR775HDgSFd3VdFLpmCDQu/z/PSWoSo+0jmToOX9t -eykF4MCLhU8ck2AiDne4MB7MNKqPesbGsmK2IwPkHLGQ8Sz0367AqFMCgYEA1KpT -tafR5D/yq4iC51o6PjQ4gMn7vpiGvkU9VVEzZQRGaP5W3ssTEh9b58wlMTOxQE3Z -cpoVNRXAg1jOkKa0NZm5SOOz1PpdNINIbGpVVrx/cUkhKHDEj+uDt72fS8cyU14n -52jlh+3LpG1UyLNX7eod/xv+Wo5oLe3fvJAzprUCgYEA5PtBqb9FnZOqaO6pznsK -igWrMvb6jNtAfV+gECXhb95Ui0e09q4u4VZRnUsi6jRiGPpyIa4rAW1kIfj8+zPg -/hEgrw1VawcrxkResnMze9kADRqkLuQ34O2EcsGiHC27hia70Pv7d4YJmToeDT4C -HuKzS1OWcKDlcue2Ik780BECgYAVwsACDIQLqQd5yeQrLC5dgxZtBz39SLow6gDW -pBJwObnCsJPPBFSVPCQ5WchMeo+eltizQ1T8M5eZWRL59jTmby5oaPRTzLKQ1wYo -IdFNqMgZnXQJIVDbsSuvN3X/WQirQy0uHqut9wUpdA6C4ucSbyxWmFS0i3HZkUed -kdvXKQKBgGpQ7jpDzNh3zXO7AU4m4FlAN+N+dVXCP0C8DwcyRM69Sioyybh5lVww -QfQoSs3/m6/XZ5r6l9OvM6oUGfovk9Ja7NN8aqXQ4lwrET4SblRroKXQqzvp0aJ2 -XwHVfW5N9DcAQtQQzyWHxcKLyNOZLYQmBRsKuw4wu2I/rn8gWsy5 +MIIEpgIBAAKCAQEAwJzDX9Xik+d94slnwxg3TuwNT84eZTUC6GyJBTzHSESI2F8w +ydbTUxKRXa1g+gDEdoMAnRAsrgHQO5oJ5FnuEf6t1Q+8OXFhRol5e3l0gQULOqig +IUoKU8jZM7Nom06wmUyZVtvsvF0ypoOWzdsr1xQc5x4WiaR5Ulkz8bepZ4ElQvUD +OtCKxrriYeqkSpPvdkfoT+ZN5pvXA7smjmga1JYatQ0E3NkRIWH0Q2Q9cTkMuNsA +mKOQ8guas+A1+AEEkKbKRieND7FYtRds59VsuPXCkLO9CCVyiwfffrx8XPUpUjJu +vnbFGFZ1gWQ+8ql8K/SxLYfE2USSRAdzWEQibwIDAQABAoIBAQCkoVkdAOO5J5Qh +06QszPX5LynxnGu+daEWqC41m815p5qP1k0NN+FIkAZP23GYPi+uXCqaFMkbsdEa +IH9z/qnOF7Dc+6YWMyLB958uOpGp9XWznY3A5lgNZQ7BcgdnN8saPK6T30Zpef9g +8/hh24ONQlOx97Wr0Dkiebw8To8tN2kVpfhYJqUvJUK1myoWjbCleUTEuYjua5ve +ABVrtllUULAAL+yz/wfUPq/HNAO5IMSkA8fLxmnikhGnuc14KKneu0HmAQ8NMc6f +GDL1wtytF0mVKA/67j0DN376FHNxDnPrWM6JbOlxacqGS323NP4nB8NPpNJ+wUf4 +Th0p4y8BAoGBAOyULaLEFYnu6WRE3gjneWeFcX7OswLtPF58urKlPbLF+m5AxR5f +XndiVQgBiIWBX+/mQGqjkVUeYwZTA6tE/A48tN6PmDv+/GCgVtKqAgQRS55aFMtF +TZYTrj+Osz6coc7CeNmxB/kqf4h0e0VXTiEM+Tj9r9cSWYY7huXHH/k3AoGBANBs +m5X/ZmnR2QQF89HtolvVcdKXElNYxr7A7tCTVvzieENNA8PP+uAl1IcHkA96Geiq +M7jpYUCvVdv+PZ+/3F7JEB4D6Mt6utaDkvcK6ASf0owizBw7Nclf7jLVHI6Gn6ub +4M22OBaYIDZ26M957YCT4JYiDzMB1lKgDmJ2KFyJAoGBAKhWk9ZyokTgrE/9tOQv +GTLxQB4UJEqb1k4BgLNnYuyXdSgIjHqdL9HRNWIZ/TPKKCLC+ukmdF5V3e59GWpA +Dv5uceC/2nouaRS0YrNJ519PkzgdLxiouplkbaOp/Z86wuQleuqjzmGcvNyyzZg8 +lEpuOdQ0p29pDiy2pLlRpE2nAoGBAKaJgbBTCPQY9zydvPrK1GZooLBSghQS5Yta +AfirImCiXNH54b4+mwkrcSwLwPJ87+LWzMk9wbW74/EKrxbMaTtbkQNKwGKGSHBL +Zcz76/R19/h9fXY5YXrsqhn36v9/Vmn6/Z+hsCNtnp+mV9QgasPIZTXRNS/ekfAn +cBcArrNxAoGBAJSPkhWZqmaTwMmrjotBhPb1h7Efnbv5z8iLmmxJPawf6BGhs18U +vlMiXvRBUw4hvWAdRw0do0ixrDKk4Md2BDvBSSEdyJmG6qhwopMAxD7yt/rrWQYt +BWTTg7Br26e8FVngUsROBlff2dRuGYjOizgEJx0zYlv/L+ZLYQg/ch5l -----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/confighttp/testdata/server.crt b/internal/otel_collector/config/confighttp/testdata/server.crt index b1346ea87b4..fbb0ead73e6 100644 --- a/internal/otel_collector/config/confighttp/testdata/server.crt +++ b/internal/otel_collector/config/confighttp/testdata/server.crt @@ -1,21 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDazCCAlOgAwIBAgIJANACN0VTlMdaMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV -BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG -A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjAwOTIy -MDUyMjEwWhcNMzAwOTIwMDUyMjEwWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ -QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV -MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAzIHy8CASiF6aI3CsI6RGlJBZExPk/Utvlp89ga42g+e1YxZUZtMm79A4 -uVOXnNsRvFtgiRA8xHrdcNcgCDBhBA7p5vQC/KgJymM6cdiNTStQbhvl7qpgyU8d -PYQNqKaaHo5ceW/AQM2z5XZRnak2HhI7VhO4QLOfp7CB0XvpFGG2lWpZ/xEHGIit -PcUQUmiROPremupF7mB04HQVH3TxWTtmHwvfWICbjO6gMfIT3me/4HrECA/WX2hj -ffP1HPfPz3ZU8UMWmodQif2/aX7auh1CfqpJbVVYMCtMr7WCmKXiYkrMK6osaoku -eCgM+ouNf1rXnzxdX6ApwZXrx9t/3QIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh -bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQBi -K8J0Vy3/CHbYcQTg2UK0OCo08auuUUy3j9nSM2KfeeIKdM0DlRgLyIH63VwZNWFI -0tk27MONgsnXPFuEfUg4QG0QXx+rny10ckzI74ff1tOvu3LFkKRYafz3a1LfWW2Q -WDnta3lC+OsSKMEze1Bd4mvHZoiqTvkLbpmAudoWF7n+VSNXoOjizoMissqxy8iD -uZ6ChBWvJ1V+MtttXP0D7rSJuB0bkVwtcyEMNkUh7GrZVl61EcMQfjg5Vwsntdrv -cIIubS1F8uzT7ABLOGhiYm6gr3HPHsQp/t8sXNWIbjTmoueYBK215rvY3FQrzvAW -hNltkVRow5h+FyA/WVDN +MIIDdjCCAl6gAwIBAgIUdTybbxIws1n7u0lNfCbSaztgav0wDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCZNZFsOX5ZPkPTE8CMe5uch43vDa9fxcfgy+dhP4Qo +Nsdbr4/5IUTf/FViamInlW2xzCXsTL9Dkxu9LesiFpeqCuKdQ2Dhhgv6w3y8Ajx3 +7R/VrBC/kLSAZEkM7HFXXtoQzdQvWUt7h+hgNMwdNrqRLsCwV7Yw1tI+MY+nqox8 +GSi4Q/gTzHD03oDT9LAtT7fUlkMAMSWuKTp4lfJuoQJX12Sd+bQj4xcVD/YaF2Ox +tOMmRbTfLjXY2iD1pa5PqDD3YvbCmnpfkx4VcKmFs3r4kKErjvsyGubf5tiKWfq/ +79RUfzeeoEiBqB9EIbpa1OIbjYlzUJXq5pleBIK2feLzAgMBAAGjLjAsMBQGA1Ud +EQQNMAuCCWxvY2FsaG9zdDAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcN +AQELBQADggEBAKhZpZs7rQnMunI4BxiVk+5FMi1DdGtL1Kxw4c0DBY+OmrOPXv+d +OykZBvD0hkAeoRklHPuWgDt1bd3Ej5Ewf+tKMVMouRELl7Vt1M/TbRUvJpF5HMJ4 +fvHJwphWyvRbzEN5PyhB7Q7nSeMRo0wUZNJLxXeVuD9rdUJf+iiG+voAUhRzSk9O +Cr67sSYneFw/7zPA7MxnmDWbAMIw6UZZzqlUcHCCQPRGXrmhf8OJB1NujPrbfn9Y +1K/LoiiPxlPGESs3VsCn5ECXMOEO9qr7nGFGfEJ9NDMur71GXarjhm4dFRzeKU5L +Sp5pffKzZEHYWsPy2fD7MF5KDOb4jG8BPrg= -----END CERTIFICATE----- diff --git a/internal/otel_collector/config/confighttp/testdata/server.key b/internal/otel_collector/config/confighttp/testdata/server.key index cef03655b40..98bee7a4a88 100644 --- a/internal/otel_collector/config/confighttp/testdata/server.key +++ b/internal/otel_collector/config/confighttp/testdata/server.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAzIHy8CASiF6aI3CsI6RGlJBZExPk/Utvlp89ga42g+e1YxZU -ZtMm79A4uVOXnNsRvFtgiRA8xHrdcNcgCDBhBA7p5vQC/KgJymM6cdiNTStQbhvl -7qpgyU8dPYQNqKaaHo5ceW/AQM2z5XZRnak2HhI7VhO4QLOfp7CB0XvpFGG2lWpZ -/xEHGIitPcUQUmiROPremupF7mB04HQVH3TxWTtmHwvfWICbjO6gMfIT3me/4HrE -CA/WX2hjffP1HPfPz3ZU8UMWmodQif2/aX7auh1CfqpJbVVYMCtMr7WCmKXiYkrM -K6osaokueCgM+ouNf1rXnzxdX6ApwZXrx9t/3QIDAQABAoIBABRe3VQN3cq3oaLm -Fj92nZEuz7CWyrhwSy01r2q7b7Kz4d182+tiHP7GPuA282MsbxfUAkmk1Gi91FDp -HMe0CfXdhm7631FLa649NBUi/PAy4FAXd0/OqNVkjAUUokeqUK+6fnuaJgxOcRzq -LDcII9va9Q4d6LyJJ94MNuIm9ZCR/Yg3S3X6TnW+fh6CWw0NL0MV9/7JLPLUZglT -UsFayjNUUxXqrL1OuQ6yyEEVxPtu0rBD9n6s3LGf7iWrmltRaPOkq6feaU741PMV -uF7YUB5oNOVSJNWDFg9cxxJfpO+5I05YA0oiahrrd1jLu+j/1LdKvDSXBy2bLnIu -m3VbigECgYEA5qZdBj/id/HMCoX/Pw/jXzv0OEkOIULc1Jh1il6GUavCYjwPI0KE -tzJUjYfEa7ToymZtcrRYg4qoG7diWHndW4J7hmxj17b+PlwCsoU/TMkxLgw9mmc0 -Qp6fn8VOdGZ4ysTGn80Pn9zRDApy5f29b070cIHjFBXZnREuE0o8hOsCgYEA4vwK -C7JoHFNnxzpDj2aW6JDmNxMRpNOeQkC5rRR6uDjTHdaGq3WI0aGqvc6l47kIcb9w -MJiapHWCzJNc56jqmb/lgDku4sGRs5g6meOYENCYf9aKZzG9fkG/gGZf3eg2Yp2z -KwfKsk4g1HUdwIcC6dTQTgsGoPMYReP44R6Z/FcCgYBeb4Us9uExvPWO5XgxiL7O -kkyW8wpvAeJKxTVy9urF665F7FNCW4zdOSU3YXxBoSujGzb6vO50xUO5PWdt1E+W -lSEgU6a5frowLBoKn9XgCYwyT161pkXWdP3kO7O4ovAYDWNJsHsSOCX7aRfMJQz3 -0vrwSa4A3kVgMtWLnlyTCwKBgQDKfpLvsG9Upcu1XnMbISiLvYjDpU1eQDO1Y0zB -7b01T+x3eASYPbibW6CYyBwSNeYko+aQU/PRt8vCecyuFnGETD+PznPXc1xqXeoZ -k4L7rTv/AARk32jvk/Qlti7cJuctvwYx4zefLjf3kavDMC8XL/XNSeTV/UiwQRqs -qsIw7QKBgDSHMszYPoSaihjPFwIlEDqjk6QNUm4MuISV9/rdRuA+RzBVUOhtWnI0 -Oxh71iELCWxxKn73G0DqIMUfMLvnR7IMBFPS7wn0T13eF9f7LanJYCEXPAJU5OsZ -RNgLchEoy8xRALwfPxYncMEEzOcvexZWXs+76vZc30BXfvEWuXbS +MIIEpAIBAAKCAQEAmTWRbDl+WT5D0xPAjHubnIeN7w2vX8XH4MvnYT+EKDbHW6+P ++SFE3/xVYmpiJ5Vtscwl7Ey/Q5MbvS3rIhaXqgrinUNg4YYL+sN8vAI8d+0f1awQ +v5C0gGRJDOxxV17aEM3UL1lLe4foYDTMHTa6kS7AsFe2MNbSPjGPp6qMfBkouEP4 +E8xw9N6A0/SwLU+31JZDADElrik6eJXybqECV9dknfm0I+MXFQ/2GhdjsbTjJkW0 +3y412Nog9aWuT6gw92L2wpp6X5MeFXCphbN6+JChK477Mhrm3+bYiln6v+/UVH83 +nqBIgagfRCG6WtTiG42Jc1CV6uaZXgSCtn3i8wIDAQABAoIBAH6Ds7Bw0ZsURaG5 +v9jCAcACV/w9isJFakaBWnH9pz4l7f4SPYt2I4/qqP955c/WHx0g/Xfh8Fb21YMk +tfQSP+9UyckfaJMSxDWw1AHUvuYxU4Z4beQitEsJhSE85mNFmkEiFsN6s1Aw7Hz1 +XFALb4iP2OJFq9csrbRZ7MyBkzytqr5Hih6HRAoNEyTRPWYhT0vMu7R5Vzpl6bFc +4rx/YbV3tHr0LGo4gurhUZQAYcDDVaSxy3Klm0Z+xhhRHR6XETAO4ntLwbCNVA0M +Rw1Jy/1fBRiBoPHuJmLGRons7p6zra1QjMbO71j/jpp6yy9jHSpM7H1nG8QfF61P +M/s8n7ECgYEAypiPB0KX4Wz0GT5ODnHf6MyTzw0JshpD0kGPVL2l3OAP2FJYBgyH +a2W8/cHAOJRahUv7lG0cGMOF/SRHA1L+WneboSKSruwzbultkd83SXB5k1o85sGn +HCGt0oPZ+xT3ZxePPjEMPDz8IzfLycXY5BqvCjT4ah+r45KhyKAz3L0CgYEAwZhU +rNJylUIIaJ3GovvmO3wX80IZf4mUFODMHCDkcutksToxNBeeXSwoiUTZ9xpqPWvA +jAgkfw8YARUCRFHWlD/N6D0IC6Z3fog5mub03pe266XAC5+2nLY8FSb7QGQWsKar +mcNtUvgcVWLsgpb6qkJT+kU0lVx3tHVm06hVMW8CgYEAgeQh/4OgoPUb43tgzD4S +Us2nDp7LUpcoWIuT+77DssMtJYJV0TsDL8ZAz2kDdsMW7lNy7wytcOsa4tv5c5Yo +YZRCAaOK6/+gUkHy8A1vAvTL3b+DQGd0XsLxEQFcJnCg1kXynusPbyeieGnzjF/+ +2PCKvT6M7m1z5SpD879SwPkCgYA53ZNpuNmg/YTP6GEING0D2Lq77kT61x+ZAfxg +aACAzRVi1/b/EBQ420sehKL19kJNK5j5AjIOfG97W1E7JI8T7uJYCW4PNWnAO22k +fGYy5nw5gWie0NVfkCTzWZx+Cayyjo76Pey+gQTPDOuOuRwhqgO56dem0WXCXdkn +aMhWJwKBgQCv8WAnzX2Iq+nE+XwHs/kvpaBgUwHczxyrXHLJ1zqCQb9wC3WJ2MlQ ++wEaaI0lbbpCGJDKD5AaQW/mDht2/PBy0r5E+YH+d6I6lumxBh/42QE3k/YbuykV +Toh6xh7KSmrFWgR9PDGH566BBBAw/PAGDDpD5ywkJxCLeKk47b+9Yw== -----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configmap.go b/internal/otel_collector/config/configmap.go deleted file mode 100644 index 94400d23684..00000000000 --- a/internal/otel_collector/config/configmap.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config // import "go.opentelemetry.io/collector/config" - -import ( - "context" - "fmt" - "reflect" - - "github.com/knadh/koanf" - "github.com/knadh/koanf/maps" - "github.com/knadh/koanf/providers/confmap" - "github.com/mitchellh/mapstructure" - "github.com/spf13/cast" -) - -const ( - // KeyDelimiter is used as the default key delimiter in the default koanf instance. - KeyDelimiter = "::" -) - -// MapConverterFunc is a converter function for the config.Map that allows distributions -// (in the future components as well) to build backwards compatible config converters. -type MapConverterFunc func(context.Context, *Map) error - -// NewMap creates a new empty config.Map instance. -func NewMap() *Map { - return &Map{k: koanf.New(KeyDelimiter)} -} - -// NewMapFromStringMap creates a config.Map from a map[string]interface{}. -func NewMapFromStringMap(data map[string]interface{}) *Map { - p := NewMap() - // Cannot return error because the koanf instance is empty. - _ = p.k.Load(confmap.Provider(data, KeyDelimiter), nil) - return p -} - -// Map represents the raw configuration map for the OpenTelemetry Collector. -// The config.Map can be unmarshalled into the Collector's config using the "configunmarshaler" package. -type Map struct { - k *koanf.Koanf -} - -// AllKeys returns all keys holding a value, regardless of where they are set. -// Nested keys are returned with a KeyDelimiter separator. -func (l *Map) AllKeys() []string { - return l.k.Keys() -} - -// Unmarshal unmarshalls the config into a struct. -// Tags on the fields of the structure must be properly set. -func (l *Map) Unmarshal(rawVal interface{}) error { - decoder, err := mapstructure.NewDecoder(decoderConfig(rawVal)) - if err != nil { - return err - } - return decoder.Decode(l.ToStringMap()) -} - -// UnmarshalExact unmarshalls the config into a struct, erroring if a field is nonexistent. -func (l *Map) UnmarshalExact(rawVal interface{}) error { - dc := decoderConfig(rawVal) - dc.ErrorUnused = true - decoder, err := mapstructure.NewDecoder(dc) - if err != nil { - return err - } - return decoder.Decode(l.ToStringMap()) -} - -// Get can retrieve any value given the key to use. -func (l *Map) Get(key string) interface{} { - return l.k.Get(key) -} - -// Set sets the value for the key. -func (l *Map) Set(key string, value interface{}) { - // koanf doesn't offer a direct setting mechanism so merging is required. - merged := koanf.New(KeyDelimiter) - _ = merged.Load(confmap.Provider(map[string]interface{}{key: value}, KeyDelimiter), nil) - // TODO (issue 4467): return this error on `Set`. - _ = l.k.Merge(merged) -} - -// IsSet checks to see if the key has been set in any of the data locations. -// IsSet is case-insensitive for a key. -func (l *Map) IsSet(key string) bool { - return l.k.Exists(key) -} - -// Merge merges the input given configuration into the existing config. -// Note that the given map may be modified. -func (l *Map) Merge(in *Map) error { - return l.k.Merge(in.k) -} - -// Sub returns new Parser instance representing a sub-config of this instance. -// It returns an error is the sub-config is not a map (use Get()) and an empty Parser if -// none exists. -func (l *Map) Sub(key string) (*Map, error) { - data := l.Get(key) - if data == nil { - return NewMap(), nil - } - - if reflect.TypeOf(data).Kind() == reflect.Map { - return NewMapFromStringMap(cast.ToStringMap(data)), nil - } - - return nil, fmt.Errorf("unexpected sub-config value kind for key:%s value:%v kind:%v)", key, data, reflect.TypeOf(data).Kind()) -} - -// ToStringMap creates a map[string]interface{} from a Parser. -func (l *Map) ToStringMap() map[string]interface{} { - return maps.Unflatten(l.k.All(), KeyDelimiter) -} - -// decoderConfig returns a default mapstructure.DecoderConfig capable of parsing time.Duration -// and weakly converting config field values to primitive types. It also ensures that maps -// whose values are nil pointer structs resolved to the zero value of the target struct (see -// expandNilStructPointers). A decoder created from this mapstructure.DecoderConfig will decode -// its contents to the result argument. -func decoderConfig(result interface{}) *mapstructure.DecoderConfig { - return &mapstructure.DecoderConfig{ - Result: result, - Metadata: nil, - TagName: "mapstructure", - WeaklyTypedInput: true, - DecodeHook: mapstructure.ComposeDecodeHookFunc( - expandNilStructPointersFunc, - stringToSliceHookFunc, - mapStringToMapComponentIDHookFunc, - stringToTimeDurationHookFunc, - textUnmarshallerHookFunc, - ), - } -} - -var ( - stringToSliceHookFunc = mapstructure.StringToSliceHookFunc(",") - stringToTimeDurationHookFunc = mapstructure.StringToTimeDurationHookFunc() - textUnmarshallerHookFunc = mapstructure.TextUnmarshallerHookFunc() - - componentIDType = reflect.TypeOf(NewComponentID("foo")) -) - -// In cases where a config has a mapping of something to a struct pointers -// we want nil values to resolve to a pointer to the zero value of the -// underlying struct just as we want nil values of a mapping of something -// to a struct to resolve to the zero value of that struct. -// -// e.g. given a config type: -// type Config struct { Thing *SomeStruct `mapstructure:"thing"` } -// -// and yaml of: -// config: -// thing: -// -// we want an unmarshaled Config to be equivalent to -// Config{Thing: &SomeStruct{}} instead of Config{Thing: nil} -var expandNilStructPointersFunc = func(from reflect.Value, to reflect.Value) (interface{}, error) { - // ensure we are dealing with map to map comparison - if from.Kind() == reflect.Map && to.Kind() == reflect.Map { - toElem := to.Type().Elem() - // ensure that map values are pointers to a struct - // (that may be nil and require manual setting w/ zero value) - if toElem.Kind() == reflect.Ptr && toElem.Elem().Kind() == reflect.Struct { - fromRange := from.MapRange() - for fromRange.Next() { - fromKey := fromRange.Key() - fromValue := fromRange.Value() - // ensure that we've run into a nil pointer instance - if fromValue.IsNil() { - newFromValue := reflect.New(toElem.Elem()) - from.SetMapIndex(fromKey, newFromValue) - } - } - } - } - return from.Interface(), nil -} - -// mapStringToMapComponentIDHookFunc returns a DecodeHookFunc that converts a map[string]interface{} to -// map[ComponentID]interface{}. -// This is needed in combination since the ComponentID.UnmarshalText may produce equal IDs for different strings, -// and an error needs to be returned in that case, otherwise the last equivalent ID overwrites the previous one. -var mapStringToMapComponentIDHookFunc = func(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error) { - if f.Kind() != reflect.Map || f.Key().Kind() != reflect.String { - return data, nil - } - - if t.Kind() != reflect.Map || t.Key() != componentIDType { - return data, nil - } - - m := make(map[ComponentID]interface{}) - for k, v := range data.(map[string]interface{}) { - id, err := NewComponentIDFromString(k) - if err != nil { - return nil, err - } - if _, ok := m[id]; ok { - return nil, fmt.Errorf("duplicate name %q after trimming spaces %v", k, id) - } - m[id] = v - } - return m, nil -} diff --git a/internal/otel_collector/config/configmapprovider/env.go b/internal/otel_collector/config/configmapprovider/env.go deleted file mode 100644 index 39753bdbe83..00000000000 --- a/internal/otel_collector/config/configmapprovider/env.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" - -import ( - "context" - "fmt" - "os" - "strings" - - "gopkg.in/yaml.v2" - - "go.opentelemetry.io/collector/config" -) - -const envSchemeName = "env" - -type envMapProvider struct{} - -// NewEnv returns a new Provider that reads the configuration from the given environment variable. -// -// This Provider supports "env" scheme, and can be called with a selector: -// `env:NAME_OF_ENVIRONMENT_VARIABLE` -func NewEnv() Provider { - return &envMapProvider{} -} - -func (emp *envMapProvider) Retrieve(_ context.Context, location string, _ WatcherFunc) (Retrieved, error) { - if !strings.HasPrefix(location, envSchemeName+":") { - return nil, fmt.Errorf("%v location is not supported by %v provider", location, envSchemeName) - } - - content := os.Getenv(location[len(envSchemeName)+1:]) - var data map[string]interface{} - if err := yaml.Unmarshal([]byte(content), &data); err != nil { - return nil, fmt.Errorf("unable to parse yaml: %w", err) - } - - return NewRetrieved(func(ctx context.Context) (*config.Map, error) { - return config.NewMapFromStringMap(data), nil - }) -} - -func (*envMapProvider) Shutdown(context.Context) error { - return nil -} diff --git a/internal/otel_collector/config/configmapprovider/file.go b/internal/otel_collector/config/configmapprovider/file.go deleted file mode 100644 index 1be4d57b196..00000000000 --- a/internal/otel_collector/config/configmapprovider/file.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" - -import ( - "context" - "fmt" - "io/ioutil" - "path/filepath" - "strings" - - "gopkg.in/yaml.v2" - - "go.opentelemetry.io/collector/config" -) - -const fileSchemeName = "file" - -type fileMapProvider struct{} - -// NewFile returns a new Provider that reads the configuration from a file. -// -// This Provider supports "file" scheme, and can be called with a "location" that follows: -// file-location = "file:" local-path -// local-path = [ drive-letter ] file-path -// drive-letter = ALPHA ":" -// The "file-path" can be relative or absolute, and it can be any OS supported format. -// -// Examples: -// `file:path/to/file` - relative path (unix, windows) -// `file:/path/to/file` - absolute path (unix, windows) -// `file:c:/path/to/file` - absolute path including drive-letter (windows) -// `file:c:\path\to\file` - absolute path including drive-letter (windows) -func NewFile() Provider { - return &fileMapProvider{} -} - -func (fmp *fileMapProvider) Retrieve(_ context.Context, location string, _ WatcherFunc) (Retrieved, error) { - if !strings.HasPrefix(location, fileSchemeName+":") { - return nil, fmt.Errorf("%v location is not supported by %v provider", location, fileSchemeName) - } - - // Clean the path before using it. - content, err := ioutil.ReadFile(filepath.Clean(location[len(fileSchemeName)+1:])) - if err != nil { - return nil, fmt.Errorf("unable to read the file %v: %w", location, err) - } - - var data map[string]interface{} - if err = yaml.Unmarshal(content, &data); err != nil { - return nil, fmt.Errorf("unable to parse yaml: %w", err) - } - - return NewRetrieved(func(ctx context.Context) (*config.Map, error) { - return config.NewMapFromStringMap(data), nil - }) -} - -func (*fileMapProvider) Shutdown(context.Context) error { - return nil -} diff --git a/internal/otel_collector/config/configmapprovider/retrieved.go b/internal/otel_collector/config/configmapprovider/retrieved.go deleted file mode 100644 index d429f6c002b..00000000000 --- a/internal/otel_collector/config/configmapprovider/retrieved.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" - -import ( - "context" - "errors" - - "go.opentelemetry.io/collector/config" -) - -// Retrieved holds the result of a call to the Retrieve method of a Provider object. -// This interface cannot be directly implemented. Implementations must use the NewRetrieved helper. -type Retrieved interface { - // Get returns the config Map. Should never be called after Close. - // Should never be called concurrently with itself or Close. - Get(ctx context.Context) (*config.Map, error) - - // Close signals that the configuration for which it was used to retrieve values is - // no longer in use and should close and release any watchers that it may have created. - // - // Should block until all resources are closed, and guarantee that `onChange` is not - // going to be called after it returns except when `ctx` is cancelled. - // - // Should never be called concurrently with itself or Get. - Close(ctx context.Context) error - - // privateRetrieved is an unexported func to disallow direct implementation. - privateRetrieved() -} - -// GetFunc specifies the function invoked when the Retrieved.Get is being called. -type GetFunc func(context.Context) (*config.Map, error) - -// Get implements the Retrieved.Get. -func (f GetFunc) Get(ctx context.Context) (*config.Map, error) { - return f(ctx) -} - -// CloseFunc specifies the function invoked when the Retrieved.Close is being called. -type CloseFunc func(context.Context) error - -// Close implements the Retrieved.Close. -func (f CloseFunc) Close(ctx context.Context) error { - if f == nil { - return nil - } - return f(ctx) -} - -// RetrievedOption represents the possible options for NewRetrieved. -type RetrievedOption func(*retrieved) - -// WithClose overrides the default `Close` function for a Retrieved. -// The default always returns nil. -func WithClose(closeFunc CloseFunc) RetrievedOption { - return func(o *retrieved) { - o.CloseFunc = closeFunc - } -} - -type retrieved struct { - GetFunc - CloseFunc -} - -func (retrieved) privateRetrieved() {} - -// NewRetrieved returns a Retrieved configured with the provided options. -func NewRetrieved(getFunc GetFunc, options ...RetrievedOption) (Retrieved, error) { - if getFunc == nil { - return nil, errors.New("nil getFunc") - } - ret := &retrieved{ - GetFunc: getFunc, - } - for _, op := range options { - op(ret) - } - return ret, nil -} diff --git a/internal/otel_collector/config/configmapprovider/testdata/invalid-yaml.yaml b/internal/otel_collector/config/configmapprovider/testdata/invalid-yaml.yaml deleted file mode 100644 index c457aaf85b4..00000000000 --- a/internal/otel_collector/config/configmapprovider/testdata/invalid-yaml.yaml +++ /dev/null @@ -1 +0,0 @@ -processors \ No newline at end of file diff --git a/internal/otel_collector/config/configtelemetry/configtelemetry.go b/internal/otel_collector/config/configtelemetry/configtelemetry.go index b7aba5fef1d..a363db1e54c 100644 --- a/internal/otel_collector/config/configtelemetry/configtelemetry.go +++ b/internal/otel_collector/config/configtelemetry/configtelemetry.go @@ -16,7 +16,7 @@ package configtelemetry // import "go.opentelemetry.io/collector/config/configte import ( "encoding" - "flag" + "errors" "fmt" "strings" ) @@ -37,18 +37,10 @@ const ( levelDetailedStr = "detailed" ) -const UseOpenTelemetryForInternalMetrics = false - -// Flags is a helper function to add telemetry config flags to the service that exposes -// the application flags. -// Deprecated: No-op, kept for backwards compatibility until v0.44.0. -func Flags(*flag.FlagSet) {} - // Level is the level of internal telemetry (metrics, logs, traces about the component itself) // that every component should generate. type Level int32 -var _ flag.Value = (*Level)(nil) var _ encoding.TextUnmarshaler = (*Level)(nil) func (l Level) String() string { @@ -65,40 +57,26 @@ func (l Level) String() string { return "unknown" } -// Deprecated: will be removed in v0.44.0. -func (l *Level) Set(s string) error { - lvl, err := parseLevel(s) - if err != nil { - return err - } - *l = lvl - return nil -} - -// UnmarshalText unmarshals text to a Level. +// UnmarshalText unmarshalls text to a Level. func (l *Level) UnmarshalText(text []byte) error { if l == nil { - return fmt.Errorf("cannot unmarshal to a nil *Level") + return errors.New("cannot unmarshal to a nil *Level") } - var err error - *l, err = parseLevel(string(text)) - return err -} - -// parseLevel returns the Level represented by the string. The parsing is case-insensitive -// and it returns error if the string value is unknown. -func parseLevel(str string) (Level, error) { - str = strings.ToLower(str) + str := strings.ToLower(string(text)) switch str { case levelNoneStr: - return LevelNone, nil + *l = LevelNone + return nil case levelBasicStr: - return LevelBasic, nil + *l = LevelBasic + return nil case levelNormalStr: - return LevelNormal, nil + *l = LevelNormal + return nil case levelDetailedStr: - return LevelDetailed, nil + *l = LevelDetailed + return nil } - return LevelNone, fmt.Errorf("unknown metrics level %q", str) + return fmt.Errorf("unknown metrics level %q", str) } diff --git a/internal/otel_collector/config/configtest/configtest.go b/internal/otel_collector/config/configtest/configtest.go index 78fca147c4f..0a3f3fb3dd5 100644 --- a/internal/otel_collector/config/configtest/configtest.go +++ b/internal/otel_collector/config/configtest/configtest.go @@ -15,31 +15,17 @@ package configtest // import "go.opentelemetry.io/collector/config/configtest" import ( - "context" "fmt" "reflect" "regexp" "strings" "go.uber.org/multierr" - - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configmapprovider" ) // The regular expression for valid config field tag. var configFieldTagRegExp = regexp.MustCompile("^[a-z0-9][a-z0-9_]*$") -// LoadConfigMap loads a config.Map from file, and does NOT validate the configuration. -func LoadConfigMap(fileName string) (*config.Map, error) { - ret, err := configmapprovider.NewFile().Retrieve(context.Background(), "file:"+fileName, nil) - if err != nil { - return nil, err - } - - return ret.Get(context.Background()) -} - // CheckConfigStruct enforces that given configuration object is following the patterns // used by the collector. This ensures consistency between different implementations // of components and extensions. It is recommended for implementers of components diff --git a/internal/otel_collector/config/configtest/doc.go b/internal/otel_collector/config/configtest/doc.go index 0a4a33211b6..1c0319cb4c0 100644 --- a/internal/otel_collector/config/configtest/doc.go +++ b/internal/otel_collector/config/configtest/doc.go @@ -12,6 +12,5 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package configtest loads the configuration to test packages -// implementing the config package interfaces. +// Package configtest provides testing functionality for config package interfaces. package configtest // import "go.opentelemetry.io/collector/config/configtest" diff --git a/internal/otel_collector/config/configtls/README.md b/internal/otel_collector/config/configtls/README.md index 4fd96c13a69..6a2ada3545c 100644 --- a/internal/otel_collector/config/configtls/README.md +++ b/internal/otel_collector/config/configtls/README.md @@ -36,10 +36,16 @@ won't use TLS at all. Minimum and maximum TLS version can be set: -- `min_version` (default = "1.2"): Minimum acceptable TLS version. -It's recommended to use at least 1.2 as the minimum version. +- `min_version` (default = "" handled by [crypto/tls](https://github.com/golang/go/blob/master/src/crypto/tls/common.go#L694)): Minimum acceptable TLS version. + - options: ["1.0", "1.1", "1.2", "1.3"] -- `max_version` (default = "1.3"): Maximum acceptable TLS version. +- `max_version` (default = "" handled by [crypto/tls](https://github.com/golang/go/blob/master/src/crypto/tls/common.go#L700)): Maximum acceptable TLS version. + - options: ["1.0", "1.1", "1.2", "1.3"] + +Additionally certifaces may be reloaded by setting the below configuration. + +- `reload_interval` (optional) : ReloadInterval specifies the duration after which the certificate will be reloaded. + If not set, it will never be reloaded. How TLS/mTLS is configured depends on whether configuring the client or server. See below for examples. diff --git a/internal/otel_collector/config/configtls/configtls.go b/internal/otel_collector/config/configtls/configtls.go index cafe3100647..3cf27bdf91a 100644 --- a/internal/otel_collector/config/configtls/configtls.go +++ b/internal/otel_collector/config/configtls/configtls.go @@ -17,9 +17,12 @@ package configtls // import "go.opentelemetry.io/collector/config/configtls" import ( "crypto/tls" "crypto/x509" + "errors" "fmt" "io/ioutil" "path/filepath" + "sync" + "time" ) // TLSSetting exposes the common client and server TLS configurations. @@ -38,12 +41,16 @@ type TLSSetting struct { KeyFile string `mapstructure:"key_file"` // MinVersion sets the minimum TLS version that is acceptable. - // If not set, TLS 1.0 is used. (optional) + // If not set, refer to crypto/tls for defaults. (optional) MinVersion string `mapstructure:"min_version"` // MaxVersion sets the maximum TLS version that is acceptable. - // If not set, TLS 1.3 is used. (optional) + // If not set, refer to crypto/tls for defaults. (optional) MaxVersion string `mapstructure:"max_version"` + + // ReloadInterval specifies the duration after which the certificate will be reloaded + // If not set, it will never be reloaded (optional) + ReloadInterval time.Duration `mapstructure:"reload_interval"` } // TLSClientSetting contains TLS configurations that are specific to client @@ -85,6 +92,59 @@ type TLSServerSetting struct { ClientCAFile string `mapstructure:"client_ca_file"` } +// certReloader is a wrapper object for certificate reloading +// Its GetCertificate method will either return the current certificate or reload from disk +// if the last reload happened more than ReloadInterval ago +type certReloader struct { + // Path to the TLS cert + CertFile string + // Path to the TLS key + KeyFile string + // ReloadInterval specifies the duration after which the certificate will be reloaded + // If not set, it will never be reloaded (optional) + ReloadInterval time.Duration + nextReload time.Time + cert *tls.Certificate + lock sync.RWMutex +} + +func newCertReloader(certFile, keyFile string, reloadInterval time.Duration) (*certReloader, error) { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return nil, err + } + return &certReloader{ + CertFile: certFile, + KeyFile: keyFile, + ReloadInterval: reloadInterval, + nextReload: time.Now().Add(reloadInterval), + cert: &cert, + }, nil +} + +func (r *certReloader) GetCertificate() (*tls.Certificate, error) { + now := time.Now() + // Read locking here before we do the time comparison + // If a reload is in progress this will block and we will skip reloading in the current + // call once we can continue + r.lock.RLock() + if r.ReloadInterval != 0 && r.nextReload.Before(now) { + // Need to release the read lock, otherwise we deadlock + r.lock.RUnlock() + r.lock.Lock() + defer r.lock.Unlock() + cert, err := tls.LoadX509KeyPair(r.CertFile, r.KeyFile) + if err != nil { + return nil, fmt.Errorf("failed to load TLS cert and key: %w", err) + } + r.cert = &cert + r.nextReload = now.Add(r.ReloadInterval) + return r.cert, nil + } + defer r.lock.RUnlock() + return r.cert, nil +} + // LoadTLSConfig loads TLS certificates and returns a tls.Config. // This will set the RootCAs and Certificates of a tls.Config. func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { @@ -101,17 +161,19 @@ func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { } if (c.CertFile == "" && c.KeyFile != "") || (c.CertFile != "" && c.KeyFile == "") { - return nil, fmt.Errorf("for auth via TLS, either both certificate and key must be supplied, or neither") + return nil, errors.New("for auth via TLS, either both certificate and key must be supplied, or neither") } - var certificates []tls.Certificate + var getCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error) + var getClientCertificate func(*tls.CertificateRequestInfo) (*tls.Certificate, error) if c.CertFile != "" && c.KeyFile != "" { - var tlsCert tls.Certificate - tlsCert, err = tls.LoadX509KeyPair(filepath.Clean(c.CertFile), filepath.Clean(c.KeyFile)) + var certReloader *certReloader + certReloader, err = newCertReloader(c.CertFile, c.KeyFile, c.ReloadInterval) if err != nil { return nil, fmt.Errorf("failed to load TLS cert and key: %w", err) } - certificates = append(certificates, tlsCert) + getCertificate = func(chi *tls.ClientHelloInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } + getClientCertificate = func(cri *tls.CertificateRequestInfo) (*tls.Certificate, error) { return certReloader.GetCertificate() } } minTLS, err := convertVersion(c.MinVersion) @@ -124,10 +186,11 @@ func (c TLSSetting) loadTLSConfig() (*tls.Config, error) { } return &tls.Config{ - RootCAs: certPool, - Certificates: certificates, - MinVersion: minTLS, - MaxVersion: maxTLS, + RootCAs: certPool, + GetCertificate: getCertificate, + GetClientCertificate: getClientCertificate, + MinVersion: minTLS, + MaxVersion: maxTLS, }, nil } @@ -177,8 +240,9 @@ func (c TLSServerSetting) LoadTLSConfig() (*tls.Config, error) { } func convertVersion(v string) (uint16, error) { + // Defaults will be handled by go/crypto/tls if v == "" { - return tls.VersionTLS12, nil // default + return 0, nil } val, ok := tlsVersions[v] if !ok { diff --git a/internal/otel_collector/config/configtls/testdata/ca-1.crt b/internal/otel_collector/config/configtls/testdata/ca-1.crt new file mode 100644 index 00000000000..4235c997a7b --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/ca-1.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDQTCCAikCFBRvACBtxF6AcNBP7lGKJj1DyZxeMA0GCSqGSIb3DQEBCwUAMF0x +CzAJBgNVBAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5l +eTESMBAGA1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcN +MjIwMTI2MTAyMzE2WhcNMzIwMTI0MTAyMzE2WjBdMQswCQYDVQQGEwJBVTESMBAG +A1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3Jn +TmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA0EKdPNVpHFQ2tlBSUfBBTR7D7Zv2Ip5aWACvyjnqxwIWv+Jz +gtOAJYpKP22Tc4ADLQlZldDwDUTuRZ/BMpcf66M5DDbXBnDZUy0xyRmX6PgPMWPY +wa1syQkawh80k/UEbFAkSRSp7NvIrevP42ox36Ex4u0LtXVr0xUHs8Q2uB6FawMY +NOcn9l5xBR1ghj8xCMCWKdKfn5FcjJQ+sW/37lOR5xmWbldKqw73eu3tuKKEWUoo +fU9Em/DOQcw3EkHAyWXSrhhWWYQ5ejscF2ON9xhoElx4FMm+lub6lh3jiiMAQo5x +kQc5sFjbKqHQFZtLL2xeVsfT9CX2+SksxbtxxwIDAQABMA0GCSqGSIb3DQEBCwUA +A4IBAQASMYvTPoh+pv4dco9OAZQeW5KZbndiIqo6QsO9ZFPyYsuJl21jexLN9nUN +vhLj38rFmYpzw8smA6fOyhl4wQDxrftj/ODyVN29gqwF9RhcElGiUg34heqO+ntE +ozGZC4MfZdQffjAJr9I7E9Y6vsuNjdVVaUmcSCya/DcDDGQUWE29io3bIsAkvpSK +Qp3Ub9ZYgCi2RPfVteWJXS/en6X8xtJsxQeujkWaXqxszU2NTYFkKyDM4lOiJTPm +yflM/1sCGZiPmLWMOXl54ULE2qHX4Mx0YVschFt7t3e/k6XgCTdUrHShOWIUs5cv +3jw3wJGOdBA753OFGmf9n5rGUw8P +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/ca-2.crt b/internal/otel_collector/config/configtls/testdata/ca-2.crt new file mode 100644 index 00000000000..c400018a8b8 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/ca-2.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDQTCCAikCFH3JsGfkQfeNsRKH1XrKLGhBNo8fMA0GCSqGSIb3DQEBCwUAMF0x +CzAJBgNVBAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5l +eTESMBAGA1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcN +MjIwMTI2MTAyMzE2WhcNMzIwMTI0MTAyMzE2WjBdMQswCQYDVQQGEwJBVTESMBAG +A1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3Jn +TmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAoE7DaA9WDSZe+7TI3RrpRntenioOss0L62cWLFf0/E92J16X +zOjWDE7EPEDf7z1lQ+FPxUkhVYSpAXUVaDHGohR++Et5ehwGGyYdwKjJlY8UuhYZ +wWM/255Mgwzcr6hErOijBumMT1j6CcVRNNtPU0UghZSKFGdsn7DUeHpebhvufwJs +xDDMmgBFpivES25hriw2mlDZeDlNp28mAKuu1ZHdV4jRoYpdwo5QJuhj+J1LYm7R +HlOR3n+vRWe6MS60uk1gUHyo5gj5MZYPjrOEwY6bMArhl2Qu/LVrVgJOx8zx9GHe +61HCCb/m4bugQHFomAqUNY/JQxrdnyDDrGU4jwIDAQABMA0GCSqGSIb3DQEBCwUA +A4IBAQADmpwPlVBMEEf0GjleYNJJu9eoI31+Zpc8Dz5NAD/eapS3zF4xTqZvan0J +pGlE+ECs92m7xryc+kgrOSGtuCRqrQVsIoN3k27BgFHoSPu3va8YtZyaBGxcya6V +D58mu4murMGsw8Ah39AUZbebRjHBUyy94KB4NJvTnX2T2VAqOvPGvl0bjXKKrbS4 +7RM4X2PaIndK7Bl96MwHwwr716x5fZJLdhnQIYH5duCXpoAGSmUWFplYUbGOlXB8 +LntVItWzWkhVa2j6a3GyyH5eyfblT4ZT9T5WzIUOWLoeOcrmDhgoMMXwByrO15Cd +mBDGxZrekfReRPfu9y833TzxN0ZZ +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/client-1.crt b/internal/otel_collector/config/configtls/testdata/client-1.crt new file mode 100644 index 00000000000..3e43e8ab926 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/client-1.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlygAwIBAgIULj32Hip9o+MkNW/FYbULhaCsqJswDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDiiR1pssfT1wR0lTDvV1AMu5EBG//uyhqTRH7feN70 +qjh1kbVL8S9kvTS7fdswm260OsAHBd3c6Ho7ynz55UqBSd6vaJ2ePRhi3nVug3ig +PuEqxyJDYFPwq6FDVYXbFNG83MHLYkWN2gMGW4dp6vFR3YCBWSFA7Avz8hFMjwDG +M9zwpoD/LIpDwaThQyyxQjtVSNUoJnj7tTEekTOHfFQ5LHL82fXNNszCMZxrrnxr +hJUMqJxa9PNDDLiL6jm1C5dit7qFSsEgCYiNNN6w6x3BOUeQB94NA/6VlQIkbMJc +hQXLMSphhlv7qnnTiXGAuFskhKXJSwIIcniqnl1/vHXFAgMBAAGjLDAqMBMGA1Ud +EQQMMAqCCGV4YW1wbGUxMBMGA1UdEQQMMAqCCGV4YW1wbGUxMA0GCSqGSIb3DQEB +CwUAA4IBAQCHZYOd0NBcysRNm/FysBNTqtwWZXRUGEyDFGzdfCFfvE4ZTguCliDP +8lOamBWhRQruXWUMasLv+XxuxmPl5+ifkAnSF/ZoA00YLa2e6YP60XrogdkHGIcj +hK7//9XhI/Cqx/G+r13rhqWTJV6pn9LK4yWF4ikcQna8TTttqqVxovXy3dxmuej0 +e/WKzwx7l4dTh4uuMef5ZACijTAf7xYRzZjbibFKsqhF5wORCjLGJQw5ZwOHGOfQ +k1zOvs1QdARvKa0cwrGSuV9xIB9KNIoDFXpMTR/je6H+8XHT92D43ROfnRUlOzXP +7tFw6dKyAV1RVPHZvHUMXUcGLHXLFxwj +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/client-1.key b/internal/otel_collector/config/configtls/testdata/client-1.key new file mode 100644 index 00000000000..72d4503f886 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/client-1.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEA4okdabLH09cEdJUw71dQDLuRARv/7soak0R+33je9Ko4dZG1 +S/EvZL00u33bMJtutDrABwXd3Oh6O8p8+eVKgUner2idnj0YYt51boN4oD7hKsci +Q2BT8KuhQ1WF2xTRvNzBy2JFjdoDBluHaerxUd2AgVkhQOwL8/IRTI8AxjPc8KaA +/yyKQ8Gk4UMssUI7VUjVKCZ4+7UxHpEzh3xUOSxy/Nn1zTbMwjGca658a4SVDKic +WvTzQwy4i+o5tQuXYre6hUrBIAmIjTTesOsdwTlHkAfeDQP+lZUCJGzCXIUFyzEq +YYZb+6p504lxgLhbJISlyUsCCHJ4qp5df7x1xQIDAQABAoIBAQC76jm34FHa7FYJ +z2hUYf1JUp4qaWuYTZZV60/DWKS6GCnVfRUC9gL2ce04SmJ0o7rlTobUTI2KHl6n +EoUxVn7DWN+cag+1n8CG4zpOfkilxQNLVPybH2ECF50iGeN7pH2HSSiI6fAAh4RS +1cIynm2oFzHuGl13WVdg+MBY3Zcq0XMlcdM37IEpclcEWUyxi8mheVDuSiSwZp6z +te5wJU3kVWIqnR6aMpkXYFm8HasZ8+Kt26PFRVQ6kMOrCgGhisXy38KTNr+S0HA/ +Lw/IcdbPysypiJ5qry0doN07ORrM9ZDkCabbuuseakxfYhmj61yNsofDYV0/O8Aj +jXBI//GBAoGBAPaGBxsGKBSeHyJOVkUFx1TBzNjhWiw3+mpXunMirMWs4aKFcGOL +9KbrZCu3IBJm7BgBM7z+zHXy6ZBam51tkb34lPbCWzS7fLOG1Xv/udndmrzFVd2r +l/iDX91doTfHIHLWs5WJCXmJNb4oSQqO1sUwwdW9oCPc08SFBgCUaigtAoGBAOs+ +ZCMdlFLiqnAVSa+oM0pE4vz5sBaeMVWeMBSeWx84Njb9pBucNjWJ+4bV3HSRYXJb +RcZcP0YklXZOcD+W4vmxFTvO3xw8ZEhcBeteU0SFmezZs5pPw+AwKpUAQLETGkHg +m0p+VJS5N1Vc3QTDG1DbVcOkeoNNgE4sDGmL9Cr5AoGBAIxI7NY2BKzm5jSxe2o/ +xZS3zAhHBPdQy5GkZpeKTeMXZDcF1FTxmcE7Bn/R79BI/WUTmgucu2ELYFojFZba +eSsvwCVDqH8zidznh6jOd0ZBUwLFEP3Z3dsvd2gTFeEV0aNIBl2748ZjjE+vwRDf +A9ymyEcHZ4/A5ElaoXXG/znpAoGBAMTJOW1iphw7/sWqGSz3MIi1XYivuo0BIlXz +8VaeLa3NERUpUqnCIFrjJWTi6/sbToAiOBk6O7gKjHkeHqojJ5Yme5O/d0YggudB +C7ab/l34wQ2wA51Xkoys3kIspvE6AKIRKPbE/S44TkB7YWxFZklaYcE6iz3hjC5Y +jL2SVNvJAoGAWqlFMCB0qvIYRG972hNDSVUCJzcgzuw6+imyAMorP+vjHhH3lnUN +tLVRigWJ2L3zycp7Vn6ZwZhgV3w1yKH6XRn4rKwy6HegMozP29M7wna6kCRQIqwx +vTmmG4xZPD6TfAJiTcTq0TwUH38noFeYLAjpPs6CJhjU8jdNnoVLREs= +-----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configtls/testdata/client-2.crt b/internal/otel_collector/config/configtls/testdata/client-2.crt new file mode 100644 index 00000000000..189ac043755 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/client-2.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlygAwIBAgIUfqvGzweJvDl3efzrjC3fDXfURYEwDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCljwt2b+FOx33WB6uW1sBgkvVEezGM+HWhs44IHxET +exP8HTcgoF6sJsQ/n0GnaHOBRBzn9Hw7R1AnNauojuZ+uPHNz2+hwN0Y2FZgM1tY +Deuo/LQ8rRm9DhbKCG4ArBCHduvzLG7Dj+bocaFRRoY2x9bfFLUxWtIKlXEaS7ij +sW7J3MFchSqN17KwYvR+979GmYAhKy89SB/cz/JdoMLAuYMpZWW8IMy1YK192GOo +5tADOPjJ6CIEkd2iqWaThrSOfxReSHq6IOyTbrBiFmFHlHsn3mpk5dk3+yu33l/U +sq78uI9Ph18CnJJPO6zEDmFiZpn2MvcJp1IX/OssQ1lDAgMBAAGjLDAqMBMGA1Ud +EQQMMAqCCGV4YW1wbGUyMBMGA1UdEQQMMAqCCGV4YW1wbGUyMA0GCSqGSIb3DQEB +CwUAA4IBAQAsbJgVGysKzxJll4XSP7nGk/Y0QyIGMa56c1xSKyvm9rsR59Y3bBcK +0DlNFUTIFN4e/CLkdeesWDlHkRiEScLtwUw8Nv/eJBjgmWy0eVQXsBFbZ1Bc6u2j +Y1IBHkWuTcFMAd7YU4KsIe7zvK/5ZqErUThG8VMpXc7s+2IhvX8rAIj/5Znbe3is ++4oRGE+/d4kBf5TvLslgPq92mP5TLJnKM0memNZmxIG5KEgliv6VVJHL+qA806tw +pboRQZGdkLnIORJQ0tA38k7sK7CLo5a8aMXFkonQqR8mXjRnZTInp7iPw4TSTwoe +5soR4FAJGrCLyVg5POZRTzO+c2PHwbMg +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/client-2.key b/internal/otel_collector/config/configtls/testdata/client-2.key new file mode 100644 index 00000000000..f4e69d37eda --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/client-2.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEApY8Ldm/hTsd91gerltbAYJL1RHsxjPh1obOOCB8RE3sT/B03 +IKBerCbEP59Bp2hzgUQc5/R8O0dQJzWrqI7mfrjxzc9vocDdGNhWYDNbWA3rqPy0 +PK0ZvQ4WyghuAKwQh3br8yxuw4/m6HGhUUaGNsfW3xS1MVrSCpVxGku4o7FuydzB +XIUqjdeysGL0fve/RpmAISsvPUgf3M/yXaDCwLmDKWVlvCDMtWCtfdhjqObQAzj4 +yegiBJHdoqlmk4a0jn8UXkh6uiDsk26wYhZhR5R7J95qZOXZN/srt95f1LKu/LiP +T4dfApySTzusxA5hYmaZ9jL3CadSF/zrLENZQwIDAQABAoIBAFRLOLLc1AKgX9mR +njP2s4x4RpjPgLMd7gaevTo1VyRsDgjXdzINdSaBtnoORAdQjz7Jx03ylS45aP4N +vZDc8U6kK7l2XIgnAmub+p6Qh3mV3N71i285U1mGyuOi1x9QfDn8urXdcafwpMjE +0jXnin5p0WVTzc2LSFZLMIMK+r+czdzy4OxpFptlamUHjXvK4yG+zJa9fm66bjP9 +EMpDPLKCIfPMDLucfzfZVKX/vDsbCmNWMCZIJKF4LdtTqU+spyYXaZP7cJ7yst0g +fv3yeOfWFjmGHzkXGZol70nCZXEB+rPl7m1qWVmxC8WoBFsUloHILQJP3nqoRNqR +T3PAkoECgYEA1WmOvFhG/vzsA3pi4Xor7T9flXAq4r96FviSsLEqRTPlNsNL8eqk +dVfGL05rsgfNl61vlPyS4+gE4W+nQ3tLq8w+Glvee2t1eggjJDbobwrpCW6n+Uw3 +Qgq8PfsCcFl+oP0EC3KkCmZomEphgwOg4GqB71Wbscv0KuU+rxyCe9kCgYEAxpjT +lyifnMVOFl2SrsQKndKsZWa4U4RtRJ9pWW5xKJ9vbFSPqKpw51IfNw4vuu/J0Yrf +ZauinZm4oPelXLOHJlIxJOKk4hLs3Evt2xxA+02OTjCOU6RTXWmFUOyJFXJuVWVH +H/pna+bw2b67RoNpn/nOVbmYTsvbTACNLfexmHsCgYBPOwhF/pQlGKtawzYwtdXX +F98ZsPILCsF+A70aIjwqQxEHGsx4PP/fnL20VG4BQ4pdlINHkdnLCRm+xGAZ2o2G +c6ZezNq1gXi03I6HZGc4ypkn6lAsatJdD3VBoY4PPfqYNDcrNN2YCtssJvk61b8F +ciVZQLQz9x9oSYHTK0d6SQKBgC8NMDxE5KP43wpPexwq2DUSH8QadRtcaaLzfbsx +fl/YfkaVNkAIuZ0kiL67frV0cEVT+J+W7X0XWXXRln0DD8cVfA04IUZqo3GCD8V0 +yTSA6HE/8ciBSzr7cBl/IO9S4C8dQp+h7PTUj0WXebk4E0NSpP8MbLhmdftougol +AA+XAoGAKJWemHLKOq2GYSVDSdR9wS1qBXPVQJY58p1J28C/gZpR9ta8cNg355ug +Qw29xfi4ZvjCRYEYqSsMMCMA+B2ZoG7xhL++oKSS2lUfiW28VB8HeFg23WFAWMT3 +g83IcgmFvzbdI7gxck2KMJC2occBPagxrK5Xz3aE44roBeq89Kw= +-----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configtls/testdata/server-1.crt b/internal/otel_collector/config/configtls/testdata/server-1.crt new file mode 100644 index 00000000000..b0669ff7d7f --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/server-1.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlygAwIBAgIULj32Hip9o+MkNW/FYbULhaCsqJowDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDZY2jYZmb1HGNM/ssRuUFmRdyGsC8qLSPEukEUb42H +Xv6F5pfvBWb1XDqZq/mcRIQWF95tUJPgMGjzwzXCQgH3WVIRZZRFBH5CutWo9dp+ +nbdmzSOVdHjnRhS9wPyu00BJf9V6hSLTMoI0OV/6RWksZCRSWiOtE4TO3521Gf1M +GonOf3zsyKLSz+qGiSwhCUz7vAH6O9vt28WYUtL450k1aNfj7XsTy/GXHg9frMje +fmH7m+Fnv0q1V3bZwO7QIDDp03w3CL7n5qg1xWk/Xayi5TqaIOQPW0mF9Fj+AFLd +StYekW71hjqjINmX2wyFg7V3H2W5ZQVJN9ZaJ/MkWWQnAgMBAAGjLDAqMBMGA1Ud +EQQMMAqCCGV4YW1wbGUxMBMGA1UdEQQMMAqCCGV4YW1wbGUxMA0GCSqGSIb3DQEB +CwUAA4IBAQCIDWxufT/yQICqbRPaw4o000jlSgjmgl13kkO4E9+0vWv7R/y5rncg +LmoH0w5JaWQQ46Nf4sxo4+rj53Jfv2XbCfC96n1zydXFaodMcsSSu4HxJRWd3Mqi +kcIEnaBApic9pKv8J6rNt1ZU9j9AlpCJwNZtA6imsvau+WLVF8iga/r588/YfJQs +p/8MaS7A0zF003AELsiX1T8kMx6MVSBb2DJytZih1BAz0EOOlUbyoFhNj66Zutns +OFxd7s0h+Mp+K1tPpU2ben0v4QKnrA0BmPVJjrUZWIFp8YHuiFl6xDkO3SaG1ogi ++SpFHtWojhNH1+92mN59UfFIuQFXGjxl +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/server-1.key b/internal/otel_collector/config/configtls/testdata/server-1.key new file mode 100644 index 00000000000..532cd446cda --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/server-1.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA2WNo2GZm9RxjTP7LEblBZkXchrAvKi0jxLpBFG+Nh17+heaX +7wVm9Vw6mav5nESEFhfebVCT4DBo88M1wkIB91lSEWWURQR+QrrVqPXafp23Zs0j +lXR450YUvcD8rtNASX/VeoUi0zKCNDlf+kVpLGQkUlojrROEzt+dtRn9TBqJzn98 +7Mii0s/qhoksIQlM+7wB+jvb7dvFmFLS+OdJNWjX4+17E8vxlx4PX6zI3n5h+5vh +Z79KtVd22cDu0CAw6dN8Nwi+5+aoNcVpP12souU6miDkD1tJhfRY/gBS3UrWHpFu +9YY6oyDZl9sMhYO1dx9luWUFSTfWWifzJFlkJwIDAQABAoIBAQCWbJBvNaTGtUcN +Tz3rXLqhb3QiiyWH1MZsacmAv5Q6eQQ8WY0Gq0FMRO6TyYmmlU6lDw0trVU2C6mE +C69WZWCA7QC54wVPIMXRnQEdsknn1XDEJO0bjQXgWwEdML5oputUMK3i4t9vLwMj +6hO81Wzqd70ecxs+t0Pt9pRlbb91eZwWN806HBnPx79nTH31AQvjSZ5OH2tTLBjz +bj9cbvhGSqpEYahLQqJggMYTZOtbI3u4G3jTSItYvhRYgOahwyP/OCR0A0adCSFK +oDLruhlPQttGkXSu2KbSNdFXI5w7UNOUxotxwTQTSDmJ5qs4ZL9gmGZe7qg0B/FU +8zTjIxNhAoGBAP/WxHE3BIaiDeaLgKnmUxzV6wXYX1Esa5kMtlfgiGWMi+pNgkkN +jutmUO9fbqQuORlxzyTzoMAEnExtBwLzccQbRLfkPwmgt91OUkTB2SA1+ryimfpf +l0GLC6ZQJ5+ZK4buEss16c1lsgDEXS0N9Zb6jRt3SUZTrHedek79iyzRAoGBANmG +cfv3YJZZ7KtAIrY8I84uPdvWi8fTorg4IsvLN5QSyzXoI0L6Irs3mN1u0bPDdCCU +MPoJlqBnzLAJFUOZpxIgoZEjaPnEtXdRgGwh/lduy3xwuSzrCZkD13GDH+Tuo1rJ +Zyvzs1AdNvStqxV6ozdVnaXxt1uz9uEMnws8Jl93AoGAHTUttCct0xkJMTrX842i +C3a4oDA1oZTKq+xxnNK7f6xuBM/YgfKUUHeb4dgpT4Efb7I4jeVqgsGD/o2r8UBN +yq+6Rqw+LiE1HITmi4b9/NlsyMBfh+AF6quvJsub2nKoL31ak+yRxqtHiSLh6FTh +ptzv4yTZLrg6xmUqI356tyECgYAppEU52ReScNCP0A1VGZo5JD0PUrkbnfYukgCH +RvXy0M46GaB2d/AiKviGm2ploWsfuX7Ovvso5fYXVQXPFSEYpUqIwGCeP/wFRYLy +MGfCUSF/Rw0L/kquEkAyKMn4R37aKGgpz9Np6M3WdVClIf8Q3sD5PZa+ZWtDlej0 +e6VU7QKBgEL9MhCDrIZsrCDs8+wcf4alf1O3gV9oHPXkwiS1Am7e2eINC6IwEW8E +DnWbTkOzxA/tmhcOZPitA4sGIWiP87B85DFDtGjd8pLso5KHUk9G2JFIG/N15RMD +gfjSSnruIHeadnmTgQXx5ClIQUhnQ9q88DN/MbuuYXv+cBndVLNM +-----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configtls/testdata/server-2.crt b/internal/otel_collector/config/configtls/testdata/server-2.crt new file mode 100644 index 00000000000..cd6030ee435 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/server-2.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlygAwIBAgIUfqvGzweJvDl3efzrjC3fDXfURYAwDQYJKoZIhvcNAQEL +BQAwXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3RyYWxpYTEPMA0GA1UEBwwG +U3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNVBAMMDE15Q29tbW9uTmFt +ZTAeFw0yMjAxMjYxMDIzMTZaFw0zMjAxMjQxMDIzMTZaMF0xCzAJBgNVBAYTAkFV +MRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAGA1UECgwJ +TXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDC3OkW/dW8uDK98U/IpuxKd8wcgZ4Kmh9CMFlbkYjF +qIa8vNE566KdX51smHhHv/t8mM6L18kFM9AsVywMqfe/+06VHKAgJppLNdzQL8sd +p3cZhrdzHDtz6vaZ9hWQb6nzB/uYfJrk9HLkwu1CchOAjH8ASW6z3sqrlxCOLki3 +GxRPHyHGEu1r4LSbvPj8ngASQU0jpV6QEbZOh1UrqNvVVngIdFPGwLHnK4E4GiW+ +gy/D5VSIfbXSrlQUpU0Vn3NK41jjEALp2Rq1jjsqT59mhWB6wfFUeJMRU4DzDeDT +VgvliqWkRw0Yw3uYWam9ukzyNGD1B6vtS0NkJZvoA6XJAgMBAAGjLDAqMBMGA1Ud +EQQMMAqCCGV4YW1wbGUyMBMGA1UdEQQMMAqCCGV4YW1wbGUyMA0GCSqGSIb3DQEB +CwUAA4IBAQBP6q+ciz+Zd9q1+FS2XKqJt3svTwvgR/CyIad3aZ8b27Zqjff//m8J +hmngsBckBLmSwoLT/Z64SS3/Iarnqg1QE+5nssEg2EvbZc5KMAXqbXJnplttmXsd ++fC94yOleZFfNLkaImt3oul5iz3CKr6yCj+wrGn+yBvIv72mA71+JU13TG7k0zPM +miykRwTxqvWcEnpWOtNQr7RPhqtZCIz1twsJPm4YlnKP5UR6HNXk0zLR5Uo8NzQV +eLe8vrcA3mhLaxynMF0PnMphS0AmNsgL8j7n33hvsYJA0yWMNRurAVMgLH1bQSlL +3NRATI9FDnQsQI9Y4i91CHl9wUk7A7E+ +-----END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/server-2.key b/internal/otel_collector/config/configtls/testdata/server-2.key new file mode 100644 index 00000000000..545a2360ed3 --- /dev/null +++ b/internal/otel_collector/config/configtls/testdata/server-2.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAwtzpFv3VvLgyvfFPyKbsSnfMHIGeCpofQjBZW5GIxaiGvLzR +OeuinV+dbJh4R7/7fJjOi9fJBTPQLFcsDKn3v/tOlRygICaaSzXc0C/LHad3GYa3 +cxw7c+r2mfYVkG+p8wf7mHya5PRy5MLtQnITgIx/AElus97Kq5cQji5ItxsUTx8h +xhLta+C0m7z4/J4AEkFNI6VekBG2TodVK6jb1VZ4CHRTxsCx5yuBOBolvoMvw+VU +iH210q5UFKVNFZ9zSuNY4xAC6dkatY47Kk+fZoVgesHxVHiTEVOA8w3g01YL5Yql +pEcNGMN7mFmpvbpM8jRg9Qer7UtDZCWb6AOlyQIDAQABAoIBADJNgMZ0pHZhPogW +ATiVDq5ymnhJZZjrDGKzxH2E5j/QL2gNfh1rnMDva94axgIPp0YU1Ez5WWVEaNrp +be+e+NvQbgrEJvnlvTLpJqV/kPmIv5ARXM4UXayg3SQFiK+Og9q/Fs3YbMvp5rbz +MvhSJoKqwiY6zp8URlFhX960SAUsPwdgK/O+YUGlkATSKLTB9pUrcntbFcB3Uev4 +w0a1Z0yJJQotm8e5Ht6ODlp/ef+v3woU+J3Tp6gv/izksDYIF7LZVMfM0FC/V8EK +Odnwuyr10nYSZoKAXGYWx5UNIc2+8EOfv6EQfsdLGq7rAHvVKDi6UrXZaQbiee8/ +YqA6G+ECgYEA5dDy8iwJVKdThQdtCuWlgSFlzLdxMtMNN/7CkJncqBiAd1ip9fDR +woXrozAug6YbXBtaBJjkVAJOCppUmNo0gHQTGItGSJLe8MApKR71oxuzFoAdRarp +cmgWLQGCpn3X/P18mr4nF+9bpqQeiHhHj5ImS+UTuASbt3aldZCTUYUCgYEA2RB6 +o7G6l/NEInBquHLfBhx/Q23ntUsWzAoPpsSR2o05fFLm0KK+cZvyaLDDhr/qrPtv +pAbG6AkYb4k43q5auzsH8Sf6RNzt3oksIZErHuNlScTSTJ70IkncbcLOVvM3FwIz +0qgknuIi88MWbeLa0Maj9Mx2lmuNm9IAUXFdFHUCgYBPTZ44MTf7DU6Fzj0zkHFf +MP4m+XpHdorOMsxDB8UcAHB8Po1PwA0yGfJpOpwic7RnQUz73yKTVsRFZmIg6NNL +LELWqmDTdFMYMsdBWFydL1bKQeVYABVUlFRqrWW/PBfHRlW0ND/bQ46V33Zl01Om +WGF8uQzn6DcvxPJtsjkT3QKBgFD/RDQnEtC2ltsfBcO0IaK/KYH41fihf2095988 +BI0AG85XhQefYt8z6P3F0ABNRv2riVo0qS5Wjoa4Nr9pYjPxcCI937aolh5vI0eX +SvbotZgUWMD8o27UDuvqQGLTuN/eE4Zs9dVP3ukFCC6S80Hqja3AShQRKDNX5oR9 +f9UtAoGAObuOZQN5hnqDISriCe2QhbhEatwFo5blB7ZwxU0hZwqcRr7KDFECYzWX +e45QLnoiQX7OblP8p2eFtfEcuEYxxN8vKeXf3293Tk9DVAeIRAss7axcCwoS4nVN +quwxYj7/Q7qW9KZsNLEwjvqJBpvfIuw8jdH634CVKawrX4Pvd5E= +-----END RSA PRIVATE KEY----- diff --git a/internal/otel_collector/config/configtls/testdata/test-cert.pem b/internal/otel_collector/config/configtls/testdata/test-cert.pem deleted file mode 100644 index 627628866fa..00000000000 --- a/internal/otel_collector/config/configtls/testdata/test-cert.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEHjCCAoagAwIBAgIQTUSsPHdq9Uhu2bMD29ThkDANBgkqhkiG9w0BAQsFADBd -MR4wHAYDVQQKExVta2NlcnQgZGV2ZWxvcG1lbnQgQ0ExGTAXBgNVBAsMEHRyaXN0 -YW5AdHJpc3RhbnMxIDAeBgNVBAMMF21rY2VydCB0cmlzdGFuQHRyaXN0YW5zMB4X -DTE5MDYxMTA3NTA0NloXDTI5MDYxMTA3NTA0NlowRDEnMCUGA1UEChMebWtjZXJ0 -IGRldmVsb3BtZW50IGNlcnRpZmljYXRlMRkwFwYDVQQLDBB0cmlzdGFuQHRyaXN0 -YW5zMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6zf2JlSdKTdiYDZV -i1yPnP65/CgqlxMflTP9N2P1W7F1SbvQgiGiSfUyc7NicffLGqqDbK3Q4hvANkRC -wOYc+nXZLL6IAxsZ/QBfud3GG2XhuETT2p84Wlqo55I3wFF+Efb89FRp+IiAy2gj -c275hmie6zDRYNJticmZwBIXfnYvwY66V8Y2jKEAjtf6BEmB8yPxWLhxdgY3FjWR -y3kRLfr6BhxVM2qYtl/gXbyGTFjAv7LgFQa/25OXRevs+VjBWFQiQ89b+YIZPpJB -y8y+02nsRLt9Oy9lWMq1/pEqySDV6T3rrw5rV7TLj2RGNkxbnjk+qmf5mWxYzO5X -QaBqeQIDAQABo3MwcTAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUH -AwIwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBQbdcIL3c/Yr+lR9wLU2FLPJSfk -ZjAbBgNVHREEFDASghBjbGllbnQuamFlZ2VyLmlvMA0GCSqGSIb3DQEBCwUAA4IB -gQBx/tQKqGLQGv90TyQOdKFPPOQ0iU/pXrM0t1Gn55UuvSz6G66IufPQuV+MeW1B -CGcSm12QAjwIvFVPFiBurygQ9eYU/tZW1NCaTSoSRa8KzYMBuDlfqYdS3/7gq2+L -L3b9QZt4rLgaQp0StTlpgCZuKa6N4aK25HQpu+lZ/ZxL1cvLlTGtI2VEWrx9hZ9q -5ImLy063iSc/YqD51XR0LJTkjSdep4sBEGtl5V582ncZAGZQim90hiaPrf3TXVnN -HQuzJNE5pwS637nCcyzmXn07Wh4qcT5vWDmySeN9eDJjfrbM9il11mkGZ9JQYf8Z -S+1562KvxjVVlsegnXaR27tAGkJ40X/OZRC28jLEXIjManDhClZD3uwqlSRtb6/M -ux4+8kqL90msVRlZR5VnUCR5/rZr4ji07NMDVJijI99lRQ5rDbf7Z9CMUpLTXcfd -jJBweUKlFEe3HZ9BfZOU3tLbAdQa2/I420lFVo8mEdu6cpKQpW8fITDvl/71OpQu -FsI= ------END CERTIFICATE----- diff --git a/internal/otel_collector/config/configtls/testdata/test-key.pem b/internal/otel_collector/config/configtls/testdata/test-key.pem deleted file mode 100644 index dc7766f9363..00000000000 --- a/internal/otel_collector/config/configtls/testdata/test-key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDrN/YmVJ0pN2Jg -NlWLXI+c/rn8KCqXEx+VM/03Y/VbsXVJu9CCIaJJ9TJzs2Jx98saqoNsrdDiG8A2 -RELA5hz6ddksvogDGxn9AF+53cYbZeG4RNPanzhaWqjnkjfAUX4R9vz0VGn4iIDL -aCNzbvmGaJ7rMNFg0m2JyZnAEhd+di/BjrpXxjaMoQCO1/oESYHzI/FYuHF2BjcW -NZHLeREt+voGHFUzapi2X+BdvIZMWMC/suAVBr/bk5dF6+z5WMFYVCJDz1v5ghk+ -kkHLzL7TaexEu307L2VYyrX+kSrJINXpPeuvDmtXtMuPZEY2TFueOT6qZ/mZbFjM -7ldBoGp5AgMBAAECgf854ouw4yHKAtcy1iw3H5A4Eneyli/k/c/H6ANonjDDX+h9 -PLsTSzOk/7JqxrpzUYeqCExPcnb1Ld8fe6zxy69V86p+WGUgXosGuBDWrL0UAP6L -WmTIaGZ11dm7I0CVE3jy8tVNS3jIsM8BP595yNWfPh/dwSXFrgNG5VXw7oLZm8Nd -q4+yybeRT/1dhlz+toV44x1GjfKkxqhnTPZvnyqvg8jYMVQmbsnUlvAyfRr3fh3g -zEnzuBW0KPPkNbMyL1Q3QU/8LVf4lQ37pI1887edJmlXtbEuh8QjTVDB/5oi7O5/ -2wxdGDTGIad4kXYG2vsuTVunZZq15BfMVyGkHoECgYEA9h1ROB6AfoxkykvQyJEb -1rOxQVz0tAgwzb25aThkSEXVZ6GgdZabgH4aArCGOEXrVt5hlDoDHC8ZEcyQ+yuF -+wFa2C6SorUkGnBJH9J9umWW+bOa5XigqgMHnpjM9yhNH34UnMSm+VarqczQhVx5 -QqIsbCsT+hbAkhwAgJo64kkCgYEA9KqbQ8YTRMc58n3juX8PIFYrOXsUGhWPG2jo -YoiUXgHSZDvxAsp6AtU2jUXjzjTCaF+h4zhxND3FD2yBLRt/Xx/GYXzmDf+Wx68B -4G0ZW4a+huoIEhsM6WGs7oT/sQxluMFb6G/rOaZEWDNzhYtVGNZTxnxCsd4eWj1j -9zy6RrECgYEA4qWTAyxLxr6Bny58ogfH7Evk4723+AdG8mFS2ww8hbYR1fKpM0C0 -CXuXdnybzjzNgl0e3YMjFBRncNXDehrVspbH0yfokABitBpNrQmKEVq201NMRSB2 -TLqnjK1IrB+oDmVslAYhgqMHSUK9kOLdJLj2UdLF/dxwEN3KtKPTsEkCgYEAhPPU -rY6MV/qfDZvFTL6z3JGWqYStVsNSYcWvSiQH49G/n4JHJIocpT9xhnFtKlfXMNqO -4SeBtK7AT/JZe8aOf4WHyuARL5gtOlNqhKckeW0OScgRHK2gZY4TaAXT4ETpXe2M -4RE4VLp6Nye2ZeJiGr4VBi3uHDOkcMsdcHOKkfECgYEAwEizw5kfhQ79bl9SwPbl -euE0wxUyEu+1lNqqAr6ty+BtfGufOxupzejNKghdpgB/bmuK77G8ikbDh6Ya6pQ1 -++Oes8NSFNiKq7pZOpjOeXRRo/OncBFKRDOX/i4ARWeJ/ZvjYz1fPyQuQiylaeDx -IYDJ4/DyVeyPiVrSQKJ5YLk= ------END PRIVATE KEY----- diff --git a/internal/otel_collector/config/configtls/testdata/testCA.pem b/internal/otel_collector/config/configtls/testdata/testCA.pem deleted file mode 100644 index 0a986020542..00000000000 --- a/internal/otel_collector/config/configtls/testdata/testCA.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICBzCCAXCgAwIBAgIQNkTaUtOczDHvL2YT/kqScTANBgkqhkiG9w0BAQsFADAX -MRUwEwYDVQQKEwxqYWdlcnRyYWNpbmcwHhcNMTkwMjA4MDYyODAyWhcNMTkwMjA4 -MDcyODAyWjAXMRUwEwYDVQQKEwxqYWdlcnRyYWNpbmcwgZ8wDQYJKoZIhvcNAQEB -BQADgY0AMIGJAoGBAMcOLYflHGbqC1f7+tbnsdfcpd0rEuX65+ab0WzelAgvo988 -yD+j7LDLPIE8IPk/tfqaETZ8h0LRUUTn8F2rW/wgrl/G8Onz0utog38N0elfTifG -Mu7GJCr/+aYM5xbQMDj4Brb4vhnkJF8UBe49fWILhIltUcm1SeKqVX3d1FvpAgMB -AAGjVDBSMA4GA1UdDwEB/wQEAwICpDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNV -HRMBAf8EBTADAQH/MBoGA1UdEQQTMBGCCWxvY2FsaG9zdIcEfwAAATANBgkqhkiG -9w0BAQsFAAOBgQCreFjwpAn1HqJT812JOwoWKrt1NjOKGcz7pvIs1k3DfQVLH2aZ -iPKnCkzNgxMzQtwdgpAOXIAqXyNibvyOAv1C+3QSMLKbuPEHaIxlCuvl1suX/g25 -17x1o3Q64AnPCWOLpN2wjkfZqX7gZ84nsxpqb9Sbw1+2+kqX7dSZ3mfVxQ== ------END CERTIFICATE----- diff --git a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-exporter.yaml b/internal/otel_collector/config/configunmarshaler/testdata/duplicate-exporter.yaml deleted file mode 100644 index c1747ac8583..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-exporter.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter /exp : - exampleexporter/ exp: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-extension.yaml b/internal/otel_collector/config/configunmarshaler/testdata/duplicate-extension.yaml deleted file mode 100644 index 1b8706c20e1..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-extension.yaml +++ /dev/null @@ -1,3 +0,0 @@ -extensions: - exampleextension /ext : - exampleextension/ ext: diff --git a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-processor.yaml b/internal/otel_collector/config/configunmarshaler/testdata/duplicate-processor.yaml deleted file mode 100644 index 0871b540fd0..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-processor.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor/ proc: - exampleprocessor /proc : -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-receiver.yaml b/internal/otel_collector/config/configunmarshaler/testdata/duplicate-receiver.yaml deleted file mode 100644 index 4e00b5fe631..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-receiver.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver/ recv: - examplereceiver /recv : -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-section.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-section.yaml deleted file mode 100644 index fa5e0257b9a..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-section.yaml +++ /dev/null @@ -1,20 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: - unknown_section: exporter -extensions: - exampleextension: -service: - extensions: - - exampleextension - pipelines: - traces: - receivers: - - examplereceiver - processors: - - exampleprocessor - exporters: - - exampleexporter diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml deleted file mode 100644 index a965a9e9e20..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: - tests -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-type.yaml deleted file mode 100644 index 9f497c228e6..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-type.yaml +++ /dev/null @@ -1,12 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: - /custom: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml deleted file mode 100644 index 7361f28073b..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml +++ /dev/null @@ -1,14 +0,0 @@ -extensions: - exampleextension/: -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] \ No newline at end of file diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-sub-config.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-sub-config.yaml deleted file mode 100644 index 0859a71cfeb..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-sub-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -extensions: - exampleextension: - tests -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: -service: - extensions: [exampleextension] - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-type.yaml deleted file mode 100644 index 95bca7040e6..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-type.yaml +++ /dev/null @@ -1,14 +0,0 @@ -extensions: - /custom: -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] \ No newline at end of file diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-logs-level.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-logs-level.yaml deleted file mode 100644 index 5abba340943..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-logs-level.yaml +++ /dev/null @@ -1,19 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: -extensions: - exampleextension: -service: - telemetry: - logs: - level: "UNKNOWN" - extensions: [exampleextension] - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] - diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml deleted file mode 100644 index 1f4718a2d94..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: - -service: - pipelines: - metrics/: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-section.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-section.yaml deleted file mode 100644 index 760edb27db4..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-section.yaml +++ /dev/null @@ -1,20 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: -extensions: - exampleextension: -service: - extensions: - - exampleextension - pipelines: - traces: - receivers: - - examplereceiver - processors: - - exampleprocessor - exporters: - - exampleexporter - unknown_section: 1 diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-type.yaml deleted file mode 100644 index 889dd6b1b51..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-type.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: - -service: - pipelines: - /metrics: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml deleted file mode 100644 index 7b0fe077c32..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: - exampleprocessor/: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-sub-config.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-sub-config.yaml deleted file mode 100644 index 862fd86ab8e..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-sub-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: - tests -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-type.yaml deleted file mode 100644 index 69d87aac4bb..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-type.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: - /custom: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml deleted file mode 100644 index e2d74fd5e03..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: - examplereceiver/: -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml deleted file mode 100644 index 2fb171b21fe..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: - tests -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-type.yaml deleted file mode 100644 index 29ffaffac33..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-type.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: - /custom: -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-sequence-value.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-sequence-value.yaml deleted file mode 100644 index 7f7a0a385ee..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-sequence-value.yaml +++ /dev/null @@ -1,14 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: - examplereceiver: - some: config - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-service-extensions-section.yaml b/internal/otel_collector/config/configunmarshaler/testdata/invalid-service-extensions-section.yaml deleted file mode 100644 index 00b123c1931..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-service-extensions-section.yaml +++ /dev/null @@ -1,18 +0,0 @@ -extensions: - exampleextension: -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: - -service: - extensions: - exampleextension: - error: true - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/unknown-exporter-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/unknown-exporter-type.yaml deleted file mode 100644 index df98a241f30..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/unknown-exporter-type.yaml +++ /dev/null @@ -1,12 +0,0 @@ -receivers: - examplereceiver: -exporters: - nosuchexporter: -processors: - exampleprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/unknown-pipeline-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/unknown-pipeline-type.yaml deleted file mode 100644 index 7c88405a947..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/unknown-pipeline-type.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - exampleprocessor: -exporters: - exampleexporter: - -service: - pipelines: - wrongdatatype: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/unknown-processor-type.yaml b/internal/otel_collector/config/configunmarshaler/testdata/unknown-processor-type.yaml deleted file mode 100644 index 02230c9d565..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/unknown-processor-type.yaml +++ /dev/null @@ -1,12 +0,0 @@ -receivers: - examplereceiver: -exporters: - exampleexporter: -processors: - nosuchprocessor: -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/valid-config.yaml b/internal/otel_collector/config/configunmarshaler/testdata/valid-config.yaml deleted file mode 100644 index 1b753fdff69..00000000000 --- a/internal/otel_collector/config/configunmarshaler/testdata/valid-config.yaml +++ /dev/null @@ -1,43 +0,0 @@ -receivers: - examplereceiver: - examplereceiver/myreceiver: - endpoint: "localhost:12345" - extra: "some string" - -processors: - exampleprocessor: - -exporters: - exampleexporter/myexporter: - extra: "some export string 2" - exampleexporter: - -extensions: - exampleextension/0: - exampleextension/disabled: - extra: "not present in the service" - exampleextension/1: - extra: "some string" - -service: - telemetry: - logs: - level: "DEBUG" - development: true - encoding: "console" - disable_caller: true - disable_stacktrace: true - output_paths: ["stderr", "./output-logs"] - error_output_paths: ["stderr", "./error-output-logs"] - initial_fields: - field_key: "filed_value" - metrics: - level: "normal" - address: ":8081" - extensions: [exampleextension/0, exampleextension/1] - pipelines: - traces: - receivers: [examplereceiver] - processors: [exampleprocessor] - exporters: [exampleexporter] - diff --git a/internal/otel_collector/config/experimental/configsource/component.go b/internal/otel_collector/config/experimental/configsource/component.go index 9bb7945e569..459684675fc 100644 --- a/internal/otel_collector/config/experimental/configsource/component.go +++ b/internal/otel_collector/config/experimental/configsource/component.go @@ -18,7 +18,7 @@ import ( "context" "errors" - "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/confmap" ) // ErrSessionClosed is returned by WatchForUpdate functions when its parent Session @@ -54,7 +54,7 @@ type ConfigSource interface { // // The selector is a string that is required on all invocations, the params are optional. Each // implementation handles the generic params according to their requirements. - Retrieve(ctx context.Context, selector string, paramsConfigMap *config.Map) (Retrieved, error) + Retrieve(ctx context.Context, selector string, paramsConfigMap *confmap.Conf) (Retrieved, error) // Close signals that the configuration for which it was used to retrieve values is no longer in use // and the object should close and release any watchers that it may have created. diff --git a/internal/otel_collector/config/exporter.go b/internal/otel_collector/config/exporter.go index 3bba3874c99..c6e6e8d3836 100644 --- a/internal/otel_collector/config/exporter.go +++ b/internal/otel_collector/config/exporter.go @@ -13,6 +13,9 @@ // limitations under the License. package config // import "go.opentelemetry.io/collector/config" +import ( + "go.opentelemetry.io/collector/confmap" +) // Exporter is the configuration of a component.Exporter. Specific extensions must implement // this interface and must embed ExporterSettings struct or a struct that extends it. @@ -23,6 +26,13 @@ type Exporter interface { privateConfigExporter() } +// UnmarshalExporter helper function to unmarshal an Exporter config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalExporter(conf *confmap.Conf, cfg Exporter) error { + return unmarshal(conf, cfg) +} + // ExporterSettings defines common settings for a component.Exporter configuration. // Specific exporters can embed this struct and extend it with more fields if needed. // diff --git a/internal/otel_collector/config/extension.go b/internal/otel_collector/config/extension.go index 44d87c8d86b..7df771b1eac 100644 --- a/internal/otel_collector/config/extension.go +++ b/internal/otel_collector/config/extension.go @@ -13,6 +13,9 @@ // limitations under the License. package config // import "go.opentelemetry.io/collector/config" +import ( + "go.opentelemetry.io/collector/confmap" +) // Extension is the configuration of a component.Extension. Specific extensions must implement // this interface and must embed ExtensionSettings struct or a struct that extends it. @@ -23,6 +26,13 @@ type Extension interface { privateConfigExtension() } +// UnmarshalExtension helper function to unmarshal an Extension config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalExtension(conf *confmap.Conf, cfg Extension) error { + return unmarshal(conf, cfg) +} + // ExtensionSettings defines common settings for a component.Extension configuration. // Specific processors can embed this struct and extend it with more fields if needed. // diff --git a/internal/otel_collector/config/internal/configsource/manager.go b/internal/otel_collector/config/internal/configsource/manager.go index d2d5f53195b..f87becbd207 100644 --- a/internal/otel_collector/config/internal/configsource/manager.go +++ b/internal/otel_collector/config/internal/configsource/manager.go @@ -25,10 +25,10 @@ import ( "github.com/spf13/cast" "go.uber.org/multierr" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" - "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/experimental/configsource" + "go.opentelemetry.io/collector/confmap" ) const ( @@ -181,7 +181,7 @@ type Manager struct { // NewManager creates a new instance of a Manager to be used to inject data from // ConfigSource objects into a configuration and watch for updates on the injected // data. -func NewManager(_ *config.Map) (*Manager, error) { +func NewManager(_ *confmap.Conf) (*Manager, error) { // TODO: Config sources should be extracted for the config itself, need Factories for that. return &Manager{ @@ -190,18 +190,18 @@ func NewManager(_ *config.Map) (*Manager, error) { }, nil } -// Resolve inspects the given config.Map and resolves all config sources referenced -// in the configuration, returning a config.Map in which all env vars and config sources on +// Resolve inspects the given confmap.Conf and resolves all config sources referenced +// in the configuration, returning a confmap.Conf in which all env vars and config sources on // the given input config map are resolved to actual literal values of the env vars or config sources. // This method must be called only once per lifetime of a Manager object. -func (m *Manager) Resolve(ctx context.Context, configMap *config.Map) (*config.Map, error) { - res := config.NewMap() +func (m *Manager) Resolve(ctx context.Context, configMap *confmap.Conf) (*confmap.Conf, error) { + out := make(map[string]interface{}) allKeys := configMap.AllKeys() for _, k := range allKeys { if strings.HasPrefix(k, configSourcesKey) { // Remove everything under the config_sources section. The `config_sources` section // is read when loading the config sources used in the configuration, but it is not - // part of the resulting configuration returned via *config.Map. + // part of the resulting configuration returned via *confmap.Conf. continue } @@ -209,10 +209,10 @@ func (m *Manager) Resolve(ctx context.Context, configMap *config.Map) (*config.M if err != nil { return nil, err } - res.Set(k, value) + out[k] = value } - return res, nil + return confmap.NewFromStringMap(out), nil } // WatchForUpdate must watch for updates on any of the values retrieved from config sources @@ -285,7 +285,7 @@ func (m *Manager) Close(ctx context.Context) error { // parseConfigValue takes the value of a "config node" and process it recursively. The processing consists // in transforming invocations of config sources and/or environment variables into literal data that can be -// used directly from a `config.Map` object. +// used directly from a `confmap.Conf` object. func (m *Manager) parseConfigValue(ctx context.Context, value interface{}) (interface{}, error) { switch v := value.(type) { case string: @@ -509,11 +509,11 @@ func newErrUnknownConfigSource(cfgSrcName string) error { // parseCfgSrcInvocation parses the original string in the configuration that has a config source // retrieve operation and return its "logical components": the config source name, the selector, and -// a config.Map to be used in this invocation of the config source. See Test_parseCfgSrcInvocation +// a confmap.Conf to be used in this invocation of the config source. See Test_parseCfgSrcInvocation // for some examples of input and output. // The caller should check for error explicitly since it is possible for the // other values to have been partially set. -func parseCfgSrcInvocation(s string) (cfgSrcName, selector string, paramsConfigMap *config.Map, err error) { +func parseCfgSrcInvocation(s string) (cfgSrcName, selector string, paramsConfigMap *confmap.Conf, err error) { parts := strings.SplitN(s, string(configSourceNameDelimChar), 2) if len(parts) != 2 { err = fmt.Errorf("invalid config source syntax at %q, it must have at least the config source name and a selector", s) @@ -534,7 +534,7 @@ func parseCfgSrcInvocation(s string) (cfgSrcName, selector string, paramsConfigM if err = yaml.Unmarshal([]byte(parts[1]), &data); err != nil { return } - paramsConfigMap = config.NewMapFromStringMap(data) + paramsConfigMap = confmap.NewFromStringMap(data) } default: @@ -556,7 +556,7 @@ func parseCfgSrcInvocation(s string) (cfgSrcName, selector string, paramsConfigM return cfgSrcName, selector, paramsConfigMap, err } -func parseParamsAsURLQuery(s string) (*config.Map, error) { +func parseParamsAsURLQuery(s string) (*confmap.Conf, error) { values, err := url.ParseQuery(s) if err != nil { return nil, err @@ -587,7 +587,7 @@ func parseParamsAsURLQuery(s string) (*config.Map, error) { params[k] = elemSlice } } - return config.NewMapFromStringMap(params), err + return confmap.NewFromStringMap(params), err } // osExpandEnv replicate the internal behavior of os.ExpandEnv when handling env diff --git a/internal/otel_collector/config/config.go b/internal/otel_collector/config/moved_config.go similarity index 83% rename from internal/otel_collector/config/config.go rename to internal/otel_collector/config/moved_config.go index 4e595e8cb0b..c266f7e40b1 100644 --- a/internal/otel_collector/config/config.go +++ b/internal/otel_collector/config/moved_config.go @@ -17,6 +17,8 @@ package config // import "go.opentelemetry.io/collector/config" import ( "errors" "fmt" + + "go.opentelemetry.io/collector/service/telemetry" ) var ( @@ -26,6 +28,7 @@ var ( ) // Config defines the configuration for the various elements of collector or agent. +// Deprecated: [v0.52.0] Use service.Config type Config struct { // Receivers is a map of ComponentID to Receivers. Receivers map[ComponentID]Receiver @@ -147,19 +150,26 @@ func (cfg *Config) validateService() error { return nil } -// Type is the component type as it is used in the config. -type Type string +// Service defines the configurable components of the service. +// Deprecated: [v0.52.0] Use service.ConfigService +type Service struct { + // Telemetry is the configuration for collector's own telemetry. + Telemetry telemetry.Config `mapstructure:"telemetry"` + + // Extensions are the ordered list of extensions configured for the service. + Extensions []ComponentID `mapstructure:"extensions"` -// validatable defines the interface for the configuration validation. -type validatable interface { - // Validate validates the configuration and returns an error if invalid. - Validate() error + // Pipelines are the set of data pipelines configured for the service. + Pipelines map[ComponentID]*Pipeline `mapstructure:"pipelines"` } -// Unmarshallable defines an optional interface for custom configuration unmarshaling. -// A configuration struct can implement this interface to override the default unmarshaling. -type Unmarshallable interface { - // Unmarshal is a function that unmarshals a config.Map into the unmarshable struct in a custom way. - // The config.Map for this specific component may be nil or empty if no config available. - Unmarshal(component *Map) error +// Pipeline defines a single pipeline. +// Deprecated: [v0.52.0] Use service.ConfigServicePipeline +type Pipeline struct { + Receivers []ComponentID `mapstructure:"receivers"` + Processors []ComponentID `mapstructure:"processors"` + Exporters []ComponentID `mapstructure:"exporters"` } + +// Deprecated: [v0.52.0] will be removed soon. +type Pipelines = map[ComponentID]*Pipeline diff --git a/internal/otel_collector/config/processor.go b/internal/otel_collector/config/processor.go index 212ba32ac17..ba0a52aa2a6 100644 --- a/internal/otel_collector/config/processor.go +++ b/internal/otel_collector/config/processor.go @@ -13,6 +13,9 @@ // limitations under the License. package config // import "go.opentelemetry.io/collector/config" +import ( + "go.opentelemetry.io/collector/confmap" +) // Processor is the configuration of a component.Processor. Specific extensions must implement // this interface and must embed ProcessorSettings struct or a struct that extends it. @@ -23,6 +26,13 @@ type Processor interface { privateConfigProcessor() } +// UnmarshalProcessor helper function to unmarshal a Processor config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalProcessor(conf *confmap.Conf, cfg Processor) error { + return unmarshal(conf, cfg) +} + // ProcessorSettings defines common settings for a component.Processor configuration. // Specific processors can embed this struct and extend it with more fields if needed. // diff --git a/internal/otel_collector/config/receiver.go b/internal/otel_collector/config/receiver.go index 5935b78d59a..4080d2df572 100644 --- a/internal/otel_collector/config/receiver.go +++ b/internal/otel_collector/config/receiver.go @@ -13,6 +13,9 @@ // limitations under the License. package config // import "go.opentelemetry.io/collector/config" +import ( + "go.opentelemetry.io/collector/confmap" +) // Receiver is the configuration of a component.Receiver. Specific extensions must implement // this interface and must embed ReceiverSettings struct or a struct that extends it. @@ -23,6 +26,13 @@ type Receiver interface { privateConfigReceiver() } +// UnmarshalReceiver helper function to unmarshal a Receiver config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalReceiver(conf *confmap.Conf, cfg Receiver) error { + return unmarshal(conf, cfg) +} + // ReceiverSettings defines common settings for a component.Receiver configuration. // Specific receivers can embed this struct and extend it with more fields if needed. // diff --git a/internal/otel_collector/confmap/README.md b/internal/otel_collector/confmap/README.md new file mode 100644 index 00000000000..c6051429e90 --- /dev/null +++ b/internal/otel_collector/confmap/README.md @@ -0,0 +1,88 @@ +# High Level Design + +This document is work in progress. + +## Conf + +The [Conf](confmap.go) represents the raw configuration for a service (e.g. OpenTelemetry Collector). + +## Provider + +The [Provider](provider.go) provides configuration, and allows to watch/monitor for changes. Any `Provider` +has a `` associated with it, and will provide configs for `configURI` that follow the ":" format. +This format is compatible with the URI definition (see [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986)). +The `` MUST be always included in the `configURI`. The scheme for any `Provider` MUST be at least 2 +characters long to avoid conflicting with a driver-letter identifier as specified in +[file URI syntax](https://tools.ietf.org/id/draft-kerwin-file-scheme-07.html#syntax). + +## Converter + +The [Converter](converter.go) allows implementing conversion logic for the provided configuration. One of the most +common use-case is to migrate/transform the configuration after a backwards incompatible change. + +## Resolver + +The `Resolver` handles the use of multiple [Providers](#provider) and [Converters](#converter) +simplifying configuration parsing, monitoring for updates, and the overall life-cycle of the used config providers. +The `Resolver` provides two main functionalities: [Configuration Resolving](#configuration-resolving) and +[Watching for Updates](#watching-for-updates). + +### Configuration Resolving + +The `Resolver` receives as input a set of `Providers`, a list of `Converters`, and a list of configuration identifier +`configURI` that will be used to generate the resulting, or effective, configuration in the form of a `Conf`, +that can be used by code that is oblivious to the usage of `Providers` and `Converters`. + +```terminal + Resolver Provider + │ │ + Resolve │ │ +────────────────►│ │ + │ │ + ┌─ │ Retrieve │ + │ ├─────────────────────────►│ + │ │ │ + │ │◄─────────────────────────┤ + foreach │ │ │ + configURI │ ├───┐ │ + │ │ │Merge │ + │ │◄──┘ │ + └─ │ │ + │ Converter │ + │ │ │ + ┌─ │ Convert │ │ + │ ├───────────────►│ │ + foreach │ │ │ │ + Converter │ │◄───────────────┤ │ + └─ │ │ + │ │ +◄────────────────┤ │ + │ │ +``` + +The `Resolve` method proceeds in the following steps: + +1. Start with an empty "result" of `Conf` type. +2. For each config URI retrieves individual configurations, and merges it into the "result". +2. For each "Converter", call "Convert" for the "result". +4. Return the "result", aka effective, configuration. + +### Watching for Updates +After the configuration was processed, the `Resolver` can be used as a single point to watch for updates in the +configuration retrieved via the `Provider` used to retrieve the “initial” configuration and to generate the “effective” one. + +```terminal + Resolver Provider + │ │ + Watch │ │ +───────────►│ │ + │ │ + . . + . . + . . + │ onChange │ + │◄────────────────────┤ +◄───────────┤ │ +``` + +The `Resolver` does that by passing an `onChange` func to each `Provider.Retrieve` call and capturing all watch events. diff --git a/internal/otel_collector/confmap/confmap.go b/internal/otel_collector/confmap/confmap.go new file mode 100644 index 00000000000..6634534941d --- /dev/null +++ b/internal/otel_collector/confmap/confmap.go @@ -0,0 +1,210 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package confmap // import "go.opentelemetry.io/collector/confmap" + +import ( + "encoding" + "fmt" + "reflect" + + "github.com/knadh/koanf" + "github.com/knadh/koanf/maps" + "github.com/knadh/koanf/providers/confmap" + "github.com/mitchellh/mapstructure" +) + +const ( + // KeyDelimiter is used as the default key delimiter in the default koanf instance. + KeyDelimiter = "::" +) + +// New creates a new empty confmap.Conf instance. +func New() *Conf { + return &Conf{k: koanf.New(KeyDelimiter)} +} + +// NewFromStringMap creates a confmap.Conf from a map[string]interface{}. +func NewFromStringMap(data map[string]interface{}) *Conf { + p := New() + // Cannot return error because the koanf instance is empty. + _ = p.k.Load(confmap.Provider(data, KeyDelimiter), nil) + return p +} + +// Conf represents the raw configuration map for the OpenTelemetry Collector. +// The confmap.Conf can be unmarshalled into the Collector's config using the "service" package. +type Conf struct { + k *koanf.Koanf +} + +// AllKeys returns all keys holding a value, regardless of where they are set. +// Nested keys are returned with a KeyDelimiter separator. +func (l *Conf) AllKeys() []string { + return l.k.Keys() +} + +// Unmarshal unmarshalls the config into a struct. +// Tags on the fields of the structure must be properly set. +func (l *Conf) Unmarshal(rawVal interface{}) error { + decoder, err := mapstructure.NewDecoder(decoderConfig(rawVal)) + if err != nil { + return err + } + return decoder.Decode(l.ToStringMap()) +} + +// UnmarshalExact unmarshalls the config into a struct, erroring if a field is nonexistent. +func (l *Conf) UnmarshalExact(rawVal interface{}) error { + dc := decoderConfig(rawVal) + dc.ErrorUnused = true + decoder, err := mapstructure.NewDecoder(dc) + if err != nil { + return err + } + return decoder.Decode(l.ToStringMap()) +} + +// Get can retrieve any value given the key to use. +func (l *Conf) Get(key string) interface{} { + return l.k.Get(key) +} + +// IsSet checks to see if the key has been set in any of the data locations. +// IsSet is case-insensitive for a key. +func (l *Conf) IsSet(key string) bool { + return l.k.Exists(key) +} + +// Merge merges the input given configuration into the existing config. +// Note that the given map may be modified. +func (l *Conf) Merge(in *Conf) error { + return l.k.Merge(in.k) +} + +// Sub returns new Conf instance representing a sub-config of this instance. +// It returns an error is the sub-config is not a map[string]interface{} (use Get()), and an empty Map if none exists. +func (l *Conf) Sub(key string) (*Conf, error) { + // Code inspired by the koanf "Cut" func, but returns an error instead of empty map for unsupported sub-config type. + data := l.Get(key) + if data == nil { + return New(), nil + } + + if v, ok := data.(map[string]interface{}); ok { + return NewFromStringMap(v), nil + } + + return nil, fmt.Errorf("unexpected sub-config value kind for key:%s value:%v kind:%v)", key, data, reflect.TypeOf(data).Kind()) +} + +// ToStringMap creates a map[string]interface{} from a Parser. +func (l *Conf) ToStringMap() map[string]interface{} { + return maps.Unflatten(l.k.All(), KeyDelimiter) +} + +// decoderConfig returns a default mapstructure.DecoderConfig capable of parsing time.Duration +// and weakly converting config field values to primitive types. It also ensures that maps +// whose values are nil pointer structs resolved to the zero value of the target struct (see +// expandNilStructPointers). A decoder created from this mapstructure.DecoderConfig will decode +// its contents to the result argument. +func decoderConfig(result interface{}) *mapstructure.DecoderConfig { + return &mapstructure.DecoderConfig{ + Result: result, + Metadata: nil, + TagName: "mapstructure", + WeaklyTypedInput: true, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + expandNilStructPointersHookFunc(), + mapstructure.StringToSliceHookFunc(","), + mapKeyStringToMapKeyTextUnmarshalerHookFunc(), + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.TextUnmarshallerHookFunc(), + ), + } +} + +// In cases where a config has a mapping of something to a struct pointers +// we want nil values to resolve to a pointer to the zero value of the +// underlying struct just as we want nil values of a mapping of something +// to a struct to resolve to the zero value of that struct. +// +// e.g. given a config type: +// type Config struct { Thing *SomeStruct `mapstructure:"thing"` } +// +// and yaml of: +// config: +// thing: +// +// we want an unmarshaled Config to be equivalent to +// Config{Thing: &SomeStruct{}} instead of Config{Thing: nil} +func expandNilStructPointersHookFunc() mapstructure.DecodeHookFuncValue { + return func(from reflect.Value, to reflect.Value) (interface{}, error) { + // ensure we are dealing with map to map comparison + if from.Kind() == reflect.Map && to.Kind() == reflect.Map { + toElem := to.Type().Elem() + // ensure that map values are pointers to a struct + // (that may be nil and require manual setting w/ zero value) + if toElem.Kind() == reflect.Ptr && toElem.Elem().Kind() == reflect.Struct { + fromRange := from.MapRange() + for fromRange.Next() { + fromKey := fromRange.Key() + fromValue := fromRange.Value() + // ensure that we've run into a nil pointer instance + if fromValue.IsNil() { + newFromValue := reflect.New(toElem.Elem()) + from.SetMapIndex(fromKey, newFromValue) + } + } + } + } + return from.Interface(), nil + } +} + +// mapKeyStringToMapKeyTextUnmarshalerHookFunc returns a DecodeHookFuncType that checks that a conversion from +// map[string]interface{} to map[encoding.TextUnmarshaler]interface{} does not overwrite keys, +// when UnmarshalText produces equal elements from different strings (e.g. trims whitespaces). +// +// This is needed in combination with ComponentID, which may produce equal IDs for different strings, +// and an error needs to be returned in that case, otherwise the last equivalent ID overwrites the previous one. +func mapKeyStringToMapKeyTextUnmarshalerHookFunc() mapstructure.DecodeHookFuncType { + return func(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error) { + if f.Kind() != reflect.Map || f.Key().Kind() != reflect.String { + return data, nil + } + + if t.Kind() != reflect.Map { + return data, nil + } + + if _, ok := reflect.New(t.Key()).Interface().(encoding.TextUnmarshaler); !ok { + return data, nil + } + + m := reflect.MakeMap(reflect.MapOf(t.Key(), reflect.TypeOf(true))) + for k := range data.(map[string]interface{}) { + tKey := reflect.New(t.Key()) + if err := tKey.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(k)); err != nil { + return nil, err + } + + if m.MapIndex(reflect.Indirect(tKey)).IsValid() { + return nil, fmt.Errorf("duplicate name %q after unmarshaling %v", k, tKey) + } + m.SetMapIndex(reflect.Indirect(tKey), reflect.ValueOf(true)) + } + return data, nil + } +} diff --git a/internal/otel_collector/config/configunmarshaler/unmarshaler.go b/internal/otel_collector/confmap/confmaptest/configtest.go similarity index 55% rename from internal/otel_collector/config/configunmarshaler/unmarshaler.go rename to internal/otel_collector/confmap/confmaptest/configtest.go index 7c649e70440..4f9a52c98d2 100644 --- a/internal/otel_collector/config/configunmarshaler/unmarshaler.go +++ b/internal/otel_collector/confmap/confmaptest/configtest.go @@ -12,15 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configunmarshaler // import "go.opentelemetry.io/collector/config/configunmarshaler" +package confmaptest // import "go.opentelemetry.io/collector/confmap/confmaptest" import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" + "context" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/fileprovider" ) -// ConfigUnmarshaler is the interface that unmarshalls the collector configuration from the config.Map. -type ConfigUnmarshaler interface { - // Unmarshal the configuration from the given parser and factories. - Unmarshal(v *config.Map, factories component.Factories) (*config.Config, error) +// LoadConf loads a confmap.Conf from file, and does NOT validate the configuration. +func LoadConf(fileName string) (*confmap.Conf, error) { + ret, err := fileprovider.New().Retrieve(context.Background(), "file:"+fileName, nil) + if err != nil { + return nil, err + } + return ret.AsConf() } diff --git a/internal/otel_collector/receiver/receiverhelper/doc.go b/internal/otel_collector/confmap/confmaptest/doc.go similarity index 76% rename from internal/otel_collector/receiver/receiverhelper/doc.go rename to internal/otel_collector/confmap/confmaptest/doc.go index bf82d16d4d6..47e5938b427 100644 --- a/internal/otel_collector/receiver/receiverhelper/doc.go +++ b/internal/otel_collector/confmap/confmaptest/doc.go @@ -12,5 +12,5 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package receiverhelper contains utilities for receivers. -package receiverhelper // import "go.opentelemetry.io/collector/receiver/receiverhelper" +// Package confmaptest helps loading confmap.Conf to test packages implementing using the configuration. +package confmaptest // import "go.opentelemetry.io/collector/confmap/confmaptest" diff --git a/internal/otel_collector/confmap/confmaptest/testdata/simple.yaml b/internal/otel_collector/confmap/confmaptest/testdata/simple.yaml new file mode 100644 index 00000000000..116d9c5f15b --- /dev/null +++ b/internal/otel_collector/confmap/confmaptest/testdata/simple.yaml @@ -0,0 +1 @@ +floating: 3.14 diff --git a/internal/otel_collector/consumer/consumerhelper/doc.go b/internal/otel_collector/confmap/converter.go similarity index 59% rename from internal/otel_collector/consumer/consumerhelper/doc.go rename to internal/otel_collector/confmap/converter.go index 977dc8faea5..74ba0933566 100644 --- a/internal/otel_collector/consumer/consumerhelper/doc.go +++ b/internal/otel_collector/confmap/converter.go @@ -12,6 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package consumerhelper defines types and functions used to create consumer -// Logs, Metrics, and Traces. -package consumerhelper // import "go.opentelemetry.io/collector/consumer/consumerhelper" +package confmap // import "go.opentelemetry.io/collector/confmap" + +import ( + "context" +) + +// Converter is a converter interface for the confmap.Conf that allows distributions +// (in the future components as well) to build backwards compatible config converters. +type Converter interface { + // Convert applies the conversion logic to the given "conf". + Convert(ctx context.Context, conf *Conf) error +} diff --git a/internal/otel_collector/config/configmapprovider/expand.go b/internal/otel_collector/confmap/converter/expandconverter/expand.go similarity index 72% rename from internal/otel_collector/config/configmapprovider/expand.go rename to internal/otel_collector/confmap/converter/expandconverter/expand.go index 943428f3ece..f98100df361 100644 --- a/internal/otel_collector/config/configmapprovider/expand.go +++ b/internal/otel_collector/confmap/converter/expandconverter/expand.go @@ -12,25 +12,30 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" +package expandconverter // import "go.opentelemetry.io/collector/confmap/converter/expandconverter" import ( "context" "os" - "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/confmap" ) -// NewExpandConverter returns a service.ConfigMapConverterFunc, that expands all environment variables for a given config.Map. +type converter struct{} + +// New returns a confmap.Converter, that expands all environment variables for a given confmap.Conf. // // Notice: This API is experimental. -func NewExpandConverter() config.MapConverterFunc { - return func(_ context.Context, cfgMap *config.Map) error { - for _, k := range cfgMap.AllKeys() { - cfgMap.Set(k, expandStringValues(cfgMap.Get(k))) - } - return nil +func New() confmap.Converter { + return converter{} +} + +func (converter) Convert(_ context.Context, conf *confmap.Conf) error { + out := make(map[string]interface{}) + for _, k := range conf.AllKeys() { + out[k] = expandStringValues(conf.Get(k)) } + return conf.Merge(confmap.NewFromStringMap(out)) } func expandStringValues(value interface{}) interface{} { diff --git a/internal/otel_collector/config/configmapprovider/testdata/default-config.yaml b/internal/otel_collector/confmap/converter/expandconverter/testdata/default-config.yaml similarity index 100% rename from internal/otel_collector/config/configmapprovider/testdata/default-config.yaml rename to internal/otel_collector/confmap/converter/expandconverter/testdata/default-config.yaml diff --git a/internal/otel_collector/config/configmapprovider/testdata/expand-escaped-env.yaml b/internal/otel_collector/confmap/converter/expandconverter/testdata/expand-escaped-env.yaml similarity index 100% rename from internal/otel_collector/config/configmapprovider/testdata/expand-escaped-env.yaml rename to internal/otel_collector/confmap/converter/expandconverter/testdata/expand-escaped-env.yaml diff --git a/internal/otel_collector/config/configmapprovider/testdata/expand-with-all-env.yaml b/internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-all-env.yaml similarity index 100% rename from internal/otel_collector/config/configmapprovider/testdata/expand-with-all-env.yaml rename to internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-all-env.yaml diff --git a/internal/otel_collector/config/configmapprovider/testdata/expand-with-no-env.yaml b/internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-no-env.yaml similarity index 100% rename from internal/otel_collector/config/configmapprovider/testdata/expand-with-no-env.yaml rename to internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-no-env.yaml diff --git a/internal/otel_collector/config/configmapprovider/testdata/expand-with-partial-env.yaml b/internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-partial-env.yaml similarity index 100% rename from internal/otel_collector/config/configmapprovider/testdata/expand-with-partial-env.yaml rename to internal/otel_collector/confmap/converter/expandconverter/testdata/expand-with-partial-env.yaml diff --git a/internal/otel_collector/config/configmapprovider/properties.go b/internal/otel_collector/confmap/converter/overwritepropertiesconverter/properties.go similarity index 70% rename from internal/otel_collector/config/configmapprovider/properties.go rename to internal/otel_collector/confmap/converter/overwritepropertiesconverter/properties.go index af467f706f2..71f5532dd79 100644 --- a/internal/otel_collector/config/configmapprovider/properties.go +++ b/internal/otel_collector/confmap/converter/overwritepropertiesconverter/properties.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" +package overwritepropertiesconverter // import "go.opentelemetry.io/collector/confmap/converter/overwritepropertiesconverter" import ( "bytes" @@ -22,28 +22,30 @@ import ( "github.com/knadh/koanf/maps" "github.com/magiconair/properties" - "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/confmap" ) -// NewOverwritePropertiesConverter returns a service.ConfigMapConverterFunc, that overrides all the given properties into the +type converter struct { + properties []string +} + +// New returns a confmap.Converter, that overrides all the given properties into the // input map. // // Properties must follow the Java properties format, key-value list separated by equal sign with a "." // as key delimiter. // ["processors.batch.timeout=2s", "processors.batch/foo.timeout=3s"] -func NewOverwritePropertiesConverter(properties []string) config.MapConverterFunc { - return func(_ context.Context, cfgMap *config.Map) error { - return convert(properties, cfgMap) - } +func New(properties []string) confmap.Converter { + return &converter{properties: properties} } -func convert(propsStr []string, cfgMap *config.Map) error { - if len(propsStr) == 0 { +func (c *converter) Convert(_ context.Context, conf *confmap.Conf) error { + if len(c.properties) == 0 { return nil } b := &bytes.Buffer{} - for _, property := range propsStr { + for _, property := range c.properties { property = strings.TrimSpace(property) b.WriteString(property) b.WriteString("\n") @@ -63,5 +65,5 @@ func convert(propsStr []string, cfgMap *config.Map) error { } prop := maps.Unflatten(parsed, ".") - return cfgMap.Merge(config.NewMapFromStringMap(prop)) + return conf.Merge(confmap.NewFromStringMap(prop)) } diff --git a/internal/otel_collector/config/configmapprovider/provider.go b/internal/otel_collector/confmap/provider.go similarity index 54% rename from internal/otel_collector/config/configmapprovider/provider.go rename to internal/otel_collector/confmap/provider.go index e0a5d54947f..bb5ddd07c6c 100644 --- a/internal/otel_collector/config/configmapprovider/provider.go +++ b/internal/otel_collector/confmap/provider.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configmapprovider // import "go.opentelemetry.io/collector/config/configmapprovider" +package confmap // import "go.opentelemetry.io/collector/confmap" import ( "context" @@ -24,25 +24,23 @@ import ( // // The typical usage is the following: // -// r := mapProvider.Retrieve("file:/path/to/config") -// r.Get() -// // wait for onChange() to be called. +// r, err := provider.Retrieve("file:/path/to/config") +// // Use r.Map; wait for watcher to be called. // r.Close() -// r = mapProvider.Retrieve("file:/path/to/config") -// r.Get() -// // wait for onChange() to be called. +// r, err = provider.Retrieve("file:/path/to/config") +// // Use r.Map; wait for watcher to be called. // r.Close() -// // repeat Retrieve/Get/wait/Close cycle until it is time to shut down the Collector process. +// // repeat retrieve/wait/close cycle until it is time to shut down the Collector process. // // ... -// mapProvider.Shutdown() +// provider.Shutdown() type Provider interface { // Retrieve goes to the configuration source and retrieves the selected data which // contains the value to be injected in the configuration and the corresponding watcher that // will be used to monitor for updates of the retrieved value. // - // `location` must follow the ":" format. This format is compatible + // `uri` must follow the ":" format. This format is compatible // with the URI definition (see https://datatracker.ietf.org/doc/html/rfc3986). The "" - // must be always included in the `location`. The scheme supported by any provider MUST be at + // must be always included in the `uri`. The scheme supported by any provider MUST be at // least 2 characters long to avoid conflicting with a driver-letter identifier as specified // in https://tools.ietf.org/id/draft-kerwin-file-scheme-07.html#syntax. // @@ -54,7 +52,10 @@ type Provider interface { // // If ctx is cancelled should return immediately with an error. // Should never be called concurrently with itself or with Shutdown. - Retrieve(ctx context.Context, location string, watcher WatcherFunc) (Retrieved, error) + Retrieve(ctx context.Context, uri string, watcher WatcherFunc) (Retrieved, error) + + // Scheme returns the location scheme used by Retrieve. + Scheme() string // Shutdown signals that the configuration for which this Provider was used to // retrieve values is no longer in use and the Provider should close and release @@ -77,3 +78,54 @@ type ChangeEvent struct { // Any non-nil error indicates that there was a problem with watching the config changes. Error error } + +// Retrieved holds the result of a call to the Retrieve method of a Provider object. +type Retrieved struct { + conf *Conf + closeFunc CloseFunc +} + +type retrievedSettings struct { + closeFunc CloseFunc +} + +// RetrievedOption options to customize Retrieved values. +type RetrievedOption func(*retrievedSettings) + +// WithRetrievedClose overrides the default Retrieved.Close function. +// The default Retrieved.Close function does nothing and always returns nil. +func WithRetrievedClose(closeFunc CloseFunc) RetrievedOption { + return func(settings *retrievedSettings) { + settings.closeFunc = closeFunc + } +} + +// NewRetrieved returns a new Retrieved instance that contains the data from the raw deserialized config. +func NewRetrieved(rawConf map[string]interface{}, opts ...RetrievedOption) (Retrieved, error) { + set := retrievedSettings{} + for _, opt := range opts { + opt(&set) + } + return Retrieved{conf: NewFromStringMap(rawConf), closeFunc: set.closeFunc}, nil +} + +// AsConf returns the retrieved configuration parsed as a Conf. +func (r Retrieved) AsConf() (*Conf, error) { + return r.conf, nil +} + +// Close and release any watchers that Provider.Retrieve may have created. +// +// Should block until all resources are closed, and guarantee that `onChange` is not +// going to be called after it returns except when `ctx` is cancelled. +// +// Should never be called concurrently with itself. +func (r Retrieved) Close(ctx context.Context) error { + if r.closeFunc == nil { + return nil + } + return r.closeFunc(ctx) +} + +// CloseFunc a function equivalent to Retrieved.Close. +type CloseFunc func(context.Context) error diff --git a/internal/otel_collector/confmap/provider/envprovider/provider.go b/internal/otel_collector/confmap/provider/envprovider/provider.go new file mode 100644 index 00000000000..15e59d3c06d --- /dev/null +++ b/internal/otel_collector/confmap/provider/envprovider/provider.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package envprovider // import "go.opentelemetry.io/collector/confmap/provider/envprovider" + +import ( + "context" + "fmt" + "os" + "strings" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/internal" +) + +const schemeName = "env" + +type provider struct{} + +// New returns a new confmap.Provider that reads the configuration from the given environment variable. +// +// This Provider supports "env" scheme, and can be called with a selector: +// `env:NAME_OF_ENVIRONMENT_VARIABLE` +func New() confmap.Provider { + return &provider{} +} + +func (emp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (confmap.Retrieved, error) { + if !strings.HasPrefix(uri, schemeName+":") { + return confmap.Retrieved{}, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) + } + + return internal.NewRetrievedFromYAML([]byte(os.Getenv(uri[len(schemeName)+1:]))) +} + +func (*provider) Scheme() string { + return schemeName +} + +func (*provider) Shutdown(context.Context) error { + return nil +} diff --git a/internal/otel_collector/confmap/provider/fileprovider/provider.go b/internal/otel_collector/confmap/provider/fileprovider/provider.go new file mode 100644 index 00000000000..faac1fabeef --- /dev/null +++ b/internal/otel_collector/confmap/provider/fileprovider/provider.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package fileprovider // import "go.opentelemetry.io/collector/confmap/provider/fileprovider" + +import ( + "context" + "fmt" + "io/ioutil" + "path/filepath" + "strings" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/internal" +) + +const schemeName = "file" + +type provider struct{} + +// New returns a new confmap.Provider that reads the configuration from a file. +// +// This Provider supports "file" scheme, and can be called with a "uri" that follows: +// file-uri = "file:" local-path +// local-path = [ drive-letter ] file-path +// drive-letter = ALPHA ":" +// The "file-path" can be relative or absolute, and it can be any OS supported format. +// +// Examples: +// `file:path/to/file` - relative path (unix, windows) +// `file:/path/to/file` - absolute path (unix, windows) +// `file:c:/path/to/file` - absolute path including drive-letter (windows) +// `file:c:\path\to\file` - absolute path including drive-letter (windows) +func New() confmap.Provider { + return &provider{} +} + +func (fmp *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (confmap.Retrieved, error) { + if !strings.HasPrefix(uri, schemeName+":") { + return confmap.Retrieved{}, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) + } + + // Clean the path before using it. + content, err := ioutil.ReadFile(filepath.Clean(uri[len(schemeName)+1:])) + if err != nil { + return confmap.Retrieved{}, fmt.Errorf("unable to read the file %v: %w", uri, err) + } + + return internal.NewRetrievedFromYAML(content) +} + +func (*provider) Scheme() string { + return schemeName +} + +func (*provider) Shutdown(context.Context) error { + return nil +} diff --git a/internal/otel_collector/confmap/provider/fileprovider/testdata/default-config.yaml b/internal/otel_collector/confmap/provider/fileprovider/testdata/default-config.yaml new file mode 100644 index 00000000000..ee4ead5c11c --- /dev/null +++ b/internal/otel_collector/confmap/provider/fileprovider/testdata/default-config.yaml @@ -0,0 +1,5 @@ +processors: + batch: +exporters: + otlp: + endpoint: "localhost:4317" diff --git a/internal/otel_collector/confmap/provider/fileprovider/testdata/invalid-yaml.yaml b/internal/otel_collector/confmap/provider/fileprovider/testdata/invalid-yaml.yaml new file mode 100644 index 00000000000..848469f9a11 --- /dev/null +++ b/internal/otel_collector/confmap/provider/fileprovider/testdata/invalid-yaml.yaml @@ -0,0 +1 @@ +[invalid, \ No newline at end of file diff --git a/internal/otel_collector/confmap/provider/internal/provider.go b/internal/otel_collector/confmap/provider/internal/provider.go new file mode 100644 index 00000000000..e3f6776dbc5 --- /dev/null +++ b/internal/otel_collector/confmap/provider/internal/provider.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal // import "go.opentelemetry.io/collector/confmap/provider/internal" + +import ( + "gopkg.in/yaml.v3" + + "go.opentelemetry.io/collector/confmap" +) + +// NewRetrievedFromYAML returns a new Retrieved instance that contains the deserialized data from the yaml bytes. +// * yamlBytes the yaml bytes that will be deserialized. +// * opts specifies options associated with this Retrieved value, such as CloseFunc. +func NewRetrievedFromYAML(yamlBytes []byte, opts ...confmap.RetrievedOption) (confmap.Retrieved, error) { + var rawConf map[string]interface{} + if err := yaml.Unmarshal(yamlBytes, &rawConf); err != nil { + return confmap.Retrieved{}, err + } + return confmap.NewRetrieved(rawConf, opts...) +} diff --git a/internal/otel_collector/confmap/provider/yamlprovider/provider.go b/internal/otel_collector/confmap/provider/yamlprovider/provider.go new file mode 100644 index 00000000000..c45e42217e3 --- /dev/null +++ b/internal/otel_collector/confmap/provider/yamlprovider/provider.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package yamlprovider // import "go.opentelemetry.io/collector/confmap/provider/yamlprovider" + +import ( + "context" + "fmt" + "strings" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/internal" +) + +const schemeName = "yaml" + +type provider struct{} + +// New returns a new confmap.Provider that allows to provide yaml bytes. +// +// This Provider supports "yaml" scheme, and can be called with a "uri" that follows: +// bytes-uri = "yaml:" yaml-bytes +// +// Examples: +// `yaml:processors::batch::timeout: 2s` +// `yaml:processors::batch/foo::timeout: 3s` +func New() confmap.Provider { + return &provider{} +} + +func (s *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (confmap.Retrieved, error) { + if !strings.HasPrefix(uri, schemeName+":") { + return confmap.Retrieved{}, fmt.Errorf("%q uri is not supported by %q provider", uri, schemeName) + } + + return internal.NewRetrievedFromYAML([]byte(uri[len(schemeName)+1:])) +} + +func (*provider) Scheme() string { + return schemeName +} + +func (s *provider) Shutdown(context.Context) error { + return nil +} diff --git a/internal/otel_collector/confmap/resolver.go b/internal/otel_collector/confmap/resolver.go new file mode 100644 index 00000000000..96a7f419fba --- /dev/null +++ b/internal/otel_collector/confmap/resolver.go @@ -0,0 +1,189 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package confmap // import "go.opentelemetry.io/collector/confmap" + +import ( + "context" + "errors" + "fmt" + "regexp" + "strings" + "sync" + + "go.uber.org/multierr" +) + +// follows drive-letter specification: +// https://tools.ietf.org/id/draft-kerwin-file-scheme-07.html#syntax +var driverLetterRegexp = regexp.MustCompile("^[A-z]:") + +// Resolver resolves a configuration as a Conf. +type Resolver struct { + uris []string + providers map[string]Provider + converters []Converter + + sync.Mutex + closers []CloseFunc + watcher chan error +} + +// ResolverSettings are the settings to configure the behavior of the Resolver. +type ResolverSettings struct { + // URIs locations from where the Conf is retrieved, and merged in the given order. + // It is required to have at least one location. + URIs []string + + // Providers is a map of pairs . + // It is required to have at least one Provider. + Providers map[string]Provider + + // MapConverters is a slice of Converter. + Converters []Converter +} + +// NewResolver returns a new Resolver that resolves configuration from multiple URIs. +// +// To resolve a configuration the following steps will happen: +// 1. Retrieves individual configurations from all given "URIs", and merge them in the retrieve order. +// 2. Once the Conf is merged, apply the converters in the given order. +// +// After the configuration was resolved the `Resolver` can be used as a single point to watch for updates in +// the configuration data retrieved via the config providers used to process the "initial" configuration and to generate +// the "effective" one. The typical usage is the following: +// +// Resolver.Resolve(ctx) +// Resolver.Watch() // wait for an event. +// Resolver.Resolve(ctx) +// Resolver.Watch() // wait for an event. +// // repeat Resolve/Watch cycle until it is time to shut down the Collector process. +// Resolver.Shutdown(ctx) +// +// `uri` must follow the ":" format. This format is compatible with the URI definition +// (see https://datatracker.ietf.org/doc/html/rfc3986). An empty "" defaults to "file" schema. +func NewResolver(set ResolverSettings) (*Resolver, error) { + if len(set.URIs) == 0 { + return nil, errors.New("invalid map resolver config: no URIs") + } + + if len(set.Providers) == 0 { + return nil, errors.New("invalid map resolver config: no Providers") + } + + // Safe copy, ensures the slices and maps cannot be changed from the caller. + urisCopy := make([]string, len(set.URIs)) + copy(urisCopy, set.URIs) + providersCopy := make(map[string]Provider, len(set.Providers)) + for k, v := range set.Providers { + providersCopy[k] = v + } + convertersCopy := make([]Converter, len(set.Converters)) + copy(convertersCopy, set.Converters) + + return &Resolver{ + uris: urisCopy, + providers: providersCopy, + converters: convertersCopy, + watcher: make(chan error, 1), + }, nil +} + +// Resolve returns the configuration as a Conf, or error otherwise. +// +// Should never be called concurrently with itself, Watch or Shutdown. +func (mr *Resolver) Resolve(ctx context.Context) (*Conf, error) { + // First check if already an active watching, close that if any. + if err := mr.closeIfNeeded(ctx); err != nil { + return nil, fmt.Errorf("cannot close previous watch: %w", err) + } + + // Retrieves individual configurations from all URIs in the given order, and merge them in retMap. + retMap := New() + for _, uri := range mr.uris { + // For backwards compatibility: + // - empty url scheme means "file". + // - "^[A-z]:" also means "file" + scheme := "file" + if idx := strings.Index(uri, ":"); idx != -1 && !driverLetterRegexp.MatchString(uri) { + scheme = uri[:idx] + } else { + uri = scheme + ":" + uri + } + p, ok := mr.providers[scheme] + if !ok { + return nil, fmt.Errorf("scheme %q is not supported for uri %q", scheme, uri) + } + ret, err := p.Retrieve(ctx, uri, mr.onChange) + if err != nil { + return nil, err + } + retCfgMap, err := ret.AsConf() + if err != nil { + return nil, err + } + if err = retMap.Merge(retCfgMap); err != nil { + return nil, err + } + mr.closers = append(mr.closers, ret.Close) + } + + // Apply the converters in the given order. + for _, confConv := range mr.converters { + if err := confConv.Convert(ctx, retMap); err != nil { + return nil, fmt.Errorf("cannot convert the confmap.Conf: %w", err) + } + } + + return retMap, nil +} + +// Watch blocks until any configuration change was detected or an unrecoverable error +// happened during monitoring the configuration changes. +// +// Error is nil if the configuration is changed and needs to be re-fetched. Any non-nil +// error indicates that there was a problem with watching the configuration changes. +// +// Should never be called concurrently with itself or Get. +func (mr *Resolver) Watch() <-chan error { + return mr.watcher +} + +// Shutdown signals that the provider is no longer in use and the that should close +// and release any resources that it may have created. It terminates the Watch channel. +// +// Should never be called concurrently with itself or Get. +func (mr *Resolver) Shutdown(ctx context.Context) error { + close(mr.watcher) + + var errs error + errs = multierr.Append(errs, mr.closeIfNeeded(ctx)) + for _, p := range mr.providers { + errs = multierr.Append(errs, p.Shutdown(ctx)) + } + + return errs +} + +func (mr *Resolver) onChange(event *ChangeEvent) { + mr.watcher <- event.Error +} + +func (mr *Resolver) closeIfNeeded(ctx context.Context) error { + var err error + for _, ret := range mr.closers { + err = multierr.Append(err, ret(ctx)) + } + return err +} diff --git a/internal/otel_collector/config/testdata/basic_types.yaml b/internal/otel_collector/confmap/testdata/basic_types.yaml similarity index 100% rename from internal/otel_collector/config/testdata/basic_types.yaml rename to internal/otel_collector/confmap/testdata/basic_types.yaml diff --git a/internal/otel_collector/config/testdata/config.yaml b/internal/otel_collector/confmap/testdata/config.yaml similarity index 100% rename from internal/otel_collector/config/testdata/config.yaml rename to internal/otel_collector/confmap/testdata/config.yaml diff --git a/internal/otel_collector/config/testdata/embedded_keys.yaml b/internal/otel_collector/confmap/testdata/embedded_keys.yaml similarity index 100% rename from internal/otel_collector/config/testdata/embedded_keys.yaml rename to internal/otel_collector/confmap/testdata/embedded_keys.yaml diff --git a/internal/otel_collector/consumer/consumer.go b/internal/otel_collector/consumer/consumer.go index 9d446f65aa6..ddfce62cdda 100644 --- a/internal/otel_collector/consumer/consumer.go +++ b/internal/otel_collector/consumer/consumer.go @@ -15,9 +15,7 @@ package consumer // import "go.opentelemetry.io/collector/consumer" import ( - "context" - - "go.opentelemetry.io/collector/model/pdata" + "errors" ) // Capabilities describes the capabilities of a Processor. @@ -34,26 +32,36 @@ type baseConsumer interface { Capabilities() Capabilities } -// Metrics is the new metrics consumer interface that receives pdata.Metrics, processes it -// as needed, and sends it to the next processing node if any or to the destination. -type Metrics interface { - baseConsumer - // ConsumeMetrics receives pdata.Metrics for consumption. - ConsumeMetrics(ctx context.Context, md pdata.Metrics) error +var errNilFunc = errors.New("nil consumer func") + +type baseImpl struct { + capabilities Capabilities } -// Traces is an interface that receives pdata.Traces, processes it -// as needed, and sends it to the next processing node if any or to the destination. -type Traces interface { - baseConsumer - // ConsumeTraces receives pdata.Traces for consumption. - ConsumeTraces(ctx context.Context, td pdata.Traces) error +// Option to construct new consumers. +type Option func(*baseImpl) + +// WithCapabilities overrides the default GetCapabilities function for a processor. +// The default GetCapabilities function returns mutable capabilities. +func WithCapabilities(capabilities Capabilities) Option { + return func(o *baseImpl) { + o.capabilities = capabilities + } } -// Logs is an interface that receives pdata.Logs, processes it -// as needed, and sends it to the next processing node if any or to the destination. -type Logs interface { - baseConsumer - // ConsumeLogs receives pdata.Logs for consumption. - ConsumeLogs(ctx context.Context, ld pdata.Logs) error +// Capabilities implementation of the base +func (bs baseImpl) Capabilities() Capabilities { + return bs.capabilities +} + +func newBaseImpl(options ...Option) *baseImpl { + bs := &baseImpl{ + capabilities: Capabilities{MutatesData: false}, + } + + for _, op := range options { + op(bs) + } + + return bs } diff --git a/internal/otel_collector/consumer/consumererror/signalerrors.go b/internal/otel_collector/consumer/consumererror/signalerrors.go index f8c7e5bd53d..c13a4abc9b6 100644 --- a/internal/otel_collector/consumer/consumererror/signalerrors.go +++ b/internal/otel_collector/consumer/consumererror/signalerrors.go @@ -15,18 +15,20 @@ package consumererror // import "go.opentelemetry.io/collector/consumer/consumererror" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) // Traces is an error that may carry associated Trace data for a subset of received data // that failed to be processed or sent. type Traces struct { error - failed pdata.Traces + failed ptrace.Traces } // NewTraces creates a Traces that can encapsulate received data that failed to be processed or sent. -func NewTraces(err error, failed pdata.Traces) error { +func NewTraces(err error, failed ptrace.Traces) error { return Traces{ error: err, failed: failed, @@ -34,7 +36,7 @@ func NewTraces(err error, failed pdata.Traces) error { } // GetTraces returns failed traces from the associated error. -func (err Traces) GetTraces() pdata.Traces { +func (err Traces) GetTraces() ptrace.Traces { return err.failed } @@ -47,11 +49,11 @@ func (err Traces) Unwrap() error { // that failed to be processed or sent. type Logs struct { error - failed pdata.Logs + failed plog.Logs } // NewLogs creates a Logs that can encapsulate received data that failed to be processed or sent. -func NewLogs(err error, failed pdata.Logs) error { +func NewLogs(err error, failed plog.Logs) error { return Logs{ error: err, failed: failed, @@ -59,7 +61,7 @@ func NewLogs(err error, failed pdata.Logs) error { } // GetLogs returns failed logs from the associated error. -func (err Logs) GetLogs() pdata.Logs { +func (err Logs) GetLogs() plog.Logs { return err.failed } @@ -72,11 +74,11 @@ func (err Logs) Unwrap() error { // that failed to be processed or sent. type Metrics struct { error - failed pdata.Metrics + failed pmetric.Metrics } // NewMetrics creates a Metrics that can encapsulate received data that failed to be processed or sent. -func NewMetrics(err error, failed pdata.Metrics) error { +func NewMetrics(err error, failed pmetric.Metrics) error { return Metrics{ error: err, failed: failed, @@ -84,7 +86,7 @@ func NewMetrics(err error, failed pdata.Metrics) error { } // GetMetrics returns failed metrics from the associated error. -func (err Metrics) GetMetrics() pdata.Metrics { +func (err Metrics) GetMetrics() pmetric.Metrics { return err.failed } diff --git a/internal/otel_collector/consumer/consumerhelper/common.go b/internal/otel_collector/consumer/consumerhelper/common.go deleted file mode 100644 index 8081e4826fe..00000000000 --- a/internal/otel_collector/consumer/consumerhelper/common.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package consumerhelper // import "go.opentelemetry.io/collector/consumer/consumerhelper" - -import ( - "errors" - - "go.opentelemetry.io/collector/consumer" -) - -var errNilFunc = errors.New("nil consumer func") - -type baseConsumer struct { - capabilities consumer.Capabilities -} - -// Option applies changes to internalOptions. -type Option func(*baseConsumer) - -// WithCapabilities overrides the default GetCapabilities function for a processor. -// The default GetCapabilities function returns mutable capabilities. -func WithCapabilities(capabilities consumer.Capabilities) Option { - return func(o *baseConsumer) { - o.capabilities = capabilities - } -} - -// Capabilities implementation of the base Consumer. -func (bs baseConsumer) Capabilities() consumer.Capabilities { - return bs.capabilities -} - -func newBaseConsumer(options ...Option) *baseConsumer { - bs := &baseConsumer{ - capabilities: consumer.Capabilities{MutatesData: false}, - } - - for _, op := range options { - op(bs) - } - - return bs -} diff --git a/internal/otel_collector/consumer/consumertest/consumer.go b/internal/otel_collector/consumer/consumertest/consumer.go index a9cee267436..a50e52b5b55 100644 --- a/internal/otel_collector/consumer/consumertest/consumer.go +++ b/internal/otel_collector/consumer/consumertest/consumer.go @@ -18,7 +18,9 @@ import ( "context" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) // Consumer is a convenience interface that implements all consumer interfaces. @@ -29,11 +31,11 @@ type Consumer interface { // Capabilities to implement the base consumer functionality. Capabilities() consumer.Capabilities // ConsumeTraces to implement the consumer.Traces. - ConsumeTraces(context.Context, pdata.Traces) error + ConsumeTraces(context.Context, ptrace.Traces) error // ConsumeMetrics to implement the consumer.Metrics. - ConsumeMetrics(context.Context, pdata.Metrics) error + ConsumeMetrics(context.Context, pmetric.Metrics) error // ConsumeLogs to implement the consumer.Logs. - ConsumeLogs(context.Context, pdata.Logs) error + ConsumeLogs(context.Context, plog.Logs) error unexported() } diff --git a/internal/otel_collector/consumer/consumertest/err.go b/internal/otel_collector/consumer/consumertest/err.go index dc0cf989cc1..0d5eadf6fc7 100644 --- a/internal/otel_collector/consumer/consumertest/err.go +++ b/internal/otel_collector/consumer/consumertest/err.go @@ -17,7 +17,9 @@ package consumertest // import "go.opentelemetry.io/collector/consumer/consumert import ( "context" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) type errConsumer struct { @@ -27,15 +29,15 @@ type errConsumer struct { func (er *errConsumer) unexported() {} -func (er *errConsumer) ConsumeTraces(context.Context, pdata.Traces) error { +func (er *errConsumer) ConsumeTraces(context.Context, ptrace.Traces) error { return er.err } -func (er *errConsumer) ConsumeMetrics(context.Context, pdata.Metrics) error { +func (er *errConsumer) ConsumeMetrics(context.Context, pmetric.Metrics) error { return er.err } -func (er *errConsumer) ConsumeLogs(context.Context, pdata.Logs) error { +func (er *errConsumer) ConsumeLogs(context.Context, plog.Logs) error { return er.err } diff --git a/internal/otel_collector/consumer/consumertest/nop.go b/internal/otel_collector/consumer/consumertest/nop.go index f48123677ca..d0c8f0ad220 100644 --- a/internal/otel_collector/consumer/consumertest/nop.go +++ b/internal/otel_collector/consumer/consumertest/nop.go @@ -17,7 +17,9 @@ package consumertest // import "go.opentelemetry.io/collector/consumer/consumert import ( "context" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) var ( @@ -30,15 +32,15 @@ type nopConsumer struct { func (nc *nopConsumer) unexported() {} -func (nc *nopConsumer) ConsumeTraces(context.Context, pdata.Traces) error { +func (nc *nopConsumer) ConsumeTraces(context.Context, ptrace.Traces) error { return nil } -func (nc *nopConsumer) ConsumeMetrics(context.Context, pdata.Metrics) error { +func (nc *nopConsumer) ConsumeMetrics(context.Context, pmetric.Metrics) error { return nil } -func (nc *nopConsumer) ConsumeLogs(context.Context, pdata.Logs) error { +func (nc *nopConsumer) ConsumeLogs(context.Context, plog.Logs) error { return nil } diff --git a/internal/otel_collector/consumer/consumertest/sink.go b/internal/otel_collector/consumer/consumertest/sink.go index d9a23602222..ed97bff5386 100644 --- a/internal/otel_collector/consumer/consumertest/sink.go +++ b/internal/otel_collector/consumer/consumertest/sink.go @@ -19,7 +19,9 @@ import ( "sync" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) // TracesSink is a consumer.Traces that acts like a sink that @@ -27,14 +29,14 @@ import ( type TracesSink struct { nonMutatingConsumer mu sync.Mutex - traces []pdata.Traces + traces []ptrace.Traces spanCount int } var _ consumer.Traces = (*TracesSink)(nil) // ConsumeTraces stores traces to this sink. -func (ste *TracesSink) ConsumeTraces(_ context.Context, td pdata.Traces) error { +func (ste *TracesSink) ConsumeTraces(_ context.Context, td ptrace.Traces) error { ste.mu.Lock() defer ste.mu.Unlock() @@ -45,11 +47,11 @@ func (ste *TracesSink) ConsumeTraces(_ context.Context, td pdata.Traces) error { } // AllTraces returns the traces stored by this sink since last Reset. -func (ste *TracesSink) AllTraces() []pdata.Traces { +func (ste *TracesSink) AllTraces() []ptrace.Traces { ste.mu.Lock() defer ste.mu.Unlock() - copyTraces := make([]pdata.Traces, len(ste.traces)) + copyTraces := make([]ptrace.Traces, len(ste.traces)) copy(copyTraces, ste.traces) return copyTraces } @@ -75,14 +77,14 @@ func (ste *TracesSink) Reset() { type MetricsSink struct { nonMutatingConsumer mu sync.Mutex - metrics []pdata.Metrics + metrics []pmetric.Metrics dataPointCount int } var _ consumer.Metrics = (*MetricsSink)(nil) // ConsumeMetrics stores metrics to this sink. -func (sme *MetricsSink) ConsumeMetrics(_ context.Context, md pdata.Metrics) error { +func (sme *MetricsSink) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { sme.mu.Lock() defer sme.mu.Unlock() @@ -93,11 +95,11 @@ func (sme *MetricsSink) ConsumeMetrics(_ context.Context, md pdata.Metrics) erro } // AllMetrics returns the metrics stored by this sink since last Reset. -func (sme *MetricsSink) AllMetrics() []pdata.Metrics { +func (sme *MetricsSink) AllMetrics() []pmetric.Metrics { sme.mu.Lock() defer sme.mu.Unlock() - copyMetrics := make([]pdata.Metrics, len(sme.metrics)) + copyMetrics := make([]pmetric.Metrics, len(sme.metrics)) copy(copyMetrics, sme.metrics) return copyMetrics } @@ -123,14 +125,14 @@ func (sme *MetricsSink) Reset() { type LogsSink struct { nonMutatingConsumer mu sync.Mutex - logs []pdata.Logs + logs []plog.Logs logRecordCount int } var _ consumer.Logs = (*LogsSink)(nil) // ConsumeLogs stores logs to this sink. -func (sle *LogsSink) ConsumeLogs(_ context.Context, ld pdata.Logs) error { +func (sle *LogsSink) ConsumeLogs(_ context.Context, ld plog.Logs) error { sle.mu.Lock() defer sle.mu.Unlock() @@ -141,11 +143,11 @@ func (sle *LogsSink) ConsumeLogs(_ context.Context, ld pdata.Logs) error { } // AllLogs returns the logs stored by this sink since last Reset. -func (sle *LogsSink) AllLogs() []pdata.Logs { +func (sle *LogsSink) AllLogs() []plog.Logs { sle.mu.Lock() defer sle.mu.Unlock() - copyLogs := make([]pdata.Logs, len(sle.logs)) + copyLogs := make([]plog.Logs, len(sle.logs)) copy(copyLogs, sle.logs) return copyLogs } diff --git a/internal/otel_collector/consumer/consumerhelper/logs.go b/internal/otel_collector/consumer/logs.go similarity index 54% rename from internal/otel_collector/consumer/consumerhelper/logs.go rename to internal/otel_collector/consumer/logs.go index 898fa7e99cf..635fb785bd4 100644 --- a/internal/otel_collector/consumer/consumerhelper/logs.go +++ b/internal/otel_collector/consumer/logs.go @@ -12,35 +12,42 @@ // See the License for the specific language governing permissions and // limitations under the License. -package consumerhelper // import "go.opentelemetry.io/collector/consumer/consumerhelper" +package consumer // import "go.opentelemetry.io/collector/consumer" import ( "context" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) +// Logs is an interface that receives plog.Logs, processes it +// as needed, and sends it to the next processing node if any or to the destination. +type Logs interface { + baseConsumer + // ConsumeLogs receives plog.Logs for consumption. + ConsumeLogs(ctx context.Context, ld plog.Logs) error +} + // ConsumeLogsFunc is a helper function that is similar to ConsumeLogs. -type ConsumeLogsFunc func(ctx context.Context, ld pdata.Logs) error +type ConsumeLogsFunc func(ctx context.Context, ld plog.Logs) error // ConsumeLogs calls f(ctx, ld). -func (f ConsumeLogsFunc) ConsumeLogs(ctx context.Context, ld pdata.Logs) error { +func (f ConsumeLogsFunc) ConsumeLogs(ctx context.Context, ld plog.Logs) error { return f(ctx, ld) } type baseLogs struct { - *baseConsumer + *baseImpl ConsumeLogsFunc } -// NewLogs returns a consumer.Logs configured with the provided options. -func NewLogs(consume ConsumeLogsFunc, options ...Option) (consumer.Logs, error) { +// NewLogs returns a Logs configured with the provided options. +func NewLogs(consume ConsumeLogsFunc, options ...Option) (Logs, error) { if consume == nil { return nil, errNilFunc } return &baseLogs{ - baseConsumer: newBaseConsumer(options...), + baseImpl: newBaseImpl(options...), ConsumeLogsFunc: consume, }, nil } diff --git a/internal/otel_collector/consumer/consumerhelper/metrics.go b/internal/otel_collector/consumer/metrics.go similarity index 59% rename from internal/otel_collector/consumer/consumerhelper/metrics.go rename to internal/otel_collector/consumer/metrics.go index 4bbd35607d8..4b96a73142f 100644 --- a/internal/otel_collector/consumer/consumerhelper/metrics.go +++ b/internal/otel_collector/consumer/metrics.go @@ -12,35 +12,42 @@ // See the License for the specific language governing permissions and // limitations under the License. -package consumerhelper // import "go.opentelemetry.io/collector/consumer/consumerhelper" +package consumer // import "go.opentelemetry.io/collector/consumer" import ( "context" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) +// Metrics is the new metrics consumer interface that receives pmetric.Metrics, processes it +// as needed, and sends it to the next processing node if any or to the destination. +type Metrics interface { + baseConsumer + // ConsumeMetrics receives pmetric.Metrics for consumption. + ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error +} + // ConsumeMetricsFunc is a helper function that is similar to ConsumeMetrics. -type ConsumeMetricsFunc func(ctx context.Context, ld pdata.Metrics) error +type ConsumeMetricsFunc func(ctx context.Context, ld pmetric.Metrics) error // ConsumeMetrics calls f(ctx, ld). -func (f ConsumeMetricsFunc) ConsumeMetrics(ctx context.Context, ld pdata.Metrics) error { +func (f ConsumeMetricsFunc) ConsumeMetrics(ctx context.Context, ld pmetric.Metrics) error { return f(ctx, ld) } type baseMetrics struct { - *baseConsumer + *baseImpl ConsumeMetricsFunc } -// NewMetrics returns a consumer.Metrics configured with the provided options. -func NewMetrics(consume ConsumeMetricsFunc, options ...Option) (consumer.Metrics, error) { +// NewMetrics returns a Metrics configured with the provided options. +func NewMetrics(consume ConsumeMetricsFunc, options ...Option) (Metrics, error) { if consume == nil { return nil, errNilFunc } return &baseMetrics{ - baseConsumer: newBaseConsumer(options...), + baseImpl: newBaseImpl(options...), ConsumeMetricsFunc: consume, }, nil } diff --git a/internal/otel_collector/consumer/consumerhelper/traces.go b/internal/otel_collector/consumer/traces.go similarity index 57% rename from internal/otel_collector/consumer/consumerhelper/traces.go rename to internal/otel_collector/consumer/traces.go index d71f5a5606d..8efd0302cc9 100644 --- a/internal/otel_collector/consumer/consumerhelper/traces.go +++ b/internal/otel_collector/consumer/traces.go @@ -12,35 +12,42 @@ // See the License for the specific language governing permissions and // limitations under the License. -package consumerhelper // import "go.opentelemetry.io/collector/consumer/consumerhelper" +package consumer // import "go.opentelemetry.io/collector/consumer" import ( "context" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) +// Traces is an interface that receives ptrace.Traces, processes it +// as needed, and sends it to the next processing node if any or to the destination. +type Traces interface { + baseConsumer + // ConsumeTraces receives ptrace.Traces for consumption. + ConsumeTraces(ctx context.Context, td ptrace.Traces) error +} + // ConsumeTracesFunc is a helper function that is similar to ConsumeTraces. -type ConsumeTracesFunc func(ctx context.Context, ld pdata.Traces) error +type ConsumeTracesFunc func(ctx context.Context, ld ptrace.Traces) error // ConsumeTraces calls f(ctx, ld). -func (f ConsumeTracesFunc) ConsumeTraces(ctx context.Context, ld pdata.Traces) error { +func (f ConsumeTracesFunc) ConsumeTraces(ctx context.Context, ld ptrace.Traces) error { return f(ctx, ld) } type baseTraces struct { - *baseConsumer + *baseImpl ConsumeTracesFunc } -// NewTraces returns a consumer.Traces configured with the provided options. -func NewTraces(consume ConsumeTracesFunc, options ...Option) (consumer.Traces, error) { +// NewTraces returns a Traces configured with the provided options. +func NewTraces(consume ConsumeTracesFunc, options ...Option) (Traces, error) { if consume == nil { return nil, errNilFunc } return &baseTraces{ - baseConsumer: newBaseConsumer(options...), + baseImpl: newBaseImpl(options...), ConsumeTracesFunc: consume, }, nil } diff --git a/internal/otel_collector/examples/k8s/otel-config.yaml b/internal/otel_collector/examples/k8s/otel-config.yaml index 8fc592a6a3b..59141db5e74 100644 --- a/internal/otel_collector/examples/k8s/otel-config.yaml +++ b/internal/otel_collector/examples/k8s/otel-config.yaml @@ -66,7 +66,7 @@ spec: - command: - "/otelcol" - "--config=/conf/otel-agent-config.yaml" - image: otel/opentelemetry-collector:0.38.0 + image: otel/opentelemetry-collector:0.56.0 name: otel-agent resources: limits: @@ -177,7 +177,7 @@ spec: - command: - "/otelcol" - "--config=/conf/otel-collector-config.yaml" - image: otel/opentelemetry-collector:0.38.0 + image: otel/opentelemetry-collector:0.56.0 name: otel-collector resources: limits: diff --git a/internal/otel_collector/examples/local/otel-config.yaml b/internal/otel_collector/examples/local/otel-config.yaml index 35bba1ba5c6..c6a64d70310 100644 --- a/internal/otel_collector/examples/local/otel-config.yaml +++ b/internal/otel_collector/examples/local/otel-config.yaml @@ -21,7 +21,7 @@ processors: exporters: logging: - logLevel: debug + loglevel: debug service: pipelines: diff --git a/internal/otel_collector/exporter/README.md b/internal/otel_collector/exporter/README.md index dd45611588f..d18adb887d4 100644 --- a/internal/otel_collector/exporter/README.md +++ b/internal/otel_collector/exporter/README.md @@ -78,8 +78,10 @@ service: ## Data Ownership When multiple exporters are configured to send the same data (e.g. by configuring multiple -exporters for the same pipeline) the exporters will have a shared access to the data. -Exporters get access to this shared data when `ConsumeTraces`/`ConsumeMetrics`/`ConsumeLogs` +exporters for the same pipeline): +* exporters *not* configured to mutate the data will have shared access to the data +* exporters with the Capabilities to mutate the data will receive a copy of the data +Exporters access export data when `ConsumeTraces`/`ConsumeMetrics`/`ConsumeLogs` function is called. Exporters MUST NOT modify the `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` argument of these functions. If the exporter needs to modify the data while performing the exporting the exporter can clone the data and perform the modification on the clone or use a @@ -97,4 +99,4 @@ following proxy environment variables: - NO_PROXY If set at Collector start time then exporters, regardless of protocol, -will or will not proxy traffic as defined by these environment variables. +will or will not proxy traffic as defined by these environment variables. \ No newline at end of file diff --git a/internal/otel_collector/exporter/exporterhelper/README.md b/internal/otel_collector/exporter/exporterhelper/README.md index b27485d3a0c..51bd4383096 100644 --- a/internal/otel_collector/exporter/exporterhelper/README.md +++ b/internal/otel_collector/exporter/exporterhelper/README.md @@ -18,14 +18,13 @@ The following configuration options can be modified: - `enabled` (default = true) - `num_consumers` (default = 10): Number of consumers that dequeue batches; ignored if `enabled` is `false` - `queue_size` (default = 5000): Maximum number of batches kept in memory before dropping; ignored if `enabled` is `false` - User should calculate this as `num_seconds * requests_per_second` where: + User should calculate this as `num_seconds * requests_per_second / requests_per_batch` where: - `num_seconds` is the number of seconds to buffer in case of a backend outage - - `requests_per_second` is the average number of requests per seconds. -- `resource_to_telemetry_conversion` - - `enabled` (default = false): If `enabled` is `true`, all the resource attributes will be converted to metric labels by default. -- `timeout` (default = 5s): Time to wait per individual attempt to send data to a backend. - -The full list of settings exposed for this helper exporter are documented [here](factory.go). + - `requests_per_second` is the average number of requests per seconds + - `requests_per_batch` is the average number of requests per batch (if + [the batch processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) + is used, the metric `batch_send_size` can be used for estimation) +- `timeout` (default = 5s): Time to wait per individual attempt to send data to a backend ### Persistent Queue diff --git a/internal/otel_collector/exporter/exporterhelper/common.go b/internal/otel_collector/exporter/exporterhelper/common.go index 5a0580e40c8..c48af91c96b 100644 --- a/internal/otel_collector/exporter/exporterhelper/common.go +++ b/internal/otel_collector/exporter/exporterhelper/common.go @@ -19,10 +19,8 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerhelper" "go.opentelemetry.io/collector/exporter/exporterhelper/internal" "go.opentelemetry.io/collector/obsreport" ) @@ -33,8 +31,8 @@ type TimeoutSettings struct { Timeout time.Duration `mapstructure:"timeout"` } -// DefaultTimeoutSettings returns the default settings for TimeoutSettings. -func DefaultTimeoutSettings() TimeoutSettings { +// NewDefaultTimeoutSettings returns the default settings for TimeoutSettings. +func NewDefaultTimeoutSettings() TimeoutSettings { return TimeoutSettings{ Timeout: 5 * time.Second, } @@ -88,9 +86,9 @@ func (req *baseRequest) OnProcessingFinished() { // baseSettings represents all the options that users can configure. type baseSettings struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc - consumerOptions []consumerhelper.Option + component.StartFunc + component.ShutdownFunc + consumerOptions []consumer.Option TimeoutSettings QueueSettings RetrySettings @@ -100,7 +98,7 @@ type baseSettings struct { func fromOptions(options ...Option) *baseSettings { // Start from the default options: opts := &baseSettings{ - TimeoutSettings: DefaultTimeoutSettings(), + TimeoutSettings: NewDefaultTimeoutSettings(), // TODO: Enable queuing by default (call DefaultQueueSettings) QueueSettings: QueueSettings{Enabled: false}, // TODO: Enable retry by default (call DefaultRetrySettings) @@ -119,7 +117,7 @@ type Option func(*baseSettings) // WithStart overrides the default Start function for an exporter. // The default start function does nothing and always returns nil. -func WithStart(start componenthelper.StartFunc) Option { +func WithStart(start component.StartFunc) Option { return func(o *baseSettings) { o.StartFunc = start } @@ -127,7 +125,7 @@ func WithStart(start componenthelper.StartFunc) Option { // WithShutdown overrides the default Shutdown function for an exporter. // The default shutdown function does nothing and always returns nil. -func WithShutdown(shutdown componenthelper.ShutdownFunc) Option { +func WithShutdown(shutdown component.ShutdownFunc) Option { return func(o *baseSettings) { o.ShutdownFunc = shutdown } @@ -162,14 +160,14 @@ func WithQueue(queueSettings QueueSettings) Option { // TODO: Verify if we can change the default to be mutable as we do for processors. func WithCapabilities(capabilities consumer.Capabilities) Option { return func(o *baseSettings) { - o.consumerOptions = append(o.consumerOptions, consumerhelper.WithCapabilities(capabilities)) + o.consumerOptions = append(o.consumerOptions, consumer.WithCapabilities(capabilities)) } } // baseExporter contains common fields between different exporter types. type baseExporter struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc obsrep *obsExporter sender requestSender qrSender *queuedRetrySender diff --git a/internal/otel_collector/exporter/exporterhelper/factory.go b/internal/otel_collector/exporter/exporterhelper/factory.go deleted file mode 100644 index b68166c375e..00000000000 --- a/internal/otel_collector/exporter/exporterhelper/factory.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/internal/internalinterface" -) - -// FactoryOption apply changes to ExporterOptions. -type FactoryOption func(o *factory) - -// CreateDefaultConfig is the equivalent of component.ExporterFactory.CreateDefaultConfig() -type CreateDefaultConfig func() config.Exporter - -// CreateTracesExporter is the equivalent of component.ExporterFactory.CreateTracesExporter() -type CreateTracesExporter func(context.Context, component.ExporterCreateSettings, config.Exporter) (component.TracesExporter, error) - -// CreateMetricsExporter is the equivalent of component.ExporterFactory.CreateMetricsExporter() -type CreateMetricsExporter func(context.Context, component.ExporterCreateSettings, config.Exporter) (component.MetricsExporter, error) - -// CreateLogsExporter is the equivalent of component.ExporterFactory.CreateLogsExporter() -type CreateLogsExporter func(context.Context, component.ExporterCreateSettings, config.Exporter) (component.LogsExporter, error) - -type factory struct { - internalinterface.BaseInternal - cfgType config.Type - createDefaultConfig CreateDefaultConfig - createTracesExporter CreateTracesExporter - createMetricsExporter CreateMetricsExporter - createLogsExporter CreateLogsExporter -} - -// WithTraces overrides the default "error not supported" implementation for CreateTracesReceiver. -func WithTraces(createTracesExporter CreateTracesExporter) FactoryOption { - return func(o *factory) { - o.createTracesExporter = createTracesExporter - } -} - -// WithMetrics overrides the default "error not supported" implementation for CreateMetricsReceiver. -func WithMetrics(createMetricsExporter CreateMetricsExporter) FactoryOption { - return func(o *factory) { - o.createMetricsExporter = createMetricsExporter - } -} - -// WithLogs overrides the default "error not supported" implementation for CreateLogsReceiver. -func WithLogs(createLogsExporter CreateLogsExporter) FactoryOption { - return func(o *factory) { - o.createLogsExporter = createLogsExporter - } -} - -// NewFactory returns a component.ExporterFactory. -func NewFactory( - cfgType config.Type, - createDefaultConfig CreateDefaultConfig, - options ...FactoryOption) component.ExporterFactory { - f := &factory{ - cfgType: cfgType, - createDefaultConfig: createDefaultConfig, - } - for _, opt := range options { - opt(f) - } - return f -} - -// Type gets the type of the Exporter config created by this factory. -func (f *factory) Type() config.Type { - return f.cfgType -} - -// CreateDefaultConfig creates the default configuration for processor. -func (f *factory) CreateDefaultConfig() config.Exporter { - return f.createDefaultConfig() -} - -// CreateTracesExporter creates a component.TracesExporter based on this config. -func (f *factory) CreateTracesExporter( - ctx context.Context, - set component.ExporterCreateSettings, - cfg config.Exporter) (component.TracesExporter, error) { - if f.createTracesExporter != nil { - return f.createTracesExporter(ctx, set, cfg) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} - -// CreateMetricsExporter creates a component.MetricsExporter based on this config. -func (f *factory) CreateMetricsExporter( - ctx context.Context, - set component.ExporterCreateSettings, - cfg config.Exporter) (component.MetricsExporter, error) { - if f.createMetricsExporter != nil { - return f.createMetricsExporter(ctx, set, cfg) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} - -// CreateLogsExporter creates a metrics processor based on this config. -func (f *factory) CreateLogsExporter( - ctx context.Context, - set component.ExporterCreateSettings, - cfg config.Exporter, -) (component.LogsExporter, error) { - if f.createLogsExporter != nil { - return f.createLogsExporter(ctx, set, cfg) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} diff --git a/internal/otel_collector/exporter/exporterhelper/internal/bounded_memory_queue.go b/internal/otel_collector/exporter/exporterhelper/internal/bounded_memory_queue.go index 7586ffffe95..654ec373041 100644 --- a/internal/otel_collector/exporter/exporterhelper/internal/bounded_memory_queue.go +++ b/internal/otel_collector/exporter/exporterhelper/internal/bounded_memory_queue.go @@ -19,7 +19,7 @@ package internal // import "go.opentelemetry.io/collector/exporter/exporterhelpe import ( "sync" - uatomic "go.uber.org/atomic" + "go.uber.org/atomic" ) // boundedMemoryQueue implements a producer-consumer exchange similar to a ring buffer queue, @@ -28,62 +28,45 @@ import ( // channels, with a special Reaper goroutine that wakes up when the queue is full and consumers // the items from the top of the queue until its size drops back to maxSize type boundedMemoryQueue struct { - workers int stopWG sync.WaitGroup - size *uatomic.Uint32 - capacity *uatomic.Uint32 - stopped *uatomic.Uint32 - items *chan interface{} + size *atomic.Uint32 + stopped *atomic.Bool + items chan interface{} onDroppedItem func(item interface{}) factory func() consumer - stopCh chan struct{} + capacity uint32 } // NewBoundedMemoryQueue constructs the new queue of specified capacity, and with an optional // callback for dropped items (e.g. useful to emit metrics). func NewBoundedMemoryQueue(capacity int, onDroppedItem func(item interface{})) ProducerConsumerQueue { - queue := make(chan interface{}, capacity) return &boundedMemoryQueue{ onDroppedItem: onDroppedItem, - items: &queue, - stopCh: make(chan struct{}), - capacity: uatomic.NewUint32(uint32(capacity)), - stopped: uatomic.NewUint32(0), - size: uatomic.NewUint32(0), + items: make(chan interface{}, capacity), + stopped: atomic.NewBool(false), + size: atomic.NewUint32(0), + capacity: uint32(capacity), } } // StartConsumers starts a given number of goroutines consuming items from the queue // and passing them into the consumer callback. -func (q *boundedMemoryQueue) StartConsumers(num int, callback func(item interface{})) { +func (q *boundedMemoryQueue) StartConsumers(numWorkers int, callback func(item interface{})) { factory := func() consumer { return consumerFunc(callback) } - q.workers = num q.factory = factory var startWG sync.WaitGroup - for i := 0; i < q.workers; i++ { + for i := 0; i < numWorkers; i++ { q.stopWG.Add(1) startWG.Add(1) go func() { startWG.Done() defer q.stopWG.Done() itemConsumer := q.factory() - queue := *q.items - for { - select { - case item, ok := <-queue: - if ok { - q.size.Sub(1) - itemConsumer.consume(item) - } else { - // channel closed, finish worker - return - } - case <-q.stopCh: - // the whole queue is closing, finish worker - return - } + for item := range q.items { + q.size.Sub(1) + itemConsumer.consume(item) } }() } @@ -101,7 +84,7 @@ func (c consumerFunc) consume(item interface{}) { // Produce is used by the producer to submit new item to the queue. Returns false in case of queue overflow. func (q *boundedMemoryQueue) Produce(item interface{}) bool { - if q.stopped.Load() != 0 { + if q.stopped.Load() { q.onDroppedItem(item) return false } @@ -109,7 +92,7 @@ func (q *boundedMemoryQueue) Produce(item interface{}) bool { // we might have two concurrent backing queues at the moment // their combined size is stored in q.size, and their combined capacity // should match the capacity of the new queue - if q.Size() >= q.Capacity() { + if q.size.Load() >= q.capacity { // note that all items will be dropped if the capacity is 0 q.onDroppedItem(item) return false @@ -117,7 +100,7 @@ func (q *boundedMemoryQueue) Produce(item interface{}) bool { q.size.Add(1) select { - case *q.items <- item: + case q.items <- item: return true default: // should not happen, as overflows should have been captured earlier @@ -132,18 +115,12 @@ func (q *boundedMemoryQueue) Produce(item interface{}) bool { // Stop stops all consumers, as well as the length reporter if started, // and releases the items channel. It blocks until all consumers have stopped. func (q *boundedMemoryQueue) Stop() { - q.stopped.Store(1) // disable producer - close(q.stopCh) + q.stopped.Store(true) // disable producer + close(q.items) q.stopWG.Wait() - close(*q.items) } // Size returns the current size of the queue func (q *boundedMemoryQueue) Size() int { return int(q.size.Load()) } - -// Capacity returns capacity of the queue -func (q *boundedMemoryQueue) Capacity() int { - return int(q.capacity.Load()) -} diff --git a/internal/otel_collector/exporter/exporterhelper/internal/persistent_queue.go b/internal/otel_collector/exporter/exporterhelper/internal/persistent_queue.go index 0284373d981..3b5012bb071 100644 --- a/internal/otel_collector/exporter/exporterhelper/internal/persistent_queue.go +++ b/internal/otel_collector/exporter/exporterhelper/internal/persistent_queue.go @@ -89,9 +89,3 @@ func (pq *persistentQueue) Stop() { func (pq *persistentQueue) Size() int { return int(pq.storage.size()) } - -// Capacity returns the current capacity of persistent queue. -// Currently, it is unlimited but in the future it can take into account available storage space or configured limits -func (pq *persistentQueue) Capacity() int { - return pq.Size() + 1 -} diff --git a/internal/otel_collector/exporter/exporterhelper/internal/persistent_storage.go b/internal/otel_collector/exporter/exporterhelper/internal/persistent_storage.go index 28d1f581325..a8e9e715a5d 100644 --- a/internal/otel_collector/exporter/exporterhelper/internal/persistent_storage.go +++ b/internal/otel_collector/exporter/exporterhelper/internal/persistent_storage.go @@ -22,8 +22,8 @@ import ( "errors" "strconv" "sync" - "sync/atomic" + "go.uber.org/atomic" "go.uber.org/zap" "go.opentelemetry.io/collector/extension/experimental/storage" @@ -83,7 +83,7 @@ type persistentContiguousStorage struct { writeIndex itemIndex currentlyDispatchedItems []itemIndex - itemsCount uint64 + itemsCount *atomic.Uint64 } type itemIndex uint64 @@ -118,6 +118,7 @@ func newPersistentContiguousStorage(ctx context.Context, queueName string, capac putChan: make(chan struct{}, capacity), reqChan: make(chan PersistentRequest), stopChan: make(chan struct{}), + itemsCount: atomic.NewUint64(0), } initPersistentContiguousStorage(ctx, pcs) @@ -152,7 +153,7 @@ func initPersistentContiguousStorage(ctx context.Context, pcs *persistentContigu } if err != nil { - if err == errValueNotSet { + if errors.Is(err, errValueNotSet) { pcs.logger.Info("Initializing new persistent queue", zap.String(zapQueueNameKey, pcs.queueName)) } else { pcs.logger.Error("Failed getting read/write index, starting with new ones", @@ -166,7 +167,7 @@ func initPersistentContiguousStorage(ctx context.Context, pcs *persistentContigu pcs.writeIndex = writeIndex } - atomic.StoreUint64(&pcs.itemsCount, uint64(pcs.writeIndex-pcs.readIndex)) + pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) } func (pcs *persistentContiguousStorage) enqueueNotDispatchedReqs(reqs []PersistentRequest) { @@ -213,7 +214,7 @@ func (pcs *persistentContiguousStorage) get() <-chan PersistentRequest { // size returns the number of currently available items, which were not picked by consumers yet func (pcs *persistentContiguousStorage) size() uint64 { - return atomic.LoadUint64(&pcs.itemsCount) + return pcs.itemsCount.Load() } func (pcs *persistentContiguousStorage) stop() { @@ -240,7 +241,7 @@ func (pcs *persistentContiguousStorage) put(req PersistentRequest) error { itemKey := pcs.itemKey(pcs.writeIndex) pcs.writeIndex++ - atomic.StoreUint64(&pcs.itemsCount, uint64(pcs.writeIndex-pcs.readIndex)) + pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) ctx := context.Background() _, err := newBatch(pcs).setItemIndex(writeIndexKey, pcs.writeIndex).setRequest(itemKey, req).execute(ctx) @@ -260,7 +261,7 @@ func (pcs *persistentContiguousStorage) getNextItem(ctx context.Context) (Persis index := pcs.readIndex // Increase here, so even if errors happen below, it always iterates pcs.readIndex++ - atomic.StoreUint64(&pcs.itemsCount, uint64(pcs.writeIndex-pcs.readIndex)) + pcs.itemsCount.Store(uint64(pcs.writeIndex - pcs.readIndex)) pcs.updateReadIndex(ctx) pcs.itemDispatchingStart(ctx, index) diff --git a/internal/otel_collector/exporter/exporterhelper/internal/producer_consumer_queue.go b/internal/otel_collector/exporter/exporterhelper/internal/producer_consumer_queue.go index 4307e872192..cb3475bb1a7 100644 --- a/internal/otel_collector/exporter/exporterhelper/internal/producer_consumer_queue.go +++ b/internal/otel_collector/exporter/exporterhelper/internal/producer_consumer_queue.go @@ -32,8 +32,6 @@ type ProducerConsumerQueue interface { Produce(item interface{}) bool // Size returns the current Size of the queue Size() int - // Capacity returns capacity of the queue - Capacity() int // Stop stops all consumers, as well as the length reporter if started, // and releases the items channel. It blocks until all consumers have stopped. Stop() diff --git a/internal/otel_collector/exporter/exporterhelper/logs.go b/internal/otel_collector/exporter/exporterhelper/logs.go index c89514f13bb..ace0670827e 100644 --- a/internal/otel_collector/exporter/exporterhelper/logs.go +++ b/internal/otel_collector/exporter/exporterhelper/logs.go @@ -22,22 +22,20 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/consumer/consumerhelper" "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) -var logsMarshaler = otlp.NewProtobufLogsMarshaler() -var logsUnmarshaler = otlp.NewProtobufLogsUnmarshaler() +var logsMarshaler = plog.NewProtoMarshaler() +var logsUnmarshaler = plog.NewProtoUnmarshaler() type logsRequest struct { baseRequest - ld pdata.Logs - pusher consumerhelper.ConsumeLogsFunc + ld plog.Logs + pusher consumer.ConsumeLogsFunc } -func newLogsRequest(ctx context.Context, ld pdata.Logs, pusher consumerhelper.ConsumeLogsFunc) request { +func newLogsRequest(ctx context.Context, ld plog.Logs, pusher consumer.ConsumeLogsFunc) request { return &logsRequest{ baseRequest: baseRequest{ctx: ctx}, ld: ld, @@ -45,7 +43,7 @@ func newLogsRequest(ctx context.Context, ld pdata.Logs, pusher consumerhelper.Co } } -func newLogsRequestUnmarshalerFunc(pusher consumerhelper.ConsumeLogsFunc) internal.RequestUnmarshaler { +func newLogsRequestUnmarshalerFunc(pusher consumer.ConsumeLogsFunc) internal.RequestUnmarshaler { return func(bytes []byte) (internal.PersistentRequest, error) { logs, err := logsUnmarshaler.UnmarshalLogs(bytes) if err != nil { @@ -84,7 +82,7 @@ type logsExporter struct { func NewLogsExporter( cfg config.Exporter, set component.ExporterCreateSettings, - pusher consumerhelper.ConsumeLogsFunc, + pusher consumer.ConsumeLogsFunc, options ...Option, ) (component.LogsExporter, error) { if cfg == nil { @@ -108,7 +106,7 @@ func NewLogsExporter( } }) - lc, err := consumerhelper.NewLogs(func(ctx context.Context, ld pdata.Logs) error { + lc, err := consumer.NewLogs(func(ctx context.Context, ld plog.Logs) error { req := newLogsRequest(ctx, ld, pusher) err := be.sender.send(req) if errors.Is(err, errSendingQueueIsFull) { diff --git a/internal/otel_collector/exporter/exporterhelper/metrics.go b/internal/otel_collector/exporter/exporterhelper/metrics.go index 9cc46c438db..05def85ae02 100644 --- a/internal/otel_collector/exporter/exporterhelper/metrics.go +++ b/internal/otel_collector/exporter/exporterhelper/metrics.go @@ -22,22 +22,20 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/consumer/consumerhelper" "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) -var metricsMarshaler = otlp.NewProtobufMetricsMarshaler() -var metricsUnmarshaler = otlp.NewProtobufMetricsUnmarshaler() +var metricsMarshaler = pmetric.NewProtoMarshaler() +var metricsUnmarshaler = pmetric.NewProtoUnmarshaler() type metricsRequest struct { baseRequest - md pdata.Metrics - pusher consumerhelper.ConsumeMetricsFunc + md pmetric.Metrics + pusher consumer.ConsumeMetricsFunc } -func newMetricsRequest(ctx context.Context, md pdata.Metrics, pusher consumerhelper.ConsumeMetricsFunc) request { +func newMetricsRequest(ctx context.Context, md pmetric.Metrics, pusher consumer.ConsumeMetricsFunc) request { return &metricsRequest{ baseRequest: baseRequest{ctx: ctx}, md: md, @@ -45,7 +43,7 @@ func newMetricsRequest(ctx context.Context, md pdata.Metrics, pusher consumerhel } } -func newMetricsRequestUnmarshalerFunc(pusher consumerhelper.ConsumeMetricsFunc) internal.RequestUnmarshaler { +func newMetricsRequestUnmarshalerFunc(pusher consumer.ConsumeMetricsFunc) internal.RequestUnmarshaler { return func(bytes []byte) (internal.PersistentRequest, error) { metrics, err := metricsUnmarshaler.UnmarshalMetrics(bytes) if err != nil { @@ -85,7 +83,7 @@ type metricsExporter struct { func NewMetricsExporter( cfg config.Exporter, set component.ExporterCreateSettings, - pusher consumerhelper.ConsumeMetricsFunc, + pusher consumer.ConsumeMetricsFunc, options ...Option, ) (component.MetricsExporter, error) { if cfg == nil { @@ -109,7 +107,7 @@ func NewMetricsExporter( } }) - mc, err := consumerhelper.NewMetrics(func(ctx context.Context, md pdata.Metrics) error { + mc, err := consumer.NewMetrics(func(ctx context.Context, md pmetric.Metrics) error { req := newMetricsRequest(ctx, md, pusher) err := be.sender.send(req) if errors.Is(err, errSendingQueueIsFull) { diff --git a/internal/otel_collector/exporter/exporterhelper/obsreport.go b/internal/otel_collector/exporter/exporterhelper/obsreport.go index 324857f6788..011c3fc99c2 100644 --- a/internal/otel_collector/exporter/exporterhelper/obsreport.go +++ b/internal/otel_collector/exporter/exporterhelper/obsreport.go @@ -40,6 +40,7 @@ func init() { type instruments struct { registry *metric.Registry queueSize *metric.Int64DerivedGauge + queueCapacity *metric.Int64DerivedGauge failedToEnqueueTraceSpans *metric.Int64Cumulative failedToEnqueueMetricPoints *metric.Int64Cumulative failedToEnqueueLogRecords *metric.Int64Cumulative @@ -55,6 +56,12 @@ func newInstruments(registry *metric.Registry) *instruments { metric.WithLabelKeys(obsmetrics.ExporterKey), metric.WithUnit(metricdata.UnitDimensionless)) + insts.queueCapacity, _ = registry.AddInt64DerivedGauge( + obsmetrics.ExporterKey+"/queue_capacity", + metric.WithDescription("Fixed capacity of the retry queue (in batches)"), + metric.WithLabelKeys(obsmetrics.ExporterKey), + metric.WithUnit(metricdata.UnitDimensionless)) + insts.failedToEnqueueTraceSpans, _ = registry.AddInt64Cumulative( obsmetrics.ExporterKey+"/enqueue_failed_spans", metric.WithDescription("Number of spans failed to be added to the sending queue."), diff --git a/internal/otel_collector/exporter/exporterhelper/queued_retry.go b/internal/otel_collector/exporter/exporterhelper/queued_retry.go index 7db7ef26e7c..daadb552a41 100644 --- a/internal/otel_collector/exporter/exporterhelper/queued_retry.go +++ b/internal/otel_collector/exporter/exporterhelper/queued_retry.go @@ -48,8 +48,8 @@ type RetrySettings struct { MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"` } -// DefaultRetrySettings returns the default settings for RetrySettings. -func DefaultRetrySettings() RetrySettings { +// NewDefaultRetrySettings returns the default settings for RetrySettings. +func NewDefaultRetrySettings() RetrySettings { return RetrySettings{ Enabled: true, InitialInterval: 5 * time.Second, @@ -147,7 +147,7 @@ func (rs *retrySender) send(req request) error { err := rs.nextSender.send(req) if err != nil { rs.logger.Error( - "Exporting failed. Try enabling retry_on_failure config option.", + "Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors", zap.Error(err), ) } diff --git a/internal/otel_collector/exporter/exporterhelper/queued_retry_experimental.go b/internal/otel_collector/exporter/exporterhelper/queued_retry_experimental.go index 1949f23b2b4..a808e212c71 100644 --- a/internal/otel_collector/exporter/exporterhelper/queued_retry_experimental.go +++ b/internal/otel_collector/exporter/exporterhelper/queued_retry_experimental.go @@ -48,8 +48,8 @@ type QueueSettings struct { PersistentStorageEnabled bool `mapstructure:"persistent_storage_enabled"` } -// DefaultQueueSettings returns the default settings for QueueSettings. -func DefaultQueueSettings() QueueSettings { +// NewDefaultQueueSettings returns the default settings for QueueSettings. +func NewDefaultQueueSettings() QueueSettings { return QueueSettings{ Enabled: true, NumConsumers: 10, @@ -62,6 +62,19 @@ func DefaultQueueSettings() QueueSettings { } } +// Validate checks if the QueueSettings configuration is valid +func (qCfg *QueueSettings) Validate() error { + if !qCfg.Enabled { + return nil + } + + if qCfg.QueueSize <= 0 { + return errors.New("queue size must be positive") + } + + return nil +} + var ( errNoStorageClient = errors.New("no storage client extension found") errMultipleStorageClients = errors.New("multiple storage extensions found") @@ -204,7 +217,13 @@ func (qrs *queuedRetrySender) start(ctx context.Context, host component.Host) er return int64(qrs.queue.Size()) }, metricdata.NewLabelValue(qrs.fullName())) if err != nil { - return fmt.Errorf("failed to create retry queue size metric: %v", err) + return fmt.Errorf("failed to create retry queue size metric: %w", err) + } + err = globalInstruments.queueCapacity.UpsertEntry(func() int64 { + return int64(qrs.cfg.QueueSize) + }, metricdata.NewLabelValue(qrs.fullName())) + if err != nil { + return fmt.Errorf("failed to create retry queue capacity metric: %w", err) } } diff --git a/internal/otel_collector/exporter/exporterhelper/queued_retry_inmemory.go b/internal/otel_collector/exporter/exporterhelper/queued_retry_inmemory.go index b83c571ee6a..7b76221a78f 100644 --- a/internal/otel_collector/exporter/exporterhelper/queued_retry_inmemory.go +++ b/internal/otel_collector/exporter/exporterhelper/queued_retry_inmemory.go @@ -19,6 +19,7 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" + "errors" "fmt" "go.opencensus.io/metric/metricdata" @@ -44,8 +45,8 @@ type QueueSettings struct { QueueSize int `mapstructure:"queue_size"` } -// DefaultQueueSettings returns the default settings for QueueSettings. -func DefaultQueueSettings() QueueSettings { +// NewDefaultQueueSettings returns the default settings for QueueSettings. +func NewDefaultQueueSettings() QueueSettings { return QueueSettings{ Enabled: true, NumConsumers: 10, @@ -57,6 +58,19 @@ func DefaultQueueSettings() QueueSettings { } } +// Validate checks if the QueueSettings configuration is valid +func (qCfg *QueueSettings) Validate() error { + if !qCfg.Enabled { + return nil + } + + if qCfg.QueueSize <= 0 { + return errors.New("queue size must be positive") + } + + return nil +} + type queuedRetrySender struct { fullName string cfg QueueSettings @@ -112,7 +126,13 @@ func (qrs *queuedRetrySender) start(context.Context, component.Host) error { return int64(qrs.queue.Size()) }, metricdata.NewLabelValue(qrs.fullName)) if err != nil { - return fmt.Errorf("failed to create retry queue size metric: %v", err) + return fmt.Errorf("failed to create retry queue size metric: %w", err) + } + err = globalInstruments.queueCapacity.UpsertEntry(func() int64 { + return int64(qrs.cfg.QueueSize) + }, metricdata.NewLabelValue(qrs.fullName)) + if err != nil { + return fmt.Errorf("failed to create retry queue capacity metric: %w", err) } } diff --git a/internal/otel_collector/exporter/exporterhelper/traces.go b/internal/otel_collector/exporter/exporterhelper/traces.go index 5b6618496a1..641d8801069 100644 --- a/internal/otel_collector/exporter/exporterhelper/traces.go +++ b/internal/otel_collector/exporter/exporterhelper/traces.go @@ -22,22 +22,20 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/consumer/consumerhelper" "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) -var tracesMarshaler = otlp.NewProtobufTracesMarshaler() -var tracesUnmarshaler = otlp.NewProtobufTracesUnmarshaler() +var tracesMarshaler = ptrace.NewProtoMarshaler() +var tracesUnmarshaler = ptrace.NewProtoUnmarshaler() type tracesRequest struct { baseRequest - td pdata.Traces - pusher consumerhelper.ConsumeTracesFunc + td ptrace.Traces + pusher consumer.ConsumeTracesFunc } -func newTracesRequest(ctx context.Context, td pdata.Traces, pusher consumerhelper.ConsumeTracesFunc) request { +func newTracesRequest(ctx context.Context, td ptrace.Traces, pusher consumer.ConsumeTracesFunc) request { return &tracesRequest{ baseRequest: baseRequest{ctx: ctx}, td: td, @@ -45,7 +43,7 @@ func newTracesRequest(ctx context.Context, td pdata.Traces, pusher consumerhelpe } } -func newTraceRequestUnmarshalerFunc(pusher consumerhelper.ConsumeTracesFunc) internal.RequestUnmarshaler { +func newTraceRequestUnmarshalerFunc(pusher consumer.ConsumeTracesFunc) internal.RequestUnmarshaler { return func(bytes []byte) (internal.PersistentRequest, error) { traces, err := tracesUnmarshaler.UnmarshalTraces(bytes) if err != nil { @@ -85,7 +83,7 @@ type traceExporter struct { func NewTracesExporter( cfg config.Exporter, set component.ExporterCreateSettings, - pusher consumerhelper.ConsumeTracesFunc, + pusher consumer.ConsumeTracesFunc, options ...Option, ) (component.TracesExporter, error) { @@ -110,7 +108,7 @@ func NewTracesExporter( } }) - tc, err := consumerhelper.NewTraces(func(ctx context.Context, td pdata.Traces) error { + tc, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error { req := newTracesRequest(ctx, td, pusher) err := be.sender.send(req) if errors.Is(err, errSendingQueueIsFull) { diff --git a/internal/otel_collector/exporter/loggingexporter/README.md b/internal/otel_collector/exporter/loggingexporter/README.md index 1ad42f63daa..78db2198072 100644 --- a/internal/otel_collector/exporter/loggingexporter/README.md +++ b/internal/otel_collector/exporter/loggingexporter/README.md @@ -1,5 +1,11 @@ # Logging Exporter +| Status | | +| ------------------------ | ----------------------- | +| Stability | [In development] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | + Exports data to the console via zap.Logger. Supported pipeline types: traces, metrics, logs @@ -27,3 +33,7 @@ exporters: sampling_initial: 5 sampling_thereafter: 200 ``` + +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[In development]: https://github.com/open-telemetry/opentelemetry-collector#in-development diff --git a/internal/otel_collector/exporter/loggingexporter/factory.go b/internal/otel_collector/exporter/loggingexporter/factory.go index 92412b79cd1..dca2659ebf9 100644 --- a/internal/otel_collector/exporter/loggingexporter/factory.go +++ b/internal/otel_collector/exporter/loggingexporter/factory.go @@ -16,13 +16,13 @@ package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggin import ( "context" + "time" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/exporter/exporterhelper" ) const ( @@ -34,12 +34,13 @@ const ( // NewFactory creates a factory for Logging exporter func NewFactory() component.ExporterFactory { - return exporterhelper.NewFactory( + return component.NewExporterFactory( typeStr, createDefaultConfig, - exporterhelper.WithTraces(createTracesExporter), - exporterhelper.WithMetrics(createMetricsExporter), - exporterhelper.WithLogs(createLogsExporter)) + component.WithTracesExporterAndStabilityLevel(createTracesExporter, component.StabilityLevelInDevelopment), + component.WithMetricsExporterAndStabilityLevel(createMetricsExporter, component.StabilityLevelInDevelopment), + component.WithLogsExporterAndStabilityLevel(createLogsExporter, component.StabilityLevelInDevelopment), + ) } func createDefaultConfig() config.Exporter { @@ -53,50 +54,29 @@ func createDefaultConfig() config.Exporter { func createTracesExporter(_ context.Context, set component.ExporterCreateSettings, config config.Exporter) (component.TracesExporter, error) { cfg := config.(*Config) - - exporterLogger, err := createLogger(cfg) - if err != nil { - return nil, err - } - - return newTracesExporter(config, exporterLogger, set) + exporterLogger := createLogger(cfg, set.TelemetrySettings.Logger) + return newTracesExporter(cfg, exporterLogger, set) } func createMetricsExporter(_ context.Context, set component.ExporterCreateSettings, config config.Exporter) (component.MetricsExporter, error) { cfg := config.(*Config) - - exporterLogger, err := createLogger(cfg) - if err != nil { - return nil, err - } - - return newMetricsExporter(config, exporterLogger, set) + exporterLogger := createLogger(cfg, set.TelemetrySettings.Logger) + return newMetricsExporter(cfg, exporterLogger, set) } func createLogsExporter(_ context.Context, set component.ExporterCreateSettings, config config.Exporter) (component.LogsExporter, error) { cfg := config.(*Config) - - exporterLogger, err := createLogger(cfg) - if err != nil { - return nil, err - } - - return newLogsExporter(config, exporterLogger, set) + exporterLogger := createLogger(cfg, set.TelemetrySettings.Logger) + return newLogsExporter(cfg, exporterLogger, set) } -func createLogger(cfg *Config) (*zap.Logger, error) { - // We take development config as the base since it matches the purpose - // of logging exporter being used for debugging reasons (so e.g. console encoder) - conf := zap.NewDevelopmentConfig() - conf.Level = zap.NewAtomicLevelAt(cfg.LogLevel) - conf.Sampling = &zap.SamplingConfig{ - Initial: cfg.SamplingInitial, - Thereafter: cfg.SamplingThereafter, - } +func createLogger(cfg *Config, logger *zap.Logger) *zap.Logger { + core := zapcore.NewSamplerWithOptions( + logger.Core(), + 1*time.Second, + cfg.SamplingInitial, + cfg.SamplingThereafter, + ) - logginglogger, err := conf.Build() - if err != nil { - return nil, err - } - return logginglogger, nil + return zap.New(core) } diff --git a/internal/otel_collector/internal/otlptext/databuffer.go b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/databuffer.go similarity index 64% rename from internal/otel_collector/internal/otlptext/databuffer.go rename to internal/otel_collector/exporter/loggingexporter/internal/otlptext/databuffer.go index 995257e6233..237f9a30322 100644 --- a/internal/otel_collector/internal/otlptext/databuffer.go +++ b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/databuffer.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( "bytes" @@ -21,7 +21,9 @@ import ( "strconv" "strings" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) type dataBuffer struct { @@ -37,26 +39,26 @@ func (b *dataBuffer) logAttr(label string, value string) { b.logEntry(" %-15s: %s", label, value) } -func (b *dataBuffer) logAttributeMap(label string, am pdata.AttributeMap) { - if am.Len() == 0 { +func (b *dataBuffer) logAttributes(label string, m pcommon.Map) { + if m.Len() == 0 { return } b.logEntry("%s:", label) - am.Range(func(k string, v pdata.AttributeValue) bool { + m.Range(func(k string, v pcommon.Value) bool { b.logEntry(" -> %s: %s(%s)", k, v.Type().String(), attributeValueToString(v)) return true }) } -func (b *dataBuffer) logInstrumentationLibrary(il pdata.InstrumentationLibrary) { +func (b *dataBuffer) logInstrumentationScope(il pcommon.InstrumentationScope) { b.logEntry( - "InstrumentationLibrary %s %s", + "InstrumentationScope %s %s", il.Name(), il.Version()) } -func (b *dataBuffer) logMetricDescriptor(md pdata.Metric) { +func (b *dataBuffer) logMetricDescriptor(md pmetric.Metric) { b.logEntry("Descriptor:") b.logEntry(" -> Name: %s", md.Name()) b.logEntry(" -> Description: %s", md.Description()) @@ -64,32 +66,32 @@ func (b *dataBuffer) logMetricDescriptor(md pdata.Metric) { b.logEntry(" -> DataType: %s", md.DataType().String()) } -func (b *dataBuffer) logMetricDataPoints(m pdata.Metric) { +func (b *dataBuffer) logMetricDataPoints(m pmetric.Metric) { switch m.DataType() { - case pdata.MetricDataTypeNone: + case pmetric.MetricDataTypeNone: return - case pdata.MetricDataTypeGauge: + case pmetric.MetricDataTypeGauge: b.logNumberDataPoints(m.Gauge().DataPoints()) - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: data := m.Sum() b.logEntry(" -> IsMonotonic: %t", data.IsMonotonic()) b.logEntry(" -> AggregationTemporality: %s", data.AggregationTemporality().String()) b.logNumberDataPoints(data.DataPoints()) - case pdata.MetricDataTypeHistogram: + case pmetric.MetricDataTypeHistogram: data := m.Histogram() b.logEntry(" -> AggregationTemporality: %s", data.AggregationTemporality().String()) b.logDoubleHistogramDataPoints(data.DataPoints()) - case pdata.MetricDataTypeExponentialHistogram: + case pmetric.MetricDataTypeExponentialHistogram: data := m.ExponentialHistogram() b.logEntry(" -> AggregationTemporality: %s", data.AggregationTemporality().String()) b.logExponentialHistogramDataPoints(data.DataPoints()) - case pdata.MetricDataTypeSummary: + case pmetric.MetricDataTypeSummary: data := m.Summary() b.logDoubleSummaryDataPoints(data.DataPoints()) } } -func (b *dataBuffer) logNumberDataPoints(ps pdata.NumberDataPointSlice) { +func (b *dataBuffer) logNumberDataPoints(ps pmetric.NumberDataPointSlice) { for i := 0; i < ps.Len(); i++ { p := ps.At(i) b.logEntry("NumberDataPoints #%d", i) @@ -97,16 +99,16 @@ func (b *dataBuffer) logNumberDataPoints(ps pdata.NumberDataPointSlice) { b.logEntry("StartTimestamp: %s", p.StartTimestamp()) b.logEntry("Timestamp: %s", p.Timestamp()) - switch p.Type() { - case pdata.MetricValueTypeInt: + switch p.ValueType() { + case pmetric.NumberDataPointValueTypeInt: b.logEntry("Value: %d", p.IntVal()) - case pdata.MetricValueTypeDouble: + case pmetric.NumberDataPointValueTypeDouble: b.logEntry("Value: %f", p.DoubleVal()) } } } -func (b *dataBuffer) logDoubleHistogramDataPoints(ps pdata.HistogramDataPointSlice) { +func (b *dataBuffer) logDoubleHistogramDataPoints(ps pmetric.HistogramDataPointSlice) { for i := 0; i < ps.Len(); i++ { p := ps.At(i) b.logEntry("HistogramDataPoints #%d", i) @@ -115,25 +117,30 @@ func (b *dataBuffer) logDoubleHistogramDataPoints(ps pdata.HistogramDataPointSli b.logEntry("StartTimestamp: %s", p.StartTimestamp()) b.logEntry("Timestamp: %s", p.Timestamp()) b.logEntry("Count: %d", p.Count()) - b.logEntry("Sum: %f", p.Sum()) - bounds := p.ExplicitBounds() - if len(bounds) != 0 { - for i, bound := range bounds { - b.logEntry("ExplicitBounds #%d: %f", i, bound) - } + if p.HasSum() { + b.logEntry("Sum: %f", p.Sum()) + } + + if p.HasMin() { + b.logEntry("Min: %f", p.Min()) + } + + if p.HasMax() { + b.logEntry("Max: %f", p.Max()) + } + + for i := 0; i < p.ExplicitBounds().Len(); i++ { + b.logEntry("ExplicitBounds #%d: %f", i, p.ExplicitBounds().At(i)) } - buckets := p.BucketCounts() - if len(buckets) != 0 { - for j, bucket := range buckets { - b.logEntry("Buckets #%d, Count: %d", j, bucket) - } + for j := 0; j < p.BucketCounts().Len(); j++ { + b.logEntry("Buckets #%d, Count: %d", j, p.BucketCounts().At(j)) } } } -func (b *dataBuffer) logExponentialHistogramDataPoints(ps pdata.ExponentialHistogramDataPointSlice) { +func (b *dataBuffer) logExponentialHistogramDataPoints(ps pmetric.ExponentialHistogramDataPointSlice) { for i := 0; i < ps.Len(); i++ { p := ps.At(i) b.logEntry("ExponentialHistogramDataPoints #%d", i) @@ -142,7 +149,18 @@ func (b *dataBuffer) logExponentialHistogramDataPoints(ps pdata.ExponentialHisto b.logEntry("StartTimestamp: %s", p.StartTimestamp()) b.logEntry("Timestamp: %s", p.Timestamp()) b.logEntry("Count: %d", p.Count()) - b.logEntry("Sum: %f", p.Sum()) + + if p.HasSum() { + b.logEntry("Sum: %f", p.Sum()) + } + + if p.HasMin() { + b.logEntry("Min: %f", p.Min()) + } + + if p.HasMax() { + b.logEntry("Max: %f", p.Max()) + } scale := int(p.Scale()) factor := math.Ldexp(math.Ln2, -scale) @@ -158,30 +176,28 @@ func (b *dataBuffer) logExponentialHistogramDataPoints(ps pdata.ExponentialHisto negB := p.Negative().BucketCounts() posB := p.Positive().BucketCounts() - for i := 0; i < len(negB); i++ { - pos := len(negB) - i - 1 + for i := 0; i < negB.Len(); i++ { + pos := negB.Len() - i - 1 index := p.Negative().Offset() + int32(pos) - count := p.Negative().BucketCounts()[pos] lower := math.Exp(float64(index) * factor) upper := math.Exp(float64(index+1) * factor) - b.logEntry("Bucket (%f, %f], Count: %d", -upper, -lower, count) + b.logEntry("Bucket (%f, %f], Count: %d", -upper, -lower, negB.At(pos)) } if p.ZeroCount() != 0 { b.logEntry("Bucket [0, 0], Count: %d", p.ZeroCount()) } - for pos := 0; pos < len(posB); pos++ { + for pos := 0; pos < posB.Len(); pos++ { index := p.Positive().Offset() + int32(pos) - count := p.Positive().BucketCounts()[pos] lower := math.Exp(float64(index) * factor) upper := math.Exp(float64(index+1) * factor) - b.logEntry("Bucket [%f, %f), Count: %d", lower, upper, count) + b.logEntry("Bucket [%f, %f), Count: %d", lower, upper, posB.At(pos)) } } } -func (b *dataBuffer) logDoubleSummaryDataPoints(ps pdata.SummaryDataPointSlice) { +func (b *dataBuffer) logDoubleSummaryDataPoints(ps pmetric.SummaryDataPointSlice) { for i := 0; i < ps.Len(); i++ { p := ps.At(i) b.logEntry("SummaryDataPoints #%d", i) @@ -200,11 +216,11 @@ func (b *dataBuffer) logDoubleSummaryDataPoints(ps pdata.SummaryDataPointSlice) } } -func (b *dataBuffer) logDataPointAttributes(labels pdata.AttributeMap) { - b.logAttributeMap("Data point attributes", labels) +func (b *dataBuffer) logDataPointAttributes(labels pcommon.Map) { + b.logAttributes("Data point attributes", labels) } -func (b *dataBuffer) logEvents(description string, se pdata.SpanEventSlice) { +func (b *dataBuffer) logEvents(description string, se ptrace.SpanEventSlice) { if se.Len() == 0 { return } @@ -221,14 +237,14 @@ func (b *dataBuffer) logEvents(description string, se pdata.SpanEventSlice) { continue } b.logEntry(" -> Attributes:") - e.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + e.Attributes().Range(func(k string, v pcommon.Value) bool { b.logEntry(" -> %s: %s(%s)", k, v.Type().String(), attributeValueToString(v)) return true }) } } -func (b *dataBuffer) logLinks(description string, sl pdata.SpanLinkSlice) { +func (b *dataBuffer) logLinks(description string, sl ptrace.SpanLinkSlice) { if sl.Len() == 0 { return } @@ -246,40 +262,40 @@ func (b *dataBuffer) logLinks(description string, sl pdata.SpanLinkSlice) { continue } b.logEntry(" -> Attributes:") - l.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + l.Attributes().Range(func(k string, v pcommon.Value) bool { b.logEntry(" -> %s: %s(%s)", k, v.Type().String(), attributeValueToString(v)) return true }) } } -func attributeValueToString(av pdata.AttributeValue) string { - switch av.Type() { - case pdata.AttributeValueTypeString: - return av.StringVal() - case pdata.AttributeValueTypeBool: - return strconv.FormatBool(av.BoolVal()) - case pdata.AttributeValueTypeDouble: - return strconv.FormatFloat(av.DoubleVal(), 'f', -1, 64) - case pdata.AttributeValueTypeInt: - return strconv.FormatInt(av.IntVal(), 10) - case pdata.AttributeValueTypeArray: - return attributeValueSliceToString(av.SliceVal()) - case pdata.AttributeValueTypeMap: - return attributeMapToString(av.MapVal()) +func attributeValueToString(v pcommon.Value) string { + switch v.Type() { + case pcommon.ValueTypeString: + return v.StringVal() + case pcommon.ValueTypeBool: + return strconv.FormatBool(v.BoolVal()) + case pcommon.ValueTypeDouble: + return strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64) + case pcommon.ValueTypeInt: + return strconv.FormatInt(v.IntVal(), 10) + case pcommon.ValueTypeSlice: + return sliceToString(v.SliceVal()) + case pcommon.ValueTypeMap: + return mapToString(v.MapVal()) default: - return fmt.Sprintf("", av.Type()) + return fmt.Sprintf("", v.Type()) } } -func attributeValueSliceToString(av pdata.AttributeValueSlice) string { +func sliceToString(s pcommon.Slice) string { var b strings.Builder b.WriteByte('[') - for i := 0; i < av.Len(); i++ { - if i < av.Len()-1 { - fmt.Fprintf(&b, "%s, ", attributeValueToString(av.At(i))) + for i := 0; i < s.Len(); i++ { + if i < s.Len()-1 { + fmt.Fprintf(&b, "%s, ", attributeValueToString(s.At(i))) } else { - b.WriteString(attributeValueToString(av.At(i))) + b.WriteString(attributeValueToString(s.At(i))) } } @@ -287,11 +303,11 @@ func attributeValueSliceToString(av pdata.AttributeValueSlice) string { return b.String() } -func attributeMapToString(av pdata.AttributeMap) string { +func mapToString(m pcommon.Map) string { var b strings.Builder b.WriteString("{\n") - av.Sort().Range(func(k string, v pdata.AttributeValue) bool { + m.Sort().Range(func(k string, v pcommon.Value) bool { fmt.Fprintf(&b, " -> %s: %s(%s)\n", k, v.Type(), v.AsString()) return true }) diff --git a/internal/otel_collector/internal/otlptext/logs.go b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/logs.go similarity index 64% rename from internal/otel_collector/internal/otlptext/logs.go rename to internal/otel_collector/exporter/loggingexporter/internal/otlptext/logs.go index 52d26aec1a4..9c12bb3101c 100644 --- a/internal/otel_collector/internal/otlptext/logs.go +++ b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/logs.go @@ -12,44 +12,44 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) -// NewTextLogsMarshaler returns a serializer.LogsMarshaler to encode to OTLP text bytes. -func NewTextLogsMarshaler() pdata.LogsMarshaler { +// NewTextLogsMarshaler returns a plog.Marshaler to encode to OTLP text bytes. +func NewTextLogsMarshaler() plog.Marshaler { return textLogsMarshaler{} } type textLogsMarshaler struct{} -// MarshalLogs pdata.Logs to OTLP text. -func (textLogsMarshaler) MarshalLogs(ld pdata.Logs) ([]byte, error) { +// MarshalLogs plog.Logs to OTLP text. +func (textLogsMarshaler) MarshalLogs(ld plog.Logs) ([]byte, error) { buf := dataBuffer{} rls := ld.ResourceLogs() for i := 0; i < rls.Len(); i++ { buf.logEntry("ResourceLog #%d", i) rl := rls.At(i) buf.logEntry("Resource SchemaURL: %s", rl.SchemaUrl()) - buf.logAttributeMap("Resource labels", rl.Resource().Attributes()) - ills := rl.InstrumentationLibraryLogs() + buf.logAttributes("Resource labels", rl.Resource().Attributes()) + ills := rl.ScopeLogs() for j := 0; j < ills.Len(); j++ { - buf.logEntry("InstrumentationLibraryLogs #%d", j) + buf.logEntry("ScopeLogs #%d", j) ils := ills.At(j) - buf.logEntry("InstrumentationLibraryMetrics SchemaURL: %s", ils.SchemaUrl()) - buf.logInstrumentationLibrary(ils.InstrumentationLibrary()) + buf.logEntry("ScopeLogs SchemaURL: %s", ils.SchemaUrl()) + buf.logInstrumentationScope(ils.Scope()) logs := ils.LogRecords() for k := 0; k < logs.Len(); k++ { buf.logEntry("LogRecord #%d", k) lr := logs.At(k) + buf.logEntry("ObservedTimestamp: %s", lr.ObservedTimestamp()) buf.logEntry("Timestamp: %s", lr.Timestamp()) buf.logEntry("Severity: %s", lr.SeverityText()) - buf.logEntry("ShortName: %s", lr.Name()) buf.logEntry("Body: %s", attributeValueToString(lr.Body())) - buf.logAttributeMap("Attributes", lr.Attributes()) + buf.logAttributes("Attributes", lr.Attributes()) buf.logEntry("Trace ID: %s", lr.TraceID().HexString()) buf.logEntry("Span ID: %s", lr.SpanID().HexString()) buf.logEntry("Flags: %d", lr.Flags()) diff --git a/internal/otel_collector/internal/otlptext/metrics.go b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/metrics.go similarity index 61% rename from internal/otel_collector/internal/otlptext/metrics.go rename to internal/otel_collector/exporter/loggingexporter/internal/otlptext/metrics.go index 7cbc3846c5d..6c7a4133764 100644 --- a/internal/otel_collector/internal/otlptext/metrics.go +++ b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/metrics.go @@ -12,34 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" -import ( - "go.opentelemetry.io/collector/model/pdata" -) +import "go.opentelemetry.io/collector/pdata/pmetric" -// NewTextMetricsMarshaler returns a serializer.MetricsMarshaler to encode to OTLP text bytes. -func NewTextMetricsMarshaler() pdata.MetricsMarshaler { +// NewTextMetricsMarshaler returns a pmetric.Marshaler to encode to OTLP text bytes. +func NewTextMetricsMarshaler() pmetric.Marshaler { return textMetricsMarshaler{} } type textMetricsMarshaler struct{} -// MarshalMetrics pdata.Metrics to OTLP text. -func (textMetricsMarshaler) MarshalMetrics(md pdata.Metrics) ([]byte, error) { +// MarshalMetrics pmetric.Metrics to OTLP text. +func (textMetricsMarshaler) MarshalMetrics(md pmetric.Metrics) ([]byte, error) { buf := dataBuffer{} rms := md.ResourceMetrics() for i := 0; i < rms.Len(); i++ { buf.logEntry("ResourceMetrics #%d", i) rm := rms.At(i) buf.logEntry("Resource SchemaURL: %s", rm.SchemaUrl()) - buf.logAttributeMap("Resource labels", rm.Resource().Attributes()) - ilms := rm.InstrumentationLibraryMetrics() + buf.logAttributes("Resource labels", rm.Resource().Attributes()) + ilms := rm.ScopeMetrics() for j := 0; j < ilms.Len(); j++ { - buf.logEntry("InstrumentationLibraryMetrics #%d", j) + buf.logEntry("ScopeMetrics #%d", j) ilm := ilms.At(j) - buf.logEntry("InstrumentationLibraryMetrics SchemaURL: %s", ilm.SchemaUrl()) - buf.logInstrumentationLibrary(ilm.InstrumentationLibrary()) + buf.logEntry("ScopeMetrics SchemaURL: %s", ilm.SchemaUrl()) + buf.logInstrumentationScope(ilm.Scope()) metrics := ilm.Metrics() for k := 0; k < metrics.Len(); k++ { buf.logEntry("Metric #%d", k) diff --git a/internal/otel_collector/internal/otlptext/traces.go b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/traces.go similarity index 68% rename from internal/otel_collector/internal/otlptext/traces.go rename to internal/otel_collector/exporter/loggingexporter/internal/otlptext/traces.go index 3d0ebb2f874..4ad770765c3 100644 --- a/internal/otel_collector/internal/otlptext/traces.go +++ b/internal/otel_collector/exporter/loggingexporter/internal/otlptext/traces.go @@ -12,34 +12,34 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) -// NewTextTracesMarshaler returns a serializer.TracesMarshaler to encode to OTLP text bytes. -func NewTextTracesMarshaler() pdata.TracesMarshaler { +// NewTextTracesMarshaler returns a ptrace.Marshaler to encode to OTLP text bytes. +func NewTextTracesMarshaler() ptrace.Marshaler { return textTracesMarshaler{} } type textTracesMarshaler struct{} -// MarshalTraces pdata.Traces to OTLP text. -func (textTracesMarshaler) MarshalTraces(td pdata.Traces) ([]byte, error) { +// MarshalTraces ptrace.Traces to OTLP text. +func (textTracesMarshaler) MarshalTraces(td ptrace.Traces) ([]byte, error) { buf := dataBuffer{} rss := td.ResourceSpans() for i := 0; i < rss.Len(); i++ { buf.logEntry("ResourceSpans #%d", i) rs := rss.At(i) buf.logEntry("Resource SchemaURL: %s", rs.SchemaUrl()) - buf.logAttributeMap("Resource labels", rs.Resource().Attributes()) - ilss := rs.InstrumentationLibrarySpans() + buf.logAttributes("Resource labels", rs.Resource().Attributes()) + ilss := rs.ScopeSpans() for j := 0; j < ilss.Len(); j++ { - buf.logEntry("InstrumentationLibrarySpans #%d", j) + buf.logEntry("ScopeSpans #%d", j) ils := ilss.At(j) - buf.logEntry("InstrumentationLibraryMetrics SchemaURL: %s", ils.SchemaUrl()) - buf.logInstrumentationLibrary(ils.InstrumentationLibrary()) + buf.logEntry("ScopeSpans SchemaURL: %s", ils.SchemaUrl()) + buf.logInstrumentationScope(ils.Scope()) spans := ils.Spans() for k := 0; k < spans.Len(); k++ { @@ -56,7 +56,7 @@ func (textTracesMarshaler) MarshalTraces(td pdata.Traces) ([]byte, error) { buf.logAttr("Status code", span.Status().Code().String()) buf.logAttr("Status message", span.Status().Message()) - buf.logAttributeMap("Attributes", span.Attributes()) + buf.logAttributes("Attributes", span.Attributes()) buf.logEvents("Events", span.Events()) buf.logLinks("Links", span.Links()) } diff --git a/internal/otel_collector/exporter/loggingexporter/known_sync_error.go b/internal/otel_collector/exporter/loggingexporter/known_sync_error.go index da1eb9c65fc..76ececa30a7 100644 --- a/internal/otel_collector/exporter/loggingexporter/known_sync_error.go +++ b/internal/otel_collector/exporter/loggingexporter/known_sync_error.go @@ -18,22 +18,29 @@ package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggingexporter" import ( + "errors" "syscall" ) +var knownSyncErrors = []error{ + // sync /dev/stdout: invalid argument + syscall.EINVAL, + // sync /dev/stdout: not supported + syscall.ENOTSUP, + // sync /dev/stdout: inappropriate ioctl for device + syscall.ENOTTY, + // sync /dev/stdout: bad file descriptor + syscall.EBADF, +} + // knownSyncError returns true if the given error is one of the known -// non-actionable errors returned by Sync on Linux and macOS: -// -// Linux: -// - sync /dev/stdout: invalid argument -// -// macOS: -// - sync /dev/stdout: inappropriate ioctl for device -// +// non-actionable errors returned by Sync on Linux and macOS. func knownSyncError(err error) bool { - switch err { - case syscall.EINVAL, syscall.ENOTSUP, syscall.ENOTTY: - return true + for _, syncError := range knownSyncErrors { + if errors.Is(err, syncError) { + return true + } } + return false } diff --git a/internal/otel_collector/exporter/loggingexporter/logging_exporter.go b/internal/otel_collector/exporter/loggingexporter/logging_exporter.go index 301e1b372b6..dc57319429a 100644 --- a/internal/otel_collector/exporter/loggingexporter/logging_exporter.go +++ b/internal/otel_collector/exporter/loggingexporter/logging_exporter.go @@ -16,29 +16,32 @@ package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggin import ( "context" + "errors" "os" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/internal/otlptext" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) type loggingExporter struct { + logLevel zapcore.Level logger *zap.Logger - logsMarshaler pdata.LogsMarshaler - metricsMarshaler pdata.MetricsMarshaler - tracesMarshaler pdata.TracesMarshaler + logsMarshaler plog.Marshaler + metricsMarshaler pmetric.Marshaler + tracesMarshaler ptrace.Marshaler } -func (s *loggingExporter) pushTraces(_ context.Context, td pdata.Traces) error { +func (s *loggingExporter) pushTraces(_ context.Context, td ptrace.Traces) error { s.logger.Info("TracesExporter", zap.Int("#spans", td.SpanCount())) - if !s.logger.Core().Enabled(zapcore.DebugLevel) { + if s.logLevel != zapcore.DebugLevel { return nil } @@ -46,14 +49,14 @@ func (s *loggingExporter) pushTraces(_ context.Context, td pdata.Traces) error { if err != nil { return err } - s.logger.Debug(string(buf)) + s.logger.Info(string(buf)) return nil } -func (s *loggingExporter) pushMetrics(_ context.Context, md pdata.Metrics) error { +func (s *loggingExporter) pushMetrics(_ context.Context, md pmetric.Metrics) error { s.logger.Info("MetricsExporter", zap.Int("#metrics", md.MetricCount())) - if !s.logger.Core().Enabled(zapcore.DebugLevel) { + if s.logLevel != zapcore.DebugLevel { return nil } @@ -61,14 +64,14 @@ func (s *loggingExporter) pushMetrics(_ context.Context, md pdata.Metrics) error if err != nil { return err } - s.logger.Debug(string(buf)) + s.logger.Info(string(buf)) return nil } -func (s *loggingExporter) pushLogs(_ context.Context, ld pdata.Logs) error { +func (s *loggingExporter) pushLogs(_ context.Context, ld plog.Logs) error { s.logger.Info("LogsExporter", zap.Int("#logs", ld.LogRecordCount())) - if !s.logger.Core().Enabled(zapcore.DebugLevel) { + if s.logLevel != zapcore.DebugLevel { return nil } @@ -76,12 +79,13 @@ func (s *loggingExporter) pushLogs(_ context.Context, ld pdata.Logs) error { if err != nil { return err } - s.logger.Debug(string(buf)) + s.logger.Info(string(buf)) return nil } -func newLoggingExporter(logger *zap.Logger) *loggingExporter { +func newLoggingExporter(logger *zap.Logger, logLevel zapcore.Level) *loggingExporter { return &loggingExporter{ + logLevel: logLevel, logger: logger, logsMarshaler: otlptext.NewTextLogsMarshaler(), metricsMarshaler: otlptext.NewTextMetricsMarshaler(), @@ -91,10 +95,10 @@ func newLoggingExporter(logger *zap.Logger) *loggingExporter { // newTracesExporter creates an exporter.TracesExporter that just drops the // received data and logs debugging messages. -func newTracesExporter(config config.Exporter, logger *zap.Logger, set component.ExporterCreateSettings) (component.TracesExporter, error) { - s := newLoggingExporter(logger) +func newTracesExporter(cfg *Config, logger *zap.Logger, set component.ExporterCreateSettings) (component.TracesExporter, error) { + s := newLoggingExporter(logger, cfg.LogLevel) return exporterhelper.NewTracesExporter( - config, + cfg, set, s.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), @@ -108,10 +112,10 @@ func newTracesExporter(config config.Exporter, logger *zap.Logger, set component // newMetricsExporter creates an exporter.MetricsExporter that just drops the // received data and logs debugging messages. -func newMetricsExporter(config config.Exporter, logger *zap.Logger, set component.ExporterCreateSettings) (component.MetricsExporter, error) { - s := newLoggingExporter(logger) +func newMetricsExporter(cfg *Config, logger *zap.Logger, set component.ExporterCreateSettings) (component.MetricsExporter, error) { + s := newLoggingExporter(logger, cfg.LogLevel) return exporterhelper.NewMetricsExporter( - config, + cfg, set, s.pushMetrics, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), @@ -125,10 +129,10 @@ func newMetricsExporter(config config.Exporter, logger *zap.Logger, set componen // newLogsExporter creates an exporter.LogsExporter that just drops the // received data and logs debugging messages. -func newLogsExporter(config config.Exporter, logger *zap.Logger, set component.ExporterCreateSettings) (component.LogsExporter, error) { - s := newLoggingExporter(logger) +func newLogsExporter(cfg *Config, logger *zap.Logger, set component.ExporterCreateSettings) (component.LogsExporter, error) { + s := newLoggingExporter(logger, cfg.LogLevel) return exporterhelper.NewLogsExporter( - config, + cfg, set, s.pushLogs, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), @@ -145,7 +149,8 @@ func loggerSync(logger *zap.Logger) func(context.Context) error { // Currently Sync() return a different error depending on the OS. // Since these are not actionable ignore them. err := logger.Sync() - if osErr, ok := err.(*os.PathError); ok { + osErr := &os.PathError{} + if errors.As(err, &osErr) { wrappedErr := osErr.Unwrap() if knownSyncError(wrappedErr) { err = nil diff --git a/internal/otel_collector/exporter/otlpexporter/README.md b/internal/otel_collector/exporter/otlpexporter/README.md index 29fa030b7f4..9263fc21ad6 100644 --- a/internal/otel_collector/exporter/otlpexporter/README.md +++ b/internal/otel_collector/exporter/otlpexporter/README.md @@ -1,14 +1,17 @@ # OTLP gRPC Exporter -Exports data via gRPC using [OTLP]( +| Status | | +| ------------------------ | --------------------- | +| Stability | traces [stable] | +| | metrics [stable] | +| | logs [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | + +Export data via gRPC using [OTLP]( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) format. By default, this exporter requires TLS and offers queued retry capabilities. -Supported pipeline types: traces, metrics, logs - -:warning: OTLP logs format is currently marked as "Beta" and may change in -incompatible ways. - ## Getting Started The following settings are required: @@ -17,19 +20,7 @@ The following settings are required: using the gRPC protocol. The valid syntax is described [here](https://github.com/grpc/grpc/blob/master/doc/naming.md). If a scheme of `https` is used then client transport security is enabled and overrides the `insecure` setting. - -By default, TLS is enabled: - -- `tls:` - - - `insecure` (default = `false`): whether to enable client transport security for the exporter's connection. - -As a result, the following parameters are also required: - -- `tls:` - - - `cert_file` (no default): path to the TLS cert to use for TLS required connections. Should only be used if `insecure` is set to false. - - `key_file` (no default): path to the TLS key to use for TLS required connections. Should only be used if `insecure` is set to false. +- `tls`: see [TLS Configuration Settings](../../config/configtls/README.md) for the full set of available options. Example: @@ -46,6 +37,15 @@ exporters: insecure: true ``` +By default, `gzip` compression is enabled. See [compression comparison](../../config/configgrpc/README.md#compression-comparison) for details benchmark information. To disable, configure as follows: + +```yaml +exporters: + otlp: + ... + compression: none +``` + ## Advanced Configuration Several helper files are leveraged to provide additional capabilities automatically: @@ -53,3 +53,8 @@ Several helper files are leveraged to provide additional capabilities automatica - [gRPC settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configgrpc/README.md) - [TLS and mTLS settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) - [Queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable diff --git a/internal/otel_collector/exporter/otlpexporter/config.go b/internal/otel_collector/exporter/otlpexporter/config.go index 4b561e66bbc..f336c57e4c3 100644 --- a/internal/otel_collector/exporter/otlpexporter/config.go +++ b/internal/otel_collector/exporter/otlpexporter/config.go @@ -15,6 +15,8 @@ package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexporter" import ( + "fmt" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,5 +36,9 @@ var _ config.Exporter = (*Config)(nil) // Validate checks if the exporter configuration is valid func (cfg *Config) Validate() error { + if err := cfg.QueueSettings.Validate(); err != nil { + return fmt.Errorf("queue settings has invalid configuration: %w", err) + } + return nil } diff --git a/internal/otel_collector/exporter/otlpexporter/factory.go b/internal/otel_collector/exporter/otlpexporter/factory.go index 759a76b3254..08b0242c9fd 100644 --- a/internal/otel_collector/exporter/otlpexporter/factory.go +++ b/internal/otel_collector/exporter/otlpexporter/factory.go @@ -19,6 +19,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -31,22 +32,25 @@ const ( // NewFactory creates a factory for OTLP exporter. func NewFactory() component.ExporterFactory { - return exporterhelper.NewFactory( + return component.NewExporterFactory( typeStr, createDefaultConfig, - exporterhelper.WithTraces(createTracesExporter), - exporterhelper.WithMetrics(createMetricsExporter), - exporterhelper.WithLogs(createLogsExporter)) + component.WithTracesExporterAndStabilityLevel(createTracesExporter, component.StabilityLevelStable), + component.WithMetricsExporterAndStabilityLevel(createMetricsExporter, component.StabilityLevelStable), + component.WithLogsExporterAndStabilityLevel(createLogsExporter, component.StabilityLevelBeta), + ) } func createDefaultConfig() config.Exporter { return &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), - TimeoutSettings: exporterhelper.DefaultTimeoutSettings(), - RetrySettings: exporterhelper.DefaultRetrySettings(), - QueueSettings: exporterhelper.DefaultQueueSettings(), + TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + RetrySettings: exporterhelper.NewDefaultRetrySettings(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), GRPCClientSettings: configgrpc.GRPCClientSettings{ Headers: map[string]string{}, + // Default to gzip compression + Compression: configcompression.Gzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, @@ -58,7 +62,7 @@ func createTracesExporter( set component.ExporterCreateSettings, cfg config.Exporter, ) (component.TracesExporter, error) { - oce, err := newExporter(cfg, set.TelemetrySettings, set.BuildInfo) + oce, err := newExporter(cfg, set) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func createMetricsExporter( set component.ExporterCreateSettings, cfg config.Exporter, ) (component.MetricsExporter, error) { - oce, err := newExporter(cfg, set.TelemetrySettings, set.BuildInfo) + oce, err := newExporter(cfg, set) if err != nil { return nil, err } @@ -103,7 +107,7 @@ func createLogsExporter( set component.ExporterCreateSettings, cfg config.Exporter, ) (component.LogsExporter, error) { - oce, err := newExporter(cfg, set.TelemetrySettings, set.BuildInfo) + oce, err := newExporter(cfg, set) if err != nil { return nil, err } diff --git a/internal/otel_collector/exporter/otlpexporter/otlp.go b/internal/otel_collector/exporter/otlpexporter/otlp.go index e8adbf44417..3533de0f3ee 100644 --- a/internal/otel_collector/exporter/otlpexporter/otlp.go +++ b/internal/otel_collector/exporter/otlpexporter/otlp.go @@ -31,8 +31,12 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/model/otlpgrpc" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) type exporter struct { @@ -40,9 +44,9 @@ type exporter struct { config *Config // gRPC clients and connection. - traceExporter otlpgrpc.TracesClient - metricExporter otlpgrpc.MetricsClient - logExporter otlpgrpc.LogsClient + traceExporter ptraceotlp.Client + metricExporter pmetricotlp.Client + logExporter plogotlp.Client clientConn *grpc.ClientConn metadata metadata.MD callOptions []grpc.CallOption @@ -55,7 +59,7 @@ type exporter struct { // Crete new exporter and start it. The exporter will begin connecting but // this function may return before the connection is established. -func newExporter(cfg config.Exporter, settings component.TelemetrySettings, buildInfo component.BuildInfo) (*exporter, error) { +func newExporter(cfg config.Exporter, set component.ExporterCreateSettings) (*exporter, error) { oCfg := cfg.(*Config) if oCfg.Endpoint == "" { @@ -63,27 +67,27 @@ func newExporter(cfg config.Exporter, settings component.TelemetrySettings, buil } userAgent := fmt.Sprintf("%s/%s (%s/%s)", - buildInfo.Description, buildInfo.Version, runtime.GOOS, runtime.GOARCH) + set.BuildInfo.Description, set.BuildInfo.Version, runtime.GOOS, runtime.GOARCH) - return &exporter{config: oCfg, settings: settings, userAgent: userAgent}, nil + return &exporter{config: oCfg, settings: set.TelemetrySettings, userAgent: userAgent}, nil } // start actually creates the gRPC connection. The client construction is deferred till this point as this // is the only place we get hold of Extensions which are required to construct auth round tripper. -func (e *exporter) start(_ context.Context, host component.Host) (err error) { +func (e *exporter) start(ctx context.Context, host component.Host) (err error) { dialOpts, err := e.config.GRPCClientSettings.ToDialOptions(host, e.settings) if err != nil { return err } dialOpts = append(dialOpts, grpc.WithUserAgent(e.userAgent)) - if e.clientConn, err = grpc.Dial(e.config.GRPCClientSettings.SanitizedEndpoint(), dialOpts...); err != nil { + if e.clientConn, err = grpc.DialContext(ctx, e.config.GRPCClientSettings.SanitizedEndpoint(), dialOpts...); err != nil { return err } - e.traceExporter = otlpgrpc.NewTracesClient(e.clientConn) - e.metricExporter = otlpgrpc.NewMetricsClient(e.clientConn) - e.logExporter = otlpgrpc.NewLogsClient(e.clientConn) + e.traceExporter = ptraceotlp.NewClient(e.clientConn) + e.metricExporter = pmetricotlp.NewClient(e.clientConn) + e.logExporter = plogotlp.NewClient(e.clientConn) e.metadata = metadata.New(e.config.GRPCClientSettings.Headers) e.callOptions = []grpc.CallOption{ grpc.WaitForReady(e.config.GRPCClientSettings.WaitForReady), @@ -96,23 +100,20 @@ func (e *exporter) shutdown(context.Context) error { return e.clientConn.Close() } -func (e *exporter) pushTraces(ctx context.Context, td pdata.Traces) error { - req := otlpgrpc.NewTracesRequest() - req.SetTraces(td) +func (e *exporter) pushTraces(ctx context.Context, td ptrace.Traces) error { + req := ptraceotlp.NewRequestFromTraces(td) _, err := e.traceExporter.Export(e.enhanceContext(ctx), req, e.callOptions...) return processError(err) } -func (e *exporter) pushMetrics(ctx context.Context, md pdata.Metrics) error { - req := otlpgrpc.NewMetricsRequest() - req.SetMetrics(md) +func (e *exporter) pushMetrics(ctx context.Context, md pmetric.Metrics) error { + req := pmetricotlp.NewRequestFromMetrics(md) _, err := e.metricExporter.Export(e.enhanceContext(ctx), req, e.callOptions...) return processError(err) } -func (e *exporter) pushLogs(ctx context.Context, ld pdata.Logs) error { - req := otlpgrpc.NewLogsRequest() - req.SetLogs(ld) +func (e *exporter) pushLogs(ctx context.Context, ld plog.Logs) error { + req := plogotlp.NewRequestFromLogs(ld) _, err := e.logExporter.Export(e.enhanceContext(ctx), req, e.callOptions...) return processError(err) } @@ -124,9 +125,6 @@ func (e *exporter) enhanceContext(ctx context.Context) context.Context { return ctx } -// Send a trace or metrics request to the server. "perform" function is expected to make -// the actual gRPC unary call that sends the request. This function implements the -// common OTLP logic around request handling such as retries and throttling. func processError(err error) error { if err == nil { // Request is successful, we are done. @@ -143,48 +141,59 @@ func processError(err error) error { // Now, this is this a real error. - if !shouldRetry(st.Code()) { + retryInfo := getRetryInfo(st) + + if !shouldRetry(st.Code(), retryInfo) { // It is not a retryable error, we should not retry. return consumererror.NewPermanent(err) } - // Need to retry. - // Check if server returned throttling information. - throttleDuration := getThrottleDuration(st) + throttleDuration := getThrottleDuration(retryInfo) if throttleDuration != 0 { + // We are throttled. Wait before retrying as requested by the server. return exporterhelper.NewThrottleRetry(err, throttleDuration) } + // Need to retry. + return err } -func shouldRetry(code codes.Code) bool { +func shouldRetry(code codes.Code, retryInfo *errdetails.RetryInfo) bool { switch code { case codes.Canceled, codes.DeadlineExceeded, - codes.ResourceExhausted, codes.Aborted, codes.OutOfRange, codes.Unavailable, codes.DataLoss: // These are retryable errors. return true + case codes.ResourceExhausted: + // Retry only if RetryInfo was supplied by the server. + // This indicates that the server can still recover from resource exhaustion. + return retryInfo != nil } // Don't retry on any other code. return false } -func getThrottleDuration(status *status.Status) time.Duration { - // See if throttling information is available. +func getRetryInfo(status *status.Status) *errdetails.RetryInfo { for _, detail := range status.Details() { if t, ok := detail.(*errdetails.RetryInfo); ok { - if t.RetryDelay.Seconds > 0 || t.RetryDelay.Nanos > 0 { - // We are throttled. Wait before retrying as requested by the server. - return time.Duration(t.RetryDelay.Seconds)*time.Second + time.Duration(t.RetryDelay.Nanos)*time.Nanosecond - } - return 0 + return t } } + return nil +} + +func getThrottleDuration(t *errdetails.RetryInfo) time.Duration { + if t == nil || t.RetryDelay == nil { + return 0 + } + if t.RetryDelay.Seconds > 0 || t.RetryDelay.Nanos > 0 { + return time.Duration(t.RetryDelay.Seconds)*time.Second + time.Duration(t.RetryDelay.Nanos)*time.Nanosecond + } return 0 } diff --git a/internal/otel_collector/exporter/otlphttpexporter/README.md b/internal/otel_collector/exporter/otlphttpexporter/README.md index 159dbebda9a..3e6f160a2a2 100644 --- a/internal/otel_collector/exporter/otlphttpexporter/README.md +++ b/internal/otel_collector/exporter/otlphttpexporter/README.md @@ -1,14 +1,17 @@ # OTLP/HTTP Exporter -Exports traces and/or metrics via HTTP using [OTLP]( +| Status | | +| ------------------------ | --------------------- | +| Stability | traces [stable] | +| | metrics [stable] | +| | logs [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | + +Export traces and/or metrics via HTTP using [OTLP]( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) format. -Supported pipeline types: traces, metrics, logs - -:warning: OTLP logs format is currently marked as "Beta" and may change in -incompatible ways. - The following settings are required: - `endpoint` (no default): The target base URL to send data to (e.g.: https://example.com:4318). @@ -24,12 +27,7 @@ The following settings can be optionally configured: If this setting is present the `endpoint` setting is ignored for metrics. - `logs_endpoint` (no default): The target URL to send log data to (e.g.: https://example.com:4318/v1/logs). If this setting is present the `endpoint` setting is ignored logs. - -- `tls:` - - `insecure` (default = false): when set to true disables verifying the server's certificate chain and host name. The connection is still encrypted but server identity is not verified. - - `ca_file` path to the CA cert. For a client this verifies the server certificate. Should only be used if `insecure` is set to false. - - `cert_file` path to the TLS cert to use for TLS required connections. Should only be used if `insecure` is set to false. - - `key_file` path to the TLS key to use for TLS required connections. Should only be used if `insecure` is set to false. +- `tls`: see [TLS Configuration Settings](../../config/configtls/README.md) for the full set of available options. - `timeout` (default = 30s): HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client - `read_buffer_size` (default = 0): ReadBufferSize for HTTP client. - `write_buffer_size` (default = 512 * 1024): WriteBufferSize for HTTP client. @@ -42,5 +40,19 @@ exporters: endpoint: https://example.com:4318/v1/traces ``` +By default `gzip` compression is enabled. See [compression comparison](../../config/configgrpc/README.md#compression-comparison) for details benchmark information. To disable, configure as follows: + +```yaml +exporters: + otlphttp: + ... + compression: none +``` + The full list of settings exposed for this exporter are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable diff --git a/internal/otel_collector/exporter/otlphttpexporter/config.go b/internal/otel_collector/exporter/otlphttpexporter/config.go index ecd03695f31..2aa650a9667 100644 --- a/internal/otel_collector/exporter/otlphttpexporter/config.go +++ b/internal/otel_collector/exporter/otlphttpexporter/config.go @@ -15,6 +15,8 @@ package otlphttpexporter // import "go.opentelemetry.io/collector/exporter/otlphttpexporter" import ( + "errors" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -41,5 +43,8 @@ var _ config.Exporter = (*Config)(nil) // Validate checks if the exporter configuration is valid func (cfg *Config) Validate() error { + if cfg.Endpoint == "" && cfg.TracesEndpoint == "" && cfg.MetricsEndpoint == "" && cfg.LogsEndpoint == "" { + return errors.New("at least one endpoint must be specified") + } return nil } diff --git a/internal/otel_collector/exporter/otlphttpexporter/factory.go b/internal/otel_collector/exporter/otlphttpexporter/factory.go index 14c38e5ca95..3aacf923af8 100644 --- a/internal/otel_collector/exporter/otlphttpexporter/factory.go +++ b/internal/otel_collector/exporter/otlphttpexporter/factory.go @@ -22,6 +22,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,23 +35,26 @@ const ( // NewFactory creates a factory for OTLP exporter. func NewFactory() component.ExporterFactory { - return exporterhelper.NewFactory( + return component.NewExporterFactory( typeStr, createDefaultConfig, - exporterhelper.WithTraces(createTracesExporter), - exporterhelper.WithMetrics(createMetricsExporter), - exporterhelper.WithLogs(createLogsExporter)) + component.WithTracesExporterAndStabilityLevel(createTracesExporter, component.StabilityLevelStable), + component.WithMetricsExporterAndStabilityLevel(createMetricsExporter, component.StabilityLevelStable), + component.WithLogsExporterAndStabilityLevel(createLogsExporter, component.StabilityLevelBeta), + ) } func createDefaultConfig() config.Exporter { return &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), - RetrySettings: exporterhelper.DefaultRetrySettings(), - QueueSettings: exporterhelper.DefaultQueueSettings(), + RetrySettings: exporterhelper.NewDefaultRetrySettings(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), HTTPClientSettings: confighttp.HTTPClientSettings{ Endpoint: "", Timeout: 30 * time.Second, Headers: map[string]string{}, + // Default to gzip compression + Compression: configcompression.Gzip, // We almost read 0 bytes, so no need to tune ReadBufferSize. WriteBufferSize: 512 * 1024, }, diff --git a/internal/otel_collector/exporter/otlphttpexporter/otlp.go b/internal/otel_collector/exporter/otlphttpexporter/otlp.go index 44cacfa01a5..181ba978e48 100644 --- a/internal/otel_collector/exporter/otlphttpexporter/otlp.go +++ b/internal/otel_collector/exporter/otlphttpexporter/otlp.go @@ -35,8 +35,12 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/model/otlpgrpc" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) type exporter struct { @@ -57,7 +61,7 @@ const ( maxHTTPResponseReadBytes = 64 * 1024 ) -// Crete new exporter. +// Create new exporter. func newExporter(cfg config.Exporter, set component.ExporterCreateSettings) (*exporter, error) { oCfg := cfg.(*Config) @@ -91,10 +95,9 @@ func (e *exporter) start(_ context.Context, host component.Host) error { return nil } -func (e *exporter) pushTraces(ctx context.Context, td pdata.Traces) error { - tr := otlpgrpc.NewTracesRequest() - tr.SetTraces(td) - request, err := tr.Marshal() +func (e *exporter) pushTraces(ctx context.Context, td ptrace.Traces) error { + tr := ptraceotlp.NewRequestFromTraces(td) + request, err := tr.MarshalProto() if err != nil { return consumererror.NewPermanent(err) } @@ -102,20 +105,18 @@ func (e *exporter) pushTraces(ctx context.Context, td pdata.Traces) error { return e.export(ctx, e.tracesURL, request) } -func (e *exporter) pushMetrics(ctx context.Context, md pdata.Metrics) error { - tr := otlpgrpc.NewMetricsRequest() - tr.SetMetrics(md) - request, err := tr.Marshal() +func (e *exporter) pushMetrics(ctx context.Context, md pmetric.Metrics) error { + tr := pmetricotlp.NewRequestFromMetrics(md) + request, err := tr.MarshalProto() if err != nil { return consumererror.NewPermanent(err) } return e.export(ctx, e.metricsURL, request) } -func (e *exporter) pushLogs(ctx context.Context, ld pdata.Logs) error { - tr := otlpgrpc.NewLogsRequest() - tr.SetLogs(ld) - request, err := tr.Marshal() +func (e *exporter) pushLogs(ctx context.Context, ld plog.Logs) error { + tr := plogotlp.NewRequestFromLogs(ld) + request, err := tr.MarshalProto() if err != nil { return consumererror.NewPermanent(err) } diff --git a/internal/otel_collector/exporter/otlphttpexporter/testdata/bad_empty_config.yaml b/internal/otel_collector/exporter/otlphttpexporter/testdata/bad_empty_config.yaml new file mode 100644 index 00000000000..c52b900bbe9 --- /dev/null +++ b/internal/otel_collector/exporter/otlphttpexporter/testdata/bad_empty_config.yaml @@ -0,0 +1,15 @@ +receivers: + nop: + +processors: + nop: + +exporters: + otlphttp: + +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [otlphttp] diff --git a/internal/otel_collector/exporter/otlphttpexporter/testdata/config.yaml b/internal/otel_collector/exporter/otlphttpexporter/testdata/config.yaml index 61de8891da9..3d48e47f57a 100644 --- a/internal/otel_collector/exporter/otlphttpexporter/testdata/config.yaml +++ b/internal/otel_collector/exporter/otlphttpexporter/testdata/config.yaml @@ -5,7 +5,6 @@ processors: nop: exporters: - otlphttp: otlphttp/2: endpoint: "https://1.2.3.4:1234" tls: @@ -36,4 +35,4 @@ service: traces: receivers: [nop] processors: [nop] - exporters: [otlphttp] + exporters: [otlphttp/2] diff --git a/internal/otel_collector/extension/ballastextension/README.md b/internal/otel_collector/extension/ballastextension/README.md index be34676c701..41b3fd0679b 100644 --- a/internal/otel_collector/extension/ballastextension/README.md +++ b/internal/otel_collector/extension/ballastextension/README.md @@ -1,5 +1,10 @@ # Memory Ballast +| Status | | +| ------------------------ | ----------------- | +| Stability | [beta] | +| Distributions | [core], [contrib] | + Memory Ballast extension enables applications to configure memory ballast for the process. For more details see: - [Go memory ballast blogpost](https://web.archive.org/web/20210929130001/https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/) - [Golang issue related to this](https://github.com/golang/go/issues/23044) @@ -41,3 +46,7 @@ extensions: memory_ballast: size_in_percentage: 20 ``` + +[beta]: https://github.com/open-telemetry/opentelemetry-collector-contrib#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/internal/otel_collector/extension/ballastextension/config.go b/internal/otel_collector/extension/ballastextension/config.go index f03f166ad78..52063e4f795 100644 --- a/internal/otel_collector/extension/ballastextension/config.go +++ b/internal/otel_collector/extension/ballastextension/config.go @@ -15,7 +15,7 @@ package ballastextension // import "go.opentelemetry.io/collector/extension/ballastextension" import ( - "fmt" + "errors" "go.opentelemetry.io/collector/config" ) @@ -37,7 +37,7 @@ type Config struct { func (cfg *Config) Validate() error { // no need to validate less than 0 case for uint64 if cfg.SizeInPercentage > 100 { - return fmt.Errorf("size_in_percentage is not in range 0 to 100") + return errors.New("size_in_percentage is not in range 0 to 100") } return nil } diff --git a/internal/otel_collector/extension/ballastextension/factory.go b/internal/otel_collector/extension/ballastextension/factory.go index 825a3fc3db2..cbf542e5126 100644 --- a/internal/otel_collector/extension/ballastextension/factory.go +++ b/internal/otel_collector/extension/ballastextension/factory.go @@ -19,7 +19,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/extension/extensionhelper" "go.opentelemetry.io/collector/internal/iruntime" ) @@ -33,10 +32,7 @@ var memHandler = iruntime.TotalMemory // NewFactory creates a factory for FluentBit extension. func NewFactory() component.ExtensionFactory { - return extensionhelper.NewFactory( - typeStr, - createDefaultConfig, - createExtension) + return component.NewExtensionFactory(typeStr, createDefaultConfig, createExtension) } func createDefaultConfig() config.Extension { diff --git a/internal/otel_collector/extension/extensionhelper/factory.go b/internal/otel_collector/extension/extensionhelper/factory.go deleted file mode 100644 index d12617f3cea..00000000000 --- a/internal/otel_collector/extension/extensionhelper/factory.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package extensionhelper // import "go.opentelemetry.io/collector/extension/extensionhelper" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/internal/internalinterface" -) - -// FactoryOption apply changes to ExporterOptions. -type FactoryOption func(o *factory) - -// CreateDefaultConfig is the equivalent of component.ExtensionFactory.CreateDefaultConfig() -type CreateDefaultConfig func() config.Extension - -// CreateServiceExtension is the equivalent of component.ExtensionFactory.CreateExtension() -type CreateServiceExtension func(context.Context, component.ExtensionCreateSettings, config.Extension) (component.Extension, error) - -type factory struct { - internalinterface.BaseInternal - cfgType config.Type - createDefaultConfig CreateDefaultConfig - createServiceExtension CreateServiceExtension -} - -// NewFactory returns a component.ExtensionFactory. -func NewFactory( - cfgType config.Type, - createDefaultConfig CreateDefaultConfig, - createServiceExtension CreateServiceExtension, - options ...FactoryOption) component.ExtensionFactory { - f := &factory{ - cfgType: cfgType, - createDefaultConfig: createDefaultConfig, - createServiceExtension: createServiceExtension, - } - for _, opt := range options { - opt(f) - } - return f -} - -// Type gets the type of the Extension config created by this factory. -func (f *factory) Type() config.Type { - return f.cfgType -} - -// CreateDefaultConfig creates the default configuration for processor. -func (f *factory) CreateDefaultConfig() config.Extension { - return f.createDefaultConfig() -} - -// CreateExtension creates a component.TraceExtension based on this config. -func (f *factory) CreateExtension( - ctx context.Context, - set component.ExtensionCreateSettings, - cfg config.Extension) (component.Extension, error) { - return f.createServiceExtension(ctx, set, cfg) -} diff --git a/internal/otel_collector/extension/zpagesextension/README.md b/internal/otel_collector/extension/zpagesextension/README.md index 7c60c5344ab..4af9999c3f8 100644 --- a/internal/otel_collector/extension/zpagesextension/README.md +++ b/internal/otel_collector/extension/zpagesextension/README.md @@ -1,5 +1,10 @@ # zPages +| Status | | +| ------------------------ | ----------------- | +| Stability | [beta] | +| Distributions | [core], [contrib] | + Enables an extension that serves zPages, an HTTP endpoint that provides live data for debugging different components that were properly instrumented for such. All core exporters and receivers provide some zPage instrumentation. @@ -28,9 +33,9 @@ The collector exposes the following zPage routes: ### ServiceZ -ServiceZ gives an overview of the collector services by gives quick access to the -`pipelinez` and `extensionz` zPages. The page also provides build and runtime -information. +ServiceZ gives an overview of the collector services and quick access to the +`pipelinez`, `extensionz`, and `featurez` zPages. The page also provides build +and runtime information. Example URL: http://localhost:55679/debug/servicez @@ -48,6 +53,13 @@ ExtensionZ shows the extensions that are active in the collector. Example URL: http://localhost:55679/debug/extensionz +### FeatureZ + +FeatureZ lists the feature gates available along with their current status +and description. + +Example URL: http://localhost:55679/debug/featurez + ### TraceZ The TraceZ route is available to examine and bucketize spans by latency buckets for example @@ -63,5 +75,6 @@ that are properly instrumented. For example when using gRPC Example URL: http://localhost:55679/debug/rpcz - - +[beta]: https://github.com/open-telemetry/opentelemetry-collector-contrib#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/internal/otel_collector/extension/zpagesextension/factory.go b/internal/otel_collector/extension/zpagesextension/factory.go index 666843ff65e..56483705ea7 100644 --- a/internal/otel_collector/extension/zpagesextension/factory.go +++ b/internal/otel_collector/extension/zpagesextension/factory.go @@ -20,7 +20,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/extension/extensionhelper" ) const ( @@ -32,10 +31,7 @@ const ( // NewFactory creates a factory for Z-Pages extension. func NewFactory() component.ExtensionFactory { - return extensionhelper.NewFactory( - typeStr, - createDefaultConfig, - createExtension) + return component.NewExtensionFactory(typeStr, createDefaultConfig, createExtension) } func createDefaultConfig() config.Extension { @@ -49,5 +45,5 @@ func createDefaultConfig() config.Extension { // createExtension creates the extension based on this config. func createExtension(_ context.Context, set component.ExtensionCreateSettings, cfg config.Extension) (component.Extension, error) { - return newServer(cfg.(*Config), set.Logger), nil + return newServer(cfg.(*Config), set.TelemetrySettings), nil } diff --git a/internal/otel_collector/extension/zpagesextension/zpagesextension.go b/internal/otel_collector/extension/zpagesextension/zpagesextension.go index 22db8ae7c19..da97462ee82 100644 --- a/internal/otel_collector/extension/zpagesextension/zpagesextension.go +++ b/internal/otel_collector/extension/zpagesextension/zpagesextension.go @@ -16,31 +16,64 @@ package zpagesextension // import "go.opentelemetry.io/collector/extension/zpage import ( "context" + "errors" "net/http" + "path" + "go.opentelemetry.io/contrib/zpages" + "go.opentelemetry.io/otel/sdk/trace" "go.uber.org/zap" "go.opentelemetry.io/collector/component" ) +const ( + tracezPath = "tracez" +) + type zpagesExtension struct { - config *Config - logger *zap.Logger - server http.Server - stopCh chan struct{} + config *Config + telemetry component.TelemetrySettings + zpagesSpanProcessor *zpages.SpanProcessor + server http.Server + stopCh chan struct{} +} + +// registerableTracerProvider is a tracer that supports +// the SDK methods RegisterSpanProcessor and UnregisterSpanProcessor. +// +// We use an interface instead of casting to the SDK tracer type to support tracer providers +// that extend the SDK. +type registerableTracerProvider interface { + // RegisterSpanProcessor adds the given SpanProcessor to the list of SpanProcessors. + // https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace#TracerProvider.RegisterSpanProcessor. + RegisterSpanProcessor(SpanProcessor trace.SpanProcessor) + + // UnregisterSpanProcessor removes the given SpanProcessor from the list of SpanProcessors. + // https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace#TracerProvider.UnregisterSpanProcessor. + UnregisterSpanProcessor(SpanProcessor trace.SpanProcessor) } func (zpe *zpagesExtension) Start(_ context.Context, host component.Host) error { zPagesMux := http.NewServeMux() + sdktracer, ok := zpe.telemetry.TracerProvider.(registerableTracerProvider) + if ok { + sdktracer.RegisterSpanProcessor(zpe.zpagesSpanProcessor) + zPagesMux.Handle(path.Join("/debug", tracezPath), zpages.NewTracezHandler(zpe.zpagesSpanProcessor)) + zpe.telemetry.Logger.Info("Registered zPages span processor on tracer provider") + } else { + zpe.telemetry.Logger.Warn("zPages span processor registration is not available") + } + hostZPages, ok := host.(interface { RegisterZPages(mux *http.ServeMux, pathPrefix string) }) if ok { - zpe.logger.Info("Register Host's zPages") hostZPages.RegisterZPages(zPagesMux, "/debug") + zpe.telemetry.Logger.Info("Registered Host's zPages") } else { - zpe.logger.Info("Host's zPages not available") + zpe.telemetry.Logger.Warn("Host's zPages not available") } // Start the listener here so we can have earlier failure if port is @@ -50,14 +83,14 @@ func (zpe *zpagesExtension) Start(_ context.Context, host component.Host) error return err } - zpe.logger.Info("Starting zPages extension", zap.Any("config", zpe.config)) + zpe.telemetry.Logger.Info("Starting zPages extension", zap.Any("config", zpe.config)) zpe.server = http.Server{Handler: zPagesMux} zpe.stopCh = make(chan struct{}) go func() { defer close(zpe.stopCh) - if err := zpe.server.Serve(ln); err != nil && err != http.ErrServerClosed { - host.ReportFatalError(err) + if errHTTP := zpe.server.Serve(ln); errHTTP != nil && !errors.Is(errHTTP, http.ErrServerClosed) { + host.ReportFatalError(errHTTP) } }() @@ -69,12 +102,22 @@ func (zpe *zpagesExtension) Shutdown(context.Context) error { if zpe.stopCh != nil { <-zpe.stopCh } + + sdktracer, ok := zpe.telemetry.TracerProvider.(registerableTracerProvider) + if ok { + sdktracer.UnregisterSpanProcessor(zpe.zpagesSpanProcessor) + zpe.telemetry.Logger.Info("Unregistered zPages span processor on tracer provider") + } else { + zpe.telemetry.Logger.Warn("zPages span processor registration is not available") + } + return err } -func newServer(config *Config, logger *zap.Logger) *zpagesExtension { +func newServer(config *Config, telemetry component.TelemetrySettings) *zpagesExtension { return &zpagesExtension{ - config: config, - logger: logger, + config: config, + telemetry: telemetry, + zpagesSpanProcessor: zpages.NewSpanProcessor(), } } diff --git a/internal/otel_collector/go.mod b/internal/otel_collector/go.mod index fe581f5b46e..4fa6389b804 100644 --- a/internal/otel_collector/go.mod +++ b/internal/otel_collector/go.mod @@ -3,43 +3,43 @@ module go.opentelemetry.io/collector go 1.17 require ( - contrib.go.opencensus.io/exporter/prometheus v0.4.0 - github.com/cenkalti/backoff/v4 v4.1.2 + contrib.go.opencensus.io/exporter/prometheus v0.4.1 + github.com/cenkalti/backoff/v4 v4.1.3 github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 github.com/google/uuid v1.3.0 - github.com/gorilla/mux v1.8.0 - github.com/klauspost/compress v1.14.2 - github.com/knadh/koanf v1.4.0 - github.com/magiconair/properties v1.8.5 - github.com/mitchellh/mapstructure v1.4.3 + github.com/klauspost/compress v1.15.8 + github.com/knadh/koanf v1.4.2 + github.com/magiconair/properties v1.8.6 + github.com/mitchellh/mapstructure v1.5.0 github.com/mostynb/go-grpc-compression v1.1.16 - github.com/prometheus/common v0.32.1 + github.com/prometheus/common v0.37.0 github.com/rs/cors v1.8.2 - github.com/shirou/gopsutil/v3 v3.21.12 - github.com/spf13/cast v1.4.1 - github.com/spf13/cobra v1.3.0 - github.com/stretchr/testify v1.7.0 + github.com/shirou/gopsutil/v3 v3.22.6 + github.com/spf13/cast v1.5.0 + github.com/spf13/cobra v1.5.0 + github.com/stretchr/testify v1.8.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector/model v0.44.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 - go.opentelemetry.io/contrib/zpages v0.28.0 - go.opentelemetry.io/otel v1.3.0 - go.opentelemetry.io/otel/exporters/prometheus v0.26.0 - go.opentelemetry.io/otel/metric v0.26.0 - go.opentelemetry.io/otel/sdk v1.3.0 - go.opentelemetry.io/otel/sdk/export/metric v0.26.0 - go.opentelemetry.io/otel/sdk/metric v0.26.0 - go.opentelemetry.io/otel/trace v1.3.0 + go.opentelemetry.io/collector/pdata v0.56.0 + go.opentelemetry.io/collector/semconv v0.56.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 + go.opentelemetry.io/contrib/zpages v0.33.0 + go.opentelemetry.io/otel v1.8.0 + go.opentelemetry.io/otel/exporters/prometheus v0.31.0 + go.opentelemetry.io/otel/metric v0.31.0 + go.opentelemetry.io/otel/sdk v1.8.0 + go.opentelemetry.io/otel/sdk/metric v0.31.0 + go.opentelemetry.io/otel/trace v1.8.0 go.uber.org/atomic v1.9.0 - go.uber.org/multierr v1.7.0 - go.uber.org/zap v1.20.0 - golang.org/x/sys v0.0.0-20211205182925-97ca703d548d + go.uber.org/multierr v1.8.0 + go.uber.org/zap v1.21.0 + golang.org/x/net v0.0.0-20220225172249-27dd8689420f + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa - google.golang.org/grpc v1.44.0 - google.golang.org/protobuf v1.27.1 - gopkg.in/yaml.v2 v2.4.0 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -47,35 +47,38 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/go-kit/log v0.1.0 // indirect - github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/logr v1.2.1 // indirect - github.com/go-logr/stdr v1.2.0 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/go-kit/log v0.2.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/prometheus/statsd_exporter v0.21.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/tklauser/go-sysconf v0.3.9 // indirect - github.com/tklauser/numcpus v0.3.0 // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel/internal/metric v0.26.0 // indirect - golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect golang.org/x/text v0.3.7 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) -replace go.opentelemetry.io/collector/model => ./model +replace go.opentelemetry.io/collector/semconv => ./semconv + +replace go.opentelemetry.io/collector/pdata => ./pdata retract v0.32.0 // Contains incomplete metrics transition to proto 0.9.0, random components are not working. diff --git a/internal/otel_collector/go.sum b/internal/otel_collector/go.sum index d54fb78a635..077c24a060c 100644 --- a/internal/otel_collector/go.sum +++ b/internal/otel_collector/go.sum @@ -12,22 +12,8 @@ cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bP cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -36,7 +22,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -47,12 +32,11 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= -contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= +contrib.go.opencensus.io/exporter/prometheus v0.4.1 h1:oObVeKo2NxpdF/fIfrPsNj6K0Prg0R0mHM+uANlYMiM= +contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -60,11 +44,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -83,11 +64,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -95,11 +74,8 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -107,10 +83,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -118,50 +91,45 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= -github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.0 h1:j4LrlVXgrbIWO83mmQUnK0Hi+YnbD+vzrE1z/EphbFE= -github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -178,8 +146,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -195,11 +161,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -211,17 +175,15 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -229,70 +191,37 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -301,9 +230,9 @@ github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -312,17 +241,14 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.14.2 h1:S0OHlFk/Gbon/yauFJ4FfJJF5V0fc5HbBTJazi28pRw= -github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/knadh/koanf v1.4.0 h1:/k0Bh49SqLyLNfte9r6cvuZWrApOQhglOmhIU3L/zDw= -github.com/knadh/koanf v1.4.0/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/klauspost/compress v1.15.8 h1:JahtItbkWjf2jzm/T+qgMxkP9EMHsqEUA6vCMGmXvhA= +github.com/klauspost/compress v1.15.8/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/knadh/koanf v1.4.2 h1:2itp+cdC6miId4pO4Jw7c/3eiYD26Z/Sz3ATJMwHxIs= +github.com/knadh/koanf v1.4.2/go.mod h1:4NCo0q4pmU398vF9vq2jStF9MWQZ8JEDcDMHlDCr4h0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -331,27 +257,13 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -360,18 +272,19 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mostynb/go-grpc-compression v1.1.16 h1:D9tGUINmcII049pxOj9dl32Fzhp26TrDVQXECoKJqQg= github.com/mostynb/go-grpc-compression v1.1.16/go.mod h1:xxa6UoYynYS2h+5HB/Hglu81iYAp87ARaNmhhwi0s1s= @@ -382,11 +295,9 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pierrec/cmdflag v0.0.2/go.mod h1:a3zKGZ3cdQUfxjd0RGMLZr8xI3nvpJOB+m6o/1X5BmU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v3 v3.3.4/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbORyey8Q= @@ -394,37 +305,37 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= @@ -435,43 +346,38 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= -github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= +github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ= +github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -479,39 +385,31 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 h1:Ky1MObd188aGbgb5OgNnwGuEEwI9MVIcc7rBW6zk5Ak= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4= -go.opentelemetry.io/contrib/zpages v0.28.0 h1:4ANASd9xZw1GtMfvtBuqSfnqpMC79wePb3dQLNWBrEw= -go.opentelemetry.io/contrib/zpages v0.28.0/go.mod h1:y5RYQQgfEQV6oASayfbUv5ye5bnnncor+Ln18jMrVKY= -go.opentelemetry.io/otel v1.3.0 h1:APxLf0eiBwLl+SOXiJJCVYzA1OOJNyAoV8C5RNRyy7Y= -go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= -go.opentelemetry.io/otel/exporters/prometheus v0.26.0 h1:qsF1KFEE+dIRoQN0M0D/A9mdhu0TqQCNAzl0o1S2CIM= -go.opentelemetry.io/otel/exporters/prometheus v0.26.0/go.mod h1:0/uJZI7H2y0FgMVCgCWdPzZpxPx3X3F5uInY32I9foI= -go.opentelemetry.io/otel/internal/metric v0.26.0 h1:dlrvawyd/A+X8Jp0EBT4wWEe4k5avYaXsXrBr4dbfnY= -go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk= -go.opentelemetry.io/otel/metric v0.26.0 h1:VaPYBTvA13h/FsiWfxa3yZnZEm15BhStD8JZQSA773M= -go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg= -go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI= -go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= -go.opentelemetry.io/otel/sdk/export/metric v0.26.0 h1:eNseg5yyZqaAAY+Att3owR3Bl0Is5rCZywqO1OrGx18= -go.opentelemetry.io/otel/sdk/export/metric v0.26.0/go.mod h1:UpqzSnUOjFeSIVQLPp3pYIXfB/MiMFyXXzYT/bercxQ= -go.opentelemetry.io/otel/sdk/metric v0.26.0 h1:7IKp3gc/ObieCtshBeYYVFp3ZP7xIH1OzODi1Wao90Y= -go.opentelemetry.io/otel/sdk/metric v0.26.0/go.mod h1:2VIeK0kS1YvRLFg3J58ptZTXYpiWlkq2n5RQt6w7He8= -go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1NOGY= -go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0 h1:z6rnla1Asjzn0FrhohzIbDi4bxbtc6EMmQ7f5ZPn+pA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0/go.mod h1:y/SlJpJQPd2UzfBCj0E9Flk9FDCtTyqUmaCB41qFrWI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 h1:Z0lVKLXU+jxGf3ANoh+UWx9Ai5bjpQVnZXI1zEzvqS0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0/go.mod h1:U5rUt7Rw6zuORsWNfpMRy8XMNKLrmIlv/4HgLVW/d5M= +go.opentelemetry.io/contrib/zpages v0.33.0 h1:0JATTp4rT56Mrfrq1icN9GqrI+1uFjq2NwJJRl8m3fk= +go.opentelemetry.io/contrib/zpages v0.33.0/go.mod h1:ddmD63NkBVE29GucaBBCR8/b/TRlY+PkpIbF3m2JF7Y= +go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= +go.opentelemetry.io/otel/exporters/prometheus v0.31.0 h1:jwtnOGBM8dIty5AVZ+9ZCzZexCea3aVKmUfZAQcHqxs= +go.opentelemetry.io/otel/exporters/prometheus v0.31.0/go.mod h1:QarXIB8L79IwIPoNgG3A6zNvBgVmcppeFogV1d8612s= +go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= +go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk= +go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c= +go.opentelemetry.io/otel/sdk/metric v0.31.0 h1:2sZx4R43ZMhJdteKAlKoHvRgrMp53V1aRxvEf5lCq8Q= +go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk= +go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -519,21 +417,16 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= -go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -556,8 +449,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -566,14 +457,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -586,7 +473,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -602,37 +488,20 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -648,11 +517,9 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -663,19 +530,13 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -689,50 +550,29 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= @@ -753,7 +593,6 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -782,22 +621,11 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -815,30 +643,13 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -870,38 +681,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -918,24 +697,13 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -948,18 +716,17 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -972,8 +739,10 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/otel_collector/internal/buildscripts/gen-certs.sh b/internal/otel_collector/internal/buildscripts/gen-certs.sh index e5266367bf2..8edcbe1ecc8 100644 --- a/internal/otel_collector/internal/buildscripts/gen-certs.sh +++ b/internal/otel_collector/internal/buildscripts/gen-certs.sh @@ -9,14 +9,16 @@ usage() { echo "-d Dry-run mode. No project files will not be modified. Default: 'false'" echo "-m Domain name to use in the certificate. Default: 'localhost'" echo "-o Output directory where certificates will be written to. Default: '.'; the current directory" + echo "-s A suffix for the generated certificate. Default: \"\"; an empty string" exit 1 } dry_run=false domain="localhost" output_dir="." +suffix="" -while getopts "dm:o:" o; do +while getopts "dm:o:s:" o; do case "${o}" in d) dry_run=true @@ -27,6 +29,9 @@ while getopts "dm:o:" o; do o) output_dir=$OPTARG ;; + s) + suffix=$OPTARG + ;; *) usage ;; @@ -37,7 +42,7 @@ shift $((OPTIND-1)) set -ex # Create temp dir for generated files. -tmp_dir=$(mktemp -d -t certificates) +tmp_dir=$(mktemp -d -t certificatesXXX) clean_up() { ARG=$? if [ $dry_run = true ]; then @@ -79,47 +84,47 @@ EOF gen_ssl_conf "$domain" "$tmp_dir/ssl.conf" # Create CA (accept defaults from prompts). -openssl genrsa -out "$tmp_dir/ca.key" 2048 -openssl req -new -key "$tmp_dir/ca.key" -x509 -days 3650 -out "$tmp_dir/ca.crt" -config "$tmp_dir/ssl.conf" +openssl genrsa -out "$tmp_dir/ca${suffix}.key" 2048 +openssl req -new -key "$tmp_dir/ca${suffix}.key" -x509 -days 3650 -out "$tmp_dir/ca${suffix}.crt" -config "$tmp_dir/ssl.conf" # Create client and server keys. -openssl genrsa -out "$tmp_dir/server.key" 2048 -openssl genrsa -out "$tmp_dir/client.key" 2048 +openssl genrsa -out "$tmp_dir/server${suffix}.key" 2048 +openssl genrsa -out "$tmp_dir/client${suffix}.key" 2048 # Create certificate sign request using the above created keys. -openssl req -new -nodes -key "$tmp_dir/server.key" -out "$tmp_dir/server.csr" -config "$tmp_dir/ssl.conf" -openssl req -new -nodes -key "$tmp_dir/client.key" -out "$tmp_dir/client.csr" -config "$tmp_dir/ssl.conf" +openssl req -new -nodes -key "$tmp_dir/server${suffix}.key" -out "$tmp_dir/server${suffix}.csr" -config "$tmp_dir/ssl.conf" +openssl req -new -nodes -key "$tmp_dir/client${suffix}.key" -out "$tmp_dir/client${suffix}.csr" -config "$tmp_dir/ssl.conf" # Creating the client and server certificates. openssl x509 -req \ -sha256 \ -days 3650 \ - -in "$tmp_dir/server.csr" \ - -signkey "$tmp_dir/server.key" \ - -out "$tmp_dir/server.crt" \ + -in "$tmp_dir/server${suffix}.csr" \ + -signkey "$tmp_dir/server${suffix}.key" \ + -out "$tmp_dir/server${suffix}.crt" \ -extensions req_ext \ - -CA "$tmp_dir/ca.crt" \ - -CAkey "$tmp_dir/ca.key" \ + -CA "$tmp_dir/ca${suffix}.crt" \ + -CAkey "$tmp_dir/ca${suffix}.key" \ -CAcreateserial \ -extfile "$tmp_dir/ssl.conf" openssl x509 -req \ -sha256 \ -days 3650 \ - -in "$tmp_dir/client.csr" \ - -signkey "$tmp_dir/client.key" \ - -out "$tmp_dir/client.crt" \ + -in "$tmp_dir/client${suffix}.csr" \ + -signkey "$tmp_dir/client${suffix}.key" \ + -out "$tmp_dir/client${suffix}.crt" \ -extensions req_ext \ - -CA "$tmp_dir/ca.crt" \ - -CAkey "$tmp_dir/ca.key" \ + -CA "$tmp_dir/ca${suffix}.crt" \ + -CAkey "$tmp_dir/ca${suffix}.key" \ -CAcreateserial \ -extfile "$tmp_dir/ssl.conf" # Copy files if not in dry-run mode. if [ $dry_run = false ]; then - cp "$tmp_dir/ca.crt" \ - "$tmp_dir/client.crt" \ - "$tmp_dir/client.key" \ - "$tmp_dir/server.crt" \ - "$tmp_dir/server.key" \ + cp "$tmp_dir/ca${suffix}.crt" \ + "$tmp_dir/client${suffix}.crt" \ + "$tmp_dir/client${suffix}.key" \ + "$tmp_dir/server${suffix}.crt" \ + "$tmp_dir/server${suffix}.key" \ "$output_dir" fi diff --git a/internal/otel_collector/internal/internalconsumertest/err_or_sink_consumer.go b/internal/otel_collector/internal/internalconsumertest/err_or_sink_consumer.go index fb5f8914bf7..6936e07246d 100644 --- a/internal/otel_collector/internal/internalconsumertest/err_or_sink_consumer.go +++ b/internal/otel_collector/internal/internalconsumertest/err_or_sink_consumer.go @@ -20,7 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) type ErrOrSinkConsumer struct { @@ -42,7 +43,7 @@ func (esc *ErrOrSinkConsumer) Capabilities() consumer.Capabilities { } // ConsumeTraces stores traces to this sink. -func (esc *ErrOrSinkConsumer) ConsumeTraces(ctx context.Context, td pdata.Traces) error { +func (esc *ErrOrSinkConsumer) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { esc.mu.Lock() defer esc.mu.Unlock() @@ -54,7 +55,7 @@ func (esc *ErrOrSinkConsumer) ConsumeTraces(ctx context.Context, td pdata.Traces } // ConsumeMetrics stores metrics to this sink. -func (esc *ErrOrSinkConsumer) ConsumeMetrics(ctx context.Context, md pdata.Metrics) error { +func (esc *ErrOrSinkConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { esc.mu.Lock() defer esc.mu.Unlock() diff --git a/internal/otel_collector/internal/internalinterface/internalinterface.go b/internal/otel_collector/internal/internalinterface/internalinterface.go deleted file mode 100644 index b6f24aa7231..00000000000 --- a/internal/otel_collector/internal/internalinterface/internalinterface.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internalinterface // import "go.opentelemetry.io/collector/internal/internalinterface" - -// InternalInterface is an interface used to prevent library consumers -// to implement a given interface. -type InternalInterface interface { - // unexportedMethod is a dummy method to force this interface to not be implemented. - unexportedMethod() -} - -var _ InternalInterface = (*BaseInternal)(nil) - -// BaseInternal must be embedded on structs implementing InternalInterface. -type BaseInternal struct{} - -// unexportedMethod implements the internal interface. -func (*BaseInternal) unexportedMethod() {} diff --git a/internal/otel_collector/internal/obsreportconfig/obsreportconfig.go b/internal/otel_collector/internal/obsreportconfig/obsreportconfig.go index e9f960d553f..c21a5cd4a17 100644 --- a/internal/otel_collector/internal/obsreportconfig/obsreportconfig.go +++ b/internal/otel_collector/internal/obsreportconfig/obsreportconfig.go @@ -15,18 +15,17 @@ package obsreportconfig // import "go.opentelemetry.io/collector/internal/obsreportconfig" import ( - "sync/atomic" - "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" + "go.uber.org/atomic" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) var ( - globalLevel = int32(configtelemetry.LevelBasic) + globalLevel = atomic.NewInt32(int32(configtelemetry.LevelBasic)) ) // ObsMetrics wraps OpenCensus View for Collector observability metrics @@ -37,7 +36,7 @@ type ObsMetrics struct { // Configure is used to control the settings that will be used by the obsreport // package. func Configure(level configtelemetry.Level) *ObsMetrics { - atomic.StoreInt32(&globalLevel, int32(level)) + globalLevel.Store(int32(level)) var views []*view.View @@ -52,7 +51,7 @@ func Configure(level configtelemetry.Level) *ObsMetrics { } func Level() configtelemetry.Level { - return configtelemetry.Level(atomic.LoadInt32(&globalLevel)) + return configtelemetry.Level(globalLevel.Load()) } // allViews return the list of all views that needs to be configured. diff --git a/internal/otel_collector/internal/testcomponents/example_exporter.go b/internal/otel_collector/internal/testcomponents/example_exporter.go index 439b02aeacf..7c3dc8ed492 100644 --- a/internal/otel_collector/internal/testcomponents/example_exporter.go +++ b/internal/otel_collector/internal/testcomponents/example_exporter.go @@ -20,111 +20,88 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) -var _ config.Unmarshallable = (*ExampleExporter)(nil) +const ( + typeStr = "exampleexporter" + stability = component.StabilityLevelInDevelopment +) -// ExampleExporter is for testing purposes. We are defining an example config and factory -// for "exampleexporter" exporter type. -type ExampleExporter struct { +// ExampleExporterConfig config for ExampleExporter. +type ExampleExporterConfig struct { config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct - ExtraInt int32 `mapstructure:"extra_int"` - ExtraSetting string `mapstructure:"extra"` - ExtraMapSetting map[string]string `mapstructure:"extra_map"` - ExtraListSetting []string `mapstructure:"extra_list"` -} - -// Unmarshal a config.Map data into the config struct -func (cfg *ExampleExporter) Unmarshal(componentParser *config.Map) error { - return componentParser.UnmarshalExact(cfg) } -const expType = "exampleexporter" - // ExampleExporterFactory is factory for ExampleExporter. -var ExampleExporterFactory = exporterhelper.NewFactory( - expType, +var ExampleExporterFactory = component.NewExporterFactory( + typeStr, createExporterDefaultConfig, - exporterhelper.WithTraces(createTracesExporter), - exporterhelper.WithMetrics(createMetricsExporter), - exporterhelper.WithLogs(createLogsExporter)) + component.WithTracesExporterAndStabilityLevel(createTracesExporter, stability), + component.WithMetricsExporterAndStabilityLevel(createMetricsExporter, stability), + component.WithLogsExporterAndStabilityLevel(createLogsExporter, stability), +) -// CreateDefaultConfig creates the default configuration for the Exporter. func createExporterDefaultConfig() config.Exporter { - return &ExampleExporter{ - ExporterSettings: config.NewExporterSettings(config.NewComponentID(expType)), - ExtraSetting: "some export string", - ExtraMapSetting: nil, - ExtraListSetting: nil, + return &ExampleExporterConfig{ + ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), } } -func createTracesExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.TracesExporter, error) { - return &ExampleExporterConsumer{}, nil +func createTracesExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.TracesExporter, error) { + return &ExampleExporter{}, nil } -func createMetricsExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.MetricsExporter, error) { - return &ExampleExporterConsumer{}, nil +func createMetricsExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.MetricsExporter, error) { + return &ExampleExporter{}, nil } -func createLogsExporter( - _ context.Context, - _ component.ExporterCreateSettings, - _ config.Exporter, -) (component.LogsExporter, error) { - return &ExampleExporterConsumer{}, nil +func createLogsExporter(context.Context, component.ExporterCreateSettings, config.Exporter) (component.LogsExporter, error) { + return &ExampleExporter{}, nil } -// ExampleExporterConsumer stores consumed traces and metrics for testing purposes. -type ExampleExporterConsumer struct { - Traces []pdata.Traces - Metrics []pdata.Metrics - Logs []pdata.Logs - ExporterStarted bool - ExporterShutdown bool +// ExampleExporter stores consumed traces and metrics for testing purposes. +type ExampleExporter struct { + Traces []ptrace.Traces + Metrics []pmetric.Metrics + Logs []plog.Logs + Started bool + Stopped bool } // Start tells the exporter to start. The exporter may prepare for exporting // by connecting to the endpoint. Host parameter can be used for communicating // with the host after Start() has already returned. -func (exp *ExampleExporterConsumer) Start(_ context.Context, _ component.Host) error { - exp.ExporterStarted = true +func (exp *ExampleExporter) Start(_ context.Context, _ component.Host) error { + exp.Started = true return nil } -// ConsumeTraces receives pdata.Traces for processing by the consumer.Traces. -func (exp *ExampleExporterConsumer) ConsumeTraces(_ context.Context, td pdata.Traces) error { +// ConsumeTraces receives ptrace.Traces for processing by the consumer.Traces. +func (exp *ExampleExporter) ConsumeTraces(_ context.Context, td ptrace.Traces) error { exp.Traces = append(exp.Traces, td) return nil } -func (exp *ExampleExporterConsumer) Capabilities() consumer.Capabilities { +func (exp *ExampleExporter) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } -// ConsumeMetrics receives pdata.Metrics for processing by the Metrics. -func (exp *ExampleExporterConsumer) ConsumeMetrics(_ context.Context, md pdata.Metrics) error { +// ConsumeMetrics receives pmetric.Metrics for processing by the Metrics. +func (exp *ExampleExporter) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { exp.Metrics = append(exp.Metrics, md) return nil } -func (exp *ExampleExporterConsumer) ConsumeLogs(_ context.Context, ld pdata.Logs) error { +func (exp *ExampleExporter) ConsumeLogs(_ context.Context, ld plog.Logs) error { exp.Logs = append(exp.Logs, ld) return nil } // Shutdown is invoked during shutdown. -func (exp *ExampleExporterConsumer) Shutdown(context.Context) error { - exp.ExporterShutdown = true +func (exp *ExampleExporter) Shutdown(context.Context) error { + exp.Stopped = true return nil } diff --git a/internal/otel_collector/internal/testcomponents/example_extension.go b/internal/otel_collector/internal/testcomponents/example_extension.go deleted file mode 100644 index 9471d2c4f4a..00000000000 --- a/internal/otel_collector/internal/testcomponents/example_extension.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package testcomponents // import "go.opentelemetry.io/collector/internal/testcomponents" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/extension/extensionhelper" -) - -// ExampleExtensionCfg is for testing purposes. We are defining an example config and factory -// for "exampleextension" extension type. -type ExampleExtensionCfg struct { - config.ExtensionSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct - ExtraSetting string `mapstructure:"extra"` - ExtraMapSetting map[string]string `mapstructure:"extra_map"` - ExtraListSetting []string `mapstructure:"extra_list"` -} - -const extType = "exampleextension" - -// ExampleExtensionFactory is factory for ExampleExtensionCfg. -var ExampleExtensionFactory = extensionhelper.NewFactory(extType, createExtensionDefaultConfig, createExtension) - -// CreateDefaultConfig creates the default configuration for the Extension. -func createExtensionDefaultConfig() config.Extension { - return &ExampleExtensionCfg{ - ExtensionSettings: config.NewExtensionSettings(config.NewComponentID(extType)), - ExtraSetting: "extra string setting", - ExtraMapSetting: nil, - ExtraListSetting: nil, - } -} - -// CreateExtension creates an Extension based on this config. -func createExtension(context.Context, component.ExtensionCreateSettings, config.Extension) (component.Extension, error) { - return componenthelper.New(), nil -} diff --git a/internal/otel_collector/internal/testcomponents/example_factories.go b/internal/otel_collector/internal/testcomponents/example_factories.go index 44935a0d66b..38f654bb901 100644 --- a/internal/otel_collector/internal/testcomponents/example_factories.go +++ b/internal/otel_collector/internal/testcomponents/example_factories.go @@ -15,70 +15,21 @@ package testcomponents // import "go.opentelemetry.io/collector/internal/testcomponents" import ( - "go.uber.org/multierr" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter/otlpexporter" - "go.opentelemetry.io/collector/extension/zpagesextension" - "go.opentelemetry.io/collector/processor/batchprocessor" - "go.opentelemetry.io/collector/receiver/otlpreceiver" + "go.opentelemetry.io/collector/config" ) // ExampleComponents registers example factories. This is only used by tests. -func ExampleComponents() ( - factories component.Factories, - err error, -) { - if factories.Extensions, err = component.MakeExtensionFactoryMap(ExampleExtensionFactory); err != nil { - return - } - - if factories.Receivers, err = component.MakeReceiverFactoryMap(ExampleReceiverFactory); err != nil { - return - } - - if factories.Exporters, err = component.MakeExporterFactoryMap(ExampleExporterFactory); err != nil { - return - } - - factories.Processors, err = component.MakeProcessorFactoryMap(ExampleProcessorFactory) - - return -} - -// DefaultFactories returns the set of components in "testdata/otelcol-config.yaml". This is only used by tests. -func DefaultFactories() ( - component.Factories, - error, -) { - var errs error - - extensions, err := component.MakeExtensionFactoryMap( - zpagesextension.NewFactory(), - ) - errs = multierr.Append(errs, err) - - receivers, err := component.MakeReceiverFactoryMap( - otlpreceiver.NewFactory(), - ) - errs = multierr.Append(errs, err) - - processors, err := component.MakeProcessorFactoryMap( - batchprocessor.NewFactory(), - ) - errs = multierr.Append(errs, err) - - exporters, err := component.MakeExporterFactoryMap( - otlpexporter.NewFactory(), - ) - errs = multierr.Append(errs, err) - - factories := component.Factories{ - Extensions: extensions, - Receivers: receivers, - Processors: processors, - Exporters: exporters, - } - - return factories, errs +func ExampleComponents() (component.Factories, error) { + return component.Factories{ + Receivers: map[config.Type]component.ReceiverFactory{ + ExampleReceiverFactory.Type(): ExampleReceiverFactory, + }, + Processors: map[config.Type]component.ProcessorFactory{ + ExampleProcessorFactory.Type(): ExampleProcessorFactory, + }, + Exporters: map[config.Type]component.ExporterFactory{ + ExampleExporterFactory.Type(): ExampleExporterFactory, + }, + }, nil } diff --git a/internal/otel_collector/internal/testcomponents/example_processor.go b/internal/otel_collector/internal/testcomponents/example_processor.go index c0a1503e02b..692399d9aaf 100644 --- a/internal/otel_collector/internal/testcomponents/example_processor.go +++ b/internal/otel_collector/internal/testcomponents/example_processor.go @@ -20,64 +20,60 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/processor/processorhelper" ) -// ExampleProcessorCfg is for testing purposes. We are defining an example config and factory -// for "exampleprocessor" processor type. -type ExampleProcessorCfg struct { +const procType = "exampleprocessor" + +// ExampleProcessorConfig config for ExampleProcessor. +type ExampleProcessorConfig struct { config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct - ExtraSetting string `mapstructure:"extra"` - ExtraMapSetting map[string]string `mapstructure:"extra_map"` - ExtraListSetting []string `mapstructure:"extra_list"` } -const procType = "exampleprocessor" - -// ExampleProcessorFactory is factory for exampleProcessor. -var ExampleProcessorFactory = processorhelper.NewFactory( +// ExampleProcessorFactory is factory for ExampleProcessor. +var ExampleProcessorFactory = component.NewProcessorFactory( procType, createDefaultConfig, - processorhelper.WithTraces(createTracesProcessor), - processorhelper.WithMetrics(createMetricsProcessor), - processorhelper.WithLogs(createLogsProcessor)) + component.WithTracesProcessorAndStabilityLevel(createTracesProcessor, component.StabilityLevelInDevelopment), + component.WithMetricsProcessorAndStabilityLevel(createMetricsProcessor, component.StabilityLevelInDevelopment), + component.WithLogsProcessorAndStabilityLevel(createLogsProcessor, component.StabilityLevelInDevelopment)) // CreateDefaultConfig creates the default configuration for the Processor. func createDefaultConfig() config.Processor { - return &ExampleProcessorCfg{ + return &ExampleProcessorConfig{ ProcessorSettings: config.NewProcessorSettings(config.NewComponentID(procType)), - ExtraSetting: "some export string", - ExtraMapSetting: nil, - ExtraListSetting: nil, } } func createTracesProcessor(_ context.Context, _ component.ProcessorCreateSettings, _ config.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { - return &exampleProcessor{Traces: nextConsumer}, nil + return &ExampleProcessor{Traces: nextConsumer}, nil } func createMetricsProcessor(_ context.Context, _ component.ProcessorCreateSettings, _ config.Processor, nextConsumer consumer.Metrics) (component.MetricsProcessor, error) { - return &exampleProcessor{Metrics: nextConsumer}, nil + return &ExampleProcessor{Metrics: nextConsumer}, nil } func createLogsProcessor(_ context.Context, _ component.ProcessorCreateSettings, _ config.Processor, nextConsumer consumer.Logs) (component.LogsProcessor, error) { - return &exampleProcessor{Logs: nextConsumer}, nil + return &ExampleProcessor{Logs: nextConsumer}, nil } -type exampleProcessor struct { +type ExampleProcessor struct { consumer.Traces consumer.Metrics consumer.Logs + Started bool + Stopped bool } -func (ep *exampleProcessor) Start(_ context.Context, _ component.Host) error { +func (ep *ExampleProcessor) Start(_ context.Context, _ component.Host) error { + ep.Started = true return nil } -func (ep *exampleProcessor) Shutdown(_ context.Context) error { +func (ep *ExampleProcessor) Shutdown(_ context.Context) error { + ep.Stopped = true return nil } -func (ep *exampleProcessor) Capabilities() consumer.Capabilities { +func (ep *ExampleProcessor) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } diff --git a/internal/otel_collector/internal/testcomponents/example_receiver.go b/internal/otel_collector/internal/testcomponents/example_receiver.go index 3c574a69bc2..be899a27a1d 100644 --- a/internal/otel_collector/internal/testcomponents/example_receiver.go +++ b/internal/otel_collector/internal/testcomponents/example_receiver.go @@ -19,46 +19,31 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/receiver/receiverhelper" ) -// ExampleReceiver is for testing purposes. We are defining an example config and factory -// for "examplereceiver" receiver type. -type ExampleReceiver struct { - config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct - // Configures the receiver server protocol. - confignet.TCPAddr `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct +const receiverType = config.Type("examplereceiver") - ExtraSetting string `mapstructure:"extra"` - ExtraMapSetting map[string]string `mapstructure:"extra_map"` - ExtraListSetting []string `mapstructure:"extra_list"` +// ExampleReceiverConfig config for ExampleReceiver. +type ExampleReceiverConfig struct { + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct } -var receiverType = config.Type("examplereceiver") - // ExampleReceiverFactory is factory for ExampleReceiver. -var ExampleReceiverFactory = receiverhelper.NewFactory( +var ExampleReceiverFactory = component.NewReceiverFactory( receiverType, createReceiverDefaultConfig, - receiverhelper.WithTraces(createTracesReceiver), - receiverhelper.WithMetrics(createMetricsReceiver), - receiverhelper.WithLogs(createLogsReceiver)) + component.WithTracesReceiverAndStabilityLevel(createTracesReceiver, component.StabilityLevelInDevelopment), + component.WithMetricsReceiverAndStabilityLevel(createMetricsReceiver, component.StabilityLevelInDevelopment), + component.WithLogsReceiverAndStabilityLevel(createLogsReceiver, component.StabilityLevelInDevelopment)) func createReceiverDefaultConfig() config.Receiver { - return &ExampleReceiver{ + return &ExampleReceiverConfig{ ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(receiverType)), - TCPAddr: confignet.TCPAddr{ - Endpoint: "localhost:1000", - }, - ExtraSetting: "some string", - ExtraMapSetting: nil, - ExtraListSetting: nil, } } -// CreateTracesReceiver creates a trace receiver based on this config. +// createTracesReceiver creates a trace receiver based on this config. func createTracesReceiver( _ context.Context, _ component.ReceiverCreateSettings, @@ -70,7 +55,7 @@ func createTracesReceiver( return receiver, nil } -// CreateMetricsReceiver creates a metrics receiver based on this config. +// createMetricsReceiver creates a metrics receiver based on this config. func createMetricsReceiver( _ context.Context, _ component.ReceiverCreateSettings, @@ -90,18 +75,17 @@ func createLogsReceiver( ) (component.LogsReceiver, error) { receiver := createReceiver(cfg) receiver.Logs = nextConsumer - return receiver, nil } -func createReceiver(cfg config.Receiver) *ExampleReceiverProducer { +func createReceiver(cfg config.Receiver) *ExampleReceiver { // There must be one receiver for all data types. We maintain a map of // receivers per config. // Check to see if there is already a receiver for this config. receiver, ok := exampleReceivers[cfg] if !ok { - receiver = &ExampleReceiverProducer{} + receiver = &ExampleReceiver{} // Remember the receiver in the map exampleReceivers[cfg] = receiver } @@ -109,23 +93,23 @@ func createReceiver(cfg config.Receiver) *ExampleReceiverProducer { return receiver } -// ExampleReceiverProducer allows producing traces and metrics for testing purposes. -type ExampleReceiverProducer struct { - Started bool - Stopped bool +// ExampleReceiver allows producing traces and metrics for testing purposes. +type ExampleReceiver struct { consumer.Traces consumer.Metrics consumer.Logs + Started bool + Stopped bool } // Start tells the receiver to start its processing. -func (erp *ExampleReceiverProducer) Start(_ context.Context, _ component.Host) error { +func (erp *ExampleReceiver) Start(_ context.Context, _ component.Host) error { erp.Started = true return nil } // Shutdown tells the receiver that should stop reception, -func (erp *ExampleReceiverProducer) Shutdown(context.Context) error { +func (erp *ExampleReceiver) Shutdown(context.Context) error { erp.Stopped = true return nil } @@ -134,4 +118,4 @@ func (erp *ExampleReceiverProducer) Shutdown(context.Context) error { // We maintain this map because the ReceiverFactory is asked trace and metric receivers separately // when it gets CreateTracesReceiver() and CreateMetricsReceiver() but they must not // create separate objects, they must use one Receiver object per configuration. -var exampleReceivers = map[config.Receiver]*ExampleReceiverProducer{} +var exampleReceivers = map[config.Receiver]*ExampleReceiver{} diff --git a/internal/otel_collector/internal/testdata/common.go b/internal/otel_collector/internal/testdata/common.go index da6c95cd8f1..35fd1706e69 100644 --- a/internal/otel_collector/internal/testdata/common.go +++ b/internal/otel_collector/internal/testdata/common.go @@ -15,73 +15,50 @@ package testdata import ( - "go.opentelemetry.io/collector/model/pdata" -) - -var ( - resourceAttributes1 = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"resource-attr": pdata.NewAttributeValueString("resource-attr-val-1")}) - resourceAttributes2 = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"resource-attr": pdata.NewAttributeValueString("resource-attr-val-2")}) - spanEventAttributes = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"span-event-attr": pdata.NewAttributeValueString("span-event-attr-val")}) - spanLinkAttributes = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"span-link-attr": pdata.NewAttributeValueString("span-link-attr-val")}) - spanAttributes = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"span-attr": pdata.NewAttributeValueString("span-attr-val")}) - metricAttachment = pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"exemplar-attachment": pdata.NewAttributeValueString("exemplar-attachment-value")}) + "go.opentelemetry.io/collector/pdata/pcommon" ) const ( - TestLabelKey1 = "label-1" - TestLabelValue1 = "label-value-1" - TestLabelKey2 = "label-2" - TestLabelValue2 = "label-value-2" - TestLabelKey3 = "label-3" - TestLabelValue3 = "label-value-3" + testLabelKey2 = "label-2" + testLabelValue2 = "label-value-2" ) -func initResourceAttributes1(dest pdata.AttributeMap) { - dest.Clear() - resourceAttributes1.CopyTo(dest) -} - -func initResourceAttributes2(dest pdata.AttributeMap) { - dest.Clear() - resourceAttributes2.CopyTo(dest) -} - -func initSpanAttributes(dest pdata.AttributeMap) { +func initResourceAttributes1(dest pcommon.Map) { dest.Clear() - spanAttributes.CopyTo(dest) + dest.InsertString("resource-attr", "resource-attr-val-1") } -func initSpanEventAttributes(dest pdata.AttributeMap) { +func initSpanEventAttributes(dest pcommon.Map) { dest.Clear() - spanEventAttributes.CopyTo(dest) + dest.InsertString("span-event-attr", "span-event-attr-val") } -func initSpanLinkAttributes(dest pdata.AttributeMap) { +func initSpanLinkAttributes(dest pcommon.Map) { dest.Clear() - spanLinkAttributes.CopyTo(dest) + dest.InsertString("span-link-attr", "span-link-attr-val") } -func initMetricAttachment(dest pdata.AttributeMap) { +func initMetricExemplarAttributes(dest pcommon.Map) { dest.Clear() - metricAttachment.CopyTo(dest) + dest.InsertString("exemplar-attachment", "exemplar-attachment-value") } -func initMetricAttributes1(dest pdata.AttributeMap) { +func initMetricAttributes1(dest pcommon.Map) { dest.Clear() - dest.InsertString(TestLabelKey1, TestLabelValue1) + dest.InsertString("label-1", "label-value-1") } -func initMetricAttributes12(dest pdata.AttributeMap) { +func initMetricAttributes12(dest pcommon.Map) { initMetricAttributes1(dest) - dest.InsertString(TestLabelKey2, TestLabelValue2) + dest.InsertString(testLabelKey2, testLabelValue2) } -func initMetricAttributes13(dest pdata.AttributeMap) { +func initMetricAttributes13(dest pcommon.Map) { initMetricAttributes1(dest) - dest.InsertString(TestLabelKey3, TestLabelValue3) + dest.InsertString("label-3", "label-value-3") } -func initMetricAttributes2(dest pdata.AttributeMap) { +func initMetricAttributes2(dest pcommon.Map) { dest.Clear() - dest.InsertString(TestLabelKey2, TestLabelValue2) + dest.InsertString(testLabelKey2, testLabelValue2) } diff --git a/internal/otel_collector/internal/testdata/log.go b/internal/otel_collector/internal/testdata/log.go index e26ddbc61b4..b2633fafb13 100644 --- a/internal/otel_collector/internal/testdata/log.go +++ b/internal/otel_collector/internal/testdata/log.go @@ -17,74 +17,37 @@ package testdata import ( "time" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" ) var ( - TestLogTime = time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC) - TestLogTimestamp = pdata.NewTimestampFromTime(TestLogTime) + logTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC)) ) -func GenerateLogsOneEmptyResourceLogs() pdata.Logs { - ld := pdata.NewLogs() - ld.ResourceLogs().AppendEmpty() - return ld -} - -func GenerateLogsNoLogRecords() pdata.Logs { - ld := GenerateLogsOneEmptyResourceLogs() - initResource1(ld.ResourceLogs().At(0).Resource()) - return ld -} - -func GenerateLogsOneEmptyLogRecord() pdata.Logs { - ld := GenerateLogsNoLogRecords() - rs0 := ld.ResourceLogs().At(0) - rs0.InstrumentationLibraryLogs().AppendEmpty().LogRecords().AppendEmpty() - return ld -} - -func GenerateLogsOneLogRecordNoResource() pdata.Logs { - ld := GenerateLogsOneEmptyResourceLogs() - rs0 := ld.ResourceLogs().At(0) - fillLogOne(rs0.InstrumentationLibraryLogs().AppendEmpty().LogRecords().AppendEmpty()) - return ld -} - -func GenerateLogsOneLogRecord() pdata.Logs { - ld := GenerateLogsOneEmptyLogRecord() - fillLogOne(ld.ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords().At(0)) - return ld -} - -func GenerateLogsTwoLogRecordsSameResource() pdata.Logs { - ld := GenerateLogsOneEmptyLogRecord() - logs := ld.ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords() - fillLogOne(logs.At(0)) - fillLogTwo(logs.AppendEmpty()) +func GenerateLogs(count int) plog.Logs { + ld := plog.NewLogs() + initResource(ld.ResourceLogs().AppendEmpty().Resource()) + logs := ld.ResourceLogs().At(0).ScopeLogs().AppendEmpty().LogRecords() + logs.EnsureCapacity(count) + for i := 0; i < count; i++ { + switch i % 2 { + case 0: + fillLogOne(logs.AppendEmpty()) + case 1: + fillLogTwo(logs.AppendEmpty()) + } + } return ld } -func GenerateLogsTwoLogRecordsSameResourceOneDifferent() pdata.Logs { - ld := pdata.NewLogs() - rl0 := ld.ResourceLogs().AppendEmpty() - initResource1(rl0.Resource()) - logs := rl0.InstrumentationLibraryLogs().AppendEmpty().LogRecords() - fillLogOne(logs.AppendEmpty()) - fillLogTwo(logs.AppendEmpty()) - rl1 := ld.ResourceLogs().AppendEmpty() - initResource2(rl1.Resource()) - fillLogThree(rl1.InstrumentationLibraryLogs().AppendEmpty().LogRecords().AppendEmpty()) - return ld -} -func fillLogOne(log pdata.LogRecord) { - log.SetName("logA") - log.SetTimestamp(TestLogTimestamp) +func fillLogOne(log plog.LogRecord) { + log.SetTimestamp(logTimestamp) log.SetDroppedAttributesCount(1) - log.SetSeverityNumber(pdata.SeverityNumberINFO) + log.SetSeverityNumber(plog.SeverityNumberINFO) log.SetSeverityText("Info") - log.SetSpanID(pdata.NewSpanID([8]byte{0x01, 0x02, 0x04, 0x08})) - log.SetTraceID(pdata.NewTraceID([16]byte{0x08, 0x04, 0x02, 0x01})) + log.SetSpanID(pcommon.NewSpanID([8]byte{0x01, 0x02, 0x04, 0x08})) + log.SetTraceID(pcommon.NewTraceID([16]byte{0x08, 0x04, 0x02, 0x01})) attrs := log.Attributes() attrs.InsertString("app", "server") @@ -93,11 +56,10 @@ func fillLogOne(log pdata.LogRecord) { log.Body().SetStringVal("This is a log message") } -func fillLogTwo(log pdata.LogRecord) { - log.SetName("logB") - log.SetTimestamp(TestLogTimestamp) +func fillLogTwo(log plog.LogRecord) { + log.SetTimestamp(logTimestamp) log.SetDroppedAttributesCount(1) - log.SetSeverityNumber(pdata.SeverityNumberINFO) + log.SetSeverityNumber(plog.SeverityNumberINFO) log.SetSeverityText("Info") attrs := log.Attributes() @@ -106,34 +68,3 @@ func fillLogTwo(log pdata.LogRecord) { log.Body().SetStringVal("something happened") } - -func fillLogThree(log pdata.LogRecord) { - log.SetName("logC") - log.SetTimestamp(TestLogTimestamp) - log.SetDroppedAttributesCount(1) - log.SetSeverityNumber(pdata.SeverityNumberWARN) - log.SetSeverityText("Warning") - - log.Body().SetStringVal("something else happened") -} - -func GenerateLogsManyLogRecordsSameResource(count int) pdata.Logs { - ld := GenerateLogsOneEmptyLogRecord() - logs := ld.ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords() - logs.EnsureCapacity(count) - for i := 0; i < count; i++ { - var l pdata.LogRecord - if i < logs.Len() { - l = logs.At(i) - } else { - l = logs.AppendEmpty() - } - - if i%2 == 0 { - fillLogOne(l) - } else { - fillLogTwo(l) - } - } - return ld -} diff --git a/internal/otel_collector/internal/testdata/metric.go b/internal/otel_collector/internal/testdata/metric.go index 52ffe71e9c6..42589205cbb 100644 --- a/internal/otel_collector/internal/testdata/metric.go +++ b/internal/otel_collector/internal/testdata/metric.go @@ -17,18 +17,14 @@ package testdata import ( "time" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" ) var ( - TestMetricStartTime = time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC) - TestMetricStartTimestamp = pdata.NewTimestampFromTime(TestMetricStartTime) - - TestMetricExemplarTime = time.Date(2020, 2, 11, 20, 26, 13, 123, time.UTC) - TestMetricExemplarTimestamp = pdata.NewTimestampFromTime(TestMetricExemplarTime) - - TestMetricTime = time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC) - TestMetricTimestamp = pdata.NewTimestampFromTime(TestMetricTime) + metricStartTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC)) + metricExemplarTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 123, time.UTC)) + metricTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC)) ) const ( @@ -41,115 +37,47 @@ const ( TestSummaryMetricName = "summary" ) -func GenerateMetricsOneEmptyResourceMetrics() pdata.Metrics { - md := pdata.NewMetrics() - md.ResourceMetrics().AppendEmpty() - return md -} - -func GenerateMetricsNoLibraries() pdata.Metrics { - md := GenerateMetricsOneEmptyResourceMetrics() - ms0 := md.ResourceMetrics().At(0) - initResource1(ms0.Resource()) - return md -} - -func GenerateMetricsOneEmptyInstrumentationLibrary() pdata.Metrics { - md := GenerateMetricsNoLibraries() - md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().AppendEmpty() - return md -} - -func GenerateMetricsOneMetricNoResource() pdata.Metrics { - md := GenerateMetricsOneEmptyResourceMetrics() - rm0 := md.ResourceMetrics().At(0) - rm0ils0 := rm0.InstrumentationLibraryMetrics().AppendEmpty() - initSumIntMetric(rm0ils0.Metrics().AppendEmpty()) +func generateMetricsOneEmptyInstrumentationScope() pmetric.Metrics { + md := pmetric.NewMetrics() + initResource(md.ResourceMetrics().AppendEmpty().Resource()) + md.ResourceMetrics().At(0).ScopeMetrics().AppendEmpty() return md } -func GenerateMetricsOneMetric() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - rm0ils0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - initSumIntMetric(rm0ils0.Metrics().AppendEmpty()) - return md -} - -func GenerateMetricsTwoMetrics() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - rm0ils0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - initSumIntMetric(rm0ils0.Metrics().AppendEmpty()) - initSumIntMetric(rm0ils0.Metrics().AppendEmpty()) - return md -} - -func GenerateMetricsOneCounterOneSummaryMetrics() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - rm0ils0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - initSumIntMetric(rm0ils0.Metrics().AppendEmpty()) - initSummaryMetric(rm0ils0.Metrics().AppendEmpty()) - return md -} - -func GenerateMetricsOneMetricNoAttributes() pdata.Metrics { - md := GenerateMetricsOneMetric() - dps := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0).Sum().DataPoints() - dps.At(0).Attributes().Clear() - dps.At(1).Attributes().Clear() - return md -} - -func GenerateMetricsAllTypesNoDataPoints() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - ilm0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - ms := ilm0.Metrics() - initMetric(ms.AppendEmpty(), TestGaugeDoubleMetricName, pdata.MetricDataTypeGauge) - initMetric(ms.AppendEmpty(), TestGaugeIntMetricName, pdata.MetricDataTypeGauge) - initMetric(ms.AppendEmpty(), TestSumDoubleMetricName, pdata.MetricDataTypeSum) - initMetric(ms.AppendEmpty(), TestSumIntMetricName, pdata.MetricDataTypeSum) - initMetric(ms.AppendEmpty(), TestHistogramMetricName, pdata.MetricDataTypeHistogram) - initMetric(ms.AppendEmpty(), TestSummaryMetricName, pdata.MetricDataTypeSummary) - return md -} - -func GenerateMetricsAllTypesEmptyDataPoint() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - ilm0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - ms := ilm0.Metrics() +func GenerateMetricsAllTypesEmpty() pmetric.Metrics { + md := generateMetricsOneEmptyInstrumentationScope() + ms := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics() doubleGauge := ms.AppendEmpty() - initMetric(doubleGauge, TestGaugeDoubleMetricName, pdata.MetricDataTypeGauge) + initMetric(doubleGauge, TestGaugeDoubleMetricName, pmetric.MetricDataTypeGauge) doubleGauge.Gauge().DataPoints().AppendEmpty() intGauge := ms.AppendEmpty() - initMetric(intGauge, TestGaugeIntMetricName, pdata.MetricDataTypeGauge) + initMetric(intGauge, TestGaugeIntMetricName, pmetric.MetricDataTypeGauge) intGauge.Gauge().DataPoints().AppendEmpty() doubleSum := ms.AppendEmpty() - initMetric(doubleSum, TestSumDoubleMetricName, pdata.MetricDataTypeSum) + initMetric(doubleSum, TestSumDoubleMetricName, pmetric.MetricDataTypeSum) doubleSum.Sum().DataPoints().AppendEmpty() intSum := ms.AppendEmpty() - initMetric(intSum, TestSumIntMetricName, pdata.MetricDataTypeSum) + initMetric(intSum, TestSumIntMetricName, pmetric.MetricDataTypeSum) intSum.Sum().DataPoints().AppendEmpty() histogram := ms.AppendEmpty() - initMetric(histogram, TestHistogramMetricName, pdata.MetricDataTypeHistogram) + initMetric(histogram, TestHistogramMetricName, pmetric.MetricDataTypeHistogram) histogram.Histogram().DataPoints().AppendEmpty() summary := ms.AppendEmpty() - initMetric(summary, TestSummaryMetricName, pdata.MetricDataTypeSummary) + initMetric(summary, TestSummaryMetricName, pmetric.MetricDataTypeSummary) summary.Summary().DataPoints().AppendEmpty() return md } -func GenerateMetricsMetricTypeInvalid() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - ilm0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - initMetric(ilm0.Metrics().AppendEmpty(), TestSumIntMetricName, pdata.MetricDataTypeNone) +func GenerateMetricsMetricTypeInvalid() pmetric.Metrics { + md := generateMetricsOneEmptyInstrumentationScope() + initMetric(md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().AppendEmpty(), TestSumIntMetricName, pmetric.MetricDataTypeNone) return md } -func GeneratMetricsAllTypesWithSampleDatapoints() pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - - ilm := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - ms := ilm.Metrics() +func GenerateMetricsAllTypes() pmetric.Metrics { + md := generateMetricsOneEmptyInstrumentationScope() + ms := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics() initGaugeIntMetric(ms.AppendEmpty()) initGaugeDoubleMetric(ms.AppendEmpty()) initSumIntMetric(ms.AppendEmpty()) @@ -160,104 +88,131 @@ func GeneratMetricsAllTypesWithSampleDatapoints() pdata.Metrics { return md } -func initGaugeIntMetric(im pdata.Metric) { - initMetric(im, TestGaugeIntMetricName, pdata.MetricDataTypeGauge) +func GenerateMetrics(count int) pmetric.Metrics { + md := generateMetricsOneEmptyInstrumentationScope() + ms := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics() + ms.EnsureCapacity(count) + for i := 0; i < count; i++ { + switch i % 7 { + case 0: + initGaugeIntMetric(ms.AppendEmpty()) + case 1: + initGaugeDoubleMetric(ms.AppendEmpty()) + case 2: + initSumIntMetric(ms.AppendEmpty()) + case 3: + initSumDoubleMetric(ms.AppendEmpty()) + case 4: + initHistogramMetric(ms.AppendEmpty()) + case 5: + initExponentialHistogramMetric(ms.AppendEmpty()) + case 6: + initSummaryMetric(ms.AppendEmpty()) + } + } + return md +} + +func initGaugeIntMetric(im pmetric.Metric) { + initMetric(im, TestGaugeIntMetricName, pmetric.MetricDataTypeGauge) idps := im.Gauge().DataPoints() idp0 := idps.AppendEmpty() initMetricAttributes1(idp0.Attributes()) - idp0.SetStartTimestamp(TestMetricStartTimestamp) - idp0.SetTimestamp(TestMetricTimestamp) + idp0.SetStartTimestamp(metricStartTimestamp) + idp0.SetTimestamp(metricTimestamp) idp0.SetIntVal(123) idp1 := idps.AppendEmpty() initMetricAttributes2(idp1.Attributes()) - idp1.SetStartTimestamp(TestMetricStartTimestamp) - idp1.SetTimestamp(TestMetricTimestamp) + idp1.SetStartTimestamp(metricStartTimestamp) + idp1.SetTimestamp(metricTimestamp) idp1.SetIntVal(456) } -func initGaugeDoubleMetric(im pdata.Metric) { - initMetric(im, TestGaugeDoubleMetricName, pdata.MetricDataTypeGauge) +func initGaugeDoubleMetric(im pmetric.Metric) { + initMetric(im, TestGaugeDoubleMetricName, pmetric.MetricDataTypeGauge) idps := im.Gauge().DataPoints() idp0 := idps.AppendEmpty() initMetricAttributes12(idp0.Attributes()) - idp0.SetStartTimestamp(TestMetricStartTimestamp) - idp0.SetTimestamp(TestMetricTimestamp) + idp0.SetStartTimestamp(metricStartTimestamp) + idp0.SetTimestamp(metricTimestamp) idp0.SetDoubleVal(1.23) idp1 := idps.AppendEmpty() initMetricAttributes13(idp1.Attributes()) - idp1.SetStartTimestamp(TestMetricStartTimestamp) - idp1.SetTimestamp(TestMetricTimestamp) + idp1.SetStartTimestamp(metricStartTimestamp) + idp1.SetTimestamp(metricTimestamp) idp1.SetDoubleVal(4.56) } -func initSumIntMetric(im pdata.Metric) { - initMetric(im, TestSumIntMetricName, pdata.MetricDataTypeSum) +func initSumIntMetric(im pmetric.Metric) { + initMetric(im, TestSumIntMetricName, pmetric.MetricDataTypeSum) idps := im.Sum().DataPoints() idp0 := idps.AppendEmpty() initMetricAttributes1(idp0.Attributes()) - idp0.SetStartTimestamp(TestMetricStartTimestamp) - idp0.SetTimestamp(TestMetricTimestamp) + idp0.SetStartTimestamp(metricStartTimestamp) + idp0.SetTimestamp(metricTimestamp) idp0.SetIntVal(123) idp1 := idps.AppendEmpty() initMetricAttributes2(idp1.Attributes()) - idp1.SetStartTimestamp(TestMetricStartTimestamp) - idp1.SetTimestamp(TestMetricTimestamp) + idp1.SetStartTimestamp(metricStartTimestamp) + idp1.SetTimestamp(metricTimestamp) idp1.SetIntVal(456) } -func initSumDoubleMetric(dm pdata.Metric) { - initMetric(dm, TestSumDoubleMetricName, pdata.MetricDataTypeSum) +func initSumDoubleMetric(dm pmetric.Metric) { + initMetric(dm, TestSumDoubleMetricName, pmetric.MetricDataTypeSum) ddps := dm.Sum().DataPoints() ddp0 := ddps.AppendEmpty() initMetricAttributes12(ddp0.Attributes()) - ddp0.SetStartTimestamp(TestMetricStartTimestamp) - ddp0.SetTimestamp(TestMetricTimestamp) + ddp0.SetStartTimestamp(metricStartTimestamp) + ddp0.SetTimestamp(metricTimestamp) ddp0.SetDoubleVal(1.23) ddp1 := ddps.AppendEmpty() initMetricAttributes13(ddp1.Attributes()) - ddp1.SetStartTimestamp(TestMetricStartTimestamp) - ddp1.SetTimestamp(TestMetricTimestamp) + ddp1.SetStartTimestamp(metricStartTimestamp) + ddp1.SetTimestamp(metricTimestamp) ddp1.SetDoubleVal(4.56) } -func initHistogramMetric(hm pdata.Metric) { - initMetric(hm, TestHistogramMetricName, pdata.MetricDataTypeHistogram) +func initHistogramMetric(hm pmetric.Metric) { + initMetric(hm, TestHistogramMetricName, pmetric.MetricDataTypeHistogram) hdps := hm.Histogram().DataPoints() hdp0 := hdps.AppendEmpty() initMetricAttributes13(hdp0.Attributes()) - hdp0.SetStartTimestamp(TestMetricStartTimestamp) - hdp0.SetTimestamp(TestMetricTimestamp) + hdp0.SetStartTimestamp(metricStartTimestamp) + hdp0.SetTimestamp(metricTimestamp) hdp0.SetCount(1) hdp0.SetSum(15) hdp1 := hdps.AppendEmpty() initMetricAttributes2(hdp1.Attributes()) - hdp1.SetStartTimestamp(TestMetricStartTimestamp) - hdp1.SetTimestamp(TestMetricTimestamp) + hdp1.SetStartTimestamp(metricStartTimestamp) + hdp1.SetTimestamp(metricTimestamp) hdp1.SetCount(1) hdp1.SetSum(15) - hdp1.SetBucketCounts([]uint64{0, 1}) + hdp1.SetMin(15) + hdp1.SetMax(15) + hdp1.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 1})) exemplar := hdp1.Exemplars().AppendEmpty() - exemplar.SetTimestamp(TestMetricExemplarTimestamp) + exemplar.SetTimestamp(metricExemplarTimestamp) exemplar.SetDoubleVal(15) - initMetricAttachment(exemplar.FilteredAttributes()) - hdp1.SetExplicitBounds([]float64{1}) + initMetricExemplarAttributes(exemplar.FilteredAttributes()) + hdp1.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1})) } -func initExponentialHistogramMetric(hm pdata.Metric) { - initMetric(hm, TestExponentialHistogramMetricName, pdata.MetricDataTypeExponentialHistogram) +func initExponentialHistogramMetric(hm pmetric.Metric) { + initMetric(hm, TestExponentialHistogramMetricName, pmetric.MetricDataTypeExponentialHistogram) hdps := hm.ExponentialHistogram().DataPoints() hdp0 := hdps.AppendEmpty() initMetricAttributes13(hdp0.Attributes()) - hdp0.SetStartTimestamp(TestMetricStartTimestamp) - hdp0.SetTimestamp(TestMetricTimestamp) + hdp0.SetStartTimestamp(metricStartTimestamp) + hdp0.SetTimestamp(metricTimestamp) hdp0.SetCount(5) hdp0.SetSum(0.15) hdp0.SetZeroCount(1) @@ -265,10 +220,10 @@ func initExponentialHistogramMetric(hm pdata.Metric) { // positive index 1 and 2 are values sqrt(2), 2 at scale 1 hdp0.Positive().SetOffset(1) - hdp0.Positive().SetBucketCounts([]uint64{1, 1}) + hdp0.Positive().SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 1})) // negative index -1 and 0 are values -1/sqrt(2), -1 at scale 1 hdp0.Negative().SetOffset(-1) - hdp0.Negative().SetBucketCounts([]uint64{1, 1}) + hdp0.Negative().SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 1})) // The above will print: // Bucket (-1.414214, -1.000000], Count: 1 @@ -279,16 +234,18 @@ func initExponentialHistogramMetric(hm pdata.Metric) { hdp1 := hdps.AppendEmpty() initMetricAttributes2(hdp1.Attributes()) - hdp1.SetStartTimestamp(TestMetricStartTimestamp) - hdp1.SetTimestamp(TestMetricTimestamp) + hdp1.SetStartTimestamp(metricStartTimestamp) + hdp1.SetTimestamp(metricTimestamp) hdp1.SetCount(3) hdp1.SetSum(1.25) + hdp1.SetMin(0) + hdp1.SetMax(1) hdp1.SetZeroCount(1) hdp1.SetScale(-1) // index -1 and 0 are values 0.25, 1 at scale -1 hdp1.Positive().SetOffset(-1) - hdp1.Positive().SetBucketCounts([]uint64{1, 1}) + hdp1.Positive().SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 1})) // The above will print: // Bucket [0, 0], Count: 1 @@ -296,26 +253,26 @@ func initExponentialHistogramMetric(hm pdata.Metric) { // Bucket [1.000000, 4.000000), Count: 1 exemplar := hdp1.Exemplars().AppendEmpty() - exemplar.SetTimestamp(TestMetricExemplarTimestamp) + exemplar.SetTimestamp(metricExemplarTimestamp) exemplar.SetDoubleVal(15) - initMetricAttachment(exemplar.FilteredAttributes()) + initMetricExemplarAttributes(exemplar.FilteredAttributes()) } -func initSummaryMetric(sm pdata.Metric) { - initMetric(sm, TestSummaryMetricName, pdata.MetricDataTypeSummary) +func initSummaryMetric(sm pmetric.Metric) { + initMetric(sm, TestSummaryMetricName, pmetric.MetricDataTypeSummary) sdps := sm.Summary().DataPoints() sdp0 := sdps.AppendEmpty() initMetricAttributes13(sdp0.Attributes()) - sdp0.SetStartTimestamp(TestMetricStartTimestamp) - sdp0.SetTimestamp(TestMetricTimestamp) + sdp0.SetStartTimestamp(metricStartTimestamp) + sdp0.SetTimestamp(metricTimestamp) sdp0.SetCount(1) sdp0.SetSum(15) sdp1 := sdps.AppendEmpty() initMetricAttributes2(sdp1.Attributes()) - sdp1.SetStartTimestamp(TestMetricStartTimestamp) - sdp1.SetTimestamp(TestMetricTimestamp) + sdp1.SetStartTimestamp(metricStartTimestamp) + sdp1.SetTimestamp(metricTimestamp) sdp1.SetCount(1) sdp1.SetSum(15) @@ -324,31 +281,21 @@ func initSummaryMetric(sm pdata.Metric) { quantile.SetValue(15) } -func initMetric(m pdata.Metric, name string, ty pdata.MetricDataType) { +func initMetric(m pmetric.Metric, name string, ty pmetric.MetricDataType) { m.SetName(name) m.SetDescription("") m.SetUnit("1") m.SetDataType(ty) switch ty { - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: sum := m.Sum() sum.SetIsMonotonic(true) - sum.SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) - case pdata.MetricDataTypeHistogram: + sum.SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + case pmetric.MetricDataTypeHistogram: histo := m.Histogram() - histo.SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) - case pdata.MetricDataTypeExponentialHistogram: + histo.SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + case pmetric.MetricDataTypeExponentialHistogram: histo := m.ExponentialHistogram() - histo.SetAggregationTemporality(pdata.MetricAggregationTemporalityDelta) + histo.SetAggregationTemporality(pmetric.MetricAggregationTemporalityDelta) } } - -func GenerateMetricsManyMetricsSameResource(metricsCount int) pdata.Metrics { - md := GenerateMetricsOneEmptyInstrumentationLibrary() - rs0ilm0 := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0) - rs0ilm0.Metrics().EnsureCapacity(metricsCount) - for i := 0; i < metricsCount; i++ { - initSumIntMetric(rs0ilm0.Metrics().AppendEmpty()) - } - return md -} diff --git a/internal/otel_collector/internal/testdata/resource.go b/internal/otel_collector/internal/testdata/resource.go index f5d2b8f726d..f19a214a8e3 100644 --- a/internal/otel_collector/internal/testdata/resource.go +++ b/internal/otel_collector/internal/testdata/resource.go @@ -14,14 +14,8 @@ package testdata -import ( - "go.opentelemetry.io/collector/model/pdata" -) +import "go.opentelemetry.io/collector/pdata/pcommon" -func initResource1(r pdata.Resource) { +func initResource(r pcommon.Resource) { initResourceAttributes1(r.Attributes()) } - -func initResource2(r pdata.Resource) { - initResourceAttributes2(r.Attributes()) -} diff --git a/internal/otel_collector/internal/testdata/trace.go b/internal/otel_collector/internal/testdata/trace.go index afd866fecb0..c7aef691976 100644 --- a/internal/otel_collector/internal/testdata/trace.go +++ b/internal/otel_collector/internal/testdata/trace.go @@ -17,112 +17,59 @@ package testdata import ( "time" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" ) var ( - TestSpanStartTime = time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC) - TestSpanStartTimestamp = pdata.NewTimestampFromTime(TestSpanStartTime) - - TestSpanEventTime = time.Date(2020, 2, 11, 20, 26, 13, 123, time.UTC) - TestSpanEventTimestamp = pdata.NewTimestampFromTime(TestSpanEventTime) - - TestSpanEndTime = time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC) - TestSpanEndTimestamp = pdata.NewTimestampFromTime(TestSpanEndTime) + spanStartTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 12, 321, time.UTC)) + spanEventTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 123, time.UTC)) + spanEndTimestamp = pcommon.NewTimestampFromTime(time.Date(2020, 2, 11, 20, 26, 13, 789, time.UTC)) ) -func GenerateTracesOneEmptyResourceSpans() pdata.Traces { - td := pdata.NewTraces() - td.ResourceSpans().AppendEmpty() - return td -} - -func GenerateTracesNoLibraries() pdata.Traces { - td := GenerateTracesOneEmptyResourceSpans() - rs0 := td.ResourceSpans().At(0) - initResource1(rs0.Resource()) - return td -} - -func GenerateTracesOneEmptyInstrumentationLibrary() pdata.Traces { - td := GenerateTracesNoLibraries() - td.ResourceSpans().At(0).InstrumentationLibrarySpans().AppendEmpty() - return td -} - -func GenerateTracesOneSpanNoResource() pdata.Traces { - td := GenerateTracesOneEmptyResourceSpans() - rs0 := td.ResourceSpans().At(0) - fillSpanOne(rs0.InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty()) - return td -} - -func GenerateTracesOneSpan() pdata.Traces { - td := GenerateTracesOneEmptyInstrumentationLibrary() - rs0ils0 := td.ResourceSpans().At(0).InstrumentationLibrarySpans().At(0) - fillSpanOne(rs0ils0.Spans().AppendEmpty()) - return td -} - -func GenerateTracesTwoSpansSameResource() pdata.Traces { - td := GenerateTracesOneEmptyInstrumentationLibrary() - rs0ils0 := td.ResourceSpans().At(0).InstrumentationLibrarySpans().At(0) - fillSpanOne(rs0ils0.Spans().AppendEmpty()) - fillSpanTwo(rs0ils0.Spans().AppendEmpty()) - return td -} - -func GenerateTracesTwoSpansSameResourceOneDifferent() pdata.Traces { - td := pdata.NewTraces() - rs0 := td.ResourceSpans().AppendEmpty() - initResource1(rs0.Resource()) - rs0ils0 := rs0.InstrumentationLibrarySpans().AppendEmpty() - fillSpanOne(rs0ils0.Spans().AppendEmpty()) - fillSpanTwo(rs0ils0.Spans().AppendEmpty()) - rs1 := td.ResourceSpans().AppendEmpty() - initResource2(rs1.Resource()) - rs1ils0 := rs1.InstrumentationLibrarySpans().AppendEmpty() - fillSpanThree(rs1ils0.Spans().AppendEmpty()) - return td -} - -func GenerateTracesManySpansSameResource(spanCount int) pdata.Traces { - td := GenerateTracesOneEmptyInstrumentationLibrary() - rs0ils0 := td.ResourceSpans().At(0).InstrumentationLibrarySpans().At(0) - rs0ils0.Spans().EnsureCapacity(spanCount) +func GenerateTraces(spanCount int) ptrace.Traces { + td := ptrace.NewTraces() + initResource(td.ResourceSpans().AppendEmpty().Resource()) + ss := td.ResourceSpans().At(0).ScopeSpans().AppendEmpty().Spans() + ss.EnsureCapacity(spanCount) for i := 0; i < spanCount; i++ { - fillSpanOne(rs0ils0.Spans().AppendEmpty()) + switch i % 2 { + case 0: + fillSpanOne(ss.AppendEmpty()) + case 1: + fillSpanTwo(ss.AppendEmpty()) + } } return td } -func fillSpanOne(span pdata.Span) { +func fillSpanOne(span ptrace.Span) { span.SetName("operationA") - span.SetStartTimestamp(TestSpanStartTimestamp) - span.SetEndTimestamp(TestSpanEndTimestamp) + span.SetStartTimestamp(spanStartTimestamp) + span.SetEndTimestamp(spanEndTimestamp) span.SetDroppedAttributesCount(1) - span.SetTraceID(pdata.NewTraceID([16]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10})) - span.SetSpanID(pdata.NewSpanID([8]byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18})) + span.SetTraceID(pcommon.NewTraceID([16]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10})) + span.SetSpanID(pcommon.NewSpanID([8]byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18})) evs := span.Events() ev0 := evs.AppendEmpty() - ev0.SetTimestamp(TestSpanEventTimestamp) + ev0.SetTimestamp(spanEventTimestamp) ev0.SetName("event-with-attr") initSpanEventAttributes(ev0.Attributes()) ev0.SetDroppedAttributesCount(2) ev1 := evs.AppendEmpty() - ev1.SetTimestamp(TestSpanEventTimestamp) + ev1.SetTimestamp(spanEventTimestamp) ev1.SetName("event") ev1.SetDroppedAttributesCount(2) span.SetDroppedEventsCount(1) status := span.Status() - status.SetCode(pdata.StatusCodeError) + status.SetCode(ptrace.StatusCodeError) status.SetMessage("status-cancelled") } -func fillSpanTwo(span pdata.Span) { +func fillSpanTwo(span ptrace.Span) { span.SetName("operationB") - span.SetStartTimestamp(TestSpanStartTimestamp) - span.SetEndTimestamp(TestSpanEndTimestamp) + span.SetStartTimestamp(spanStartTimestamp) + span.SetEndTimestamp(spanEndTimestamp) link0 := span.Links().AppendEmpty() initSpanLinkAttributes(link0.Attributes()) link0.SetDroppedAttributesCount(4) @@ -130,11 +77,3 @@ func fillSpanTwo(span pdata.Span) { link1.SetDroppedAttributesCount(4) span.SetDroppedLinksCount(3) } - -func fillSpanThree(span pdata.Span) { - span.SetName("operationC") - span.SetStartTimestamp(TestSpanStartTimestamp) - span.SetEndTimestamp(TestSpanEndTimestamp) - initSpanAttributes(span.Attributes()) - span.SetDroppedAttributesCount(5) -} diff --git a/internal/otel_collector/internal/testutil/testutil.go b/internal/otel_collector/internal/testutil/testutil.go index 33d1ce08fc9..8c3cc6a7e34 100644 --- a/internal/otel_collector/internal/testutil/testutil.go +++ b/internal/otel_collector/internal/testutil/testutil.go @@ -18,10 +18,10 @@ import ( "net" "os/exec" "runtime" - "strconv" "strings" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -34,19 +34,7 @@ type portpair struct { // describing it. The port is available for opening when this function returns // provided that there is no race by some other code to grab the same port // immediately. -func GetAvailableLocalAddress(t *testing.T) string { - ln, err := net.Listen("tcp", "localhost:0") - require.NoError(t, err, "Failed to get a free local port") - // There is a possible race if something else takes this same port before - // the test uses it, however, that is unlikely in practice. - defer ln.Close() - return ln.Addr().String() -} - -// GetAvailablePort finds an available local port and returns it. The port is -// available for opening when this function returns provided that there is no -// race by some other code to grab the same port immediately. -func GetAvailablePort(t *testing.T) uint16 { +func GetAvailableLocalAddress(t testing.TB) string { // Retry has been added for windows as net.Listen can return a port that is not actually available. Details can be // found in https://github.com/docker/for-win/issues/3171 but to summarize Hyper-V will reserve ranges of ports // which do not show up under the "netstat -ano" but can only be found by @@ -54,15 +42,14 @@ func GetAvailablePort(t *testing.T) uint16 { // retry if the port returned by GetAvailableLocalAddress falls in one of those them. var exclusions []portpair portFound := false - var port string - var err error if runtime.GOOS == "windows" { exclusions = getExclusionsList(t) } + var endpoint string for !portFound { - endpoint := GetAvailableLocalAddress(t) - _, port, err = net.SplitHostPort(endpoint) + endpoint = findAvailableAddress(t) + _, port, err := net.SplitHostPort(endpoint) require.NoError(t, err) portFound = true if runtime.GOOS == "windows" { @@ -75,24 +62,37 @@ func GetAvailablePort(t *testing.T) uint16 { } } - portInt, err := strconv.ParseUint(port, 10, 16) - require.NoError(t, err) + return endpoint +} - return uint16(portInt) +func findAvailableAddress(t testing.TB) string { + ln, err := net.Listen("tcp", "localhost:0") + require.NoError(t, err, "Failed to get a free local port") + // There is a possible race if something else takes this same port before + // the test uses it, however, that is unlikely in practice. + defer func() { + assert.NoError(t, ln.Close()) + }() + return ln.Addr().String() } // Get excluded ports on Windows from the command: netsh interface ipv4 show excludedportrange protocol=tcp -func getExclusionsList(t *testing.T) []portpair { - cmd := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=tcp") - output, err := cmd.CombinedOutput() - require.NoError(t, err) +func getExclusionsList(t testing.TB) []portpair { + cmdTCP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=tcp") + outputTCP, errTCP := cmdTCP.CombinedOutput() + require.NoError(t, errTCP) + exclusions := createExclusionsList(string(outputTCP), t) + + cmdUDP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=udp") + outputUDP, errUDP := cmdUDP.CombinedOutput() + require.NoError(t, errUDP) + exclusions = append(exclusions, createExclusionsList(string(outputUDP), t)...) - exclusions := createExclusionsList(string(output), t) return exclusions } -func createExclusionsList(exclusionsText string, t *testing.T) []portpair { - exclusions := []portpair{} +func createExclusionsList(exclusionsText string, t testing.TB) []portpair { + var exclusions []portpair parts := strings.Split(exclusionsText, "--------") require.Equal(t, len(parts), 3) diff --git a/internal/otel_collector/internal/version/version.go b/internal/otel_collector/internal/version/version.go deleted file mode 100644 index dd962baf55c..00000000000 --- a/internal/otel_collector/internal/version/version.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package version // import "go.opentelemetry.io/collector/internal/version" - -import ( - "bytes" - "fmt" - "runtime" - "time" -) - -var ( - // Version variable will be replaced at link time after `make` has been run. - Version = "latest" - - // startTime - startTime time.Time -) - -func init() { - startTime = time.Now() -} - -// InfoVar is a singleton instance of the Info struct. -var InfoVar = Info{ - {"Version", Version}, - {"GoVersion", runtime.Version()}, - {"OS", runtime.GOOS}, - {"Architecture", runtime.GOARCH}, - // Add other valuable build-time information here. -} - -// RuntimeVar returns the InfoVar plus runtime information like uptime. -func RuntimeVar() Info { - return append(InfoVar, [2]string{"StartTimestamp", startTime.String()}, [2]string{"Uptime", time.Since(startTime).String()}) -} - -// Info has properties about the build and runtime. -type Info [][2]string - -// String returns a formatted string, with linebreaks, intended to be displayed -// on stdout. -func (i Info) String() string { - buf := new(bytes.Buffer) - maxRow1Alignment := 0 - for _, prop := range i { - if cl0 := len(prop[0]); cl0 > maxRow1Alignment { - maxRow1Alignment = cl0 - } - } - - for _, prop := range i { - // Then finally print them with left alignment - fmt.Fprintf(buf, "%*s %s\n", -maxRow1Alignment, prop[0], prop[1]) - } - return buf.String() -} diff --git a/internal/otel_collector/obsreport/obsreport_scraper.go b/internal/otel_collector/obsreport/obsreport_scraper.go index 3c3717281bf..29df9cd395a 100644 --- a/internal/otel_collector/obsreport/obsreport_scraper.go +++ b/internal/otel_collector/obsreport/obsreport_scraper.go @@ -16,6 +16,7 @@ package obsreport // import "go.opentelemetry.io/collector/obsreport" import ( "context" + "errors" "go.opencensus.io/stats" "go.opencensus.io/tag" @@ -77,7 +78,8 @@ func (s *Scraper) EndMetricsOp( ) { numErroredMetrics := 0 if err != nil { - if partialErr, isPartial := err.(scrapererror.PartialScrapeError); isPartial { + var partialErr scrapererror.PartialScrapeError + if errors.As(err, &partialErr) { numErroredMetrics = partialErr.Failed } else { numErroredMetrics = numScrapedMetrics diff --git a/internal/otel_collector/processor/batchprocessor/README.md b/internal/otel_collector/processor/batchprocessor/README.md index 5b69aa0166f..093ce0ef8e7 100644 --- a/internal/otel_collector/processor/batchprocessor/README.md +++ b/internal/otel_collector/processor/batchprocessor/README.md @@ -1,6 +1,12 @@ # Batch Processor -Supported pipeline types: metric, traces, logs +| Status | | +| ------------------------ | --------------------- | +| Stability | traces [beta] | +| | metrics [beta] | +| | logs [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | The batch processor accepts spans, metrics, or logs and places them into batches. Batching helps better compress the data and reduce the number of @@ -22,7 +28,7 @@ regardless of size. - `send_batch_max_size` (default = 0): The upper limit of the batch size. `0` means no upper limit of the batch size. This property ensures that larger batches are split into smaller units. - It must be greater or equal to `send_batch_size`. + It must be greater than or equal to `send_batch_size`. Examples: @@ -36,3 +42,7 @@ processors: Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/internal/otel_collector/processor/batchprocessor/batch_processor.go b/internal/otel_collector/processor/batchprocessor/batch_processor.go index c7974f08bdd..40896dbb9a2 100644 --- a/internal/otel_collector/processor/batchprocessor/batch_processor.go +++ b/internal/otel_collector/processor/batchprocessor/batch_processor.go @@ -27,8 +27,9 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) // batch_processor is a component that accepts spans and metrics, places them @@ -58,14 +59,11 @@ type batchProcessor struct { type batch interface { // export the current batch - export(ctx context.Context, sendBatchMaxSize int) error + export(ctx context.Context, sendBatchMaxSize int, returnBytes bool) (sentBatchSize int, sentBatchBytes int, err error) // itemCount returns the size of the current batch itemCount() int - // size returns the size in bytes of the current batch - size() int - // add item to the current batch add(item interface{}) } @@ -174,33 +172,34 @@ func (bp *batchProcessor) resetTimer() { } func (bp *batchProcessor) sendItems(triggerMeasure *stats.Int64Measure) { - // Add that it came form the trace pipeline? - stats.Record(bp.exportCtx, triggerMeasure.M(1), statBatchSendSize.M(int64(bp.batch.itemCount()))) - - if bp.telemetryLevel == configtelemetry.LevelDetailed { - stats.Record(bp.exportCtx, statBatchSendSizeBytes.M(int64(bp.batch.size()))) - } - - if err := bp.batch.export(bp.exportCtx, bp.sendBatchMaxSize); err != nil { + detailed := bp.telemetryLevel == configtelemetry.LevelDetailed + sent, bytes, err := bp.batch.export(bp.exportCtx, bp.sendBatchMaxSize, detailed) + if err != nil { bp.logger.Warn("Sender failed", zap.Error(err)) + } else { + // Add that it came form the trace pipeline? + stats.Record(bp.exportCtx, triggerMeasure.M(1), statBatchSendSize.M(int64(sent))) + if detailed { + stats.Record(bp.exportCtx, statBatchSendSizeBytes.M(int64(bytes))) + } } } // ConsumeTraces implements TracesProcessor -func (bp *batchProcessor) ConsumeTraces(_ context.Context, td pdata.Traces) error { +func (bp *batchProcessor) ConsumeTraces(_ context.Context, td ptrace.Traces) error { bp.newItem <- td return nil } // ConsumeMetrics implements MetricsProcessor -func (bp *batchProcessor) ConsumeMetrics(_ context.Context, md pdata.Metrics) error { +func (bp *batchProcessor) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { // First thing is convert into a different internal format bp.newItem <- md return nil } // ConsumeLogs implements LogsProcessor -func (bp *batchProcessor) ConsumeLogs(_ context.Context, ld pdata.Logs) error { +func (bp *batchProcessor) ConsumeLogs(_ context.Context, ld plog.Logs) error { bp.newItem <- ld return nil } @@ -222,18 +221,18 @@ func newBatchLogsProcessor(set component.ProcessorCreateSettings, next consumer. type batchTraces struct { nextConsumer consumer.Traces - traceData pdata.Traces + traceData ptrace.Traces spanCount int - sizer pdata.TracesSizer + sizer ptrace.Sizer } func newBatchTraces(nextConsumer consumer.Traces) *batchTraces { - return &batchTraces{nextConsumer: nextConsumer, traceData: pdata.NewTraces(), sizer: otlp.NewProtobufTracesMarshaler().(pdata.TracesSizer)} + return &batchTraces{nextConsumer: nextConsumer, traceData: ptrace.NewTraces(), sizer: ptrace.NewProtoMarshaler().(ptrace.Sizer)} } // add updates current batchTraces by adding new TraceData object func (bt *batchTraces) add(item interface{}) { - td := item.(pdata.Traces) + td := item.(ptrace.Traces) newSpanCount := td.SpanCount() if newSpanCount == 0 { return @@ -243,61 +242,67 @@ func (bt *batchTraces) add(item interface{}) { td.ResourceSpans().MoveAndAppendTo(bt.traceData.ResourceSpans()) } -func (bt *batchTraces) export(ctx context.Context, sendBatchMaxSize int) error { - var req pdata.Traces +func (bt *batchTraces) export(ctx context.Context, sendBatchMaxSize int, returnBytes bool) (int, int, error) { + var req ptrace.Traces + var sent int + var bytes int if sendBatchMaxSize > 0 && bt.itemCount() > sendBatchMaxSize { req = splitTraces(sendBatchMaxSize, bt.traceData) bt.spanCount -= sendBatchMaxSize + sent = sendBatchMaxSize } else { req = bt.traceData - bt.traceData = pdata.NewTraces() + sent = bt.spanCount + bt.traceData = ptrace.NewTraces() bt.spanCount = 0 } - return bt.nextConsumer.ConsumeTraces(ctx, req) + if returnBytes { + bytes = bt.sizer.TracesSize(req) + } + return sent, bytes, bt.nextConsumer.ConsumeTraces(ctx, req) } func (bt *batchTraces) itemCount() int { return bt.spanCount } -func (bt *batchTraces) size() int { - return bt.sizer.TracesSize(bt.traceData) -} - type batchMetrics struct { nextConsumer consumer.Metrics - metricData pdata.Metrics + metricData pmetric.Metrics dataPointCount int - sizer pdata.MetricsSizer + sizer pmetric.Sizer } func newBatchMetrics(nextConsumer consumer.Metrics) *batchMetrics { - return &batchMetrics{nextConsumer: nextConsumer, metricData: pdata.NewMetrics(), sizer: otlp.NewProtobufMetricsMarshaler().(pdata.MetricsSizer)} + return &batchMetrics{nextConsumer: nextConsumer, metricData: pmetric.NewMetrics(), sizer: pmetric.NewProtoMarshaler().(pmetric.Sizer)} } -func (bm *batchMetrics) export(ctx context.Context, sendBatchMaxSize int) error { - var req pdata.Metrics +func (bm *batchMetrics) export(ctx context.Context, sendBatchMaxSize int, returnBytes bool) (int, int, error) { + var req pmetric.Metrics + var sent int + var bytes int if sendBatchMaxSize > 0 && bm.dataPointCount > sendBatchMaxSize { req = splitMetrics(sendBatchMaxSize, bm.metricData) bm.dataPointCount -= sendBatchMaxSize + sent = sendBatchMaxSize } else { req = bm.metricData - bm.metricData = pdata.NewMetrics() + sent = bm.dataPointCount + bm.metricData = pmetric.NewMetrics() bm.dataPointCount = 0 } - return bm.nextConsumer.ConsumeMetrics(ctx, req) + if returnBytes { + bytes = bm.sizer.MetricsSize(req) + } + return sent, bytes, bm.nextConsumer.ConsumeMetrics(ctx, req) } func (bm *batchMetrics) itemCount() int { return bm.dataPointCount } -func (bm *batchMetrics) size() int { - return bm.sizer.MetricsSize(bm.metricData) -} - func (bm *batchMetrics) add(item interface{}) { - md := item.(pdata.Metrics) + md := item.(pmetric.Metrics) newDataPointCount := md.DataPointCount() if newDataPointCount == 0 { @@ -309,38 +314,41 @@ func (bm *batchMetrics) add(item interface{}) { type batchLogs struct { nextConsumer consumer.Logs - logData pdata.Logs + logData plog.Logs logCount int - sizer pdata.LogsSizer + sizer plog.Sizer } func newBatchLogs(nextConsumer consumer.Logs) *batchLogs { - return &batchLogs{nextConsumer: nextConsumer, logData: pdata.NewLogs(), sizer: otlp.NewProtobufLogsMarshaler().(pdata.LogsSizer)} + return &batchLogs{nextConsumer: nextConsumer, logData: plog.NewLogs(), sizer: plog.NewProtoMarshaler().(plog.Sizer)} } -func (bl *batchLogs) export(ctx context.Context, sendBatchMaxSize int) error { - var req pdata.Logs +func (bl *batchLogs) export(ctx context.Context, sendBatchMaxSize int, returnBytes bool) (int, int, error) { + var req plog.Logs + var sent int + var bytes int if sendBatchMaxSize > 0 && bl.logCount > sendBatchMaxSize { req = splitLogs(sendBatchMaxSize, bl.logData) bl.logCount -= sendBatchMaxSize + sent = sendBatchMaxSize } else { req = bl.logData - bl.logData = pdata.NewLogs() + sent = bl.logCount + bl.logData = plog.NewLogs() bl.logCount = 0 } - return bl.nextConsumer.ConsumeLogs(ctx, req) + if returnBytes { + bytes = bl.sizer.LogsSize(req) + } + return sent, bytes, bl.nextConsumer.ConsumeLogs(ctx, req) } func (bl *batchLogs) itemCount() int { return bl.logCount } -func (bl *batchLogs) size() int { - return bl.sizer.LogsSize(bl.logData) -} - func (bl *batchLogs) add(item interface{}) { - ld := item.(pdata.Logs) + ld := item.(plog.Logs) newLogsCount := ld.LogRecordCount() if newLogsCount == 0 { diff --git a/internal/otel_collector/processor/batchprocessor/config.go b/internal/otel_collector/processor/batchprocessor/config.go index f26928eb509..ef8ba20d79f 100644 --- a/internal/otel_collector/processor/batchprocessor/config.go +++ b/internal/otel_collector/processor/batchprocessor/config.go @@ -26,15 +26,15 @@ type Config struct { config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct // Timeout sets the time after which a batch will be sent regardless of size. - Timeout time.Duration `mapstructure:"timeout,omitempty"` + Timeout time.Duration `mapstructure:"timeout"` // SendBatchSize is the size of a batch which after hit, will trigger it to be sent. - SendBatchSize uint32 `mapstructure:"send_batch_size,omitempty"` + SendBatchSize uint32 `mapstructure:"send_batch_size"` // SendBatchMaxSize is the maximum size of a batch. It must be larger than SendBatchSize. // Larger batches are split into smaller units. // Default value is 0, that means no maximum size. - SendBatchMaxSize uint32 `mapstructure:"send_batch_max_size,omitempty"` + SendBatchMaxSize uint32 `mapstructure:"send_batch_max_size"` } var _ config.Processor = (*Config)(nil) diff --git a/internal/otel_collector/processor/batchprocessor/factory.go b/internal/otel_collector/processor/batchprocessor/factory.go index cc932893339..118346f1455 100644 --- a/internal/otel_collector/processor/batchprocessor/factory.go +++ b/internal/otel_collector/processor/batchprocessor/factory.go @@ -21,7 +21,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/processor/processorhelper" ) const ( @@ -34,12 +33,12 @@ const ( // NewFactory returns a new factory for the Batch processor. func NewFactory() component.ProcessorFactory { - return processorhelper.NewFactory( + return component.NewProcessorFactory( typeStr, createDefaultConfig, - processorhelper.WithTraces(createTracesProcessor), - processorhelper.WithMetrics(createMetricsProcessor), - processorhelper.WithLogs(createLogsProcessor)) + component.WithTracesProcessorAndStabilityLevel(createTracesProcessor, component.StabilityLevelStable), + component.WithMetricsProcessorAndStabilityLevel(createMetricsProcessor, component.StabilityLevelStable), + component.WithLogsProcessorAndStabilityLevel(createLogsProcessor, component.StabilityLevelStable)) } func createDefaultConfig() config.Processor { diff --git a/internal/otel_collector/processor/batchprocessor/splitlogs.go b/internal/otel_collector/processor/batchprocessor/splitlogs.go index ad04ecf01ce..cbd40dbc621 100644 --- a/internal/otel_collector/processor/batchprocessor/splitlogs.go +++ b/internal/otel_collector/processor/batchprocessor/splitlogs.go @@ -15,18 +15,18 @@ package batchprocessor // import "go.opentelemetry.io/collector/processor/batchprocessor" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) // splitLogs removes logrecords from the input data and returns a new data of the specified size. -func splitLogs(size int, src pdata.Logs) pdata.Logs { +func splitLogs(size int, src plog.Logs) plog.Logs { if src.LogRecordCount() <= size { return src } totalCopiedLogRecords := 0 - dest := pdata.NewLogs() + dest := plog.NewLogs() - src.ResourceLogs().RemoveIf(func(srcRl pdata.ResourceLogs) bool { + src.ResourceLogs().RemoveIf(func(srcRl plog.ResourceLogs) bool { // If we are done skip everything else. if totalCopiedLogRecords == size { return false @@ -42,7 +42,7 @@ func splitLogs(size int, src pdata.Logs) pdata.Logs { destRl := dest.ResourceLogs().AppendEmpty() srcRl.Resource().CopyTo(destRl.Resource()) - srcRl.InstrumentationLibraryLogs().RemoveIf(func(srcIll pdata.InstrumentationLibraryLogs) bool { + srcRl.ScopeLogs().RemoveIf(func(srcIll plog.ScopeLogs) bool { // If we are done skip everything else. if totalCopiedLogRecords == size { return false @@ -52,13 +52,13 @@ func splitLogs(size int, src pdata.Logs) pdata.Logs { srcIllLRC := srcIll.LogRecords().Len() if size >= srcIllLRC+totalCopiedLogRecords { totalCopiedLogRecords += srcIllLRC - srcIll.MoveTo(destRl.InstrumentationLibraryLogs().AppendEmpty()) + srcIll.MoveTo(destRl.ScopeLogs().AppendEmpty()) return true } - destIll := destRl.InstrumentationLibraryLogs().AppendEmpty() - srcIll.InstrumentationLibrary().CopyTo(destIll.InstrumentationLibrary()) - srcIll.LogRecords().RemoveIf(func(srcMetric pdata.LogRecord) bool { + destIll := destRl.ScopeLogs().AppendEmpty() + srcIll.Scope().CopyTo(destIll.Scope()) + srcIll.LogRecords().RemoveIf(func(srcMetric plog.LogRecord) bool { // If we are done skip everything else. if totalCopiedLogRecords == size { return false @@ -69,16 +69,16 @@ func splitLogs(size int, src pdata.Logs) pdata.Logs { }) return false }) - return srcRl.InstrumentationLibraryLogs().Len() == 0 + return srcRl.ScopeLogs().Len() == 0 }) return dest } -// resourceLRC calculates the total number of log records in the pdata.ResourceLogs. -func resourceLRC(rs pdata.ResourceLogs) (count int) { - for k := 0; k < rs.InstrumentationLibraryLogs().Len(); k++ { - count += rs.InstrumentationLibraryLogs().At(k).LogRecords().Len() +// resourceLRC calculates the total number of log records in the plog.ResourceLogs. +func resourceLRC(rs plog.ResourceLogs) (count int) { + for k := 0; k < rs.ScopeLogs().Len(); k++ { + count += rs.ScopeLogs().At(k).LogRecords().Len() } return } diff --git a/internal/otel_collector/processor/batchprocessor/splitmetrics.go b/internal/otel_collector/processor/batchprocessor/splitmetrics.go index bbf8d33322e..f9394b0e134 100644 --- a/internal/otel_collector/processor/batchprocessor/splitmetrics.go +++ b/internal/otel_collector/processor/batchprocessor/splitmetrics.go @@ -15,19 +15,19 @@ package batchprocessor // import "go.opentelemetry.io/collector/processor/batchprocessor" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) // splitMetrics removes metrics from the input data and returns a new data of the specified size. -func splitMetrics(size int, src pdata.Metrics) pdata.Metrics { +func splitMetrics(size int, src pmetric.Metrics) pmetric.Metrics { dataPoints := src.DataPointCount() if dataPoints <= size { return src } totalCopiedDataPoints := 0 - dest := pdata.NewMetrics() + dest := pmetric.NewMetrics() - src.ResourceMetrics().RemoveIf(func(srcRs pdata.ResourceMetrics) bool { + src.ResourceMetrics().RemoveIf(func(srcRs pmetric.ResourceMetrics) bool { // If we are done skip everything else. if totalCopiedDataPoints == size { return false @@ -43,23 +43,23 @@ func splitMetrics(size int, src pdata.Metrics) pdata.Metrics { destRs := dest.ResourceMetrics().AppendEmpty() srcRs.Resource().CopyTo(destRs.Resource()) - srcRs.InstrumentationLibraryMetrics().RemoveIf(func(srcIlm pdata.InstrumentationLibraryMetrics) bool { + srcRs.ScopeMetrics().RemoveIf(func(srcIlm pmetric.ScopeMetrics) bool { // If we are done skip everything else. if totalCopiedDataPoints == size { return false } // If possible to move all metrics do that. - srcIlmDataPointCount := instrumentationLibraryMetricsDPC(srcIlm) + srcIlmDataPointCount := scopeMetricsDPC(srcIlm) if srcIlmDataPointCount+totalCopiedDataPoints <= size { totalCopiedDataPoints += srcIlmDataPointCount - srcIlm.MoveTo(destRs.InstrumentationLibraryMetrics().AppendEmpty()) + srcIlm.MoveTo(destRs.ScopeMetrics().AppendEmpty()) return true } - destIlm := destRs.InstrumentationLibraryMetrics().AppendEmpty() - srcIlm.InstrumentationLibrary().CopyTo(destIlm.InstrumentationLibrary()) - srcIlm.Metrics().RemoveIf(func(srcMetric pdata.Metric) bool { + destIlm := destRs.ScopeMetrics().AppendEmpty() + srcIlm.Scope().CopyTo(destIlm.Scope()) + srcIlm.Metrics().RemoveIf(func(srcMetric pmetric.Metric) bool { // If we are done skip everything else. if totalCopiedDataPoints == size { return false @@ -80,24 +80,24 @@ func splitMetrics(size int, src pdata.Metrics) pdata.Metrics { }) return false }) - return srcRs.InstrumentationLibraryMetrics().Len() == 0 + return srcRs.ScopeMetrics().Len() == 0 }) return dest } -// resourceMetricsDPC calculates the total number of data points in the pdata.ResourceMetrics. -func resourceMetricsDPC(rs pdata.ResourceMetrics) int { +// resourceMetricsDPC calculates the total number of data points in the pmetric.ResourceMetrics. +func resourceMetricsDPC(rs pmetric.ResourceMetrics) int { dataPointCount := 0 - ilms := rs.InstrumentationLibraryMetrics() + ilms := rs.ScopeMetrics() for k := 0; k < ilms.Len(); k++ { - dataPointCount += instrumentationLibraryMetricsDPC(ilms.At(k)) + dataPointCount += scopeMetricsDPC(ilms.At(k)) } return dataPointCount } -// instrumentationLibraryMetricsDPC calculates the total number of data points in the pdata.InstrumentationLibraryMetrics. -func instrumentationLibraryMetricsDPC(ilm pdata.InstrumentationLibraryMetrics) int { +// scopeMetricsDPC calculates the total number of data points in the pmetric.ScopeMetrics. +func scopeMetricsDPC(ilm pmetric.ScopeMetrics) int { dataPointCount := 0 ms := ilm.Metrics() for k := 0; k < ms.Len(); k++ { @@ -106,18 +106,18 @@ func instrumentationLibraryMetricsDPC(ilm pdata.InstrumentationLibraryMetrics) i return dataPointCount } -// metricDPC calculates the total number of data points in the pdata.Metric. -func metricDPC(ms pdata.Metric) int { +// metricDPC calculates the total number of data points in the pmetric.Metric. +func metricDPC(ms pmetric.Metric) int { switch ms.DataType() { - case pdata.MetricDataTypeGauge: + case pmetric.MetricDataTypeGauge: return ms.Gauge().DataPoints().Len() - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: return ms.Sum().DataPoints().Len() - case pdata.MetricDataTypeHistogram: + case pmetric.MetricDataTypeHistogram: return ms.Histogram().DataPoints().Len() - case pdata.MetricDataTypeExponentialHistogram: + case pmetric.MetricDataTypeExponentialHistogram: return ms.ExponentialHistogram().DataPoints().Len() - case pdata.MetricDataTypeSummary: + case pmetric.MetricDataTypeSummary: return ms.Summary().DataPoints().Len() } return 0 @@ -125,35 +125,35 @@ func metricDPC(ms pdata.Metric) int { // splitMetric removes metric points from the input data and moves data of the specified size to destination. // Returns size of moved data and boolean describing, whether the metric should be removed from original slice. -func splitMetric(ms, dest pdata.Metric, size int) (int, bool) { +func splitMetric(ms, dest pmetric.Metric, size int) (int, bool) { dest.SetDataType(ms.DataType()) dest.SetName(ms.Name()) dest.SetDescription(ms.Description()) dest.SetUnit(ms.Unit()) switch ms.DataType() { - case pdata.MetricDataTypeGauge: + case pmetric.MetricDataTypeGauge: return splitNumberDataPoints(ms.Gauge().DataPoints(), dest.Gauge().DataPoints(), size) - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: dest.Sum().SetAggregationTemporality(ms.Sum().AggregationTemporality()) dest.Sum().SetIsMonotonic(ms.Sum().IsMonotonic()) return splitNumberDataPoints(ms.Sum().DataPoints(), dest.Sum().DataPoints(), size) - case pdata.MetricDataTypeHistogram: + case pmetric.MetricDataTypeHistogram: dest.Histogram().SetAggregationTemporality(ms.Histogram().AggregationTemporality()) return splitHistogramDataPoints(ms.Histogram().DataPoints(), dest.Histogram().DataPoints(), size) - case pdata.MetricDataTypeExponentialHistogram: + case pmetric.MetricDataTypeExponentialHistogram: dest.ExponentialHistogram().SetAggregationTemporality(ms.ExponentialHistogram().AggregationTemporality()) return splitExponentialHistogramDataPoints(ms.ExponentialHistogram().DataPoints(), dest.ExponentialHistogram().DataPoints(), size) - case pdata.MetricDataTypeSummary: + case pmetric.MetricDataTypeSummary: return splitSummaryDataPoints(ms.Summary().DataPoints(), dest.Summary().DataPoints(), size) } return size, false } -func splitNumberDataPoints(src, dst pdata.NumberDataPointSlice, size int) (int, bool) { +func splitNumberDataPoints(src, dst pmetric.NumberDataPointSlice, size int) (int, bool) { dst.EnsureCapacity(size) i := 0 - src.RemoveIf(func(dp pdata.NumberDataPoint) bool { + src.RemoveIf(func(dp pmetric.NumberDataPoint) bool { if i < size { dp.MoveTo(dst.AppendEmpty()) i++ @@ -164,10 +164,10 @@ func splitNumberDataPoints(src, dst pdata.NumberDataPointSlice, size int) (int, return size, false } -func splitHistogramDataPoints(src, dst pdata.HistogramDataPointSlice, size int) (int, bool) { +func splitHistogramDataPoints(src, dst pmetric.HistogramDataPointSlice, size int) (int, bool) { dst.EnsureCapacity(size) i := 0 - src.RemoveIf(func(dp pdata.HistogramDataPoint) bool { + src.RemoveIf(func(dp pmetric.HistogramDataPoint) bool { if i < size { dp.MoveTo(dst.AppendEmpty()) i++ @@ -178,10 +178,10 @@ func splitHistogramDataPoints(src, dst pdata.HistogramDataPointSlice, size int) return size, false } -func splitExponentialHistogramDataPoints(src, dst pdata.ExponentialHistogramDataPointSlice, size int) (int, bool) { +func splitExponentialHistogramDataPoints(src, dst pmetric.ExponentialHistogramDataPointSlice, size int) (int, bool) { dst.EnsureCapacity(size) i := 0 - src.RemoveIf(func(dp pdata.ExponentialHistogramDataPoint) bool { + src.RemoveIf(func(dp pmetric.ExponentialHistogramDataPoint) bool { if i < size { dp.MoveTo(dst.AppendEmpty()) i++ @@ -192,10 +192,10 @@ func splitExponentialHistogramDataPoints(src, dst pdata.ExponentialHistogramData return size, false } -func splitSummaryDataPoints(src, dst pdata.SummaryDataPointSlice, size int) (int, bool) { +func splitSummaryDataPoints(src, dst pmetric.SummaryDataPointSlice, size int) (int, bool) { dst.EnsureCapacity(size) i := 0 - src.RemoveIf(func(dp pdata.SummaryDataPoint) bool { + src.RemoveIf(func(dp pmetric.SummaryDataPoint) bool { if i < size { dp.MoveTo(dst.AppendEmpty()) i++ diff --git a/internal/otel_collector/processor/batchprocessor/splittraces.go b/internal/otel_collector/processor/batchprocessor/splittraces.go index b3b8bbf5ccf..6c1212682ee 100644 --- a/internal/otel_collector/processor/batchprocessor/splittraces.go +++ b/internal/otel_collector/processor/batchprocessor/splittraces.go @@ -15,18 +15,18 @@ package batchprocessor // import "go.opentelemetry.io/collector/processor/batchprocessor" import ( - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) // splitTraces removes spans from the input trace and returns a new trace of the specified size. -func splitTraces(size int, src pdata.Traces) pdata.Traces { +func splitTraces(size int, src ptrace.Traces) ptrace.Traces { if src.SpanCount() <= size { return src } totalCopiedSpans := 0 - dest := pdata.NewTraces() + dest := ptrace.NewTraces() - src.ResourceSpans().RemoveIf(func(srcRs pdata.ResourceSpans) bool { + src.ResourceSpans().RemoveIf(func(srcRs ptrace.ResourceSpans) bool { // If we are done skip everything else. if totalCopiedSpans == size { return false @@ -42,7 +42,7 @@ func splitTraces(size int, src pdata.Traces) pdata.Traces { destRs := dest.ResourceSpans().AppendEmpty() srcRs.Resource().CopyTo(destRs.Resource()) - srcRs.InstrumentationLibrarySpans().RemoveIf(func(srcIls pdata.InstrumentationLibrarySpans) bool { + srcRs.ScopeSpans().RemoveIf(func(srcIls ptrace.ScopeSpans) bool { // If we are done skip everything else. if totalCopiedSpans == size { return false @@ -52,13 +52,13 @@ func splitTraces(size int, src pdata.Traces) pdata.Traces { srcIlsSC := srcIls.Spans().Len() if size-totalCopiedSpans >= srcIlsSC { totalCopiedSpans += srcIlsSC - srcIls.MoveTo(destRs.InstrumentationLibrarySpans().AppendEmpty()) + srcIls.MoveTo(destRs.ScopeSpans().AppendEmpty()) return true } - destIls := destRs.InstrumentationLibrarySpans().AppendEmpty() - srcIls.InstrumentationLibrary().CopyTo(destIls.InstrumentationLibrary()) - srcIls.Spans().RemoveIf(func(srcSpan pdata.Span) bool { + destIls := destRs.ScopeSpans().AppendEmpty() + srcIls.Scope().CopyTo(destIls.Scope()) + srcIls.Spans().RemoveIf(func(srcSpan ptrace.Span) bool { // If we are done skip everything else. if totalCopiedSpans == size { return false @@ -69,16 +69,16 @@ func splitTraces(size int, src pdata.Traces) pdata.Traces { }) return false }) - return srcRs.InstrumentationLibrarySpans().Len() == 0 + return srcRs.ScopeSpans().Len() == 0 }) return dest } -// resourceSC calculates the total number of spans in the pdata.ResourceSpans. -func resourceSC(rs pdata.ResourceSpans) (count int) { - for k := 0; k < rs.InstrumentationLibrarySpans().Len(); k++ { - count += rs.InstrumentationLibrarySpans().At(k).Spans().Len() +// resourceSC calculates the total number of spans in the ptrace.ResourceSpans. +func resourceSC(rs ptrace.ResourceSpans) (count int) { + for k := 0; k < rs.ScopeSpans().Len(); k++ { + count += rs.ScopeSpans().At(k).Spans().Len() } return } diff --git a/internal/otel_collector/processor/memorylimiterprocessor/README.md b/internal/otel_collector/processor/memorylimiterprocessor/README.md index 406d2f3d87c..0e896d0e271 100644 --- a/internal/otel_collector/processor/memorylimiterprocessor/README.md +++ b/internal/otel_collector/processor/memorylimiterprocessor/README.md @@ -1,6 +1,10 @@ # Memory Limiter Processor -Supported pipeline types: metrics, traces, logs +| Status | | +| ------------------------ | --------------------- | +| Stability | [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | The memory limiter processor is used to prevent out of memory situations on the collector. Given that the amount and type of data the collector processes is @@ -93,3 +97,7 @@ processors: Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/internal/otel_collector/processor/memorylimiterprocessor/factory.go b/internal/otel_collector/processor/memorylimiterprocessor/factory.go index ea26c45b415..e5e5f021796 100644 --- a/internal/otel_collector/processor/memorylimiterprocessor/factory.go +++ b/internal/otel_collector/processor/memorylimiterprocessor/factory.go @@ -16,6 +16,7 @@ package memorylimiterprocessor // import "go.opentelemetry.io/collector/processo import ( "context" + "sync" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" @@ -30,14 +31,24 @@ const ( var processorCapabilities = consumer.Capabilities{MutatesData: false} +type factory struct { + // memoryLimiters stores memoryLimiter instances with unique configs that multiple processors can reuse. + // This avoids running multiple memory checks (ie: GC) for every processor using the same processor config. + memoryLimiters map[config.ComponentID]*memoryLimiter + lock sync.Mutex +} + // NewFactory returns a new factory for the Memory Limiter processor. func NewFactory() component.ProcessorFactory { - return processorhelper.NewFactory( + f := &factory{ + memoryLimiters: map[config.ComponentID]*memoryLimiter{}, + } + return component.NewProcessorFactory( typeStr, createDefaultConfig, - processorhelper.WithTraces(createTracesProcessor), - processorhelper.WithMetrics(createMetricsProcessor), - processorhelper.WithLogs(createLogsProcessor)) + component.WithTracesProcessorAndStabilityLevel(f.createTracesProcessor, component.StabilityLevelBeta), + component.WithMetricsProcessorAndStabilityLevel(f.createMetricsProcessor, component.StabilityLevelBeta), + component.WithLogsProcessorAndStabilityLevel(f.createLogsProcessor, component.StabilityLevelBeta)) } // CreateDefaultConfig creates the default configuration for processor. Notice @@ -48,57 +59,78 @@ func createDefaultConfig() config.Processor { } } -func createTracesProcessor( +func (f *factory) createTracesProcessor( _ context.Context, set component.ProcessorCreateSettings, cfg config.Processor, nextConsumer consumer.Traces, ) (component.TracesProcessor, error) { - ml, err := newMemoryLimiter(set, cfg.(*Config)) + memLimiter, err := f.getMemoryLimiter(set, cfg) if err != nil { return nil, err } return processorhelper.NewTracesProcessor( cfg, nextConsumer, - ml.processTraces, + memLimiter.processTraces, processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithStart(ml.start), - processorhelper.WithShutdown(ml.shutdown)) + processorhelper.WithStart(memLimiter.start), + processorhelper.WithShutdown(memLimiter.shutdown)) } -func createMetricsProcessor( +func (f *factory) createMetricsProcessor( _ context.Context, set component.ProcessorCreateSettings, cfg config.Processor, nextConsumer consumer.Metrics, ) (component.MetricsProcessor, error) { - ml, err := newMemoryLimiter(set, cfg.(*Config)) + memLimiter, err := f.getMemoryLimiter(set, cfg) if err != nil { return nil, err } return processorhelper.NewMetricsProcessor( cfg, nextConsumer, - ml.processMetrics, + memLimiter.processMetrics, processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithShutdown(ml.shutdown)) + processorhelper.WithStart(memLimiter.start), + processorhelper.WithShutdown(memLimiter.shutdown)) } -func createLogsProcessor( +func (f *factory) createLogsProcessor( _ context.Context, set component.ProcessorCreateSettings, cfg config.Processor, nextConsumer consumer.Logs, ) (component.LogsProcessor, error) { - ml, err := newMemoryLimiter(set, cfg.(*Config)) + memLimiter, err := f.getMemoryLimiter(set, cfg) if err != nil { return nil, err } return processorhelper.NewLogsProcessor( cfg, nextConsumer, - ml.processLogs, + memLimiter.processLogs, processorhelper.WithCapabilities(processorCapabilities), - processorhelper.WithShutdown(ml.shutdown)) + processorhelper.WithStart(memLimiter.start), + processorhelper.WithShutdown(memLimiter.shutdown)) +} + +// getMemoryLimiter checks if we have a cached memoryLimiter with a specific config, +// otherwise initialize and add one to the store. +func (f *factory) getMemoryLimiter(set component.ProcessorCreateSettings, cfg config.Processor) (*memoryLimiter, error) { + f.lock.Lock() + defer f.lock.Unlock() + + if memLimiter, ok := f.memoryLimiters[cfg.ID()]; ok { + return memLimiter, nil + } + + memLimiter, err := newMemoryLimiter(set, cfg.(*Config)) + if err != nil { + return nil, err + } + + f.memoryLimiters[cfg.ID()] = memLimiter + return memLimiter, nil } diff --git a/internal/otel_collector/processor/memorylimiterprocessor/memorylimiter.go b/internal/otel_collector/processor/memorylimiterprocessor/memorylimiter.go index 19dbe420c8b..e4def9e7c08 100644 --- a/internal/otel_collector/processor/memorylimiterprocessor/memorylimiter.go +++ b/internal/otel_collector/processor/memorylimiterprocessor/memorylimiter.go @@ -19,16 +19,19 @@ import ( "errors" "fmt" "runtime" - "sync/atomic" + "sync" "time" + "go.uber.org/atomic" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension/ballastextension" "go.opentelemetry.io/collector/internal/iruntime" - "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/obsreport" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" ) const ( @@ -54,6 +57,8 @@ var ( errPercentageLimitOutOfRange = errors.New( "memoryLimitPercentage and memorySpikePercentage must be greater than zero and less than or equal to hundred", ) + + errShutdownNotStarted = errors.New("no existing monitoring routine is running") ) // make it overridable by tests @@ -66,7 +71,7 @@ type memoryLimiter struct { ballastSize uint64 // forceDrop is used atomically to indicate when data should be dropped. - forceDrop int64 + forceDrop *atomic.Bool ticker *time.Ticker @@ -81,6 +86,9 @@ type memoryLimiter struct { configMismatchedLogged bool obsrep *obsreport.Processor + + refCounterLock sync.Mutex + refCounter int } // Minimum interval between forced GC when in soft limited mode. We don't want to @@ -113,6 +121,7 @@ func newMemoryLimiter(set component.ProcessorCreateSettings, cfg *Config) (*memo ticker: time.NewTicker(cfg.CheckInterval), readMemStatsFn: runtime.ReadMemStats, logger: logger, + forceDrop: atomic.NewBool(false), obsrep: obsreport.NewProcessor(obsreport.ProcessorSettings{ Level: set.MetricsLevel, ProcessorID: cfg.ID(), @@ -148,19 +157,26 @@ func (ml *memoryLimiter) start(_ context.Context, host component.Host) error { break } } - ml.startMonitoring() return nil } func (ml *memoryLimiter) shutdown(context.Context) error { - ml.ticker.Stop() + ml.refCounterLock.Lock() + defer ml.refCounterLock.Unlock() + + if ml.refCounter == 0 { + return errShutdownNotStarted + } else if ml.refCounter == 1 { + ml.ticker.Stop() + } + ml.refCounter-- return nil } -func (ml *memoryLimiter) processTraces(ctx context.Context, td pdata.Traces) (pdata.Traces, error) { +func (ml *memoryLimiter) processTraces(ctx context.Context, td ptrace.Traces) (ptrace.Traces, error) { numSpans := td.SpanCount() - if ml.forcingDrop() { + if ml.forceDrop.Load() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it @@ -177,9 +193,9 @@ func (ml *memoryLimiter) processTraces(ctx context.Context, td pdata.Traces) (pd return td, nil } -func (ml *memoryLimiter) processMetrics(ctx context.Context, md pdata.Metrics) (pdata.Metrics, error) { +func (ml *memoryLimiter) processMetrics(ctx context.Context, md pmetric.Metrics) (pmetric.Metrics, error) { numDataPoints := md.DataPointCount() - if ml.forcingDrop() { + if ml.forceDrop.Load() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it @@ -195,9 +211,9 @@ func (ml *memoryLimiter) processMetrics(ctx context.Context, md pdata.Metrics) ( return md, nil } -func (ml *memoryLimiter) processLogs(ctx context.Context, ld pdata.Logs) (pdata.Logs, error) { +func (ml *memoryLimiter) processLogs(ctx context.Context, ld plog.Logs) (plog.Logs, error) { numRecords := ld.LogRecordCount() - if ml.forcingDrop() { + if ml.forceDrop.Load() { // TODO: actually to be 100% sure that this is "refused" and not "dropped" // it is necessary to check the pipeline to see if this is directly connected // to a receiver (ie.: a receiver is on the call stack). For now it @@ -230,27 +246,20 @@ func (ml *memoryLimiter) readMemStats() *runtime.MemStats { return ms } -// startMonitoring starts a ticker'd goroutine that will check memory usage -// every checkInterval period. +// startMonitoring starts a single ticker'd goroutine per instance +// that will check memory usage every checkInterval period. func (ml *memoryLimiter) startMonitoring() { - go func() { - for range ml.ticker.C { - ml.checkMemLimits() - } - }() -} - -// forcingDrop indicates when memory resources need to be released. -func (ml *memoryLimiter) forcingDrop() bool { - return atomic.LoadInt64(&ml.forceDrop) != 0 -} - -func (ml *memoryLimiter) setForcingDrop(b bool) { - var i int64 - if b { - i = 1 + ml.refCounterLock.Lock() + defer ml.refCounterLock.Unlock() + + ml.refCounter++ + if ml.refCounter == 1 { + go func() { + for range ml.ticker.C { + ml.checkMemLimits() + } + }() } - atomic.StoreInt64(&ml.forceDrop, i) } func memstatToZapField(ms *runtime.MemStats) zap.Field { @@ -276,7 +285,7 @@ func (ml *memoryLimiter) checkMemLimits() { } // Remember current dropping state. - wasForcingDrop := ml.forcingDrop() + wasForcingDrop := ml.forceDrop.Load() // Check if the memory usage is above the soft limit. mustForceDrop := ml.usageChecker.aboveSoftLimit(ms) @@ -301,7 +310,7 @@ func (ml *memoryLimiter) checkMemLimits() { } } - ml.setForcingDrop(mustForceDrop) + ml.forceDrop.Store(mustForceDrop) } type memUsageChecker struct { diff --git a/internal/otel_collector/processor/processorhelper/factory.go b/internal/otel_collector/processor/processorhelper/factory.go deleted file mode 100644 index f0eb72a6d3c..00000000000 --- a/internal/otel_collector/processor/processorhelper/factory.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package processorhelper // import "go.opentelemetry.io/collector/processor/processorhelper" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/internalinterface" -) - -// FactoryOption apply changes to ProcessorOptions. -type FactoryOption func(o *factory) - -// CreateDefaultConfig is the equivalent of component.ProcessorFactory.CreateDefaultConfig() -type CreateDefaultConfig func() config.Processor - -// CreateTracesProcessor is the equivalent of component.ProcessorFactory.CreateTracesProcessor() -type CreateTracesProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Traces) (component.TracesProcessor, error) - -// CreateMetricsProcessor is the equivalent of component.ProcessorFactory.CreateMetricsProcessor() -type CreateMetricsProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Metrics) (component.MetricsProcessor, error) - -// CreateLogsProcessor is the equivalent of component.ProcessorFactory.CreateLogsProcessor() -type CreateLogsProcessor func(context.Context, component.ProcessorCreateSettings, config.Processor, consumer.Logs) (component.LogsProcessor, error) - -type factory struct { - internalinterface.BaseInternal - cfgType config.Type - createDefaultConfig CreateDefaultConfig - createTracesProcessor CreateTracesProcessor - createMetricsProcessor CreateMetricsProcessor - createLogsProcessor CreateLogsProcessor -} - -// WithTraces overrides the default "error not supported" implementation for CreateTracesProcessor. -func WithTraces(createTracesProcessor CreateTracesProcessor) FactoryOption { - return func(o *factory) { - o.createTracesProcessor = createTracesProcessor - } -} - -// WithMetrics overrides the default "error not supported" implementation for CreateMetricsProcessor. -func WithMetrics(createMetricsProcessor CreateMetricsProcessor) FactoryOption { - return func(o *factory) { - o.createMetricsProcessor = createMetricsProcessor - } -} - -// WithLogs overrides the default "error not supported" implementation for CreateLogsProcessor. -func WithLogs(createLogsProcessor CreateLogsProcessor) FactoryOption { - return func(o *factory) { - o.createLogsProcessor = createLogsProcessor - } -} - -// NewFactory returns a component.ProcessorFactory. -func NewFactory( - cfgType config.Type, - createDefaultConfig CreateDefaultConfig, - options ...FactoryOption) component.ProcessorFactory { - f := &factory{ - cfgType: cfgType, - createDefaultConfig: createDefaultConfig, - } - for _, opt := range options { - opt(f) - } - return f -} - -// Type gets the type of the Processor config created by this factory. -func (f *factory) Type() config.Type { - return f.cfgType -} - -// CreateDefaultConfig creates the default configuration for processor. -func (f *factory) CreateDefaultConfig() config.Processor { - return f.createDefaultConfig() -} - -// CreateTracesProcessor creates a component.TracesProcessor based on this config. -func (f *factory) CreateTracesProcessor( - ctx context.Context, - set component.ProcessorCreateSettings, - cfg config.Processor, - nextConsumer consumer.Traces, -) (component.TracesProcessor, error) { - if f.createTracesProcessor == nil { - return nil, componenterror.ErrDataTypeIsNotSupported - } - return f.createTracesProcessor(ctx, set, cfg, nextConsumer) -} - -// CreateMetricsProcessor creates a component.MetricsProcessor based on this config. -func (f *factory) CreateMetricsProcessor( - ctx context.Context, - set component.ProcessorCreateSettings, - cfg config.Processor, - nextConsumer consumer.Metrics, -) (component.MetricsProcessor, error) { - if f.createMetricsProcessor == nil { - return nil, componenterror.ErrDataTypeIsNotSupported - } - return f.createMetricsProcessor(ctx, set, cfg, nextConsumer) -} - -// CreateLogsProcessor creates a component.LogsProcessor based on this config. -func (f *factory) CreateLogsProcessor( - ctx context.Context, - set component.ProcessorCreateSettings, - cfg config.Processor, - nextConsumer consumer.Logs, -) (component.LogsProcessor, error) { - if f.createLogsProcessor == nil { - return nil, componenterror.ErrDataTypeIsNotSupported - } - return f.createLogsProcessor(ctx, set, cfg, nextConsumer) -} diff --git a/internal/otel_collector/processor/processorhelper/logs.go b/internal/otel_collector/processor/processorhelper/logs.go index 290d0aaa3a1..fd1c8d82229 100644 --- a/internal/otel_collector/processor/processorhelper/logs.go +++ b/internal/otel_collector/processor/processorhelper/logs.go @@ -21,21 +21,18 @@ import ( "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerhelper" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) // ProcessLogsFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. // If error is returned then returned data are ignored. It MUST not call the next component. -type ProcessLogsFunc func(context.Context, pdata.Logs) (pdata.Logs, error) +type ProcessLogsFunc func(context.Context, plog.Logs) (plog.Logs, error) type logProcessor struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc consumer.Logs } @@ -52,12 +49,12 @@ func NewLogsProcessor( } if nextConsumer == nil { - return nil, componenterror.ErrNilNextConsumer + return nil, component.ErrNilNextConsumer } eventOptions := spanAttributes(cfg.ID()) bs := fromOptions(options) - logsConsumer, err := consumerhelper.NewLogs(func(ctx context.Context, ld pdata.Logs) error { + logsConsumer, err := consumer.NewLogs(func(ctx context.Context, ld plog.Logs) error { span := trace.SpanFromContext(ctx) span.AddEvent("Start processing.", eventOptions) var err error diff --git a/internal/otel_collector/processor/processorhelper/metrics.go b/internal/otel_collector/processor/processorhelper/metrics.go index a275797042a..56e85a8188f 100644 --- a/internal/otel_collector/processor/processorhelper/metrics.go +++ b/internal/otel_collector/processor/processorhelper/metrics.go @@ -21,21 +21,18 @@ import ( "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerhelper" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) // ProcessMetricsFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. // If error is returned then returned data are ignored. It MUST not call the next component. -type ProcessMetricsFunc func(context.Context, pdata.Metrics) (pdata.Metrics, error) +type ProcessMetricsFunc func(context.Context, pmetric.Metrics) (pmetric.Metrics, error) type metricsProcessor struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc consumer.Metrics } @@ -52,12 +49,12 @@ func NewMetricsProcessor( } if nextConsumer == nil { - return nil, componenterror.ErrNilNextConsumer + return nil, component.ErrNilNextConsumer } eventOptions := spanAttributes(cfg.ID()) bs := fromOptions(options) - metricsConsumer, err := consumerhelper.NewMetrics(func(ctx context.Context, md pdata.Metrics) error { + metricsConsumer, err := consumer.NewMetrics(func(ctx context.Context, md pmetric.Metrics) error { span := trace.SpanFromContext(ctx) span.AddEvent("Start processing.", eventOptions) var err error diff --git a/internal/otel_collector/processor/processorhelper/processor.go b/internal/otel_collector/processor/processorhelper/processor.go index 4dc76a52d37..1797692bdc6 100644 --- a/internal/otel_collector/processor/processorhelper/processor.go +++ b/internal/otel_collector/processor/processorhelper/processor.go @@ -20,10 +20,9 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component/componenthelper" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerhelper" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) @@ -37,7 +36,7 @@ type Option func(*baseSettings) // WithStart overrides the default Start function for an processor. // The default shutdown function does nothing and always returns nil. -func WithStart(start componenthelper.StartFunc) Option { +func WithStart(start component.StartFunc) Option { return func(o *baseSettings) { o.StartFunc = start } @@ -45,7 +44,7 @@ func WithStart(start componenthelper.StartFunc) Option { // WithShutdown overrides the default Shutdown function for an processor. // The default shutdown function does nothing and always returns nil. -func WithShutdown(shutdown componenthelper.ShutdownFunc) Option { +func WithShutdown(shutdown component.ShutdownFunc) Option { return func(o *baseSettings) { o.ShutdownFunc = shutdown } @@ -55,21 +54,21 @@ func WithShutdown(shutdown componenthelper.ShutdownFunc) Option { // The default GetCapabilities function returns mutable capabilities. func WithCapabilities(capabilities consumer.Capabilities) Option { return func(o *baseSettings) { - o.consumerOptions = append(o.consumerOptions, consumerhelper.WithCapabilities(capabilities)) + o.consumerOptions = append(o.consumerOptions, consumer.WithCapabilities(capabilities)) } } type baseSettings struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc - consumerOptions []consumerhelper.Option + component.StartFunc + component.ShutdownFunc + consumerOptions []consumer.Option } // fromOptions returns the internal settings starting from the default and applying all options. func fromOptions(options []Option) *baseSettings { // Start from the default options: opts := &baseSettings{ - consumerOptions: []consumerhelper.Option{consumerhelper.WithCapabilities(consumer.Capabilities{MutatesData: true})}, + consumerOptions: []consumer.Option{consumer.WithCapabilities(consumer.Capabilities{MutatesData: true})}, } for _, op := range options { diff --git a/internal/otel_collector/processor/processorhelper/traces.go b/internal/otel_collector/processor/processorhelper/traces.go index 64781516657..43e0d4faaa0 100644 --- a/internal/otel_collector/processor/processorhelper/traces.go +++ b/internal/otel_collector/processor/processorhelper/traces.go @@ -21,21 +21,18 @@ import ( "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerhelper" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) // ProcessTracesFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. // If error is returned then returned data are ignored. It MUST not call the next component. -type ProcessTracesFunc func(context.Context, pdata.Traces) (pdata.Traces, error) +type ProcessTracesFunc func(context.Context, ptrace.Traces) (ptrace.Traces, error) type tracesProcessor struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc consumer.Traces } @@ -52,12 +49,12 @@ func NewTracesProcessor( } if nextConsumer == nil { - return nil, componenterror.ErrNilNextConsumer + return nil, component.ErrNilNextConsumer } eventOptions := spanAttributes(cfg.ID()) bs := fromOptions(options) - traceConsumer, err := consumerhelper.NewTraces(func(ctx context.Context, td pdata.Traces) error { + traceConsumer, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error { span := trace.SpanFromContext(ctx) span.AddEvent("Start processing.", eventOptions) var err error diff --git a/internal/otel_collector/proto_patch.sed b/internal/otel_collector/proto_patch.sed index 9758580f9c8..d00e35af57c 100644 --- a/internal/otel_collector/proto_patch.sed +++ b/internal/otel_collector/proto_patch.sed @@ -1,4 +1,4 @@ -s+github.com/open-telemetry/opentelemetry-proto/gen/go/+go.opentelemetry.io/collector/model/internal/data/protogen/+g +s+go.opentelemetry.io/proto/otlp/+go.opentelemetry.io/collector/pdata/internal/data/protogen/+g s+package opentelemetry.proto.\(.*\).v1;+package opentelemetry.proto.\1.v1;\ \ @@ -8,14 +8,14 @@ s+bytes trace_id = \(.*\);+bytes trace_id = \1\ [\ // Use custom TraceId data type for this field.\ (gogoproto.nullable) = false,\ - (gogoproto.customtype) = "go.opentelemetry.io/collector/model/internal/data.TraceID"\ + (gogoproto.customtype) = "go.opentelemetry.io/collector/pdata/internal/data.TraceID"\ ];+g s+bytes \(.*span_id\) = \(.*\);+bytes \1 = \2\ [\ // Use custom SpanId data type for this field.\ (gogoproto.nullable) = false,\ - (gogoproto.customtype) = "go.opentelemetry.io/collector/model/internal/data.SpanID"\ + (gogoproto.customtype) = "go.opentelemetry.io/collector/pdata/internal/data.SpanID"\ ];+g s+repeated opentelemetry.proto.common.v1.KeyValue \(.*\);+repeated opentelemetry.proto.common.v1.KeyValue \1\ @@ -40,6 +40,9 @@ s+opentelemetry.proto.resource.v1.Resource resource = \(.*\);+opentelemetry.prot s+opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = \(.*\);+opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = \1\ [ (gogoproto.nullable) = false ];+g +s+opentelemetry.proto.common.v1.InstrumentationScope scope = \(.*\);+opentelemetry.proto.common.v1.InstrumentationScope scope = \1\ + [ (gogoproto.nullable) = false ];+g + s+Status \(.*\);+Status \1\ [ (gogoproto.nullable) = false ];+g @@ -50,4 +53,7 @@ s+repeated Exemplar exemplars = \(.*\);+repeated Exemplar exemplars = \1\ [ (gogoproto.nullable) = false ];+g s+Buckets \(.*\)tive = \(.*\);+Buckets \1tive = \2\ - [ (gogoproto.nullable) = false ];+g \ No newline at end of file + [ (gogoproto.nullable) = false ];+g + +# optional fixed64 foo = 1 -> oneof foo_ { fixed64 foo = 1;} +s+optional \(.*\) \(.*\) = \(.*\);+ oneof \2_ { \1 \2 = \3;}+g diff --git a/internal/otel_collector/receiver/otlpreceiver/README.md b/internal/otel_collector/receiver/otlpreceiver/README.md index ecd6b80a0d3..42e933f394c 100644 --- a/internal/otel_collector/receiver/otlpreceiver/README.md +++ b/internal/otel_collector/receiver/otlpreceiver/README.md @@ -1,14 +1,17 @@ # OTLP Receiver +| Status | | +| ------------------------ | --------------------- | +| Stability | traces [stable] | +| | metrics [stable] | +| | logs [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | + Receives data via gRPC or HTTP using [OTLP]( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) format. -Supported pipeline types: traces, metrics, logs - -:warning: OTLP logs format is currently marked as "Beta" and may change in -incompatible ways. - ## Getting Started All that is required to enable the OTLP receiver is to include it in the @@ -41,8 +44,7 @@ Several helper files are leveraged to provide additional capabilities automatica The OTLP receiver can receive trace export calls via HTTP/JSON in addition to gRPC. The HTTP/JSON address is the same as gRPC as the protocol is recognized -and processed accordingly. Note the format needs to be [protobuf JSON -serialization](https://developers.google.com/protocol-buffers/docs/proto3#json). +and processed accordingly. Note the serialization format needs to be [protobuf JSON](https://developers.google.com/protocol-buffers/docs/proto3#json). To write traces with HTTP/JSON, `POST` to `[address]/v1/traces` for traces, to `[address]/v1/metrics` for metrics, to `[address]/v1/logs` for logs. The default @@ -75,3 +77,8 @@ receivers: - Example-Header max_age: 7200 ``` + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable diff --git a/internal/otel_collector/receiver/otlpreceiver/config.go b/internal/otel_collector/receiver/otlpreceiver/config.go index b6b694298f7..6a4552db25a 100644 --- a/internal/otel_collector/receiver/otlpreceiver/config.go +++ b/internal/otel_collector/receiver/otlpreceiver/config.go @@ -15,11 +15,12 @@ package otlpreceiver // import "go.opentelemetry.io/collector/receiver/otlpreceiver" import ( - "fmt" + "errors" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/confmap" ) const ( @@ -49,15 +50,15 @@ var _ config.Unmarshallable = (*Config)(nil) func (cfg *Config) Validate() error { if cfg.GRPC == nil && cfg.HTTP == nil { - return fmt.Errorf("must specify at least one protocol when using the OTLP receiver") + return errors.New("must specify at least one protocol when using the OTLP receiver") } return nil } -// Unmarshal a config.Map into the config struct. -func (cfg *Config) Unmarshal(componentParser *config.Map) error { +// Unmarshal a confmap.Conf into the config struct. +func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { if componentParser == nil || len(componentParser.AllKeys()) == 0 { - return fmt.Errorf("empty config for OTLP receiver") + return errors.New("empty config for OTLP receiver") } // first load the config normally err := componentParser.UnmarshalExact(cfg) @@ -65,7 +66,7 @@ func (cfg *Config) Unmarshal(componentParser *config.Map) error { return err } - // next manually search for protocols in the config.Map, if a protocol is not present it means it is disabled. + // next manually search for protocols in the confmap.Conf, if a protocol is not present it means it is disabled. protocols, err := componentParser.Sub(protocolsFieldName) if err != nil { return err diff --git a/internal/otel_collector/receiver/otlpreceiver/encoder.go b/internal/otel_collector/receiver/otlpreceiver/encoder.go index ea9cee80d87..c486eebf07c 100644 --- a/internal/otel_collector/receiver/otlpreceiver/encoder.go +++ b/internal/otel_collector/receiver/otlpreceiver/encoder.go @@ -21,7 +21,9 @@ import ( "github.com/gogo/protobuf/proto" spb "google.golang.org/genproto/googleapis/rpc/status" - "go.opentelemetry.io/collector/model/otlpgrpc" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) const ( @@ -36,13 +38,13 @@ var ( ) type encoder interface { - unmarshalTracesRequest(buf []byte) (otlpgrpc.TracesRequest, error) - unmarshalMetricsRequest(buf []byte) (otlpgrpc.MetricsRequest, error) - unmarshalLogsRequest(buf []byte) (otlpgrpc.LogsRequest, error) + unmarshalTracesRequest(buf []byte) (ptraceotlp.Request, error) + unmarshalMetricsRequest(buf []byte) (pmetricotlp.Request, error) + unmarshalLogsRequest(buf []byte) (plogotlp.Request, error) - marshalTracesResponse(otlpgrpc.TracesResponse) ([]byte, error) - marshalMetricsResponse(otlpgrpc.MetricsResponse) ([]byte, error) - marshalLogsResponse(otlpgrpc.LogsResponse) ([]byte, error) + marshalTracesResponse(ptraceotlp.Response) ([]byte, error) + marshalMetricsResponse(pmetricotlp.Response) ([]byte, error) + marshalLogsResponse(plogotlp.Response) ([]byte, error) marshalStatus(rsp *spb.Status) ([]byte, error) @@ -51,28 +53,34 @@ type encoder interface { type protoEncoder struct{} -func (protoEncoder) unmarshalTracesRequest(buf []byte) (otlpgrpc.TracesRequest, error) { - return otlpgrpc.UnmarshalTracesRequest(buf) +func (protoEncoder) unmarshalTracesRequest(buf []byte) (ptraceotlp.Request, error) { + req := ptraceotlp.NewRequest() + err := req.UnmarshalProto(buf) + return req, err } -func (protoEncoder) unmarshalMetricsRequest(buf []byte) (otlpgrpc.MetricsRequest, error) { - return otlpgrpc.UnmarshalMetricsRequest(buf) +func (protoEncoder) unmarshalMetricsRequest(buf []byte) (pmetricotlp.Request, error) { + req := pmetricotlp.NewRequest() + err := req.UnmarshalProto(buf) + return req, err } -func (protoEncoder) unmarshalLogsRequest(buf []byte) (otlpgrpc.LogsRequest, error) { - return otlpgrpc.UnmarshalLogsRequest(buf) +func (protoEncoder) unmarshalLogsRequest(buf []byte) (plogotlp.Request, error) { + req := plogotlp.NewRequest() + err := req.UnmarshalProto(buf) + return req, err } -func (protoEncoder) marshalTracesResponse(resp otlpgrpc.TracesResponse) ([]byte, error) { - return resp.Marshal() +func (protoEncoder) marshalTracesResponse(resp ptraceotlp.Response) ([]byte, error) { + return resp.MarshalProto() } -func (protoEncoder) marshalMetricsResponse(resp otlpgrpc.MetricsResponse) ([]byte, error) { - return resp.Marshal() +func (protoEncoder) marshalMetricsResponse(resp pmetricotlp.Response) ([]byte, error) { + return resp.MarshalProto() } -func (protoEncoder) marshalLogsResponse(resp otlpgrpc.LogsResponse) ([]byte, error) { - return resp.Marshal() +func (protoEncoder) marshalLogsResponse(resp plogotlp.Response) ([]byte, error) { + return resp.MarshalProto() } func (protoEncoder) marshalStatus(resp *spb.Status) ([]byte, error) { @@ -85,27 +93,33 @@ func (protoEncoder) contentType() string { type jsonEncoder struct{} -func (jsonEncoder) unmarshalTracesRequest(buf []byte) (otlpgrpc.TracesRequest, error) { - return otlpgrpc.UnmarshalJSONTracesRequest(buf) +func (jsonEncoder) unmarshalTracesRequest(buf []byte) (ptraceotlp.Request, error) { + req := ptraceotlp.NewRequest() + err := req.UnmarshalJSON(buf) + return req, err } -func (jsonEncoder) unmarshalMetricsRequest(buf []byte) (otlpgrpc.MetricsRequest, error) { - return otlpgrpc.UnmarshalJSONMetricsRequest(buf) +func (jsonEncoder) unmarshalMetricsRequest(buf []byte) (pmetricotlp.Request, error) { + req := pmetricotlp.NewRequest() + err := req.UnmarshalJSON(buf) + return req, err } -func (jsonEncoder) unmarshalLogsRequest(buf []byte) (otlpgrpc.LogsRequest, error) { - return otlpgrpc.UnmarshalJSONLogsRequest(buf) +func (jsonEncoder) unmarshalLogsRequest(buf []byte) (plogotlp.Request, error) { + req := plogotlp.NewRequest() + err := req.UnmarshalJSON(buf) + return req, err } -func (jsonEncoder) marshalTracesResponse(resp otlpgrpc.TracesResponse) ([]byte, error) { +func (jsonEncoder) marshalTracesResponse(resp ptraceotlp.Response) ([]byte, error) { return resp.MarshalJSON() } -func (jsonEncoder) marshalMetricsResponse(resp otlpgrpc.MetricsResponse) ([]byte, error) { +func (jsonEncoder) marshalMetricsResponse(resp pmetricotlp.Response) ([]byte, error) { return resp.MarshalJSON() } -func (jsonEncoder) marshalLogsResponse(resp otlpgrpc.LogsResponse) ([]byte, error) { +func (jsonEncoder) marshalLogsResponse(resp plogotlp.Response) ([]byte, error) { return resp.MarshalJSON() } diff --git a/internal/otel_collector/receiver/otlpreceiver/factory.go b/internal/otel_collector/receiver/otlpreceiver/factory.go index acc820df318..18ee98f8404 100644 --- a/internal/otel_collector/receiver/otlpreceiver/factory.go +++ b/internal/otel_collector/receiver/otlpreceiver/factory.go @@ -24,7 +24,6 @@ import ( "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/internal/sharedcomponent" - "go.opentelemetry.io/collector/receiver/receiverhelper" ) const ( @@ -32,17 +31,16 @@ const ( defaultGRPCEndpoint = "0.0.0.0:4317" defaultHTTPEndpoint = "0.0.0.0:4318" - legacyHTTPEndpoint = "0.0.0.0:55681" ) // NewFactory creates a new OTLP receiver factory. func NewFactory() component.ReceiverFactory { - return receiverhelper.NewFactory( + return component.NewReceiverFactory( typeStr, createDefaultConfig, - receiverhelper.WithTraces(createTracesReceiver), - receiverhelper.WithMetrics(createMetricsReceiver), - receiverhelper.WithLogs(createLogReceiver)) + component.WithTracesReceiverAndStabilityLevel(createTracesReceiver, component.StabilityLevelStable), + component.WithMetricsReceiverAndStabilityLevel(createMetricsReceiver, component.StabilityLevelStable), + component.WithLogsReceiverAndStabilityLevel(createLogReceiver, component.StabilityLevelBeta)) } // createDefaultConfig creates the default configuration for receiver. @@ -65,7 +63,7 @@ func createDefaultConfig() config.Receiver { } } -// CreateTracesReceiver creates a trace receiver based on provided config. +// createTracesReceiver creates a trace receiver based on provided config. func createTracesReceiver( _ context.Context, set component.ReceiverCreateSettings, @@ -82,7 +80,7 @@ func createTracesReceiver( return r, nil } -// CreateMetricsReceiver creates a metrics receiver based on provided config. +// createMetricsReceiver creates a metrics receiver based on provided config. func createMetricsReceiver( _ context.Context, set component.ReceiverCreateSettings, @@ -99,7 +97,7 @@ func createMetricsReceiver( return r, nil } -// CreateLogReceiver creates a log receiver based on provided config. +// createLogReceiver creates a log receiver based on provided config. func createLogReceiver( _ context.Context, set component.ReceiverCreateSettings, diff --git a/internal/otel_collector/receiver/otlpreceiver/internal/logs/otlp.go b/internal/otel_collector/receiver/otlpreceiver/internal/logs/otlp.go index 8bdca9ec0c4..898a6ae9f28 100644 --- a/internal/otel_collector/receiver/otlpreceiver/internal/logs/otlp.go +++ b/internal/otel_collector/receiver/otlpreceiver/internal/logs/otlp.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" "go.opentelemetry.io/collector/obsreport" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" ) const ( @@ -48,16 +48,16 @@ func New(id config.ComponentID, nextConsumer consumer.Logs, set component.Receiv } // Export implements the service Export logs func. -func (r *Receiver) Export(ctx context.Context, req otlpgrpc.LogsRequest) (otlpgrpc.LogsResponse, error) { +func (r *Receiver) Export(ctx context.Context, req plogotlp.Request) (plogotlp.Response, error) { ld := req.Logs() numSpans := ld.LogRecordCount() if numSpans == 0 { - return otlpgrpc.NewLogsResponse(), nil + return plogotlp.NewResponse(), nil } ctx = r.obsrecv.StartLogsOp(ctx) err := r.nextConsumer.ConsumeLogs(ctx, ld) r.obsrecv.EndLogsOp(ctx, dataFormatProtobuf, numSpans, err) - return otlpgrpc.NewLogsResponse(), err + return plogotlp.NewResponse(), err } diff --git a/internal/otel_collector/receiver/otlpreceiver/internal/metrics/otlp.go b/internal/otel_collector/receiver/otlpreceiver/internal/metrics/otlp.go index 3a6c01bee11..514910958a6 100644 --- a/internal/otel_collector/receiver/otlpreceiver/internal/metrics/otlp.go +++ b/internal/otel_collector/receiver/otlpreceiver/internal/metrics/otlp.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" "go.opentelemetry.io/collector/obsreport" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" ) const ( @@ -48,16 +48,16 @@ func New(id config.ComponentID, nextConsumer consumer.Metrics, set component.Rec } // Export implements the service Export metrics func. -func (r *Receiver) Export(ctx context.Context, req otlpgrpc.MetricsRequest) (otlpgrpc.MetricsResponse, error) { +func (r *Receiver) Export(ctx context.Context, req pmetricotlp.Request) (pmetricotlp.Response, error) { md := req.Metrics() dataPointCount := md.DataPointCount() if dataPointCount == 0 { - return otlpgrpc.NewMetricsResponse(), nil + return pmetricotlp.NewResponse(), nil } ctx = r.obsrecv.StartMetricsOp(ctx) err := r.nextConsumer.ConsumeMetrics(ctx, md) r.obsrecv.EndMetricsOp(ctx, dataFormatProtobuf, dataPointCount, err) - return otlpgrpc.NewMetricsResponse(), err + return pmetricotlp.NewResponse(), err } diff --git a/internal/otel_collector/receiver/otlpreceiver/internal/trace/otlp.go b/internal/otel_collector/receiver/otlpreceiver/internal/trace/otlp.go index cb20562e1b3..d92cd08fb5a 100644 --- a/internal/otel_collector/receiver/otlpreceiver/internal/trace/otlp.go +++ b/internal/otel_collector/receiver/otlpreceiver/internal/trace/otlp.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" "go.opentelemetry.io/collector/obsreport" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" ) const ( @@ -48,17 +48,17 @@ func New(id config.ComponentID, nextConsumer consumer.Traces, set component.Rece } // Export implements the service Export traces func. -func (r *Receiver) Export(ctx context.Context, req otlpgrpc.TracesRequest) (otlpgrpc.TracesResponse, error) { +func (r *Receiver) Export(ctx context.Context, req ptraceotlp.Request) (ptraceotlp.Response, error) { td := req.Traces() // We need to ensure that it propagates the receiver name as a tag numSpans := td.SpanCount() if numSpans == 0 { - return otlpgrpc.NewTracesResponse(), nil + return ptraceotlp.NewResponse(), nil } ctx = r.obsrecv.StartTracesOp(ctx) err := r.nextConsumer.ConsumeTraces(ctx, td) r.obsrecv.EndTracesOp(ctx, dataFormatProtobuf, numSpans, err) - return otlpgrpc.NewTracesResponse(), err + return ptraceotlp.NewResponse(), err } diff --git a/internal/otel_collector/receiver/otlpreceiver/mixin.go b/internal/otel_collector/receiver/otlpreceiver/mixin.go index 628a933034a..385d2a7e38b 100644 --- a/internal/otel_collector/receiver/otlpreceiver/mixin.go +++ b/internal/otel_collector/receiver/otlpreceiver/mixin.go @@ -18,8 +18,6 @@ import ( "context" "net/http" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/otel/metric" apitrace "go.opentelemetry.io/otel/trace" "go.uber.org/zap" @@ -29,7 +27,9 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace" @@ -62,21 +62,21 @@ type HTTPHandlers struct { // RegisterGRPCTraceReceiver registers the trace receiver with a gRPC server. func RegisterGRPCTraceReceiver(ctx context.Context, consumer consumer.Traces, serverGRPC *grpc.Server) error { receiver := trace.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterTracesServer(serverGRPC, receiver) + ptraceotlp.RegisterServer(serverGRPC, receiver) return nil } // RegisterGRPCMetricsReceiver registers the metrics receiver with a gRPC server. func RegisterGRPCMetricsReceiver(ctx context.Context, consumer consumer.Metrics, serverGRPC *grpc.Server) error { receiver := metrics.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterMetricsServer(serverGRPC, receiver) + pmetricotlp.RegisterServer(serverGRPC, receiver) return nil } // RegisterGRPCLogsReceiver registers the logs receiver with a gRPC server. func RegisterGRPCLogsReceiver(ctx context.Context, consumer consumer.Logs, serverGRPC *grpc.Server) error { receiver := logs.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterLogsServer(serverGRPC, receiver) + plogotlp.RegisterServer(serverGRPC, receiver) return nil } @@ -84,9 +84,6 @@ func RegisterGRPCLogsReceiver(ctx context.Context, consumer consumer.Logs, serve func TracesHTTPHandler(ctx context.Context, consumer consumer.Traces) (http.HandlerFunc, error) { receiver := trace.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleTraces(w, r, receiver, pbEncoder) }, nil @@ -94,9 +91,6 @@ func TracesHTTPHandler(ctx context.Context, consumer consumer.Traces) (http.Hand func MetricsHTTPHandler(ctx context.Context, consumer consumer.Metrics) (http.HandlerFunc, error) { receiver := metrics.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleMetrics(w, r, receiver, pbEncoder) }, nil @@ -104,9 +98,6 @@ func MetricsHTTPHandler(ctx context.Context, consumer consumer.Metrics) (http.Ha func LogsHTTPHandler(ctx context.Context, consumer consumer.Logs) (http.HandlerFunc, error) { receiver := logs.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleLogs(w, r, receiver, pbEncoder) }, nil diff --git a/internal/otel_collector/receiver/otlpreceiver/otlp.go b/internal/otel_collector/receiver/otlpreceiver/otlp.go index 35a735a7b9c..0156cb2e106 100644 --- a/internal/otel_collector/receiver/otlpreceiver/otlp.go +++ b/internal/otel_collector/receiver/otlpreceiver/otlp.go @@ -16,20 +16,21 @@ package otlpreceiver // import "go.opentelemetry.io/collector/receiver/otlprecei import ( "context" + "errors" "fmt" "net" "net/http" "sync" - "github.com/gorilla/mux" "google.golang.org/grpc" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace" @@ -39,7 +40,7 @@ import ( type otlpReceiver struct { cfg *Config serverGRPC *grpc.Server - httpMux *mux.Router + httpMux *http.ServeMux serverHTTP *http.Server traceReceiver *trace.Receiver @@ -59,7 +60,7 @@ func newOtlpReceiver(cfg *Config, settings component.ReceiverCreateSettings) *ot settings: settings, } if cfg.HTTP != nil { - r.httpMux = mux.NewRouter() + r.httpMux = http.NewServeMux() } return r @@ -76,7 +77,7 @@ func (r *otlpReceiver) startGRPCServer(cfg *configgrpc.GRPCServerSettings, host go func() { defer r.shutdownWG.Done() - if errGrpc := r.serverGRPC.Serve(gln); errGrpc != nil && errGrpc != grpc.ErrServerStopped { + if errGrpc := r.serverGRPC.Serve(gln); errGrpc != nil && !errors.Is(errGrpc, grpc.ErrServerStopped) { host.ReportFatalError(errGrpc) } }() @@ -94,7 +95,7 @@ func (r *otlpReceiver) startHTTPServer(cfg *confighttp.HTTPServerSettings, host go func() { defer r.shutdownWG.Done() - if errHTTP := r.serverHTTP.Serve(hln); errHTTP != http.ErrServerClosed { + if errHTTP := r.serverHTTP.Serve(hln); errHTTP != nil && !errors.Is(errHTTP, http.ErrServerClosed) { host.ReportFatalError(errHTTP) } }() @@ -112,15 +113,15 @@ func (r *otlpReceiver) startProtocolServers(host component.Host) error { r.serverGRPC = grpc.NewServer(opts...) if r.traceReceiver != nil { - otlpgrpc.RegisterTracesServer(r.serverGRPC, r.traceReceiver) + ptraceotlp.RegisterServer(r.serverGRPC, r.traceReceiver) } if r.metricsReceiver != nil { - otlpgrpc.RegisterMetricsServer(r.serverGRPC, r.metricsReceiver) + pmetricotlp.RegisterServer(r.serverGRPC, r.metricsReceiver) } if r.logReceiver != nil { - otlpgrpc.RegisterLogsServer(r.serverGRPC, r.logReceiver) + plogotlp.RegisterServer(r.serverGRPC, r.logReceiver) } err = r.startGRPCServer(r.cfg.GRPC, host) @@ -143,22 +144,6 @@ func (r *otlpReceiver) startProtocolServers(host component.Host) error { if err != nil { return err } - if r.cfg.HTTP.Endpoint == defaultHTTPEndpoint { - r.settings.Logger.Info("Setting up a second HTTP listener on legacy endpoint " + legacyHTTPEndpoint) - - // Copy the config. - cfgLegacyHTTP := *(r.cfg.HTTP) - // And use the legacy endpoint. - cfgLegacyHTTP.Endpoint = legacyHTTPEndpoint - err = r.startHTTPServer(&cfgLegacyHTTP, host) - if err != nil { - return err - } - } - if r.cfg.HTTP.Endpoint == legacyHTTPEndpoint { - r.settings.Logger.Warn(fmt.Sprintf("Legacy HTTP endpoint %v is configured, please use %v instead.", - legacyHTTPEndpoint, defaultHTTPEndpoint)) - } } return err @@ -188,18 +173,23 @@ func (r *otlpReceiver) Shutdown(ctx context.Context) error { func (r *otlpReceiver) registerTraceConsumer(tc consumer.Traces) error { if tc == nil { - return componenterror.ErrNilNextConsumer + return component.ErrNilNextConsumer } r.traceReceiver = trace.New(r.cfg.ID(), tc, r.settings) if r.httpMux != nil { r.httpMux.HandleFunc("/v1/traces", func(resp http.ResponseWriter, req *http.Request) { - handleTraces(resp, req, r.traceReceiver, pbEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", pbContentType) - r.httpMux.HandleFunc("/v1/traces", func(resp http.ResponseWriter, req *http.Request) { - handleTraces(resp, req, r.traceReceiver, jsEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", jsonContentType) - r.httpMux.HandleFunc("/v1/traces", func(resp http.ResponseWriter, req *http.Request) { - handleUnmatchedRequests(resp, req) + if req.Method != http.MethodPost { + handleUnmatchedMethod(resp) + return + } + switch req.Header.Get("Content-Type") { + case pbContentType: + handleTraces(resp, req, r.traceReceiver, pbEncoder) + case jsonContentType: + handleTraces(resp, req, r.traceReceiver, jsEncoder) + default: + handleUnmatchedContentType(resp) + } }) } return nil @@ -207,18 +197,23 @@ func (r *otlpReceiver) registerTraceConsumer(tc consumer.Traces) error { func (r *otlpReceiver) registerMetricsConsumer(mc consumer.Metrics) error { if mc == nil { - return componenterror.ErrNilNextConsumer + return component.ErrNilNextConsumer } r.metricsReceiver = metrics.New(r.cfg.ID(), mc, r.settings) if r.httpMux != nil { r.httpMux.HandleFunc("/v1/metrics", func(resp http.ResponseWriter, req *http.Request) { - handleMetrics(resp, req, r.metricsReceiver, pbEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", pbContentType) - r.httpMux.HandleFunc("/v1/metrics", func(resp http.ResponseWriter, req *http.Request) { - handleMetrics(resp, req, r.metricsReceiver, jsEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", jsonContentType) - r.httpMux.HandleFunc("/v1/metrics", func(resp http.ResponseWriter, req *http.Request) { - handleUnmatchedRequests(resp, req) + if req.Method != http.MethodPost { + handleUnmatchedMethod(resp) + return + } + switch req.Header.Get("Content-Type") { + case pbContentType: + handleMetrics(resp, req, r.metricsReceiver, pbEncoder) + case jsonContentType: + handleMetrics(resp, req, r.metricsReceiver, jsEncoder) + default: + handleUnmatchedContentType(resp) + } }) } return nil @@ -226,32 +221,34 @@ func (r *otlpReceiver) registerMetricsConsumer(mc consumer.Metrics) error { func (r *otlpReceiver) registerLogsConsumer(lc consumer.Logs) error { if lc == nil { - return componenterror.ErrNilNextConsumer + return component.ErrNilNextConsumer } r.logReceiver = logs.New(r.cfg.ID(), lc, r.settings) if r.httpMux != nil { - r.httpMux.HandleFunc("/v1/logs", func(w http.ResponseWriter, req *http.Request) { - handleLogs(w, req, r.logReceiver, pbEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", pbContentType) - r.httpMux.HandleFunc("/v1/logs", func(w http.ResponseWriter, req *http.Request) { - handleLogs(w, req, r.logReceiver, jsEncoder) - }).Methods(http.MethodPost).Headers("Content-Type", jsonContentType) r.httpMux.HandleFunc("/v1/logs", func(resp http.ResponseWriter, req *http.Request) { - handleUnmatchedRequests(resp, req) + if req.Method != http.MethodPost { + handleUnmatchedMethod(resp) + return + } + switch req.Header.Get("Content-Type") { + case pbContentType: + handleLogs(resp, req, r.logReceiver, pbEncoder) + case jsonContentType: + handleLogs(resp, req, r.logReceiver, jsEncoder) + default: + handleUnmatchedContentType(resp) + } }) } return nil } -func handleUnmatchedRequests(resp http.ResponseWriter, req *http.Request) { - if req.Method != http.MethodPost { - status := http.StatusMethodNotAllowed - writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v method not allowed, supported: [POST]", status))) - return - } - if req.Header.Get("Content-Type") == "" { - status := http.StatusUnsupportedMediaType - writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v unsupported media type, supported: [%s, %s]", status, jsonContentType, pbContentType))) - return - } +func handleUnmatchedMethod(resp http.ResponseWriter) { + status := http.StatusMethodNotAllowed + writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v method not allowed, supported: [POST]", status))) +} + +func handleUnmatchedContentType(resp http.ResponseWriter) { + status := http.StatusUnsupportedMediaType + writeResponse(resp, "text/plain", status, []byte(fmt.Sprintf("%v unsupported media type, supported: [%s, %s]", status, jsonContentType, pbContentType))) } diff --git a/internal/otel_collector/receiver/otlpreceiver/testdata/config.yaml b/internal/otel_collector/receiver/otlpreceiver/testdata/config.yaml index 53a0272494d..db79718fe66 100644 --- a/internal/otel_collector/receiver/otlpreceiver/testdata/config.yaml +++ b/internal/otel_collector/receiver/otlpreceiver/testdata/config.yaml @@ -13,6 +13,14 @@ receivers: otlp/only_http: protocols: http: + # The following entry initializes the default OTLP receiver with only http support by setting it explicitly to null. + otlp/only_http_null: + protocols: + http: null + # The following entry initializes the default OTLP receiver with only http support by setting it explicitly to an empty map. + otlp/only_http_empty_map: + protocols: + http: {} # The following entry demonstrates configuring the common receiver settings: # - endpoint # This configuration is of type 'otlp' and has the name 'customname' with a full name of 'otlp/customname' diff --git a/internal/otel_collector/receiver/receiverhelper/factory.go b/internal/otel_collector/receiver/receiverhelper/factory.go deleted file mode 100644 index 604a804de2d..00000000000 --- a/internal/otel_collector/receiver/receiverhelper/factory.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package receiverhelper // import "go.opentelemetry.io/collector/receiver/receiverhelper" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/internalinterface" -) - -// FactoryOption apply changes to ReceiverOptions. -type FactoryOption func(o *factory) - -// WithTraces overrides the default "error not supported" implementation for CreateTracesReceiver. -func WithTraces(createTracesReceiver CreateTracesReceiver) FactoryOption { - return func(o *factory) { - o.createTracesReceiver = createTracesReceiver - } -} - -// WithMetrics overrides the default "error not supported" implementation for CreateMetricsReceiver. -func WithMetrics(createMetricsReceiver CreateMetricsReceiver) FactoryOption { - return func(o *factory) { - o.createMetricsReceiver = createMetricsReceiver - } -} - -// WithLogs overrides the default "error not supported" implementation for CreateLogsReceiver. -func WithLogs(createLogsReceiver CreateLogsReceiver) FactoryOption { - return func(o *factory) { - o.createLogsReceiver = createLogsReceiver - } -} - -// CreateDefaultConfig is the equivalent of component.ReceiverFactory.CreateDefaultConfig() -type CreateDefaultConfig func() config.Receiver - -// CreateTracesReceiver is the equivalent of component.ReceiverFactory.CreateTracesReceiver() -type CreateTracesReceiver func(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Traces) (component.TracesReceiver, error) - -// CreateMetricsReceiver is the equivalent of component.ReceiverFactory.CreateMetricsReceiver() -type CreateMetricsReceiver func(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Metrics) (component.MetricsReceiver, error) - -// CreateLogsReceiver is the equivalent of component.ReceiverFactory.CreateLogsReceiver() -type CreateLogsReceiver func(context.Context, component.ReceiverCreateSettings, config.Receiver, consumer.Logs) (component.LogsReceiver, error) - -type factory struct { - internalinterface.BaseInternal - cfgType config.Type - createDefaultConfig CreateDefaultConfig - createTracesReceiver CreateTracesReceiver - createMetricsReceiver CreateMetricsReceiver - createLogsReceiver CreateLogsReceiver -} - -// NewFactory returns a component.ReceiverFactory. -func NewFactory( - cfgType config.Type, - createDefaultConfig CreateDefaultConfig, - options ...FactoryOption) component.ReceiverFactory { - f := &factory{ - cfgType: cfgType, - createDefaultConfig: createDefaultConfig, - } - for _, opt := range options { - opt(f) - } - return f -} - -// Type gets the type of the Receiver config created by this factory. -func (f *factory) Type() config.Type { - return f.cfgType -} - -// CreateDefaultConfig creates the default configuration for receiver. -func (f *factory) CreateDefaultConfig() config.Receiver { - return f.createDefaultConfig() -} - -// CreateTracesReceiver creates a component.TracesReceiver based on this config. -func (f *factory) CreateTracesReceiver( - ctx context.Context, - set component.ReceiverCreateSettings, - cfg config.Receiver, - nextConsumer consumer.Traces) (component.TracesReceiver, error) { - if f.createTracesReceiver != nil { - return f.createTracesReceiver(ctx, set, cfg, nextConsumer) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} - -// CreateMetricsReceiver creates a component.MetricsReceiver based on this config. -func (f *factory) CreateMetricsReceiver( - ctx context.Context, - set component.ReceiverCreateSettings, - cfg config.Receiver, - nextConsumer consumer.Metrics) (component.MetricsReceiver, error) { - if f.createMetricsReceiver != nil { - return f.createMetricsReceiver(ctx, set, cfg, nextConsumer) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} - -// CreateLogsReceiver creates a metrics processor based on this config. -func (f *factory) CreateLogsReceiver( - ctx context.Context, - set component.ReceiverCreateSettings, - cfg config.Receiver, - nextConsumer consumer.Logs, -) (component.LogsReceiver, error) { - if f.createLogsReceiver != nil { - return f.createLogsReceiver(ctx, set, cfg, nextConsumer) - } - return nil, componenterror.ErrDataTypeIsNotSupported -} diff --git a/internal/otel_collector/receiver/scraperhelper/scraper.go b/internal/otel_collector/receiver/scraperhelper/scraper.go index 7bdd65e5a7b..8b16e63514b 100644 --- a/internal/otel_collector/receiver/scraperhelper/scraper.go +++ b/internal/otel_collector/receiver/scraperhelper/scraper.go @@ -19,17 +19,16 @@ import ( "errors" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) var errNilFunc = errors.New("nil scrape func") // ScrapeFunc scrapes metrics. -type ScrapeFunc func(context.Context) (pdata.Metrics, error) +type ScrapeFunc func(context.Context) (pmetric.Metrics, error) -func (sf ScrapeFunc) Scrape(ctx context.Context) (pdata.Metrics, error) { +func (sf ScrapeFunc) Scrape(ctx context.Context) (pmetric.Metrics, error) { return sf(ctx) } @@ -39,21 +38,21 @@ type Scraper interface { // ID returns the scraper id. ID() config.ComponentID - Scrape(context.Context) (pdata.Metrics, error) + Scrape(context.Context) (pmetric.Metrics, error) } // ScraperOption apply changes to internal options. type ScraperOption func(*baseScraper) // WithStart sets the function that will be called on startup. -func WithStart(start componenthelper.StartFunc) ScraperOption { +func WithStart(start component.StartFunc) ScraperOption { return func(o *baseScraper) { o.StartFunc = start } } // WithShutdown sets the function that will be called on shutdown. -func WithShutdown(shutdown componenthelper.ShutdownFunc) ScraperOption { +func WithShutdown(shutdown component.ShutdownFunc) ScraperOption { return func(o *baseScraper) { o.ShutdownFunc = shutdown } @@ -62,8 +61,8 @@ func WithShutdown(shutdown componenthelper.ShutdownFunc) ScraperOption { var _ Scraper = (*baseScraper)(nil) type baseScraper struct { - componenthelper.StartFunc - componenthelper.ShutdownFunc + component.StartFunc + component.ShutdownFunc ScrapeFunc id config.ComponentID } diff --git a/internal/otel_collector/receiver/scraperhelper/scrapercontroller.go b/internal/otel_collector/receiver/scraperhelper/scrapercontroller.go index 24454070e18..c2c63a329df 100644 --- a/internal/otel_collector/receiver/scraperhelper/scrapercontroller.go +++ b/internal/otel_collector/receiver/scraperhelper/scrapercontroller.go @@ -23,11 +23,10 @@ import ( "go.uber.org/zap" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/obsreport" + "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/receiver/scrapererror" ) @@ -39,9 +38,9 @@ type ScraperControllerSettings struct { CollectionInterval time.Duration `mapstructure:"collection_interval"` } -// DefaultScraperControllerSettings returns default scraper controller +// NewDefaultScraperControllerSettings returns default scraper controller // settings with a collection interval of one minute. -func DefaultScraperControllerSettings(cfgType config.Type) ScraperControllerSettings { +func NewDefaultScraperControllerSettings(cfgType config.Type) ScraperControllerSettings { return ScraperControllerSettings{ ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(cfgType)), CollectionInterval: time.Minute, @@ -97,7 +96,7 @@ func NewScraperControllerReceiver( options ...ScraperControllerOption, ) (component.Receiver, error) { if nextConsumer == nil { - return nil, componenterror.ErrNilNextConsumer + return nil, component.ErrNilNextConsumer } if cfg.CollectionInterval <= 0 { @@ -183,7 +182,7 @@ func (sc *controller) startScraping() { // Scrapers, records observability information, and passes the scraped metrics // to the next component. func (sc *controller) scrapeMetricsAndReport(ctx context.Context) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() for _, scraper := range sc.scrapers { scrp := obsreport.NewScraper(obsreport.ScraperSettings{ diff --git a/internal/otel_collector/service/README.md b/internal/otel_collector/service/README.md new file mode 100644 index 00000000000..1ce985939db --- /dev/null +++ b/internal/otel_collector/service/README.md @@ -0,0 +1,36 @@ +# OpenTelemetry Collector Service + +## How to provide configuration + +The `--config` flag accepts either a file path or values in the form of a config URI `":"`. Currently, the +OpenTelemetry Collector supports the following providers `scheme`: +- [file](../confmap/provider/fileprovider/provider.go) - Reads configuration from a file. E.g. `file:path/to/config.yaml`. +- [env](../confmap/provider/envprovider/provider.go) - Reads configuration from an environment variable. E.g. `env:MY_CONFIG_IN_AN_ENVVAR`. +- [yaml](../confmap/provider/yamlprovider/provider.go) - Reads configuration from yaml bytes. E.g. `yaml:exporters::logging::loglevel: debug`. + +For more technical details about how configuration is resolved you can read the [configuration resolving design](../confmap/README.md#configuration-resolving). + +### Single Config Source + +1. Simple local file: + + `./otelcorecol --config=examples/local/otel-config.yaml` + +2. Simple local file using the new URI format: + + `./otelcorecol --config=file:examples/local/otel-config.yaml` + +3. Config provided via an environment variable: + + `./otelcorecol --config=env:MY_CONFIG_IN_AN_ENVVAR` + + +### Multiple Config Sources + +1. Merge a `otel-config.yaml` file with the content of an environment variable `MY_OTHER_CONFIG` and use the merged result as the config: + + `./otelcorecol --config=file:examples/local/otel-config.yaml --config=env:MY_OTHER_CONFIG` + +2. Merge a `config.yaml` file with the content of a yaml bytes configuration (overwrites the `exporters::logging::loglevel` config) and use the content as the config: + + `./otelcorecol --config=file:examples/local/otel-config.yaml --config="yaml:exporters::logging::loglevel: info"` diff --git a/internal/otel_collector/service/collector.go b/internal/otel_collector/service/collector.go index a7e76ea57bb..249f88c695a 100644 --- a/internal/otel_collector/service/collector.go +++ b/internal/otel_collector/service/collector.go @@ -23,20 +23,14 @@ import ( "os" "os/signal" "runtime" - "sync/atomic" "syscall" - "go.opentelemetry.io/contrib/zpages" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" + "go.uber.org/atomic" "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension/ballastextension" - "go.opentelemetry.io/collector/service/internal" "go.opentelemetry.io/collector/service/internal/telemetrylogs" ) @@ -50,6 +44,20 @@ const ( Closed ) +func (s State) String() string { + switch s { + case Starting: + return "Starting" + case Running: + return "Running" + case Closing: + return "Closing" + case Closed: + return "Closed" + } + return "UNKNOWN" +} + // (Internal note) Collector Lifecycle: // - New constructs a new Collector. // - Run starts the collector. @@ -63,15 +71,10 @@ const ( // Collector represents a server providing the OpenTelemetry Collector service. type Collector struct { - set CollectorSettings - logger *zap.Logger - - tracerProvider trace.TracerProvider - meterProvider metric.MeterProvider - zPagesSpanProcessor *zpages.SpanProcessor + set CollectorSettings service *service - state atomic.Value + state *atomic.Int32 // shutdownChan is used to terminate the collector. shutdownChan chan struct{} @@ -89,39 +92,40 @@ func New(set CollectorSettings) (*Collector, error) { return nil, errors.New("invalid nil config provider") } - state := atomic.Value{} - state.Store(Starting) + if set.telemetry == nil { + set.telemetry = collectorTelemetry + } + return &Collector{ - set: set, - state: state, + asyncErrorChannel: make(chan error), + + set: set, + state: atomic.NewInt32(int32(Starting)), + shutdownChan: make(chan struct{}), }, nil } // GetState returns current state of the collector server. func (col *Collector) GetState() State { - return col.state.Load().(State) -} - -// GetLogger returns logger used by the Collector. -// The logger is initialized after collector server start. -func (col *Collector) GetLogger() *zap.Logger { - return col.logger + return State(col.state.Load()) } // Shutdown shuts down the collector server. func (col *Collector) Shutdown() { - defer func() { - if r := recover(); r != nil { - col.logger.Info("shutdownChan already closed") - } - }() - close(col.shutdownChan) + // Only shutdown if we're in a Running or Starting State else noop + state := col.GetState() + if state == Running || state == Starting { + defer func() { + recover() // nolint:errcheck + }() + close(col.shutdownChan) + } } // runAndWaitForShutdownEvent waits for one of the shutdown events that can happen. func (col *Collector) runAndWaitForShutdownEvent(ctx context.Context) error { - col.logger.Info("Everything is ready. Begin running and processing data.") + col.service.telemetrySettings.Logger.Info("Everything is ready. Begin running and processing data.") col.signalsChannel = make(chan os.Signal, 1) // Only notify with SIGTERM and SIGINT if graceful shutdown is enabled. @@ -129,18 +133,17 @@ func (col *Collector) runAndWaitForShutdownEvent(ctx context.Context) error { signal.Notify(col.signalsChannel, os.Interrupt, syscall.SIGTERM) } - col.shutdownChan = make(chan struct{}) col.setCollectorState(Running) LOOP: for { select { case err := <-col.set.ConfigProvider.Watch(): if err != nil { - col.logger.Error("Config watch failed", zap.Error(err)) + col.service.telemetrySettings.Logger.Error("Config watch failed", zap.Error(err)) break LOOP } - col.logger.Warn("Config updated, restart service") + col.service.telemetrySettings.Logger.Warn("Config updated, restart service") col.setCollectorState(Closing) if err = col.service.Shutdown(ctx); err != nil { @@ -150,14 +153,19 @@ LOOP: return fmt.Errorf("failed to setup configuration components: %w", err) } case err := <-col.asyncErrorChannel: - col.logger.Error("Asynchronous error received, terminating process", zap.Error(err)) + col.service.telemetrySettings.Logger.Error("Asynchronous error received, terminating process", zap.Error(err)) break LOOP case s := <-col.signalsChannel: - col.logger.Info("Received signal from OS", zap.String("signal", s.String())) + col.service.telemetrySettings.Logger.Info("Received signal from OS", zap.String("signal", s.String())) break LOOP case <-col.shutdownChan: - col.logger.Info("Received shutdown request") + col.service.telemetrySettings.Logger.Info("Received shutdown request") break LOOP + case <-ctx.Done(): + col.service.telemetrySettings.Logger.Info("Context done, terminating process", zap.Error(ctx.Err())) + + // Call shutdown with background context as the passed in context has been canceled + return col.shutdown(context.Background()) } } return col.shutdown(ctx) @@ -172,29 +180,23 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { if err != nil { return fmt.Errorf("failed to get config: %w", err) } - if col.logger, err = telemetrylogs.NewLogger(cfg.Service.Telemetry.Logs, col.set.LoggingOptions); err != nil { - return fmt.Errorf("failed to get logger: %w", err) - } - telemetrylogs.SetColGRPCLogger(col.logger, cfg.Service.Telemetry.Logs.Level) - - col.service, err = newService(&svcSettings{ - BuildInfo: col.set.BuildInfo, - Factories: col.set.Factories, - Config: cfg, - Telemetry: component.TelemetrySettings{ - Logger: col.logger, - TracerProvider: col.tracerProvider, - MeterProvider: col.meterProvider, - MetricsLevel: cfg.Telemetry.Metrics.Level, - }, - ZPagesSpanProcessor: col.zPagesSpanProcessor, - AsyncErrorChannel: col.asyncErrorChannel, + col.service, err = newService(&settings{ + BuildInfo: col.set.BuildInfo, + Factories: col.set.Factories, + Config: cfg, + AsyncErrorChannel: col.asyncErrorChannel, + LoggingOptions: col.set.LoggingOptions, + telemetry: col.set.telemetry, }) if err != nil { return err } + if !col.set.SkipSettingGRPCLogger { + telemetrylogs.SetColGRPCLogger(col.service.telemetrySettings.Logger, cfg.Service.Telemetry.Logs.Level) + } + if err = col.service.Start(ctx); err != nil { return err } @@ -202,31 +204,15 @@ func (col *Collector) setupConfigurationComponents(ctx context.Context) error { return nil } -// Run starts the collector according to the given configuration given, and waits for it to complete. +// Run starts the collector according to the given configuration, and waits for it to complete. // Consecutive calls to Run are not allowed, Run shouldn't be called once a collector is shut down. func (col *Collector) Run(ctx context.Context) error { - col.zPagesSpanProcessor = zpages.NewSpanProcessor() - col.tracerProvider = sdktrace.NewTracerProvider( - sdktrace.WithSampler(internal.AlwaysRecord()), - sdktrace.WithSpanProcessor(col.zPagesSpanProcessor)) - - // Set the constructed tracer provider as Global, in case any component uses the - // global TracerProvider. - otel.SetTracerProvider(col.tracerProvider) - - col.meterProvider = metric.NewNoopMeterProvider() - - col.asyncErrorChannel = make(chan error) - if err := col.setupConfigurationComponents(ctx); err != nil { + col.setCollectorState(Closed) return err } - if err := collectorTelemetry.init(col); err != nil { - return err - } - - col.logger.Info("Starting "+col.set.BuildInfo.Command+"...", + col.service.telemetrySettings.Logger.Info("Starting "+col.set.BuildInfo.Command+"...", zap.String("Version", col.set.BuildInfo.Version), zap.Int("NumCPU", runtime.NumCPU()), ) @@ -242,7 +228,7 @@ func (col *Collector) shutdown(ctx context.Context) error { var errs error // Begin shutdown sequence. - col.logger.Info("Starting shutdown...") + col.service.telemetrySettings.Logger.Info("Starting shutdown...") if err := col.set.ConfigProvider.Shutdown(ctx); err != nil { errs = multierr.Append(errs, fmt.Errorf("failed to shutdown config provider: %w", err)) @@ -252,11 +238,11 @@ func (col *Collector) shutdown(ctx context.Context) error { errs = multierr.Append(errs, fmt.Errorf("failed to shutdown service: %w", err)) } - if err := collectorTelemetry.shutdown(); err != nil { + // TODO: Move this as part of the service shutdown. + if err := col.service.telemetryInitializer.shutdown(); err != nil { errs = multierr.Append(errs, fmt.Errorf("failed to shutdown collector telemetry: %w", err)) } - col.logger.Info("Shutdown complete.") col.setCollectorState(Closed) return errs @@ -264,7 +250,7 @@ func (col *Collector) shutdown(ctx context.Context) error { // setCollectorState provides current state of the collector func (col *Collector) setCollectorState(state State) { - col.state.Store(state) + col.state.Store(int32(state)) } func getBallastSize(host component.Host) uint64 { diff --git a/internal/otel_collector/service/collector_windows.go b/internal/otel_collector/service/collector_windows.go index 0f6490ae765..d6657248dea 100644 --- a/internal/otel_collector/service/collector_windows.go +++ b/internal/otel_collector/service/collector_windows.go @@ -19,6 +19,7 @@ package service // import "go.opentelemetry.io/collector/service" import ( "context" + "flag" "fmt" "os" "syscall" @@ -28,19 +29,25 @@ import ( "go.uber.org/zap/zapcore" "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/eventlog" + + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/converter/overwritepropertiesconverter" + "go.opentelemetry.io/collector/service/featuregate" ) -type WindowsService struct { +type windowsService struct { settings CollectorSettings col *Collector + flags *flag.FlagSet } -func NewWindowsService(set CollectorSettings) *WindowsService { - return &WindowsService{settings: set} +// NewSvcHandler constructs a new svc.Handler using the given CollectorSettings. +func NewSvcHandler(set CollectorSettings) svc.Handler { + return &windowsService{settings: set, flags: flags()} } // Execute implements https://godoc.org/golang.org/x/sys/windows/svc#Handler -func (s *WindowsService) Execute(args []string, requests <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) { +func (s *windowsService) Execute(args []string, requests <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) { // The first argument supplied to service.Execute is the service name. If this is // not provided for some reason, raise a relevant error to the system event log if len(args) == 0 { @@ -83,13 +90,14 @@ func (s *WindowsService) Execute(args []string, requests <-chan svc.ChangeReques return false, 0 } -func (s *WindowsService) start(elog *eventlog.Log, colErrorChannel chan error) error { +func (s *windowsService) start(elog *eventlog.Log, colErrorChannel chan error) error { // Parse all the flags manually. - if err := flags().Parse(os.Args[1:]); err != nil { + if err := s.flags.Parse(os.Args[1:]); err != nil { return err } + featuregate.GetRegistry().Apply(gatesList) var err error - s.col, err = newWithWindowsEventLogCore(s.settings, elog) + s.col, err = newWithWindowsEventLogCore(s.settings, s.flags, elog) if err != nil { return err } @@ -116,7 +124,7 @@ func (s *WindowsService) start(elog *eventlog.Log, colErrorChannel chan error) e return <-colErrorChannel } -func (s *WindowsService) stop(colErrorChannel chan error) error { +func (s *windowsService) stop(colErrorChannel chan error) error { // simulate a SIGTERM signal to terminate the collector server s.col.signalsChannel <- syscall.SIGTERM // return the response of col.Start @@ -132,13 +140,22 @@ func openEventLog(serviceName string) (*eventlog.Log, error) { return elog, nil } -func newWithWindowsEventLogCore(set CollectorSettings, elog *eventlog.Log) (*Collector, error) { +func newWithWindowsEventLogCore(set CollectorSettings, flags *flag.FlagSet, elog *eventlog.Log) (*Collector, error) { if set.ConfigProvider == nil { - set.ConfigProvider = MustNewDefaultConfigProvider(getConfigFlag(), getSetFlag()) + var err error + cfgSet := newDefaultConfigProviderSettings(getConfigFlag(flags)) + // Append the "overwrite properties converter" as the first converter. + cfgSet.MapConverters = append( + []confmap.Converter{overwritepropertiesconverter.New(getSetFlag(flags))}, + cfgSet.MapConverters...) + set.ConfigProvider, err = NewConfigProvider(cfgSet) + if err != nil { + return nil, err + } } set.LoggingOptions = append( - set.LoggingOptions, - zap.WrapCore(withWindowsCore(elog)), + []zap.Option{zap.WrapCore(withWindowsCore(elog))}, + set.LoggingOptions..., ) return New(set) } diff --git a/internal/otel_collector/service/command.go b/internal/otel_collector/service/command.go index 13aebff9838..1a171a1a72c 100644 --- a/internal/otel_collector/service/command.go +++ b/internal/otel_collector/service/command.go @@ -17,20 +17,31 @@ package service // import "go.opentelemetry.io/collector/service" import ( "github.com/spf13/cobra" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/converter/overwritepropertiesconverter" "go.opentelemetry.io/collector/service/featuregate" ) -// NewCommand constructs a new cobra.Command using the given Collector. -// TODO: Make this independent of the collector internals. +// NewCommand constructs a new cobra.Command using the given CollectorSettings. func NewCommand(set CollectorSettings) *cobra.Command { + flagSet := flags() rootCmd := &cobra.Command{ Use: set.BuildInfo.Command, Version: set.BuildInfo.Version, SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { - featuregate.Apply(featuregate.GetFlags()) + featuregate.GetRegistry().Apply(gatesList) if set.ConfigProvider == nil { - set.ConfigProvider = MustNewDefaultConfigProvider(getConfigFlag(), getSetFlag()) + var err error + cfgSet := newDefaultConfigProviderSettings(getConfigFlag(flagSet)) + // Append the "overwrite properties converter" as the first converter. + cfgSet.MapConverters = append( + []confmap.Converter{overwritepropertiesconverter.New(getSetFlag(flagSet))}, + cfgSet.MapConverters...) + set.ConfigProvider, err = NewConfigProvider(cfgSet) + if err != nil { + return err + } } col, err := New(set) if err != nil { @@ -40,6 +51,6 @@ func NewCommand(set CollectorSettings) *cobra.Command { }, } - rootCmd.Flags().AddGoFlagSet(flags()) + rootCmd.Flags().AddGoFlagSet(flagSet) return rootCmd } diff --git a/internal/otel_collector/config/configunmarshaler/doc.go b/internal/otel_collector/service/config.go similarity index 50% rename from internal/otel_collector/config/configunmarshaler/doc.go rename to internal/otel_collector/service/config.go index d2a55f05223..09deb3b52a7 100644 --- a/internal/otel_collector/config/configunmarshaler/doc.go +++ b/internal/otel_collector/service/config.go @@ -12,7 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package configunmarshaler implements configuration unmarshalling from a config.Map. -// The implementation relies on registered factories that allow creating -// default configuration for each type of receiver/exporter/processor. -package configunmarshaler // import "go.opentelemetry.io/collector/config/configunmarshaler" +package service // import "go.opentelemetry.io/collector/service" + +import ( + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/telemetry" +) + +type Config = config.Config + +type ConfigService = config.Service + +// Deprecated: [v0.54.0] use telemetry.Config +type ConfigServiceTelemetry = telemetry.Config + +// Deprecated: [v0.54.0] use telemetry.Config +type ConfigServiceTelemetryLogs = telemetry.LogsConfig + +// Deprecated: [v0.54.0] use telemetry.Config +type ConfigServiceTelemetryMetrics = telemetry.MetricsConfig + +type ConfigServicePipeline = config.Pipeline diff --git a/internal/otel_collector/service/config_provider.go b/internal/otel_collector/service/config_provider.go index fd727680a4f..8f428c25190 100644 --- a/internal/otel_collector/service/config_provider.go +++ b/internal/otel_collector/service/config_provider.go @@ -17,17 +17,14 @@ package service // import "go.opentelemetry.io/collector/service" import ( "context" "fmt" - "regexp" - "strings" - "sync" - - "go.uber.org/multierr" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configmapprovider" - "go.opentelemetry.io/collector/config/configunmarshaler" - "go.opentelemetry.io/collector/config/experimental/configsource" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/converter/expandconverter" + "go.opentelemetry.io/collector/confmap/provider/envprovider" + "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/confmap/provider/yamlprovider" + "go.opentelemetry.io/collector/service/internal/configunmarshaler" ) // ConfigProvider provides the service configuration. @@ -44,7 +41,7 @@ type ConfigProvider interface { // Get returns the service configuration, or error otherwise. // // Should never be called concurrently with itself, Watch or Shutdown. - Get(ctx context.Context, factories component.Factories) (*config.Config, error) + Get(ctx context.Context, factories component.Factories) (*Config, error) // Watch blocks until any configuration change was detected or an unrecoverable error // happened during monitoring the configuration changes. @@ -65,110 +62,56 @@ type ConfigProvider interface { } type configProvider struct { - locations []string - configMapProviders map[string]configmapprovider.Provider - cfgMapConverters []config.MapConverterFunc - configUnmarshaler configunmarshaler.ConfigUnmarshaler - - sync.Mutex - ret configmapprovider.Retrieved - watcher chan error + mapResolver *confmap.Resolver } -// MustNewConfigProvider returns a new ConfigProvider that provides the configuration: -// * Retrieve the config.Map by merging all retrieved maps from all the configmapprovider.Provider in order. -// * Then applies all the ConfigMapConverterFunc in the given order. -// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler. -// -// The `configMapProviders` is a map of pairs . -// -// Notice: This API is experimental. -func MustNewConfigProvider( - locations []string, - configMapProviders map[string]configmapprovider.Provider, - cfgMapConverters []config.MapConverterFunc, - configUnmarshaler configunmarshaler.ConfigUnmarshaler) ConfigProvider { - return NewConfigProvider(locations, configMapProviders, cfgMapConverters, configUnmarshaler) -} - -// Deprecated: use MustNewConfigProvider instead -// NewConfigProvider returns a new ConfigProvider that provides the configuration: -// * Retrieve the config.Map by merging all retrieved maps from all the configmapprovider.Provider in order. -// * Then applies all the config.MapConverterFunc in the given order. -// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler. -// -// The `configMapProviders` is a map of pairs . -// -// Notice: This API is experimental. -func NewConfigProvider( - locations []string, - configMapProviders map[string]configmapprovider.Provider, - cfgMapConverters []config.MapConverterFunc, - configUnmarshaler configunmarshaler.ConfigUnmarshaler) ConfigProvider { - // Safe copy, ensures the slice cannot be changed from the caller. - locationsCopy := make([]string, len(locations)) - copy(locationsCopy, locations) - return &configProvider{ - locations: locationsCopy, - configMapProviders: configMapProviders, - cfgMapConverters: cfgMapConverters, - configUnmarshaler: configUnmarshaler, - watcher: make(chan error, 1), - } -} +// ConfigProviderSettings are the settings to configure the behavior of the ConfigProvider. +// TODO: embed confmap.ResolverSettings into this to avoid duplicates. +type ConfigProviderSettings struct { + // Locations from where the confmap.Conf is retrieved, and merged in the given order. + // It is required to have at least one location. + Locations []string -// MustNewDefaultConfigProvider returns the default ConfigProvider, and it creates configuration from a file -// defined by the given configFile and overwrites fields using properties. -func MustNewDefaultConfigProvider(configLocations []string, properties []string) ConfigProvider { - return NewDefaultConfigProvider(configLocations, properties) -} + // MapProviders is a map of pairs . + // It is required to have at least one confmap.Provider. + MapProviders map[string]confmap.Provider -// Deprecated: use MustNewDefaultConfigProvider instead -// NewDefaultConfigProvider returns the default ConfigProvider, and it creates configuration from a file -// defined by the given configFile and overwrites fields using properties. -func NewDefaultConfigProvider(configLocations []string, properties []string) ConfigProvider { - return NewConfigProvider( - configLocations, - map[string]configmapprovider.Provider{ - "file": configmapprovider.NewFile(), - "env": configmapprovider.NewEnv(), - }, - []config.MapConverterFunc{ - configmapprovider.NewOverwritePropertiesConverter(properties), - configmapprovider.NewExpandConverter(), - }, - configunmarshaler.NewDefault()) + // MapConverters is a slice of confmap.Converter. + MapConverters []confmap.Converter } -func (cm *configProvider) Get(ctx context.Context, factories component.Factories) (*config.Config, error) { - // First check if already an active watching, close that if any. - if err := cm.closeIfNeeded(ctx); err != nil { - return nil, fmt.Errorf("cannot close previous watch: %w", err) +func newDefaultConfigProviderSettings(locations []string) ConfigProviderSettings { + return ConfigProviderSettings{ + Locations: locations, + MapProviders: makeMapProvidersMap(fileprovider.New(), envprovider.New(), yamlprovider.New()), + MapConverters: []confmap.Converter{expandconverter.New()}, } +} - var err error - cm.ret, err = cm.mergeRetrieve(ctx) +// NewConfigProvider returns a new ConfigProvider that provides the service configuration: +// * Initially it resolves the "configuration map": +// * Retrieve the confmap.Conf by merging all retrieved maps from the given `locations` in order. +// * Then applies all the confmap.Converter in the given order. +// * Then unmarshalls the confmap.Conf into the service Config. +func NewConfigProvider(set ConfigProviderSettings) (ConfigProvider, error) { + mr, err := confmap.NewResolver(confmap.ResolverSettings{URIs: set.Locations, Providers: set.MapProviders, Converters: set.MapConverters}) if err != nil { - // Nothing to close, no valid retrieved value. - cm.ret = nil - return nil, fmt.Errorf("cannot retrieve the configuration: %w", err) + return nil, err } - var cfgMap *config.Map - cfgMap, err = cm.ret.Get(ctx) - if err != nil { - return nil, fmt.Errorf("cannot get the configuration: %w", err) - } + return &configProvider{ + mapResolver: mr, + }, nil +} - // Apply all converters. - for _, cfgMapConv := range cm.cfgMapConverters { - if err = cfgMapConv(ctx, cfgMap); err != nil { - return nil, fmt.Errorf("cannot convert the config.Map: %w", err) - } +func (cm *configProvider) Get(ctx context.Context, factories component.Factories) (*Config, error) { + retMap, err := cm.mapResolver.Resolve(ctx) + if err != nil { + return nil, fmt.Errorf("cannot resolve the configuration: %w", err) } - var cfg *config.Config - if cfg, err = cm.configUnmarshaler.Unmarshal(cfgMap, factories); err != nil { + var cfg *Config + if cfg, err = configunmarshaler.New().Unmarshal(retMap, factories); err != nil { return nil, fmt.Errorf("cannot unmarshal the configuration: %w", err) } @@ -180,78 +123,17 @@ func (cm *configProvider) Get(ctx context.Context, factories component.Factories } func (cm *configProvider) Watch() <-chan error { - return cm.watcher -} - -func (cm *configProvider) onChange(event *configmapprovider.ChangeEvent) { - // TODO: Remove check for configsource.ErrSessionClosed when providers updated to not call onChange when closed. - if event.Error != configsource.ErrSessionClosed { - cm.watcher <- event.Error - } -} - -func (cm *configProvider) closeIfNeeded(ctx context.Context) error { - if cm.ret != nil { - return cm.ret.Close(ctx) - } - return nil + return cm.mapResolver.Watch() } func (cm *configProvider) Shutdown(ctx context.Context) error { - close(cm.watcher) - - var errs error - errs = multierr.Append(errs, cm.closeIfNeeded(ctx)) - for _, p := range cm.configMapProviders { - errs = multierr.Append(errs, p.Shutdown(ctx)) - } - - return errs + return cm.mapResolver.Shutdown(ctx) } -// follows drive-letter specification: -// https://tools.ietf.org/id/draft-kerwin-file-scheme-07.html#syntax -var driverLetterRegexp = regexp.MustCompile("^[A-z]:") - -func (cm *configProvider) mergeRetrieve(ctx context.Context) (configmapprovider.Retrieved, error) { - var retrs []configmapprovider.Retrieved - retCfgMap := config.NewMap() - for _, location := range cm.locations { - // For backwards compatibility: - // - empty url scheme means "file". - // - "^[A-z]:" also means "file" - scheme := "file" - if idx := strings.Index(location, ":"); idx != -1 && !driverLetterRegexp.MatchString(location) { - scheme = location[:idx] - } else { - location = scheme + ":" + location - } - p, ok := cm.configMapProviders[scheme] - if !ok { - return nil, fmt.Errorf("scheme %v is not supported for location %v", scheme, location) - } - retr, err := p.Retrieve(ctx, location, cm.onChange) - if err != nil { - return nil, err - } - cfgMap, err := retr.Get(ctx) - if err != nil { - return nil, err - } - if err = retCfgMap.Merge(cfgMap); err != nil { - return nil, err - } - retrs = append(retrs, retr) +func makeMapProvidersMap(providers ...confmap.Provider) map[string]confmap.Provider { + ret := make(map[string]confmap.Provider, len(providers)) + for _, provider := range providers { + ret[provider.Scheme()] = provider } - return configmapprovider.NewRetrieved( - func(ctx context.Context) (*config.Map, error) { - return retCfgMap, nil - }, - configmapprovider.WithClose(func(ctxF context.Context) error { - var err error - for _, ret := range retrs { - err = multierr.Append(err, ret.Close(ctxF)) - } - return err - })) + return ret } diff --git a/internal/otel_collector/service/featuregate/README.md b/internal/otel_collector/service/featuregate/README.md index ea3eddaf18d..af7bf9b3385 100644 --- a/internal/otel_collector/service/featuregate/README.md +++ b/internal/otel_collector/service/featuregate/README.md @@ -39,10 +39,6 @@ are required. Avoid querying the registry in a loop. ## Controlling Gates -``` -N.B.: This feature has not yet been implemented and is subject to change. -``` - Feature gates can be enabled or disabled via the CLI, with the `--feature-gates` flag. When using the CLI flag, gate identifiers must be presented as a comma-delimited list. Gate identifiers diff --git a/internal/otel_collector/service/featuregate/flags.go b/internal/otel_collector/service/featuregate/flags.go index f614e9964d7..6d4b9fa48d6 100644 --- a/internal/otel_collector/service/featuregate/flags.go +++ b/internal/otel_collector/service/featuregate/flags.go @@ -20,25 +20,6 @@ import ( "strings" ) -const gatesListCfg = "feature-gates" - -var gatesList = FlagValue{} - -// Flags adds CLI flags for managing feature gates to the provided FlagSet -// Feature gates can be configured with `--feature-gates=foo,-bar`. This would -// enable the `foo` feature gate and disable the `bar` feature gate. -func Flags(flags *flag.FlagSet) { - flags.Var( - gatesList, - gatesListCfg, - "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.") -} - -// GetFlags returns the FlagValue used with Flags() -func GetFlags() FlagValue { - return gatesList -} - var _ flag.Value = (*FlagValue)(nil) // FlagValue implements the flag.Value interface and provides a mechanism for applying feature @@ -63,11 +44,14 @@ func (f FlagValue) String() string { // Set applies the FlagValue encoded in the input string func (f FlagValue) Set(s string) error { - return f.SetSlice(strings.Split(s, ",")) + if s == "" { + return nil + } + + return f.setSlice(strings.Split(s, ",")) } -// SetSlice applies the feature gate statuses in the input slice to the FlagValue -func (f FlagValue) SetSlice(s []string) error { +func (f FlagValue) setSlice(s []string) error { for _, v := range s { var id string var val bool diff --git a/internal/otel_collector/service/featuregate/gates.go b/internal/otel_collector/service/featuregate/gates.go index 47d14f9346e..751c45b4e04 100644 --- a/internal/otel_collector/service/featuregate/gates.go +++ b/internal/otel_collector/service/featuregate/gates.go @@ -27,69 +27,82 @@ type Gate struct { Enabled bool } -var reg = ®istry{gates: make(map[string]Gate)} +var reg = NewRegistry() -// IsEnabled returns true if a registered feature gate is enabled and false otherwise. -func IsEnabled(id string) bool { - return reg.isEnabled(id) +// GetRegistry returns the global Registry. +func GetRegistry() *Registry { + return reg } -// List returns a slice of copies of all registered Gates. -func List() []Gate { - return reg.list() +// NewRegistry returns a new empty Registry. +func NewRegistry() *Registry { + return &Registry{gates: make(map[string]Gate)} } -// Register a Gate. May only be called in an init() function. -// Will panic() if a Gate with the same ID is already registered. -func Register(g Gate) { - if err := reg.add(g); err != nil { - panic(err) - } +type Registry struct { + mu sync.RWMutex + gates map[string]Gate } // Apply a configuration in the form of a map of Gate identifiers to boolean values. // Sets only those values provided in the map, other gate values are not changed. -func Apply(cfg map[string]bool) { - reg.apply(cfg) -} - -type registry struct { - sync.RWMutex - gates map[string]Gate +// Deprecated: [v0.56.0] Use MustApply instead. +func (r *Registry) Apply(cfg map[string]bool) { + r.mu.Lock() + defer r.mu.Unlock() + for id, val := range cfg { + if g, ok := r.gates[id]; ok { + g.Enabled = val + r.gates[g.ID] = g + } + } } -func (r *registry) apply(cfg map[string]bool) { - r.Lock() - defer r.Unlock() +// MustApply a configuration in the form of a map of Gate identifiers to boolean values. +// Sets only those values provided in the map, other gate values are not changed. +func (r *Registry) MustApply(cfg map[string]bool) { + r.mu.Lock() + defer r.mu.Unlock() for id, val := range cfg { if g, ok := r.gates[id]; ok { g.Enabled = val r.gates[g.ID] = g + } else { + panic(fmt.Sprintf("feature gate %s is unregistered", id)) } } } -func (r *registry) add(g Gate) error { - r.Lock() - defer r.Unlock() +// IsEnabled returns true if a registered feature gate is enabled and false otherwise. +func (r *Registry) IsEnabled(id string) bool { + r.mu.RLock() + defer r.mu.RUnlock() + g, ok := r.gates[id] + return ok && g.Enabled +} + +// MustRegister like Register but panics if a Gate with the same ID is already registered. +func (r *Registry) MustRegister(g Gate) { + if err := r.Register(g); err != nil { + panic(err) + } +} + +// Register registers a Gate. May only be called in an init() function. +func (r *Registry) Register(g Gate) error { + r.mu.Lock() + defer r.mu.Unlock() if _, ok := r.gates[g.ID]; ok { return fmt.Errorf("attempted to add pre-existing gate %q", g.ID) } - r.gates[g.ID] = g return nil } -func (r *registry) isEnabled(id string) bool { - r.RLock() - defer r.RUnlock() - g, ok := r.gates[id] - return ok && g.Enabled -} - -func (r *registry) list() []Gate { - r.RLock() - defer r.RUnlock() +// List returns a slice of copies of all registered Gates. +func (r *Registry) List() []Gate { + r.mu.RLock() + defer r.mu.RUnlock() ret := make([]Gate, len(r.gates)) i := 0 for _, gate := range r.gates { diff --git a/internal/otel_collector/service/flags.go b/internal/otel_collector/service/flags.go index 8c9f75cccab..5ea7c61d4e7 100644 --- a/internal/otel_collector/service/flags.go +++ b/internal/otel_collector/service/flags.go @@ -21,10 +21,14 @@ import ( "go.opentelemetry.io/collector/service/featuregate" ) +const ( + configFlag = "config" + setFlag = "set" +) + var ( // Command-line flag that control the configuration file. - configFlag = new(stringArrayValue) - setFlag = new(stringArrayValue) + gatesList = featuregate.FlagValue{} ) type stringArrayValue struct { @@ -42,23 +46,27 @@ func (s *stringArrayValue) String() string { func flags() *flag.FlagSet { flagSet := new(flag.FlagSet) - featuregate.Flags(flagSet) - flagSet.Var(configFlag, "config", "Locations to the config file(s), note that only a"+ + flagSet.Var(new(stringArrayValue), configFlag, "Locations to the config file(s), note that only a"+ " single location can be set per flag entry e.g. `-config=file:/path/to/first --config=file:path/to/second`.") - flagSet.Var(setFlag, "set", + flagSet.Var(new(stringArrayValue), setFlag, "Set arbitrary component config property. The component has to be defined in the config file and the flag"+ " has a higher precedence. Array config properties are overridden and maps are joined, note that only a single"+ " (first) array property can be set e.g. -set=processors.attributes.actions.key=some_key. Example --set=processors.batch.timeout=2s") + flagSet.Var( + gatesList, + "feature-gates", + "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.") + return flagSet } -func getConfigFlag() []string { - return configFlag.values +func getConfigFlag(flagSet *flag.FlagSet) []string { + return flagSet.Lookup(configFlag).Value.(*stringArrayValue).values } -func getSetFlag() []string { - return setFlag.values +func getSetFlag(flagSet *flag.FlagSet) []string { + return flagSet.Lookup(setFlag).Value.(*stringArrayValue).values } diff --git a/internal/otel_collector/service/host.go b/internal/otel_collector/service/host.go new file mode 100644 index 00000000000..6b9e9eec41c --- /dev/null +++ b/internal/otel_collector/service/host.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package service // import "go.opentelemetry.io/collector/service" + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/internal/extensions" + "go.opentelemetry.io/collector/service/internal/pipelines" +) + +var _ component.Host = (*serviceHost)(nil) + +type serviceHost struct { + asyncErrorChannel chan error + factories component.Factories + buildInfo component.BuildInfo + + pipelines *pipelines.Pipelines + extensions *extensions.Extensions +} + +// ReportFatalError is used to report to the host that the receiver encountered +// a fatal error (i.e.: an error that the instance can't recover from) after +// its start function has already returned. +func (host *serviceHost) ReportFatalError(err error) { + host.asyncErrorChannel <- err +} + +func (host *serviceHost) GetFactory(kind component.Kind, componentType config.Type) component.Factory { + switch kind { + case component.KindReceiver: + return host.factories.Receivers[componentType] + case component.KindProcessor: + return host.factories.Processors[componentType] + case component.KindExporter: + return host.factories.Exporters[componentType] + case component.KindExtension: + return host.factories.Extensions[componentType] + } + return nil +} + +func (host *serviceHost) GetExtensions() map[config.ComponentID]component.Extension { + return host.extensions.GetExtensions() +} + +func (host *serviceHost) GetExporters() map[config.DataType]map[config.ComponentID]component.Exporter { + return host.pipelines.GetExporters() +} diff --git a/internal/otel_collector/service/internal/builder/exporters_builder.go b/internal/otel_collector/service/internal/builder/exporters_builder.go deleted file mode 100644 index 5576ac4009a..00000000000 --- a/internal/otel_collector/service/internal/builder/exporters_builder.go +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package builder // import "go.opentelemetry.io/collector/service/internal/builder" - -import ( - "context" - "fmt" - - "go.uber.org/multierr" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/service/internal/components" -) - -// builtExporter is an exporter that is built based on a config. It can have -// a trace and/or a metrics consumer and have a shutdown function. -type builtExporter struct { - logger *zap.Logger - expByDataType map[config.DataType]component.Exporter -} - -// Start the exporter. -func (bexp *builtExporter) Start(ctx context.Context, host component.Host) error { - var errs error - bexp.logger.Info("Exporter is starting...") - for _, exporter := range bexp.expByDataType { - errs = multierr.Append(errs, exporter.Start(ctx, components.NewHostWrapper(host, bexp.logger))) - } - - if errs != nil { - return errs - } - bexp.logger.Info("Exporter started.") - return nil -} - -// Shutdown the trace component and the metrics component of an exporter. -func (bexp *builtExporter) Shutdown(ctx context.Context) error { - var errs error - for _, exporter := range bexp.expByDataType { - errs = multierr.Append(errs, exporter.Shutdown(ctx)) - } - - return errs -} - -func (bexp *builtExporter) getTracesExporter() component.TracesExporter { - exp := bexp.expByDataType[config.TracesDataType] - if exp == nil { - return nil - } - return exp.(component.TracesExporter) -} - -func (bexp *builtExporter) getMetricsExporter() component.MetricsExporter { - exp := bexp.expByDataType[config.MetricsDataType] - if exp == nil { - return nil - } - return exp.(component.MetricsExporter) -} - -func (bexp *builtExporter) getLogsExporter() component.LogsExporter { - exp := bexp.expByDataType[config.LogsDataType] - if exp == nil { - return nil - } - return exp.(component.LogsExporter) -} - -// Exporters is a map of exporters created from exporter configs. -type Exporters map[config.ComponentID]*builtExporter - -// StartAll starts all exporters. -func (exps Exporters) StartAll(ctx context.Context, host component.Host) error { - for _, exp := range exps { - if err := exp.Start(ctx, host); err != nil { - return err - } - } - return nil -} - -// ShutdownAll stops all exporters. -func (exps Exporters) ShutdownAll(ctx context.Context) error { - var errs error - for _, exp := range exps { - errs = multierr.Append(errs, exp.Shutdown(ctx)) - } - - return errs -} - -func (exps Exporters) ToMapByDataType() map[config.DataType]map[config.ComponentID]component.Exporter { - - exportersMap := make(map[config.DataType]map[config.ComponentID]component.Exporter) - - exportersMap[config.TracesDataType] = make(map[config.ComponentID]component.Exporter, len(exps)) - exportersMap[config.MetricsDataType] = make(map[config.ComponentID]component.Exporter, len(exps)) - exportersMap[config.LogsDataType] = make(map[config.ComponentID]component.Exporter, len(exps)) - - for expID, bexp := range exps { - for t, exp := range bexp.expByDataType { - exportersMap[t][expID] = exp - } - } - - return exportersMap -} - -// Map of config.DataType to the id of the Pipeline that requires the data type. -type dataTypeRequirements map[config.DataType]config.ComponentID - -// Data type requirements for all exporters. -type exportersRequiredDataTypes map[config.ComponentID]dataTypeRequirements - -// BuildExporters builds Exporters from config. -func BuildExporters( - settings component.TelemetrySettings, - buildInfo component.BuildInfo, - cfg *config.Config, - factories map[config.Type]component.ExporterFactory, -) (Exporters, error) { - logger := settings.Logger.With(zap.String(components.ZapKindKey, components.ZapKindLogExporter)) - - // We need to calculate required input data types for each exporter so that we know - // which data type must be started for each exporter. - exporterInputDataTypes := calcExportersRequiredDataTypes(cfg) - - exporters := make(Exporters) - - // Build exporters based on configuration and required input data types. - for expID, expCfg := range cfg.Exporters { - set := component.ExporterCreateSettings{ - TelemetrySettings: component.TelemetrySettings{ - Logger: logger.With(zap.String(components.ZapNameKey, expID.String())), - TracerProvider: settings.TracerProvider, - MeterProvider: settings.MeterProvider, - MetricsLevel: cfg.Telemetry.Metrics.Level, - }, - BuildInfo: buildInfo, - } - - factory, exists := factories[expID.Type()] - if !exists || factory == nil { - return nil, fmt.Errorf("exporter factory not found for type: %s", expID.Type()) - } - - exp, err := buildExporter(context.Background(), factory, set, expCfg, exporterInputDataTypes[expID]) - if err != nil { - return nil, err - } - - exporters[expID] = exp - } - - return exporters, nil -} - -func calcExportersRequiredDataTypes(cfg *config.Config) exportersRequiredDataTypes { - // Go over all pipelines. The data type of the pipeline defines what data type - // each exporter is expected to receive. Collect all required types for each - // exporter. - // - // We also remember the last pipeline that requested the particular data type. - // This is only needed for logging purposes in error cases when we need to - // print that a particular exporter does not support the data type required for - // a particular pipeline. - - result := make(exportersRequiredDataTypes) - - // Iterate over pipelines. - for pipelineID, pipeline := range cfg.Service.Pipelines { - // Iterate over all exporters for this pipeline. - for _, expID := range pipeline.Exporters { - // Create the data type requirement for the expCfg if it does not exist. - if _, ok := result[expID]; !ok { - result[expID] = make(dataTypeRequirements) - } - - // Remember that this data type is required for the expCfg and also which - // pipeline the requirement is coming from. - result[expID][pipelineID.Type()] = pipelineID - } - } - return result -} - -func buildExporter( - ctx context.Context, - factory component.ExporterFactory, - set component.ExporterCreateSettings, - cfg config.Exporter, - inputDataTypes dataTypeRequirements, -) (*builtExporter, error) { - exporter := &builtExporter{ - logger: set.Logger, - expByDataType: make(map[config.DataType]component.Exporter, 3), - } - - if inputDataTypes == nil { - set.Logger.Info("Ignoring exporter as it is not used by any pipeline") - return exporter, nil - } - - var err error - var createdExporter component.Exporter - for dataType, pipelineID := range inputDataTypes { - switch dataType { - case config.TracesDataType: - createdExporter, err = factory.CreateTracesExporter(ctx, set, cfg) - - case config.MetricsDataType: - createdExporter, err = factory.CreateMetricsExporter(ctx, set, cfg) - - case config.LogsDataType: - createdExporter, err = factory.CreateLogsExporter(ctx, set, cfg) - - default: - // Could not create because this exporter does not support this data type. - return nil, exporterTypeMismatchErr(cfg, pipelineID, dataType) - } - - if err != nil { - if err == componenterror.ErrDataTypeIsNotSupported { - // Could not create because this exporter does not support this data type. - return nil, exporterTypeMismatchErr(cfg, pipelineID, dataType) - } - return nil, fmt.Errorf("error creating %v exporter: %w", cfg.ID(), err) - } - - // Check if the factory really created the exporter. - if createdExporter == nil { - return nil, fmt.Errorf("factory for %v produced a nil exporter", cfg.ID()) - } - - exporter.expByDataType[dataType] = createdExporter - } - - set.Logger.Info("Exporter was built.") - - return exporter, nil -} - -func exporterTypeMismatchErr( - config config.Exporter, - pipelineID config.ComponentID, - dataType config.DataType, -) error { - return fmt.Errorf( - "pipeline %q of data type %q has an exporter %v, which does not support that data type", - pipelineID, dataType, config.ID(), - ) -} diff --git a/internal/otel_collector/service/internal/builder/pipelines_builder.go b/internal/otel_collector/service/internal/builder/pipelines_builder.go deleted file mode 100644 index 3f488bb195e..00000000000 --- a/internal/otel_collector/service/internal/builder/pipelines_builder.go +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package builder // import "go.opentelemetry.io/collector/service/internal/builder" - -import ( - "context" - "fmt" - - "go.uber.org/multierr" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/service/internal/components" - "go.opentelemetry.io/collector/service/internal/fanoutconsumer" -) - -// builtPipeline is a pipeline that is built based on a config. -// It can have a trace and/or a metrics consumer (the consumer is either the first -// processor in the pipeline or the exporter if pipeline has no processors). -type builtPipeline struct { - logger *zap.Logger - firstTC consumer.Traces - firstMC consumer.Metrics - firstLC consumer.Logs - - // Config is the configuration of this Pipeline. - Config *config.Pipeline - // MutatesData is set to true if any processors in the pipeline - // can mutate the TraceData or MetricsData input argument. - MutatesData bool - - processors []component.Processor -} - -// BuiltPipelines is a map of build pipelines created from pipeline configs. -type BuiltPipelines map[config.ComponentID]*builtPipeline - -func (bps BuiltPipelines) StartProcessors(ctx context.Context, host component.Host) error { - for _, bp := range bps { - bp.logger.Info("Pipeline is starting...") - hostWrapper := components.NewHostWrapper(host, bp.logger) - // Start in reverse order, starting from the back of processors pipeline. - // This is important so that processors that are earlier in the pipeline and - // reference processors that are later in the pipeline do not start sending - // data to later pipelines which are not yet started. - for i := len(bp.processors) - 1; i >= 0; i-- { - if err := bp.processors[i].Start(ctx, hostWrapper); err != nil { - return err - } - } - bp.logger.Info("Pipeline is started.") - } - return nil -} - -func (bps BuiltPipelines) ShutdownProcessors(ctx context.Context) error { - var errs error - for _, bp := range bps { - bp.logger.Info("Pipeline is shutting down...") - for _, p := range bp.processors { - errs = multierr.Append(errs, p.Shutdown(ctx)) - } - bp.logger.Info("Pipeline is shutdown.") - } - - return errs -} - -// pipelinesBuilder builds Pipelines from config. -type pipelinesBuilder struct { - settings component.TelemetrySettings - buildInfo component.BuildInfo - config *config.Config - exporters Exporters - factories map[config.Type]component.ProcessorFactory -} - -// BuildPipelines builds pipeline processors from config. Requires exporters to be already -// built via BuildExporters. -func BuildPipelines( - settings component.TelemetrySettings, - buildInfo component.BuildInfo, - config *config.Config, - exporters Exporters, - factories map[config.Type]component.ProcessorFactory, -) (BuiltPipelines, error) { - pb := &pipelinesBuilder{settings, buildInfo, config, exporters, factories} - - pipelineProcessors := make(BuiltPipelines) - for pipelineID, pipeline := range pb.config.Service.Pipelines { - bp, err := pb.buildPipeline(context.Background(), pipelineID, pipeline) - if err != nil { - return nil, err - } - pipelineProcessors[pipelineID] = bp - } - - return pipelineProcessors, nil -} - -// Builds a pipeline of processors. Returns the first processor in the pipeline. -// The last processor in the pipeline will be plugged to fan out the data into exporters -// that are configured for this pipeline. -func (pb *pipelinesBuilder) buildPipeline(ctx context.Context, pipelineID config.ComponentID, pipelineCfg *config.Pipeline) (*builtPipeline, error) { - - // BuildProcessors the pipeline backwards. - - // First create a consumer junction point that fans out the data to all exporters. - var tc consumer.Traces - var mc consumer.Metrics - var lc consumer.Logs - - // Take into consideration the Capabilities for the exporter as well. - mutatesConsumedData := false - switch pipelineID.Type() { - case config.TracesDataType: - tc = pb.buildFanoutExportersTracesConsumer(pipelineCfg.Exporters) - mutatesConsumedData = tc.Capabilities().MutatesData - case config.MetricsDataType: - mc = pb.buildFanoutExportersMetricsConsumer(pipelineCfg.Exporters) - mutatesConsumedData = mc.Capabilities().MutatesData - case config.LogsDataType: - lc = pb.buildFanoutExportersLogsConsumer(pipelineCfg.Exporters) - mutatesConsumedData = lc.Capabilities().MutatesData - } - - processors := make([]component.Processor, len(pipelineCfg.Processors)) - - // Now build the processors backwards, starting from the last one. - // The last processor points to consumer which fans out to exporters, then - // the processor itself becomes a consumer for the one that precedes it in - // in the pipeline and so on. - for i := len(pipelineCfg.Processors) - 1; i >= 0; i-- { - procID := pipelineCfg.Processors[i] - - procCfg, existsCfg := pb.config.Processors[procID] - if !existsCfg { - return nil, fmt.Errorf("processor %q is not configured", procID) - } - - factory, existsFactory := pb.factories[procID.Type()] - if !existsFactory { - return nil, fmt.Errorf("processor factory for type %q is not configured", procID.Type()) - } - - // This processor must point to the next consumer and then - // it becomes the next for the previous one (previous in the pipeline, - // which we will build in the next loop iteration). - var err error - set := component.ProcessorCreateSettings{ - TelemetrySettings: component.TelemetrySettings{ - Logger: pb.settings.Logger.With( - zap.String(components.ZapKindKey, components.ZapKindProcessor), - zap.String(components.ZapNameKey, procID.String())), - TracerProvider: pb.settings.TracerProvider, - MeterProvider: pb.settings.MeterProvider, - MetricsLevel: pb.config.Telemetry.Metrics.Level, - }, - BuildInfo: pb.buildInfo, - } - - switch pipelineID.Type() { - case config.TracesDataType: - var proc component.TracesProcessor - if proc, err = factory.CreateTracesProcessor(ctx, set, procCfg, tc); err != nil { - return nil, fmt.Errorf("error creating processor %q in pipeline %q: %w", procID, pipelineID, err) - } - // Check if the factory really created the processor. - if proc == nil { - return nil, fmt.Errorf("factory for %v produced a nil processor", procID) - } - mutatesConsumedData = mutatesConsumedData || proc.Capabilities().MutatesData - processors[i] = proc - tc = proc - case config.MetricsDataType: - var proc component.MetricsProcessor - if proc, err = factory.CreateMetricsProcessor(ctx, set, procCfg, mc); err != nil { - return nil, fmt.Errorf("error creating processor %q in pipeline %q: %w", procID, pipelineID, err) - } - // Check if the factory really created the processor. - if proc == nil { - return nil, fmt.Errorf("factory for %v produced a nil processor", procID) - } - mutatesConsumedData = mutatesConsumedData || proc.Capabilities().MutatesData - processors[i] = proc - mc = proc - - case config.LogsDataType: - var proc component.LogsProcessor - if proc, err = factory.CreateLogsProcessor(ctx, set, procCfg, lc); err != nil { - return nil, fmt.Errorf("error creating processor %q in pipeline %q: %w", procID, pipelineID, err) - } - // Check if the factory really created the processor. - if proc == nil { - return nil, fmt.Errorf("factory for %v produced a nil processor", procID) - } - mutatesConsumedData = mutatesConsumedData || proc.Capabilities().MutatesData - processors[i] = proc - lc = proc - - default: - return nil, fmt.Errorf("error creating processor %q in pipeline %q, data type %s is not supported", - procID, pipelineID, pipelineID.Type()) - } - } - - pipelineLogger := pb.settings.Logger.With(zap.String(components.ZapNameKey, components.ZapKindPipeline), - zap.String(components.ZapNameKey, pipelineID.String())) - pipelineLogger.Info("Pipeline was built.") - - // Some consumers may not correctly implement the Capabilities, - // and ignore the next consumer when calculated the Capabilities. - // Because of this wrap the first consumer if any consumers in the pipeline - // mutate the data and the first says that it doesn't. - if tc != nil { - tc = capabilitiesTraces{Traces: tc, capabilities: consumer.Capabilities{MutatesData: mutatesConsumedData}} - } - if mc != nil { - mc = capabilitiesMetrics{Metrics: mc, capabilities: consumer.Capabilities{MutatesData: mutatesConsumedData}} - } - if lc != nil { - lc = capabilitiesLogs{Logs: lc, capabilities: consumer.Capabilities{MutatesData: mutatesConsumedData}} - } - bp := &builtPipeline{ - logger: pipelineLogger, - firstTC: tc, - firstMC: mc, - firstLC: lc, - Config: pipelineCfg, - MutatesData: mutatesConsumedData, - processors: processors, - } - - return bp, nil -} - -// Converts the list of exporter names to a list of corresponding builtExporters. -func (pb *pipelinesBuilder) getBuiltExportersByIDs(exporterIDs []config.ComponentID) []*builtExporter { - var result []*builtExporter - for _, expID := range exporterIDs { - exporter := pb.exporters[expID] - result = append(result, exporter) - } - - return result -} - -func (pb *pipelinesBuilder) buildFanoutExportersTracesConsumer(exporterIDs []config.ComponentID) consumer.Traces { - builtExporters := pb.getBuiltExportersByIDs(exporterIDs) - - var exporters []consumer.Traces - for _, builtExp := range builtExporters { - exporters = append(exporters, builtExp.getTracesExporter()) - } - - // Create a junction point that fans out to all exporters. - return fanoutconsumer.NewTraces(exporters) -} - -func (pb *pipelinesBuilder) buildFanoutExportersMetricsConsumer(exporterIDs []config.ComponentID) consumer.Metrics { - builtExporters := pb.getBuiltExportersByIDs(exporterIDs) - - var exporters []consumer.Metrics - for _, builtExp := range builtExporters { - exporters = append(exporters, builtExp.getMetricsExporter()) - } - - // Create a junction point that fans out to all exporters. - return fanoutconsumer.NewMetrics(exporters) -} - -func (pb *pipelinesBuilder) buildFanoutExportersLogsConsumer(exporterIDs []config.ComponentID) consumer.Logs { - builtExporters := pb.getBuiltExportersByIDs(exporterIDs) - - exporters := make([]consumer.Logs, len(builtExporters)) - for i, builtExp := range builtExporters { - exporters[i] = builtExp.getLogsExporter() - } - - // Create a junction point that fans out to all exporters. - return fanoutconsumer.NewLogs(exporters) -} - -type capabilitiesLogs struct { - consumer.Logs - capabilities consumer.Capabilities -} - -func (mts capabilitiesLogs) Capabilities() consumer.Capabilities { - return mts.capabilities -} - -type capabilitiesMetrics struct { - consumer.Metrics - capabilities consumer.Capabilities -} - -func (mts capabilitiesMetrics) Capabilities() consumer.Capabilities { - return mts.capabilities -} - -type capabilitiesTraces struct { - consumer.Traces - capabilities consumer.Capabilities -} - -func (mts capabilitiesTraces) Capabilities() consumer.Capabilities { - return mts.capabilities -} diff --git a/internal/otel_collector/service/internal/builder/receivers_builder.go b/internal/otel_collector/service/internal/builder/receivers_builder.go deleted file mode 100644 index 777aafe8b79..00000000000 --- a/internal/otel_collector/service/internal/builder/receivers_builder.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package builder // import "go.opentelemetry.io/collector/service/internal/builder" - -import ( - "context" - "errors" - "fmt" - - "go.uber.org/multierr" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/service/internal/components" - "go.opentelemetry.io/collector/service/internal/fanoutconsumer" -) - -var errUnusedReceiver = errors.New("receiver defined but not used by any pipeline") - -// builtReceiver is a receiver that is built based on a config. It can have -// a trace and/or a metrics component. -type builtReceiver struct { - logger *zap.Logger - receiver component.Receiver -} - -// Start starts the receiver. -func (rcv *builtReceiver) Start(ctx context.Context, host component.Host) error { - return rcv.receiver.Start(ctx, components.NewHostWrapper(host, rcv.logger)) -} - -// Shutdown stops the receiver. -func (rcv *builtReceiver) Shutdown(ctx context.Context) error { - return rcv.receiver.Shutdown(ctx) -} - -// Receivers is a map of receivers created from receiver configs. -type Receivers map[config.ComponentID]*builtReceiver - -// ShutdownAll stops all receivers. -func (rcvs Receivers) ShutdownAll(ctx context.Context) error { - var err error - for _, rcv := range rcvs { - err = multierr.Append(err, rcv.Shutdown(ctx)) - } - - return err -} - -// StartAll starts all receivers. -func (rcvs Receivers) StartAll(ctx context.Context, host component.Host) error { - for _, rcv := range rcvs { - rcv.logger.Info("Receiver is starting...") - - if err := rcv.Start(ctx, host); err != nil { - return err - } - rcv.logger.Info("Receiver started.") - } - return nil -} - -// receiversBuilder builds receivers from config. -type receiversBuilder struct { - config *config.Config - builtPipelines BuiltPipelines - factories map[config.Type]component.ReceiverFactory -} - -// BuildReceivers builds Receivers from config. -func BuildReceivers( - settings component.TelemetrySettings, - buildInfo component.BuildInfo, - cfg *config.Config, - builtPipelines BuiltPipelines, - factories map[config.Type]component.ReceiverFactory, -) (Receivers, error) { - rb := &receiversBuilder{cfg, builtPipelines, factories} - - receivers := make(Receivers) - for recvID, recvCfg := range cfg.Receivers { - set := component.ReceiverCreateSettings{ - TelemetrySettings: component.TelemetrySettings{ - Logger: settings.Logger.With( - zap.String(components.ZapKindKey, components.ZapKindReceiver), - zap.String(components.ZapNameKey, recvID.String())), - TracerProvider: settings.TracerProvider, - MeterProvider: settings.MeterProvider, - MetricsLevel: cfg.Telemetry.Metrics.Level, - }, - BuildInfo: buildInfo, - } - - rcv, err := rb.buildReceiver(context.Background(), set, recvID, recvCfg) - if err != nil { - if err == errUnusedReceiver { - set.Logger.Info("Ignoring receiver as it is not used by any pipeline") - continue - } - return nil, err - } - receivers[recvID] = rcv - } - - return receivers, nil -} - -// hasReceiver returns true if the pipeline is attached to specified receiver. -func hasReceiver(pipeline *config.Pipeline, receiverID config.ComponentID) bool { - for _, id := range pipeline.Receivers { - if id == receiverID { - return true - } - } - return false -} - -type attachedPipelines map[config.DataType][]*builtPipeline - -func (rb *receiversBuilder) findPipelinesToAttach(receiverID config.ComponentID) (attachedPipelines, error) { - // A receiver may be attached to multiple pipelines. Pipelines may consume different - // data types. We need to compile the list of pipelines of each type that must be - // attached to this receiver according to configuration. - - pipelinesToAttach := make(attachedPipelines) - - // Iterate over all pipelines. - for pipelineID, pipelineCfg := range rb.config.Service.Pipelines { - // Get the first processor of the pipeline. - pipelineProcessor := rb.builtPipelines[pipelineID] - if pipelineProcessor == nil { - return nil, fmt.Errorf("cannot find pipeline %q", pipelineID) - } - - // Is this receiver attached to the pipeline? - if hasReceiver(pipelineCfg, receiverID) { - if _, exists := pipelinesToAttach[pipelineID.Type()]; !exists { - pipelinesToAttach[pipelineID.Type()] = make([]*builtPipeline, 0) - } - - // Yes, add it to the list of pipelines of corresponding data type. - pipelinesToAttach[pipelineID.Type()] = append(pipelinesToAttach[pipelineID.Type()], pipelineProcessor) - } - } - - return pipelinesToAttach, nil -} - -func attachReceiverToPipelines( - ctx context.Context, - set component.ReceiverCreateSettings, - factory component.ReceiverFactory, - dataType config.DataType, - id config.ComponentID, - cfg config.Receiver, - rcv *builtReceiver, - builtPipelines []*builtPipeline, -) error { - // There are pipelines of the specified data type that must be attached to - // the receiver. Create the receiver of corresponding data type and make - // sure its output is fanned out to all attached pipelines. - var err error - var createdReceiver component.Receiver - - switch dataType { - case config.TracesDataType: - junction := buildFanoutTraceConsumer(builtPipelines) - createdReceiver, err = factory.CreateTracesReceiver(ctx, set, cfg, junction) - - case config.MetricsDataType: - junction := buildFanoutMetricConsumer(builtPipelines) - createdReceiver, err = factory.CreateMetricsReceiver(ctx, set, cfg, junction) - - case config.LogsDataType: - junction := buildFanoutLogConsumer(builtPipelines) - createdReceiver, err = factory.CreateLogsReceiver(ctx, set, cfg, junction) - - default: - err = componenterror.ErrDataTypeIsNotSupported - } - - if err != nil { - if err == componenterror.ErrDataTypeIsNotSupported { - return fmt.Errorf( - "receiver %v does not support %s but it was used in a %s pipeline", - id, dataType, dataType) - } - return fmt.Errorf("cannot create receiver %v: %w", id, err) - } - - // Check if the factory really created the receiver. - if createdReceiver == nil { - return fmt.Errorf("factory for %v produced a nil receiver", id) - } - - if rcv.receiver != nil { - // The receiver was previously created for this config. This can happen if the - // same receiver type supports more than one data type. In that case we expect - // that CreateTracesReceiver and CreateMetricsReceiver return the same value. - if rcv.receiver != createdReceiver { - return fmt.Errorf( - "factory for %q is implemented incorrectly: "+ - "CreateTracesReceiver, CreateMetricsReceiver and CreateLogsReceiver must return "+ - "the same receiver pointer when creating receivers of different data types", - id, - ) - } - } - rcv.receiver = createdReceiver - - set.Logger.Info("Receiver was built.", zap.String("datatype", string(dataType))) - - return nil -} - -func (rb *receiversBuilder) buildReceiver(ctx context.Context, set component.ReceiverCreateSettings, id config.ComponentID, cfg config.Receiver) (*builtReceiver, error) { - - // First find pipelines that must be attached to this receiver. - pipelinesToAttach, err := rb.findPipelinesToAttach(id) - if err != nil { - return nil, err - } - - // Prepare to build the receiver. - factory := rb.factories[id.Type()] - if factory == nil { - return nil, fmt.Errorf("receiver factory not found for: %v", cfg.ID()) - } - rcv := &builtReceiver{ - logger: set.Logger, - } - - // Now we have list of pipelines broken down by data type. Iterate for each data type. - for dataType, pipelines := range pipelinesToAttach { - if len(pipelines) == 0 { - // No pipelines of this data type are attached to this receiver. - continue - } - - // Attach the corresponding part of the receiver to all pipelines that require - // this data type. - if err = attachReceiverToPipelines(ctx, set, factory, dataType, id, cfg, rcv, pipelines); err != nil { - return nil, err - } - } - - if rcv.receiver == nil { - return nil, errUnusedReceiver - } - - return rcv, nil -} - -func buildFanoutTraceConsumer(pipelines []*builtPipeline) consumer.Traces { - var pipelineConsumers []consumer.Traces - for _, pipeline := range pipelines { - pipelineConsumers = append(pipelineConsumers, pipeline.firstTC) - } - // Create a junction point that fans out to all pipelines. - return fanoutconsumer.NewTraces(pipelineConsumers) -} - -func buildFanoutMetricConsumer(pipelines []*builtPipeline) consumer.Metrics { - var pipelineConsumers []consumer.Metrics - for _, pipeline := range pipelines { - pipelineConsumers = append(pipelineConsumers, pipeline.firstMC) - } - // Create a junction point that fans out to all pipelines. - return fanoutconsumer.NewMetrics(pipelineConsumers) -} - -func buildFanoutLogConsumer(pipelines []*builtPipeline) consumer.Logs { - var pipelineConsumers []consumer.Logs - for _, pipeline := range pipelines { - pipelineConsumers = append(pipelineConsumers, pipeline.firstLC) - } - // Create a junction point that fans out to all pipelines. - return fanoutconsumer.NewLogs(pipelineConsumers) -} diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_logs.yaml b/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_logs.yaml deleted file mode 100644 index bf8ce83017e..00000000000 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_logs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - bf: -exporters: - exampleexporter: - -service: - pipelines: - logs: - receivers: [examplereceiver] - processors: [bf] - exporters: [exampleexporter] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_metrics.yaml b/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_metrics.yaml deleted file mode 100644 index 38d0cd79a14..00000000000 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_metrics.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - bf: -exporters: - exampleexporter: - -service: - pipelines: - metrics: - receivers: [examplereceiver] - processors: [bf] - exporters: [exampleexporter] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_traces.yaml b/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_traces.yaml deleted file mode 100644 index d9c931a2d7b..00000000000 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_processor_traces.yaml +++ /dev/null @@ -1,13 +0,0 @@ -receivers: - examplereceiver: -processors: - bf: -exporters: - exampleexporter: - -service: - pipelines: - traces: - receivers: [examplereceiver] - processors: [bf] - exporters: [exampleexporter] diff --git a/internal/otel_collector/service/internal/builder/testdata/pipelines_builder.yaml b/internal/otel_collector/service/internal/builder/testdata/pipelines_builder.yaml deleted file mode 100644 index ef965adb5fa..00000000000 --- a/internal/otel_collector/service/internal/builder/testdata/pipelines_builder.yaml +++ /dev/null @@ -1,40 +0,0 @@ -receivers: - examplereceiver: - examplereceiver/2: - examplereceiver/3: - examplereceiver/multi: - -processors: - exampleprocessor: - -exporters: - exampleexporter: - exampleexporter/2: - -service: - pipelines: - traces: - receivers: [examplereceiver, examplereceiver/multi] - processors: [exampleprocessor] - exporters: [exampleexporter] - - traces/2: - receivers: [examplereceiver/2, examplereceiver/multi] - processors: [exampleprocessor] - exporters: [exampleexporter, exampleexporter/2] - - metrics: - receivers: [examplereceiver] - exporters: [exampleexporter] - - metrics/2: - receivers: [examplereceiver/3] - exporters: [exampleexporter] - - metrics/3: - receivers: [examplereceiver/3] - exporters: [exampleexporter/2] - - logs: - receivers: [examplereceiver/3] - exporters: [exampleexporter/2] diff --git a/internal/otel_collector/service/internal/builder/testdata/unused_receiver.yaml b/internal/otel_collector/service/internal/builder/testdata/unused_receiver.yaml deleted file mode 100644 index f8dc448ac28..00000000000 --- a/internal/otel_collector/service/internal/builder/testdata/unused_receiver.yaml +++ /dev/null @@ -1,12 +0,0 @@ -receivers: - examplereceiver: - examplereceiver/2: -processors: -exporters: - exampleexporter: - -service: - pipelines: - traces: - receivers: [examplereceiver] - exporters: [exampleexporter] \ No newline at end of file diff --git a/internal/otel_collector/service/internal/components/components.go b/internal/otel_collector/service/internal/components/components.go new file mode 100644 index 00000000000..410fffb37db --- /dev/null +++ b/internal/otel_collector/service/internal/components/components.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package components // import "go.opentelemetry.io/collector/service/internal/components" + +import ( + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" +) + +// LogStabilityLevel logs the stability level of a component. The log level is set to info for +// undefined, unmaintained, deprecated and in development. The log level is set to debug +// for alpha, beta and stable. +func LogStabilityLevel(logger *zap.Logger, sl component.StabilityLevel) { + if sl >= component.StabilityLevelAlpha { + logger.Debug(sl.LogMessage(), zap.String(ZapStabilityKey, sl.String())) + } else { + logger.Info(sl.LogMessage(), zap.String(ZapStabilityKey, sl.String())) + } +} diff --git a/internal/otel_collector/service/internal/components/constants.go b/internal/otel_collector/service/internal/components/constants.go index 5d580d5fcd7..b1bed541de9 100644 --- a/internal/otel_collector/service/internal/components/constants.go +++ b/internal/otel_collector/service/internal/components/constants.go @@ -15,11 +15,13 @@ package components // import "go.opentelemetry.io/collector/service/internal/components" const ( - ZapKindKey = "kind" - ZapKindReceiver = "receiver" - ZapKindProcessor = "processor" - ZapKindLogExporter = "exporter" - ZapKindExtension = "extension" - ZapKindPipeline = "pipeline" - ZapNameKey = "name" + ZapKindKey = "kind" + ZapKindReceiver = "receiver" + ZapKindProcessor = "processor" + ZapKindExporter = "exporter" + ZapKindExtension = "extension" + ZapKindPipeline = "pipeline" + ZapNameKey = "name" + ZapDataTypeKey = "data_type" + ZapStabilityKey = "stability" ) diff --git a/internal/otel_collector/config/configunmarshaler/defaultunmarshaler.go b/internal/otel_collector/service/internal/configunmarshaler/defaultunmarshaler.go similarity index 84% rename from internal/otel_collector/config/configunmarshaler/defaultunmarshaler.go rename to internal/otel_collector/service/internal/configunmarshaler/defaultunmarshaler.go index c0bb55f1b75..1fe5ccc4604 100644 --- a/internal/otel_collector/config/configunmarshaler/defaultunmarshaler.go +++ b/internal/otel_collector/service/internal/configunmarshaler/defaultunmarshaler.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configunmarshaler // import "go.opentelemetry.io/collector/config/configunmarshaler" +package configunmarshaler // import "go.opentelemetry.io/collector/service/internal/configunmarshaler" import ( "fmt" @@ -23,6 +23,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/service/telemetry" ) // These are errors that can be returned by Unmarshal(). Note that error codes are not part @@ -75,23 +77,23 @@ type configSettings struct { Service map[string]interface{} `mapstructure:"service"` } -type defaultUnmarshaler struct{} +type ConfigUnmarshaler struct{} -// NewDefault returns a default ConfigUnmarshaler that unmarshalls every configuration -// using the custom unmarshaler if present or default to strict -func NewDefault() ConfigUnmarshaler { - return &defaultUnmarshaler{} +// New returns a default ConfigUnmarshaler that unmarshalls every component's configuration +// using the custom unmarshaler if present or default strict unmarshaler otherwise. +func New() ConfigUnmarshaler { + return ConfigUnmarshaler{} } -// Unmarshal the Config from a config.Map. +// Unmarshal the config.Config from a confmap.Conf. // After the config is unmarshalled, `Validate()` must be called to validate. -func (*defaultUnmarshaler) Unmarshal(v *config.Map, factories component.Factories) (*config.Config, error) { +func (ConfigUnmarshaler) Unmarshal(v *confmap.Conf, factories component.Factories) (*config.Config, error) { var cfg config.Config // Unmarshal top level sections and validate. rawCfg := configSettings{} if err := v.UnmarshalExact(&rawCfg); err != nil { - return nil, &configError{ + return nil, configError{ error: fmt.Errorf("error reading top level configuration sections: %w", err), code: errUnmarshalTopLevelStructure, } @@ -99,35 +101,35 @@ func (*defaultUnmarshaler) Unmarshal(v *config.Map, factories component.Factorie var err error if cfg.Extensions, err = unmarshalExtensions(rawCfg.Extensions, factories.Extensions); err != nil { - return nil, &configError{ + return nil, configError{ error: err, code: errUnmarshalExtension, } } if cfg.Receivers, err = unmarshalReceivers(rawCfg.Receivers, factories.Receivers); err != nil { - return nil, &configError{ + return nil, configError{ error: err, code: errUnmarshalReceiver, } } if cfg.Processors, err = unmarshalProcessors(rawCfg.Processors, factories.Processors); err != nil { - return nil, &configError{ + return nil, configError{ error: err, code: errUnmarshalProcessor, } } if cfg.Exporters, err = unmarshalExporters(rawCfg.Exporters, factories.Exporters); err != nil { - return nil, &configError{ + return nil, configError{ error: err, code: errUnmarshalExporter, } } if cfg.Service, err = unmarshalService(rawCfg.Service); err != nil { - return nil, &configError{ + return nil, configError{ error: err, code: errUnmarshalService, } @@ -143,8 +145,8 @@ func unmarshalExtensions(exts map[config.ComponentID]map[string]interface{}, fac // Iterate over extensions and create a config for each. for id, value := range exts { // Find extension factory based on "type" that we read from config source. - factory := factories[id.Type()] - if factory == nil { + factory, ok := factories[id.Type()] + if !ok { return nil, errorUnknownType(extensionsKeyName, id, reflect.ValueOf(factories).MapKeys()) } @@ -154,7 +156,7 @@ func unmarshalExtensions(exts map[config.ComponentID]map[string]interface{}, fac // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), extensionCfg); err != nil { + if err := config.UnmarshalExtension(confmap.NewFromStringMap(value), extensionCfg); err != nil { return nil, errorUnmarshalError(extensionsKeyName, id, err) } @@ -168,8 +170,8 @@ func unmarshalService(srvRaw map[string]interface{}) (config.Service, error) { // Setup default telemetry values as in service/logger.go. // TODO: Add a component.ServiceFactory to allow this to be defined by the Service. srv := config.Service{ - Telemetry: config.ServiceTelemetry{ - Logs: config.ServiceTelemetryLogs{ + Telemetry: telemetry.Config{ + Logs: telemetry.LogsConfig{ Level: zapcore.InfoLevel, Development: false, Encoding: "console", @@ -183,7 +185,7 @@ func unmarshalService(srvRaw map[string]interface{}) (config.Service, error) { }, } - if err := unmarshal(config.NewMapFromStringMap(srvRaw), &srv); err != nil { + if err := confmap.NewFromStringMap(srvRaw).UnmarshalExact(&srv); err != nil { return srv, fmt.Errorf("error reading service configuration: %w", err) } @@ -195,22 +197,22 @@ func unmarshalService(srvRaw map[string]interface{}) (config.Service, error) { return srv, nil } -func defaultServiceTelemetryMetricsSettings() config.ServiceTelemetryMetrics { - return config.ServiceTelemetryMetrics{ +func defaultServiceTelemetryMetricsSettings() telemetry.MetricsConfig { + return telemetry.MetricsConfig{ Level: configtelemetry.LevelBasic, //nolint:staticcheck Address: ":8888", } } // LoadReceiver loads a receiver config from componentConfig using the provided factories. -func LoadReceiver(componentConfig *config.Map, id config.ComponentID, factory component.ReceiverFactory) (config.Receiver, error) { +func LoadReceiver(componentConfig *confmap.Conf, id config.ComponentID, factory component.ReceiverFactory) (config.Receiver, error) { // Create the default config for this receiver. receiverCfg := factory.CreateDefaultConfig() receiverCfg.SetIDName(id.Name()) // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(componentConfig, receiverCfg); err != nil { + if err := config.UnmarshalReceiver(componentConfig, receiverCfg); err != nil { return nil, errorUnmarshalError(receiversKeyName, id, err) } @@ -229,7 +231,7 @@ func unmarshalReceivers(recvs map[config.ComponentID]map[string]interface{}, fac return nil, errorUnknownType(receiversKeyName, id, reflect.ValueOf(factories).MapKeys()) } - receiverCfg, err := LoadReceiver(config.NewMapFromStringMap(value), id, factory) + receiverCfg, err := LoadReceiver(confmap.NewFromStringMap(value), id, factory) if err != nil { // LoadReceiver already wraps the error. return nil, err @@ -259,7 +261,7 @@ func unmarshalExporters(exps map[config.ComponentID]map[string]interface{}, fact // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), exporterCfg); err != nil { + if err := config.UnmarshalExporter(confmap.NewFromStringMap(value), exporterCfg); err != nil { return nil, errorUnmarshalError(exportersKeyName, id, err) } @@ -287,7 +289,7 @@ func unmarshalProcessors(procs map[config.ComponentID]map[string]interface{}, fa // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), processorCfg); err != nil { + if err := config.UnmarshalProcessor(confmap.NewFromStringMap(value), processorCfg); err != nil { return nil, errorUnmarshalError(processorsKeyName, id, err) } @@ -297,14 +299,6 @@ func unmarshalProcessors(procs map[config.ComponentID]map[string]interface{}, fa return processors, nil } -func unmarshal(componentSection *config.Map, intoCfg interface{}) error { - if cu, ok := intoCfg.(config.Unmarshallable); ok { - return cu.Unmarshal(componentSection) - } - - return componentSection.UnmarshalExact(intoCfg) -} - func errorUnknownType(component string, id config.ComponentID, factories []reflect.Value) error { return fmt.Errorf("unknown %s type %q for %q (valid values: %v)", component, id.Type(), id, factories) } diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-exporter.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-exporter.yaml new file mode 100644 index 00000000000..ed8aac0e141 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-exporter.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop /exp : + nop/ exp: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-extension.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-extension.yaml new file mode 100644 index 00000000000..caa5ac91619 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-extension.yaml @@ -0,0 +1,3 @@ +extensions: + nop /ext : + nop/ ext: diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-pipeline.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-pipeline.yaml new file mode 100644 index 00000000000..de1cda0a397 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-pipeline.yaml @@ -0,0 +1,16 @@ +receivers: + nop: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces /pipe: + receivers: [nop] + exporters: [nop] + processors: [nop] + traces/ pipe : + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-processor.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-processor.yaml new file mode 100644 index 00000000000..6247c1d4c5b --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-processor.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop: +processors: + nop/ proc: + nop /proc : +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-receiver.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-receiver.yaml new file mode 100644 index 00000000000..9d844bccd25 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/duplicate-receiver.yaml @@ -0,0 +1,13 @@ +receivers: + nop/ recv: + nop /recv : +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/empty-all-sections.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/empty-all-sections.yaml similarity index 100% rename from internal/otel_collector/config/configunmarshaler/testdata/empty-all-sections.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/empty-all-sections.yaml diff --git a/internal/otel_collector/config/configunmarshaler/testdata/empty-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/empty-config.yaml similarity index 100% rename from internal/otel_collector/config/configunmarshaler/testdata/empty-config.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/empty-config.yaml diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml similarity index 56% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml index b6a03029a3e..f2a994c076c 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml @@ -1,10 +1,10 @@ receivers: - examplereceiver: + nop: exporters: - exampleexporter: - exampleexporter/: + nop: + nop/: processors: - exampleprocessor: + nop: service: pipelines: traces: diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-section.yaml new file mode 100644 index 00000000000..83e94599360 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-section.yaml @@ -0,0 +1,20 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: + unknown_section: exporter +extensions: + nop: +service: + extensions: + - nop + pipelines: + traces: + receivers: + - nop + processors: + - nop + exporters: + - nop diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml new file mode 100644 index 00000000000..46b0be22901 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop: + tests +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-type.yaml new file mode 100644 index 00000000000..35972659401 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-exporter-type.yaml @@ -0,0 +1,12 @@ +receivers: + nop: +exporters: + nop: + /custom: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml new file mode 100644 index 00000000000..a56a80829b8 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml @@ -0,0 +1,14 @@ +extensions: + nop/: +receivers: + nop: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-section.yaml similarity index 56% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-section.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-section.yaml index 1e0a809d9a3..ddec54a0143 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-extension-section.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-section.yaml @@ -1,11 +1,11 @@ receivers: - examplereceiver: + nop: processors: - exampleprocessor: + nop: exporters: - exampleexporter: + nop: extensions: - exampleextension: + nop: unknown_section: a_num: 2 service: @@ -14,8 +14,8 @@ service: pipelines: traces: receivers: - - examplereceiver + - nop processors: - - exampleprocessor + - nop exporters: - - exampleexporter + - nop diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml new file mode 100644 index 00000000000..a3d0c210832 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml @@ -0,0 +1,16 @@ +extensions: + nop: + tests +receivers: + nop: +processors: + nop: +exporters: + nop: +service: + extensions: [nop] + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-type.yaml new file mode 100644 index 00000000000..0486eeb2f31 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-extension-type.yaml @@ -0,0 +1,14 @@ +extensions: + /custom: +receivers: + nop: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-logs-level.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-logs-level.yaml new file mode 100644 index 00000000000..a30cd0e71d6 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-logs-level.yaml @@ -0,0 +1,19 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: +extensions: + nop: +service: + telemetry: + logs: + level: "UNKNOWN" + extensions: [nop] + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] + diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-metrics-level.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-metrics-level.yaml new file mode 100644 index 00000000000..d57a14d0ff7 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-metrics-level.yaml @@ -0,0 +1,19 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: +extensions: + nop: +service: + telemetry: + metrics: + level: "unknown" + extensions: [nop] + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] + diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml new file mode 100644 index 00000000000..6df9ffd1e50 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: + +service: + pipelines: + metrics/: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-section.yaml new file mode 100644 index 00000000000..c507b87bc14 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-section.yaml @@ -0,0 +1,20 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: +extensions: + nop: +service: + extensions: + - nop + pipelines: + traces: + receivers: + - nop + processors: + - nop + exporters: + - nop + unknown_section: 1 diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml similarity index 53% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml index ddf95f3b9bd..dbe067632ca 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml @@ -1,9 +1,9 @@ receivers: - examplereceiver: + nop: exporters: - exampleexporter: + nop: processors: - exampleprocessor: + nop: service: pipelines: traces diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-type.yaml new file mode 100644 index 00000000000..937202168c4 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-pipeline-type.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: + +service: + pipelines: + /metrics: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml new file mode 100644 index 00000000000..d67a44c03ee --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop: +processors: + nop: + nop/: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-section.yaml similarity index 56% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-section.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-section.yaml index 01d2a086ed4..8223a53d5d8 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-processor-section.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-section.yaml @@ -1,21 +1,21 @@ receivers: - examplereceiver: + nop: processors: - exampleprocessor: + nop: unknown_section: a_num: 2 exporters: - exampleexporter: + nop: extensions: - exampleextension: + nop: service: extensions: - examapleextension pipelines: traces: receivers: - - examplereceiver + - nop processors: - - exampleprocessor + - nop exporters: - - exampleexporter + - nop diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml new file mode 100644 index 00000000000..0596ab33369 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop: +processors: + nop: + tests +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-type.yaml new file mode 100644 index 00000000000..58973cc9d9c --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-processor-type.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +exporters: + nop: +processors: + nop: + /custom: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml new file mode 100644 index 00000000000..52ebc0d2e01 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml @@ -0,0 +1,13 @@ +receivers: + nop: + nop/: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-section.yaml similarity index 56% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-section.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-section.yaml index 558f17a4682..918bc052188 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-receiver-section.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-section.yaml @@ -1,21 +1,21 @@ receivers: - examplereceiver: + nop: unknown_section: a_num: 2 processors: - exampleprocessor: + nop: exporters: - exampleexporter: + nop: extensions: - exampleextension: + nop: service: extensions: - examapleextension pipelines: traces: receivers: - - examplereceiver + - nop processors: - - exampleprocessor + - nop exporters: - - exampleexporter + - nop diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml new file mode 100644 index 00000000000..99deefefd05 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml @@ -0,0 +1,13 @@ +receivers: + nop: + tests +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-type.yaml new file mode 100644 index 00000000000..c4673ebd728 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-receiver-type.yaml @@ -0,0 +1,13 @@ +receivers: + nop: + /custom: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-sequence-value.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-sequence-value.yaml new file mode 100644 index 00000000000..b537378dbf9 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-sequence-value.yaml @@ -0,0 +1,14 @@ +receivers: + nop: +exporters: + nop: +processors: + nop: +service: + pipelines: + traces: + receivers: + nop: + some: config + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml new file mode 100644 index 00000000000..1386878e5a8 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml @@ -0,0 +1,18 @@ +extensions: + nop: +receivers: + nop: +processors: + nop: +exporters: + nop: + +service: + extensions: + nop: + error: true + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-service-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-section.yaml similarity index 56% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-service-section.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-section.yaml index 6a3b8f92772..7dcf713e035 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-service-section.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-service-section.yaml @@ -1,11 +1,11 @@ receivers: - examplereceiver: + nop: processors: - exampleprocessor: + nop: exporters: - exampleexporter: + nop: extensions: - exampleextension: + nop: service: extenstions: - examapleextension @@ -14,8 +14,8 @@ service: pipelines: traces: receivers: - - examplereceiver + - nop processors: - - exampleprocessor + - nop exporters: - - exampleexporter + - nop diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-top-level-section.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-top-level-section.yaml similarity index 55% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-top-level-section.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-top-level-section.yaml index 0b9819d17de..a40aa2efd6e 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-top-level-section.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/invalid-top-level-section.yaml @@ -1,21 +1,21 @@ receivers: - examplereceiver: + nop: processors: - exampleprocessor: + nop: exporters: - exampleexporter: + nop: extensions: - exampleextension: + nop: service: extenstions: - examapleextension pipelines: traces: receivers: - - examplereceiver + - nop processors: - - exampleprocessor + - nop exporters: - - exampleexporter + - nop unknown_section: a_num: 2 diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-exporter-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-exporter-type.yaml new file mode 100644 index 00000000000..5a0074b126c --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-exporter-type.yaml @@ -0,0 +1,12 @@ +receivers: + nop: +exporters: + nosuchexporter: +processors: + nop: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/unknown-extension-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-extension-type.yaml similarity index 100% rename from internal/otel_collector/config/configunmarshaler/testdata/unknown-extension-type.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-extension-type.yaml diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-pipeline-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-pipeline-type.yaml new file mode 100644 index 00000000000..96366945602 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-pipeline-type.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: + +service: + pipelines: + wrongdatatype: + receivers: [nop] + processors: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-processor-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-processor-type.yaml new file mode 100644 index 00000000000..37a1ea4b3dc --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-processor-type.yaml @@ -0,0 +1,12 @@ +receivers: + nop: +exporters: + nop: +processors: + nosuchprocessor: +service: + pipelines: + traces: + receivers: [nop] + exporters: [nop] + processors: [nop] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/unknown-receiver-type.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-receiver-type.yaml similarity index 53% rename from internal/otel_collector/config/configunmarshaler/testdata/unknown-receiver-type.yaml rename to internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-receiver-type.yaml index 75c777f2bb0..72eb974b793 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/unknown-receiver-type.yaml +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/unknown-receiver-type.yaml @@ -1,15 +1,15 @@ receivers: nosuchreceiver: exporters: - exampleexporter: + nop: processors: - exampleprocessor: + nop: service: pipelines: traces: receivers: - - examplereceiver + - nop exporters: - - exampleexporter + - nop processors: - - exampleprocessor + - nop diff --git a/internal/otel_collector/service/internal/configunmarshaler/testdata/valid-config.yaml b/internal/otel_collector/service/internal/configunmarshaler/testdata/valid-config.yaml new file mode 100644 index 00000000000..07e18aff337 --- /dev/null +++ b/internal/otel_collector/service/internal/configunmarshaler/testdata/valid-config.yaml @@ -0,0 +1,38 @@ +receivers: + nop: + nop/myreceiver: + +processors: + nop: + +exporters: + nop/myexporter: + nop: + +extensions: + nop/0: + nop/disabled: + nop/1: + +service: + telemetry: + logs: + level: "DEBUG" + development: true + encoding: "console" + disable_caller: true + disable_stacktrace: true + output_paths: ["stderr", "./output-logs"] + error_output_paths: ["stderr", "./error-output-logs"] + initial_fields: + field_key: "filed_value" + metrics: + level: "normal" + address: ":8081" + extensions: [nop/0, nop/1] + pipelines: + traces: + receivers: [nop/myreceiver] + processors: [nop] + exporters: [nop/myexporter] + diff --git a/internal/otel_collector/service/internal/extensions/extensions.go b/internal/otel_collector/service/internal/extensions/extensions.go index 060a24b643b..54cf2fac234 100644 --- a/internal/otel_collector/service/internal/extensions/extensions.go +++ b/internal/otel_collector/service/internal/extensions/extensions.go @@ -17,6 +17,8 @@ package extensions // import "go.opentelemetry.io/collector/service/internal/ext import ( "context" "fmt" + "net/http" + "sort" "go.uber.org/multierr" "go.uber.org/zap" @@ -24,148 +26,154 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/service/internal/components" + "go.opentelemetry.io/collector/service/internal/zpages" ) -// builtExporter is an exporter that is built based on a config. It can have -// a trace and/or a metrics consumer and have a shutdown function. -type builtExtension struct { - logger *zap.Logger - extension component.Extension -} - -// Start the receiver. -func (ext *builtExtension) Start(ctx context.Context, host component.Host) error { - ext.logger.Info("Extension is starting...") - if err := ext.extension.Start(ctx, components.NewHostWrapper(host, ext.logger)); err != nil { - return err - } - ext.logger.Info("Extension started.") - return nil -} - -// Shutdown the receiver. -func (ext *builtExtension) Shutdown(ctx context.Context) error { - return ext.extension.Shutdown(ctx) -} - -var _ component.Extension = (*builtExtension)(nil) +const zExtensionName = "zextensionname" // Extensions is a map of extensions created from extension configs. -type Extensions map[config.ComponentID]*builtExtension +type Extensions struct { + telemetry component.TelemetrySettings + extMap map[config.ComponentID]component.Extension +} -// StartAll starts all exporters. -func (exts Extensions) StartAll(ctx context.Context, host component.Host) error { - for _, ext := range exts { - if err := ext.Start(ctx, host); err != nil { +// StartAll starts all extensions. +func (bes *Extensions) StartAll(ctx context.Context, host component.Host) error { + bes.telemetry.Logger.Info("Starting extensions...") + for extID, ext := range bes.extMap { + extLogger := extensionLogger(bes.telemetry.Logger, extID) + extLogger.Info("Extension is starting...") + if err := ext.Start(ctx, components.NewHostWrapper(host, extLogger)); err != nil { return err } + extLogger.Info("Extension started.") } return nil } -// ShutdownAll stops all exporters. -func (exts Extensions) ShutdownAll(ctx context.Context) error { +// ShutdownAll stops all extensions. +func (bes *Extensions) ShutdownAll(ctx context.Context) error { + bes.telemetry.Logger.Info("Stopping extensions...") var errs error - for _, ext := range exts { + for _, ext := range bes.extMap { errs = multierr.Append(errs, ext.Shutdown(ctx)) } return errs } -func (exts Extensions) NotifyPipelineReady() error { - for _, ext := range exts { - if pw, ok := ext.extension.(component.PipelineWatcher); ok { +func (bes *Extensions) NotifyPipelineReady() error { + for extID, ext := range bes.extMap { + if pw, ok := ext.(component.PipelineWatcher); ok { if err := pw.Ready(); err != nil { - ext.logger.Error("Error notifying extension that the pipeline was started.") - return err + return fmt.Errorf("failed to notify extension %q: %w", extID, err) } } } - return nil } -func (exts Extensions) NotifyPipelineNotReady() error { +func (bes *Extensions) NotifyPipelineNotReady() error { // Notify extensions in reverse order. var errs error - for _, ext := range exts { - if pw, ok := ext.extension.(component.PipelineWatcher); ok { - if err := pw.NotReady(); err != nil { - ext.logger.Error("Error notifying extension that the pipeline was shutdown.") - errs = multierr.Append(errs, err) - } + for _, ext := range bes.extMap { + if pw, ok := ext.(component.PipelineWatcher); ok { + errs = multierr.Append(errs, pw.NotReady()) } } - return errs } -func (exts Extensions) ToMap() map[config.ComponentID]component.Extension { - result := make(map[config.ComponentID]component.Extension, len(exts)) - for extID, v := range exts { - result[extID] = v.extension +func (bes *Extensions) GetExtensions() map[config.ComponentID]component.Extension { + result := make(map[config.ComponentID]component.Extension, len(bes.extMap)) + for extID, v := range bes.extMap { + result[extID] = v } return result } +func (bes *Extensions) HandleZPages(w http.ResponseWriter, r *http.Request) { + extensionName := r.URL.Query().Get(zExtensionName) + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Extensions"}) + data := zpages.SummaryExtensionsTableData{} + + data.Rows = make([]zpages.SummaryExtensionsTableRowData, 0, len(bes.extMap)) + for id := range bes.extMap { + row := zpages.SummaryExtensionsTableRowData{FullName: id.String()} + data.Rows = append(data.Rows, row) + } + + sort.Slice(data.Rows, func(i, j int) bool { + return data.Rows[i].FullName < data.Rows[j].FullName + }) + zpages.WriteHTMLExtensionsSummaryTable(w, data) + if extensionName != "" { + zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ + Name: extensionName, + }) + // TODO: Add config + status info. + } + zpages.WriteHTMLPageFooter(w) +} + +// Settings holds configuration for building Extensions. +type Settings struct { + Telemetry component.TelemetrySettings + BuildInfo component.BuildInfo + + // Configs is a map of config.ComponentID to config.Extension. + Configs map[config.ComponentID]config.Extension + + // Factories maps extension type names in the config to the respective component.ExtensionFactory. + Factories map[config.Type]component.ExtensionFactory + + // ServiceExtensions are the ordered list of extensions configured for the service. + ServiceExtensions []config.ComponentID +} + // Build builds Extensions from config. -func Build( - settings component.TelemetrySettings, - buildInfo component.BuildInfo, - config *config.Config, - factories map[config.Type]component.ExtensionFactory, -) (Extensions, error) { - extensions := make(Extensions) - for _, extID := range config.Service.Extensions { - extCfg, existsCfg := config.Extensions[extID] +func Build(ctx context.Context, set Settings) (*Extensions, error) { + exts := &Extensions{ + telemetry: set.Telemetry, + extMap: make(map[config.ComponentID]component.Extension), + } + for _, extID := range set.ServiceExtensions { + extCfg, existsCfg := set.Configs[extID] if !existsCfg { return nil, fmt.Errorf("extension %q is not configured", extID) } - factory, existsFactory := factories[extID.Type()] + factory, existsFactory := set.Factories[extID.Type()] if !existsFactory { return nil, fmt.Errorf("extension factory for type %q is not configured", extID.Type()) } - set := component.ExtensionCreateSettings{ - TelemetrySettings: component.TelemetrySettings{ - Logger: settings.Logger.With( - zap.String(components.ZapKindKey, components.ZapKindExtension), - zap.String(components.ZapNameKey, extID.String())), - TracerProvider: settings.TracerProvider, - MeterProvider: settings.MeterProvider, - MetricsLevel: config.Telemetry.Metrics.Level, - }, - BuildInfo: buildInfo, + extSet := component.ExtensionCreateSettings{ + TelemetrySettings: set.Telemetry, + BuildInfo: set.BuildInfo, } - ext, err := buildExtension(context.Background(), factory, set, extCfg) + extSet.TelemetrySettings.Logger = extensionLogger(set.Telemetry.Logger, extID) + + ext, err := factory.CreateExtension(ctx, extSet, extCfg) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to create extension %q: %w", extID, err) } - extensions[extID] = ext - } - - return extensions, nil -} - -func buildExtension(ctx context.Context, factory component.ExtensionFactory, creationSet component.ExtensionCreateSettings, cfg config.Extension) (*builtExtension, error) { - ext := &builtExtension{ - logger: creationSet.Logger, - } - - ex, err := factory.CreateExtension(ctx, creationSet, cfg) - if err != nil { - return nil, fmt.Errorf("failed to create extension %v: %w", cfg.ID(), err) - } + // Check if the factory really created the extension. + if ext == nil { + return nil, fmt.Errorf("factory for %q produced a nil extension", extID) + } - // Check if the factory really created the extension. - if ex == nil { - return nil, fmt.Errorf("factory for %v produced a nil extension", cfg.ID()) + exts.extMap[extID] = ext } - ext.extension = ex + return exts, nil +} - return ext, nil +func extensionLogger(logger *zap.Logger, id config.ComponentID) *zap.Logger { + return logger.With( + zap.String(components.ZapKindKey, components.ZapKindExtension), + zap.String(components.ZapNameKey, id.String())) } diff --git a/internal/otel_collector/service/internal/fanoutconsumer/logs.go b/internal/otel_collector/service/internal/fanoutconsumer/logs.go index 9dde97673a1..8673bacb2a9 100644 --- a/internal/otel_collector/service/internal/fanoutconsumer/logs.go +++ b/internal/otel_collector/service/internal/fanoutconsumer/logs.go @@ -22,7 +22,7 @@ import ( "go.uber.org/multierr" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" ) // NewLogs wraps multiple log consumers in a single one. @@ -64,8 +64,8 @@ func (lsc *logsConsumer) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } -// ConsumeLogs exports the pdata.Logs to all consumers wrapped by the current one. -func (lsc *logsConsumer) ConsumeLogs(ctx context.Context, ld pdata.Logs) error { +// ConsumeLogs exports the plog.Logs to all consumers wrapped by the current one. +func (lsc *logsConsumer) ConsumeLogs(ctx context.Context, ld plog.Logs) error { var errs error // Initially pass to clone exporter to avoid the case where the optimization of sending // the incoming data to a mutating consumer is used that may change the incoming data before diff --git a/internal/otel_collector/service/internal/fanoutconsumer/metrics.go b/internal/otel_collector/service/internal/fanoutconsumer/metrics.go index 371643252b5..a44c12979d1 100644 --- a/internal/otel_collector/service/internal/fanoutconsumer/metrics.go +++ b/internal/otel_collector/service/internal/fanoutconsumer/metrics.go @@ -20,7 +20,7 @@ import ( "go.uber.org/multierr" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pmetric" ) // NewMetrics wraps multiple metrics consumers in a single one. @@ -62,8 +62,8 @@ func (msc *metricsConsumer) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } -// ConsumeMetrics exports the pdata.Metrics to all consumers wrapped by the current one. -func (msc *metricsConsumer) ConsumeMetrics(ctx context.Context, md pdata.Metrics) error { +// ConsumeMetrics exports the pmetric.Metrics to all consumers wrapped by the current one. +func (msc *metricsConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { var errs error // Initially pass to clone exporter to avoid the case where the optimization of sending // the incoming data to a mutating consumer is used that may change the incoming data before diff --git a/internal/otel_collector/service/internal/fanoutconsumer/traces.go b/internal/otel_collector/service/internal/fanoutconsumer/traces.go index 04dcd9fb5e8..e286c92e8b6 100644 --- a/internal/otel_collector/service/internal/fanoutconsumer/traces.go +++ b/internal/otel_collector/service/internal/fanoutconsumer/traces.go @@ -20,7 +20,7 @@ import ( "go.uber.org/multierr" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/ptrace" ) // NewTraces wraps multiple trace consumers in a single one. @@ -62,8 +62,8 @@ func (tsc *tracesConsumer) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } -// ConsumeTraces exports the pdata.Traces to all consumers wrapped by the current one. -func (tsc *tracesConsumer) ConsumeTraces(ctx context.Context, td pdata.Traces) error { +// ConsumeTraces exports the ptrace.Traces to all consumers wrapped by the current one. +func (tsc *tracesConsumer) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { var errs error // Initially pass to clone exporter to avoid the case where the optimization of sending // the incoming data to a mutating consumer is used that may change the incoming data before diff --git a/internal/otel_collector/service/internal/pipelines/capabilities.go b/internal/otel_collector/service/internal/pipelines/capabilities.go new file mode 100644 index 00000000000..6414f239f56 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/capabilities.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pipelines // import "go.opentelemetry.io/collector/service/internal/pipelines" + +import ( + "go.opentelemetry.io/collector/consumer" +) + +func wrapLogs(logs consumer.Logs, cap consumer.Capabilities) consumer.Logs { + return capLogs{Logs: logs, cap: cap} +} + +type capLogs struct { + consumer.Logs + cap consumer.Capabilities +} + +func (mts capLogs) Capabilities() consumer.Capabilities { + return mts.cap +} + +func wrapMetrics(metrics consumer.Metrics, cap consumer.Capabilities) consumer.Metrics { + return capMetrics{Metrics: metrics, cap: cap} +} + +type capMetrics struct { + consumer.Metrics + cap consumer.Capabilities +} + +func (mts capMetrics) Capabilities() consumer.Capabilities { + return mts.cap +} + +func wrapTraces(traces consumer.Traces, cap consumer.Capabilities) consumer.Traces { + return capTraces{Traces: traces, cap: cap} +} + +type capTraces struct { + consumer.Traces + cap consumer.Capabilities +} + +func (mts capTraces) Capabilities() consumer.Capabilities { + return mts.cap +} diff --git a/internal/otel_collector/service/internal/pipelines/pipelines.go b/internal/otel_collector/service/internal/pipelines/pipelines.go new file mode 100644 index 00000000000..098b511ce54 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/pipelines.go @@ -0,0 +1,567 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pipelines // import "go.opentelemetry.io/collector/service/internal/pipelines" + +import ( + "context" + "fmt" + "net/http" + "sort" + + "go.uber.org/multierr" + "go.uber.org/zap" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/service/internal/components" + "go.opentelemetry.io/collector/service/internal/fanoutconsumer" + "go.opentelemetry.io/collector/service/internal/zpages" +) + +const ( + zPipelineName = "zpipelinename" + zComponentName = "zcomponentname" + zComponentKind = "zcomponentkind" +) + +// baseConsumer redeclared here since not public in consumer package. May consider to make that public. +type baseConsumer interface { + Capabilities() consumer.Capabilities +} + +type builtComponent struct { + id config.ComponentID + comp component.Component +} + +type builtPipeline struct { + lastConsumer baseConsumer + + receivers []builtComponent + processors []builtComponent + exporters []builtComponent +} + +// Pipelines is set of all pipelines created from exporter configs. +type Pipelines struct { + telemetry component.TelemetrySettings + + allReceivers map[config.DataType]map[config.ComponentID]component.Receiver + allExporters map[config.DataType]map[config.ComponentID]component.Exporter + + pipelines map[config.ComponentID]*builtPipeline +} + +// StartAll starts all pipelines. +// +// Start with exporters, processors (in reverse configured order), then receivers. +// This is important so that components that are earlier in the pipeline and reference components that are +// later in the pipeline do not start sending data to later components which are not yet started. +func (bps *Pipelines) StartAll(ctx context.Context, host component.Host) error { + bps.telemetry.Logger.Info("Starting exporters...") + for dt, expByID := range bps.allExporters { + for expID, exp := range expByID { + expLogger := exporterLogger(bps.telemetry.Logger, expID, dt) + expLogger.Info("Exporter is starting...") + if err := exp.Start(ctx, components.NewHostWrapper(host, expLogger)); err != nil { + return err + } + expLogger.Info("Exporter started.") + } + } + + bps.telemetry.Logger.Info("Starting processors...") + for pipelineID, bp := range bps.pipelines { + for i := len(bp.processors) - 1; i >= 0; i-- { + procLogger := processorLogger(bps.telemetry.Logger, bp.processors[i].id, pipelineID) + procLogger.Info("Processor is starting...") + if err := bp.processors[i].comp.Start(ctx, components.NewHostWrapper(host, procLogger)); err != nil { + return err + } + procLogger.Info("Processor started.") + } + } + + bps.telemetry.Logger.Info("Starting receivers...") + for dt, recvByID := range bps.allReceivers { + for recvID, recv := range recvByID { + recvLogger := receiverLogger(bps.telemetry.Logger, recvID, dt) + recvLogger.Info("Receiver is starting...") + if err := recv.Start(ctx, components.NewHostWrapper(host, recvLogger)); err != nil { + return err + } + recvLogger.Info("Receiver started.") + } + } + return nil +} + +// ShutdownAll stops all pipelines. +// +// Shutdown order is the reverse of starting: receivers, processors, then exporters. +// This gives senders a chance to send all their data to a not "shutdown" component. +func (bps *Pipelines) ShutdownAll(ctx context.Context) error { + var errs error + bps.telemetry.Logger.Info("Stopping receivers...") + for _, recvByID := range bps.allReceivers { + for _, recv := range recvByID { + errs = multierr.Append(errs, recv.Shutdown(ctx)) + } + } + + bps.telemetry.Logger.Info("Stopping processors...") + for _, bp := range bps.pipelines { + for _, p := range bp.processors { + errs = multierr.Append(errs, p.comp.Shutdown(ctx)) + } + } + + bps.telemetry.Logger.Info("Stopping exporters...") + for _, expByID := range bps.allExporters { + for _, exp := range expByID { + errs = multierr.Append(errs, exp.Shutdown(ctx)) + } + } + + return errs +} + +func (bps *Pipelines) GetExporters() map[config.DataType]map[config.ComponentID]component.Exporter { + exportersMap := make(map[config.DataType]map[config.ComponentID]component.Exporter) + + exportersMap[config.TracesDataType] = make(map[config.ComponentID]component.Exporter, len(bps.allExporters[config.TracesDataType])) + exportersMap[config.MetricsDataType] = make(map[config.ComponentID]component.Exporter, len(bps.allExporters[config.MetricsDataType])) + exportersMap[config.LogsDataType] = make(map[config.ComponentID]component.Exporter, len(bps.allExporters[config.LogsDataType])) + + for dt, expByID := range bps.allExporters { + for expID, exp := range expByID { + exportersMap[dt][expID] = exp + } + } + + return exportersMap +} + +func (bps *Pipelines) HandleZPages(w http.ResponseWriter, r *http.Request) { + qValues := r.URL.Query() + pipelineName := qValues.Get(zPipelineName) + componentName := qValues.Get(zComponentName) + componentKind := qValues.Get(zComponentKind) + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Pipelines"}) + zpages.WriteHTMLPipelinesSummaryTable(w, bps.getPipelinesSummaryTableData()) + if pipelineName != "" && componentName != "" && componentKind != "" { + fullName := componentName + if componentKind == "processor" { + fullName = pipelineName + "/" + componentName + } + zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ + Name: componentKind + ": " + fullName, + }) + // TODO: Add config + status info. + } + zpages.WriteHTMLPageFooter(w) +} + +// Settings holds configuration for building Pipelines. +type Settings struct { + Telemetry component.TelemetrySettings + BuildInfo component.BuildInfo + + // ReceiverFactories maps receiver type names in the config to the respective component.ReceiverFactory. + ReceiverFactories map[config.Type]component.ReceiverFactory + + // ReceiverConfigs is a map of config.ComponentID to config.Receiver. + ReceiverConfigs map[config.ComponentID]config.Receiver + + // ProcessorFactories maps processor type names in the config to the respective component.ProcessorFactory. + ProcessorFactories map[config.Type]component.ProcessorFactory + + // ProcessorConfigs is a map of config.ComponentID to config.Processor. + ProcessorConfigs map[config.ComponentID]config.Processor + + // ExporterFactories maps exporter type names in the config to the respective component.ExporterFactory. + ExporterFactories map[config.Type]component.ExporterFactory + + // ExporterConfigs is a map of config.ComponentID to config.Exporter. + ExporterConfigs map[config.ComponentID]config.Exporter + + // PipelineConfigs is a map of config.ComponentID to config.Pipeline. + PipelineConfigs map[config.ComponentID]*config.Pipeline +} + +// Build builds all pipelines from config. +func Build(ctx context.Context, set Settings) (*Pipelines, error) { + exps := &Pipelines{ + telemetry: set.Telemetry, + allReceivers: make(map[config.DataType]map[config.ComponentID]component.Receiver), + allExporters: make(map[config.DataType]map[config.ComponentID]component.Exporter), + pipelines: make(map[config.ComponentID]*builtPipeline, len(set.PipelineConfigs)), + } + + receiversConsumers := make(map[config.DataType]map[config.ComponentID][]baseConsumer) + + // Iterate over all pipelines, and create exporters, then processors. + // Receivers cannot be created since we need to know all consumers, a.k.a. we need all pipelines build up to the + // first processor. + for pipelineID, pipeline := range set.PipelineConfigs { + // The data type of the pipeline defines what data type each exporter is expected to receive. + if _, ok := exps.allExporters[pipelineID.Type()]; !ok { + exps.allExporters[pipelineID.Type()] = make(map[config.ComponentID]component.Exporter) + } + expByID := exps.allExporters[pipelineID.Type()] + + bp := &builtPipeline{ + receivers: make([]builtComponent, len(pipeline.Receivers)), + processors: make([]builtComponent, len(pipeline.Processors)), + exporters: make([]builtComponent, len(pipeline.Exporters)), + } + exps.pipelines[pipelineID] = bp + + // Iterate over all Exporters for this pipeline. + for i, expID := range pipeline.Exporters { + // If already created an exporter for this [DataType, ComponentID] nothing to do, will reuse this instance. + if exp, ok := expByID[expID]; ok { + bp.exporters[i] = builtComponent{id: expID, comp: exp} + continue + } + + exp, err := buildExporter(ctx, set.Telemetry, set.BuildInfo, set.ExporterConfigs, set.ExporterFactories, expID, pipelineID) + if err != nil { + return nil, err + } + + bp.exporters[i] = builtComponent{id: expID, comp: exp} + expByID[expID] = exp + } + + // Build a fan out consumer to all exporters. + switch pipelineID.Type() { + case config.TracesDataType: + bp.lastConsumer = buildFanOutExportersTracesConsumer(bp.exporters) + case config.MetricsDataType: + bp.lastConsumer = buildFanOutExportersMetricsConsumer(bp.exporters) + case config.LogsDataType: + bp.lastConsumer = buildFanOutExportersLogsConsumer(bp.exporters) + default: + return nil, fmt.Errorf("create fan-out exporter in pipeline %q, data type %q is not supported", pipelineID, pipelineID.Type()) + } + + mutatesConsumedData := bp.lastConsumer.Capabilities().MutatesData + // Build the processors backwards, starting from the last one. + // The last processor points to fan out consumer to all Exporters, then the processor itself becomes a + // consumer for the one that precedes it in the pipeline and so on. + for i := len(pipeline.Processors) - 1; i >= 0; i-- { + procID := pipeline.Processors[i] + + proc, err := buildProcessor(ctx, set.Telemetry, set.BuildInfo, set.ProcessorConfigs, set.ProcessorFactories, procID, pipelineID, bp.lastConsumer) + if err != nil { + return nil, err + } + + bp.processors[i] = builtComponent{id: procID, comp: proc} + bp.lastConsumer = proc.(baseConsumer) + mutatesConsumedData = mutatesConsumedData || bp.lastConsumer.Capabilities().MutatesData + } + + // Some consumers may not correctly implement the Capabilities, and ignore the next consumer when calculated the Capabilities. + // Because of this wrap the first consumer if any consumers in the pipeline mutate the data and the first says that it doesn't. + switch pipelineID.Type() { + case config.TracesDataType: + bp.lastConsumer = capTraces{Traces: bp.lastConsumer.(consumer.Traces), cap: consumer.Capabilities{MutatesData: mutatesConsumedData}} + case config.MetricsDataType: + bp.lastConsumer = capMetrics{Metrics: bp.lastConsumer.(consumer.Metrics), cap: consumer.Capabilities{MutatesData: mutatesConsumedData}} + case config.LogsDataType: + bp.lastConsumer = capLogs{Logs: bp.lastConsumer.(consumer.Logs), cap: consumer.Capabilities{MutatesData: mutatesConsumedData}} + default: + return nil, fmt.Errorf("create cap consumer in pipeline %q, data type %q is not supported", pipelineID, pipelineID.Type()) + } + + // The data type of the pipeline defines what data type each exporter is expected to receive. + if _, ok := receiversConsumers[pipelineID.Type()]; !ok { + receiversConsumers[pipelineID.Type()] = make(map[config.ComponentID][]baseConsumer) + } + recvConsByID := receiversConsumers[pipelineID.Type()] + // Iterate over all Receivers for this pipeline and just append the lastConsumer as a consumer for the receiver. + for _, recvID := range pipeline.Receivers { + recvConsByID[recvID] = append(recvConsByID[recvID], bp.lastConsumer) + } + } + + // Now that we built the `receiversConsumers` map, we can build the receivers as well. + for pipelineID, pipeline := range set.PipelineConfigs { + // The data type of the pipeline defines what data type each exporter is expected to receive. + if _, ok := exps.allReceivers[pipelineID.Type()]; !ok { + exps.allReceivers[pipelineID.Type()] = make(map[config.ComponentID]component.Receiver) + } + recvByID := exps.allReceivers[pipelineID.Type()] + bp := exps.pipelines[pipelineID] + + // Iterate over all Receivers for this pipeline. + for i, recvID := range pipeline.Receivers { + // If already created a receiver for this [DataType, ComponentID] nothing to do. + if exp, ok := recvByID[recvID]; ok { + bp.receivers[i] = builtComponent{id: recvID, comp: exp} + continue + } + + recv, err := buildReceiver(ctx, set.Telemetry, set.BuildInfo, set.ReceiverConfigs, set.ReceiverFactories, recvID, pipelineID, receiversConsumers[pipelineID.Type()][recvID]) + if err != nil { + return nil, err + } + + bp.receivers[i] = builtComponent{id: recvID, comp: recv} + recvByID[recvID] = recv + } + } + return exps, nil +} + +func buildExporter( + ctx context.Context, + settings component.TelemetrySettings, + buildInfo component.BuildInfo, + cfgs map[config.ComponentID]config.Exporter, + factories map[config.Type]component.ExporterFactory, + id config.ComponentID, + pipelineID config.ComponentID, +) (component.Exporter, error) { + cfg, existsCfg := cfgs[id] + if !existsCfg { + return nil, fmt.Errorf("exporter %q is not configured", id) + } + + factory, existsFactory := factories[id.Type()] + if !existsFactory { + return nil, fmt.Errorf("exporter factory not available for: %q", id) + } + + set := component.ExporterCreateSettings{ + TelemetrySettings: settings, + BuildInfo: buildInfo, + } + set.TelemetrySettings.Logger = exporterLogger(settings.Logger, id, pipelineID.Type()) + components.LogStabilityLevel(set.TelemetrySettings.Logger, factory.StabilityLevel(pipelineID.Type())) + + exp, err := createExporter(ctx, set, cfg, id, pipelineID, factory) + if err != nil { + return nil, fmt.Errorf("failed to create %q exporter, in pipeline %q: %w", id, pipelineID, err) + } + + return exp, nil +} + +func createExporter(ctx context.Context, set component.ExporterCreateSettings, cfg config.Exporter, id config.ComponentID, pipelineID config.ComponentID, factory component.ExporterFactory) (component.Exporter, error) { + switch pipelineID.Type() { + case config.TracesDataType: + return factory.CreateTracesExporter(ctx, set, cfg) + + case config.MetricsDataType: + return factory.CreateMetricsExporter(ctx, set, cfg) + + case config.LogsDataType: + return factory.CreateLogsExporter(ctx, set, cfg) + } + return nil, fmt.Errorf("error creating exporter %q in pipeline %q, data type %q is not supported", id, pipelineID, pipelineID.Type()) +} + +func buildFanOutExportersTracesConsumer(exporters []builtComponent) consumer.Traces { + consumers := make([]consumer.Traces, 0, len(exporters)) + for _, exp := range exporters { + consumers = append(consumers, exp.comp.(consumer.Traces)) + } + // Create a junction point that fans out to all allExporters. + return fanoutconsumer.NewTraces(consumers) +} + +func buildFanOutExportersMetricsConsumer(exporters []builtComponent) consumer.Metrics { + consumers := make([]consumer.Metrics, 0, len(exporters)) + for _, exp := range exporters { + consumers = append(consumers, exp.comp.(consumer.Metrics)) + } + // Create a junction point that fans out to all allExporters. + return fanoutconsumer.NewMetrics(consumers) +} + +func buildFanOutExportersLogsConsumer(exporters []builtComponent) consumer.Logs { + consumers := make([]consumer.Logs, 0, len(exporters)) + for _, exp := range exporters { + consumers = append(consumers, exp.comp.(consumer.Logs)) + } + // Create a junction point that fans out to all allExporters. + return fanoutconsumer.NewLogs(consumers) +} + +func exporterLogger(logger *zap.Logger, id config.ComponentID, dt config.DataType) *zap.Logger { + return logger.With( + zap.String(components.ZapKindKey, components.ZapKindExporter), + zap.String(components.ZapDataTypeKey, string(dt)), + zap.String(components.ZapNameKey, id.String())) +} + +func buildProcessor(ctx context.Context, + settings component.TelemetrySettings, + buildInfo component.BuildInfo, + cfgs map[config.ComponentID]config.Processor, + factories map[config.Type]component.ProcessorFactory, + id config.ComponentID, + pipelineID config.ComponentID, + next baseConsumer, +) (component.Processor, error) { + procCfg, existsCfg := cfgs[id] + if !existsCfg { + return nil, fmt.Errorf("processor %q is not configured", id) + } + + factory, existsFactory := factories[id.Type()] + if !existsFactory { + return nil, fmt.Errorf("processor factory not available for: %q", id) + } + + set := component.ProcessorCreateSettings{ + TelemetrySettings: settings, + BuildInfo: buildInfo, + } + set.TelemetrySettings.Logger = processorLogger(settings.Logger, id, pipelineID) + components.LogStabilityLevel(set.TelemetrySettings.Logger, factory.StabilityLevel(pipelineID.Type())) + + proc, err := createProcessor(ctx, set, procCfg, id, pipelineID, next, factory) + if err != nil { + return nil, fmt.Errorf("failed to create %q processor, in pipeline %q: %w", id, pipelineID, err) + } + return proc, nil +} + +func createProcessor(ctx context.Context, set component.ProcessorCreateSettings, cfg config.Processor, id config.ComponentID, pipelineID config.ComponentID, next baseConsumer, factory component.ProcessorFactory) (component.Processor, error) { + switch pipelineID.Type() { + case config.TracesDataType: + return factory.CreateTracesProcessor(ctx, set, cfg, next.(consumer.Traces)) + + case config.MetricsDataType: + return factory.CreateMetricsProcessor(ctx, set, cfg, next.(consumer.Metrics)) + + case config.LogsDataType: + return factory.CreateLogsProcessor(ctx, set, cfg, next.(consumer.Logs)) + } + return nil, fmt.Errorf("error creating processor %q in pipeline %q, data type %q is not supported", id, pipelineID, pipelineID.Type()) +} + +func processorLogger(logger *zap.Logger, procID config.ComponentID, pipelineID config.ComponentID) *zap.Logger { + return logger.With( + zap.String(components.ZapKindKey, components.ZapKindProcessor), + zap.String(components.ZapNameKey, procID.String()), + zap.String(components.ZapKindPipeline, pipelineID.String())) +} + +func buildReceiver(ctx context.Context, + settings component.TelemetrySettings, + buildInfo component.BuildInfo, + cfgs map[config.ComponentID]config.Receiver, + factories map[config.Type]component.ReceiverFactory, + id config.ComponentID, + pipelineID config.ComponentID, + nexts []baseConsumer, +) (component.Receiver, error) { + cfg, existsCfg := cfgs[id] + if !existsCfg { + return nil, fmt.Errorf("receiver %q is not configured", id) + } + + factory, existsFactory := factories[id.Type()] + if !existsFactory { + return nil, fmt.Errorf("receiver factory not available for: %q", id) + } + + set := component.ReceiverCreateSettings{ + TelemetrySettings: settings, + BuildInfo: buildInfo, + } + set.TelemetrySettings.Logger = receiverLogger(settings.Logger, id, pipelineID.Type()) + components.LogStabilityLevel(set.TelemetrySettings.Logger, factory.StabilityLevel(pipelineID.Type())) + + recv, err := createReceiver(ctx, set, cfg, id, pipelineID, nexts, factory) + if err != nil { + return nil, fmt.Errorf("failed to create %q receiver, in pipeline %q: %w", id, pipelineID, err) + } + + return recv, nil +} + +func createReceiver(ctx context.Context, set component.ReceiverCreateSettings, cfg config.Receiver, id config.ComponentID, pipelineID config.ComponentID, nexts []baseConsumer, factory component.ReceiverFactory) (component.Receiver, error) { + switch pipelineID.Type() { + case config.TracesDataType: + var consumers []consumer.Traces + for _, next := range nexts { + consumers = append(consumers, next.(consumer.Traces)) + } + return factory.CreateTracesReceiver(ctx, set, cfg, fanoutconsumer.NewTraces(consumers)) + case config.MetricsDataType: + var consumers []consumer.Metrics + for _, next := range nexts { + consumers = append(consumers, next.(consumer.Metrics)) + } + return factory.CreateMetricsReceiver(ctx, set, cfg, fanoutconsumer.NewMetrics(consumers)) + case config.LogsDataType: + var consumers []consumer.Logs + for _, next := range nexts { + consumers = append(consumers, next.(consumer.Logs)) + } + return factory.CreateLogsReceiver(ctx, set, cfg, fanoutconsumer.NewLogs(consumers)) + } + return nil, fmt.Errorf("error creating receiver %q in pipeline %q, data type %q is not supported", id, pipelineID, pipelineID.Type()) +} + +func receiverLogger(logger *zap.Logger, id config.ComponentID, dt config.DataType) *zap.Logger { + return logger.With( + zap.String(components.ZapKindKey, components.ZapKindReceiver), + zap.String(components.ZapNameKey, id.String()), + zap.String(components.ZapKindPipeline, string(dt))) +} + +func (bps *Pipelines) getPipelinesSummaryTableData() zpages.SummaryPipelinesTableData { + sumData := zpages.SummaryPipelinesTableData{} + sumData.Rows = make([]zpages.SummaryPipelinesTableRowData, 0, len(bps.pipelines)) + for c, p := range bps.pipelines { + // TODO: Change the template to use ID. + var recvs []string + for _, bRecv := range p.receivers { + recvs = append(recvs, bRecv.id.String()) + } + var procs []string + for _, bProc := range p.processors { + procs = append(procs, bProc.id.String()) + } + var exps []string + for _, bExp := range p.exporters { + exps = append(exps, bExp.id.String()) + } + row := zpages.SummaryPipelinesTableRowData{ + FullName: c.String(), + InputType: string(c.Type()), + MutatesData: p.lastConsumer.Capabilities().MutatesData, + Receivers: recvs, + Processors: procs, + Exporters: exps, + } + sumData.Rows = append(sumData.Rows, row) + } + + sort.Slice(sumData.Rows, func(i, j int) bool { + return sumData.Rows[i].FullName < sumData.Rows[j].FullName + }) + return sumData +} diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_logs.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_logs.yaml similarity index 60% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_logs.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_logs.yaml index 5dcb27600fe..2907aabeb5f 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_logs.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_logs.yaml @@ -1,10 +1,10 @@ receivers: - examplereceiver: + nop: exporters: bf: service: pipelines: logs: - receivers: [examplereceiver] + receivers: [nop] exporters: [bf] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_metrics.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_metrics.yaml similarity index 61% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_metrics.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_metrics.yaml index c46e8b5c40d..962aad9ef81 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_metrics.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_metrics.yaml @@ -1,10 +1,10 @@ receivers: - examplereceiver: + nop: exporters: bf: service: pipelines: metrics: - receivers: [examplereceiver] + receivers: [nop] exporters: [bf] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_traces.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_traces.yaml similarity index 61% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_traces.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_traces.yaml index b1b4283e8ee..88aaba0a214 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_exporter_traces.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_exporter_traces.yaml @@ -1,10 +1,10 @@ receivers: - examplereceiver: + nop: exporters: bf: service: pipelines: traces: - receivers: [examplereceiver] + receivers: [nop] exporters: [bf] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_logs.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_logs.yaml new file mode 100644 index 00000000000..49636decb7b --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_logs.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + bf: +exporters: + nop: + +service: + pipelines: + logs: + receivers: [nop] + processors: [bf] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_metrics.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_metrics.yaml new file mode 100644 index 00000000000..bb62de57e18 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_metrics.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + bf: +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [nop] + processors: [bf] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_traces.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_traces.yaml new file mode 100644 index 00000000000..79baed24a29 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_processor_traces.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + bf: +exporters: + nop: + +service: + pipelines: + traces: + receivers: [nop] + processors: [bf] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_logs.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_logs.yaml similarity index 68% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_logs.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_logs.yaml index e4ac06f49b8..f59d862f0ae 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_logs.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_logs.yaml @@ -1,10 +1,10 @@ receivers: bf: # this is the bad receiver factory exporters: - exampleexporter: + nop: service: pipelines: logs: receivers: [bf] - exporters: [exampleexporter] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_metrics.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_metrics.yaml similarity index 69% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_metrics.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_metrics.yaml index e73eb326c00..20edc1d388c 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_metrics.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_metrics.yaml @@ -1,10 +1,10 @@ receivers: bf: # this is the bad receiver factory exporters: - exampleexporter: + nop: service: pipelines: metrics: receivers: [bf] - exporters: [exampleexporter] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_traces.yaml b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_traces.yaml similarity index 68% rename from internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_traces.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_traces.yaml index 1359d79578c..ec29c48b204 100644 --- a/internal/otel_collector/service/internal/builder/testdata/not_supported_receiver_traces.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/not_supported_receiver_traces.yaml @@ -1,10 +1,10 @@ receivers: bf: # this is the bad receiver factory exporters: - exampleexporter: + nop: service: pipelines: traces: receivers: [bf] - exporters: [exampleexporter] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/pipelines_exporter_multi_pipeline.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_exporter_multi_pipeline.yaml new file mode 100644 index 00000000000..f0932b14d20 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_exporter_multi_pipeline.yaml @@ -0,0 +1,37 @@ +receivers: + examplereceiver: + +processors: + exampleprocessor: + +exporters: + exampleexporter: + +service: + pipelines: + traces: + receivers: [ examplereceiver ] + processors: [ exampleprocessor ] + exporters: [ exampleexporter ] + + traces/1: + receivers: [ examplereceiver ] + exporters: [ exampleexporter ] + + metrics: + receivers: [ examplereceiver ] + processors: [ exampleprocessor ] + exporters: [ exampleexporter ] + + metrics/1: + receivers: [ examplereceiver ] + exporters: [ exampleexporter ] + + logs: + receivers: [ examplereceiver ] + processors: [ exampleprocessor ] + exporters: [ exampleexporter ] + + logs/1: + receivers: [ examplereceiver ] + exporters: [ exampleexporter ] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi.yaml new file mode 100644 index 00000000000..8f08e07dc75 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi.yaml @@ -0,0 +1,28 @@ +receivers: + examplereceiver: + examplereceiver/1: + +processors: + exampleprocessor: + exampleprocessor/1: + +exporters: + exampleexporter: + exampleexporter/1: + +service: + pipelines: + traces: + receivers: [ examplereceiver, examplereceiver/1 ] + processors: [ exampleprocessor, exampleprocessor/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] + + metrics: + receivers: [ examplereceiver, examplereceiver/1 ] + processors: [ exampleprocessor, exampleprocessor/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] + + logs: + receivers: [ examplereceiver, examplereceiver/1 ] + processors: [ exampleprocessor, exampleprocessor/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi_no_proc.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi_no_proc.yaml new file mode 100644 index 00000000000..5746e41fe5f --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_multi_no_proc.yaml @@ -0,0 +1,21 @@ +receivers: + examplereceiver: + examplereceiver/1: + +exporters: + exampleexporter: + exampleexporter/1: + +service: + pipelines: + traces: + receivers: [ examplereceiver, examplereceiver/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] + + metrics: + receivers: [ examplereceiver, examplereceiver/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] + + logs: + receivers: [ examplereceiver, examplereceiver/1 ] + exporters: [ exampleexporter, exampleexporter/1 ] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/invalid-metrics-level.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple.yaml similarity index 52% rename from internal/otel_collector/config/configunmarshaler/testdata/invalid-metrics-level.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple.yaml index 814e6307062..c18ca604ab5 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/invalid-metrics-level.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple.yaml @@ -1,19 +1,25 @@ receivers: examplereceiver: + processors: exampleprocessor: + exporters: exampleexporter: -extensions: - exampleextension: + service: - telemetry: - metrics: - level: "unknown" - extensions: [exampleextension] pipelines: traces: receivers: [examplereceiver] processors: [exampleprocessor] exporters: [exampleexporter] + metrics: + receivers: [examplereceiver] + processors: [exampleprocessor] + exporters: [exampleexporter] + + logs: + receivers: [examplereceiver] + processors: [exampleprocessor] + exporters: [exampleexporter] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_multi_proc.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_multi_proc.yaml new file mode 100644 index 00000000000..bb51c870843 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_multi_proc.yaml @@ -0,0 +1,25 @@ +receivers: + examplereceiver: + +processors: + exampleprocessor: + +exporters: + exampleexporter: + +service: + pipelines: + traces: + receivers: [examplereceiver] + processors: [exampleprocessor, exampleprocessor] + exporters: [exampleexporter] + + metrics: + receivers: [examplereceiver] + processors: [exampleprocessor, exampleprocessor] + exporters: [exampleexporter] + + logs: + receivers: [examplereceiver] + processors: [exampleprocessor, exampleprocessor] + exporters: [exampleexporter] diff --git a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-pipeline.yaml b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_no_proc.yaml similarity index 69% rename from internal/otel_collector/config/configunmarshaler/testdata/duplicate-pipeline.yaml rename to internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_no_proc.yaml index 45fc037b7fa..351687e69c5 100644 --- a/internal/otel_collector/config/configunmarshaler/testdata/duplicate-pipeline.yaml +++ b/internal/otel_collector/service/internal/pipelines/testdata/pipelines_simple_no_proc.yaml @@ -1,16 +1,22 @@ receivers: examplereceiver: -exporters: - exampleexporter: + processors: exampleprocessor: + +exporters: + exampleexporter: + service: pipelines: - traces /pipe: + traces: + receivers: [examplereceiver] + exporters: [exampleexporter] + + metrics: receivers: [examplereceiver] exporters: [exampleexporter] - processors: [exampleprocessor] - traces/ pipe : + + logs: receivers: [examplereceiver] exporters: [exampleexporter] - processors: [exampleprocessor] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_config.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_config.yaml new file mode 100644 index 00000000000..a205cbfa016 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_config.yaml @@ -0,0 +1,10 @@ +receivers: + nop: +exporters: + nop: + +service: + pipelines: + logs: + receivers: [nop] + exporters: [nop/1] \ No newline at end of file diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_factory.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_factory.yaml new file mode 100644 index 00000000000..51e20dba800 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_exporter_factory.yaml @@ -0,0 +1,10 @@ +receivers: + nop: +exporters: + unknown: + +service: + pipelines: + logs: + receivers: [nop] + exporters: [unknown] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_config.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_config.yaml new file mode 100644 index 00000000000..f7df08fb164 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_config.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + nop: +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [nop] + processors: [nop/1] + exporters: [nop] \ No newline at end of file diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_factory.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_factory.yaml new file mode 100644 index 00000000000..315b40c0020 --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_processor_factory.yaml @@ -0,0 +1,13 @@ +receivers: + nop: +processors: + unknown: +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [nop] + processors: [unknown] + exporters: [nop] \ No newline at end of file diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_config.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_config.yaml new file mode 100644 index 00000000000..ad1558070ed --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_config.yaml @@ -0,0 +1,10 @@ +receivers: + nop: +exporters: + nop: + +service: + pipelines: + traces: + receivers: [nop/1] + exporters: [nop] diff --git a/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_factory.yaml b/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_factory.yaml new file mode 100644 index 00000000000..8e0eb5952dd --- /dev/null +++ b/internal/otel_collector/service/internal/pipelines/testdata/unknown_receiver_factory.yaml @@ -0,0 +1,10 @@ +receivers: + unknown: +exporters: + nop: + +service: + pipelines: + traces: + receivers: [unknown] + exporters: [nop] diff --git a/internal/otel_collector/component/componenterror/errors.go b/internal/otel_collector/service/internal/runtimeinfo/info.go similarity index 53% rename from internal/otel_collector/component/componenterror/errors.go rename to internal/otel_collector/service/internal/runtimeinfo/info.go index 07d0c3bc398..7a6b4d718a9 100644 --- a/internal/otel_collector/component/componenterror/errors.go +++ b/internal/otel_collector/service/internal/runtimeinfo/info.go @@ -12,18 +12,29 @@ // See the License for the specific language governing permissions and // limitations under the License. -package componenterror // import "go.opentelemetry.io/collector/component/componenterror" +package runtimeinfo // import "go.opentelemetry.io/collector/service/internal/runtimeinfo" import ( - "errors" + "runtime" + "time" ) var ( - // ErrNilNextConsumer indicates an error on nil next consumer. - ErrNilNextConsumer = errors.New("nil nextConsumer") - - // ErrDataTypeIsNotSupported can be returned by receiver, exporter or processor - // factory methods that create the entity if the particular telemetry - // data type is not supported by the receiver, exporter or processor. - ErrDataTypeIsNotSupported = errors.New("telemetry type is not supported") + // InfoVar is a singleton instance of the Info struct. + runtimeInfoVar [][2]string ) + +func init() { + runtimeInfoVar = [][2]string{ + {"StartTimestamp", time.Now().String()}, + {"Go", runtime.Version()}, + {"OS", runtime.GOOS}, + {"Arch", runtime.GOARCH}, + // Add other valuable runtime information here. + } +} + +// Info returns the runtime information like uptime, os, arch, etc. +func Info() [][2]string { + return runtimeInfoVar +} diff --git a/internal/otel_collector/service/internal/telemetry/process_telemetry.go b/internal/otel_collector/service/internal/telemetry/process_telemetry.go index 1a8e5700d16..1a2ff42bb3a 100644 --- a/internal/otel_collector/service/internal/telemetry/process_telemetry.go +++ b/internal/otel_collector/service/internal/telemetry/process_telemetry.go @@ -15,171 +15,173 @@ package telemetry // import "go.opentelemetry.io/collector/service/internal/telemetry" import ( - "context" "os" "runtime" + "sync" "time" "github.com/shirou/gopsutil/v3/process" + "go.opencensus.io/metric" "go.opencensus.io/stats" - "go.opencensus.io/stats/view" ) -// ProcessMetricsViews is a struct that contains views related to process metrics (cpu, mem, etc) -type ProcessMetricsViews struct { - prevTimeUnixNano int64 - ballastSizeBytes uint64 - views []*view.View - done chan struct{} - proc *process.Process +// processMetrics is a struct that contains views related to process metrics (cpu, mem, etc) +type processMetrics struct { + startTimeUnixNano int64 + ballastSizeBytes uint64 + proc *process.Process + + processUptime *metric.Float64DerivedCumulative + allocMem *metric.Int64DerivedGauge + totalAllocMem *metric.Int64DerivedCumulative + sysMem *metric.Int64DerivedGauge + cpuSeconds *metric.Float64DerivedCumulative + rssMemory *metric.Int64DerivedGauge + + // mu protects everything bellow. + mu sync.Mutex + lastMsRead time.Time + ms *runtime.MemStats } -var mUptime = stats.Float64( - "process/uptime", - "Uptime of the process", - stats.UnitSeconds) -var viewProcessUptime = &view.View{ - Name: mUptime.Name(), - Description: mUptime.Description(), - Measure: mUptime, - Aggregation: view.Sum(), - TagKeys: nil, -} - -var mRuntimeAllocMem = stats.Int64( - "process/runtime/heap_alloc_bytes", - "Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc')", - stats.UnitBytes) -var viewAllocMem = &view.View{ - Name: mRuntimeAllocMem.Name(), - Description: mRuntimeAllocMem.Description(), - Measure: mRuntimeAllocMem, - Aggregation: view.LastValue(), - TagKeys: nil, -} - -var mRuntimeTotalAllocMem = stats.Int64( - "process/runtime/total_alloc_bytes", - "Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')", - stats.UnitBytes) -var viewTotalAllocMem = &view.View{ - Name: mRuntimeTotalAllocMem.Name(), - Description: mRuntimeTotalAllocMem.Description(), - Measure: mRuntimeTotalAllocMem, - Aggregation: view.LastValue(), - TagKeys: nil, -} +// RegisterProcessMetrics creates a new set of processMetrics (mem, cpu) that can be used to measure +// basic information about this process. +func RegisterProcessMetrics(registry *metric.Registry, ballastSizeBytes uint64) error { + pm := &processMetrics{ + startTimeUnixNano: time.Now().UnixNano(), + ballastSizeBytes: ballastSizeBytes, + ms: &runtime.MemStats{}, + } + var err error + pm.proc, err = process.NewProcess(int32(os.Getpid())) + if err != nil { + return err + } -var mRuntimeSysMem = stats.Int64( - "process/runtime/total_sys_memory_bytes", - "Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys')", - stats.UnitBytes) -var viewSysMem = &view.View{ - Name: mRuntimeSysMem.Name(), - Description: mRuntimeSysMem.Description(), - Measure: mRuntimeSysMem, - Aggregation: view.LastValue(), - TagKeys: nil, -} + pm.processUptime, err = registry.AddFloat64DerivedCumulative( + "process/uptime", + metric.WithDescription("Uptime of the process"), + metric.WithUnit(stats.UnitSeconds)) + if err != nil { + return err + } + if err = pm.processUptime.UpsertEntry(pm.updateProcessUptime); err != nil { + return err + } -var mCPUSeconds = stats.Float64( - "process/cpu_seconds", - "Total CPU user and system time in seconds", - stats.UnitSeconds) -var viewCPUSeconds = &view.View{ - Name: mCPUSeconds.Name(), - Description: mCPUSeconds.Description(), - Measure: mCPUSeconds, - Aggregation: view.LastValue(), - TagKeys: nil, -} + pm.allocMem, err = registry.AddInt64DerivedGauge( + "process/runtime/heap_alloc_bytes", + metric.WithDescription("Bytes of allocated heap objects (see 'go doc runtime.MemStats.HeapAlloc')"), + metric.WithUnit(stats.UnitBytes)) + if err != nil { + return err + } + if err = pm.allocMem.UpsertEntry(pm.updateAllocMem); err != nil { + return err + } -var mRSSMemory = stats.Int64( - "process/memory/rss", - "Total physical memory (resident set size)", - stats.UnitBytes) -var viewRSSMemory = &view.View{ - Name: mRSSMemory.Name(), - Description: mRSSMemory.Description(), - Measure: mRSSMemory, - Aggregation: view.LastValue(), - TagKeys: nil, -} + pm.totalAllocMem, err = registry.AddInt64DerivedCumulative( + "process/runtime/total_alloc_bytes", + metric.WithDescription("Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')"), + metric.WithUnit(stats.UnitBytes)) + if err != nil { + return err + } + if err = pm.totalAllocMem.UpsertEntry(pm.updateTotalAllocMem); err != nil { + return err + } -// NewProcessMetricsViews creates a new set of ProcessMetrics (mem, cpu) that can be used to measure -// basic information about this process. -func NewProcessMetricsViews(ballastSizeBytes uint64) (*ProcessMetricsViews, error) { - pmv := &ProcessMetricsViews{ - prevTimeUnixNano: time.Now().UnixNano(), - views: []*view.View{viewProcessUptime, viewAllocMem, viewTotalAllocMem, viewSysMem, viewCPUSeconds, viewRSSMemory}, - ballastSizeBytes: ballastSizeBytes, - done: make(chan struct{}), + pm.sysMem, err = registry.AddInt64DerivedGauge( + "process/runtime/total_sys_memory_bytes", + metric.WithDescription("Total bytes of memory obtained from the OS (see 'go doc runtime.MemStats.Sys')"), + metric.WithUnit(stats.UnitBytes)) + if err != nil { + return err + } + if err = pm.sysMem.UpsertEntry(pm.updateSysMem); err != nil { + return err } - pid := os.Getpid() + pm.cpuSeconds, err = registry.AddFloat64DerivedCumulative( + "process/cpu_seconds", + metric.WithDescription("Total CPU user and system time in seconds"), + metric.WithUnit(stats.UnitSeconds)) + if err != nil { + return err + } + if err = pm.cpuSeconds.UpsertEntry(pm.updateCPUSeconds); err != nil { + return err + } - var err error - pmv.proc, err = process.NewProcess(int32(pid)) + pm.rssMemory, err = registry.AddInt64DerivedGauge( + "process/memory/rss", + metric.WithDescription("Total physical memory (resident set size)"), + metric.WithUnit(stats.UnitBytes)) if err != nil { - return nil, err + return err } + if err = pm.rssMemory.UpsertEntry(pm.updateRSSMemory); err != nil { + return err + } + + return nil +} - return pmv, nil +func (pm *processMetrics) updateProcessUptime() float64 { + now := time.Now().UnixNano() + return float64(now-pm.startTimeUnixNano) / 1e9 } -// StartCollection starts a ticker'd goroutine that will update the PMV measurements every 5 seconds -func (pmv *ProcessMetricsViews) StartCollection() { - go func() { - ticker := time.NewTicker(5 * time.Second) - defer ticker.Stop() - for { - select { - case <-ticker.C: - pmv.updateViews() - case <-pmv.done: - return - } - } - }() +func (pm *processMetrics) updateAllocMem() int64 { + pm.mu.Lock() + defer pm.mu.Unlock() + pm.readMemStatsIfNeeded() + return int64(pm.ms.Alloc) } -// Views returns the views internal to the PMV. -func (pmv *ProcessMetricsViews) Views() []*view.View { - return pmv.views +func (pm *processMetrics) updateTotalAllocMem() int64 { + pm.mu.Lock() + defer pm.mu.Unlock() + pm.readMemStatsIfNeeded() + return int64(pm.ms.TotalAlloc) } -// StopCollection stops the collection of the process metric information. -func (pmv *ProcessMetricsViews) StopCollection() { - close(pmv.done) +func (pm *processMetrics) updateSysMem() int64 { + pm.mu.Lock() + defer pm.mu.Unlock() + pm.readMemStatsIfNeeded() + return int64(pm.ms.Sys) } -func (pmv *ProcessMetricsViews) updateViews() { - now := time.Now().UnixNano() - stats.Record(context.Background(), mUptime.M(float64(now-pmv.prevTimeUnixNano)/1e9)) - pmv.prevTimeUnixNano = now - - ms := &runtime.MemStats{} - pmv.readMemStats(ms) - stats.Record(context.Background(), mRuntimeAllocMem.M(int64(ms.Alloc))) - stats.Record(context.Background(), mRuntimeTotalAllocMem.M(int64(ms.TotalAlloc))) - stats.Record(context.Background(), mRuntimeSysMem.M(int64(ms.Sys))) - - if pmv.proc != nil { - if times, err := pmv.proc.Times(); err == nil { - stats.Record(context.Background(), mCPUSeconds.M(times.Total())) - } - if mem, err := pmv.proc.MemoryInfo(); err == nil { - stats.Record(context.Background(), mRSSMemory.M(int64(mem.RSS))) - } +func (pm *processMetrics) updateCPUSeconds() float64 { + times, err := pm.proc.Times() + if err != nil { + return 0 + } + + return times.Total() +} + +func (pm *processMetrics) updateRSSMemory() int64 { + mem, err := pm.proc.MemoryInfo() + if err != nil { + return 0 } + return int64(mem.RSS) } -func (pmv *ProcessMetricsViews) readMemStats(ms *runtime.MemStats) { - runtime.ReadMemStats(ms) - if pmv.ballastSizeBytes > 0 { - ms.Alloc -= pmv.ballastSizeBytes - ms.HeapAlloc -= pmv.ballastSizeBytes - ms.HeapSys -= pmv.ballastSizeBytes - ms.HeapInuse -= pmv.ballastSizeBytes +func (pm *processMetrics) readMemStatsIfNeeded() { + now := time.Now() + // If last time we read was less than one second ago just reuse the values + if now.Sub(pm.lastMsRead) < time.Second { + return + } + pm.lastMsRead = now + runtime.ReadMemStats(pm.ms) + if pm.ballastSizeBytes > 0 { + pm.ms.Alloc -= pm.ballastSizeBytes + pm.ms.HeapAlloc -= pm.ballastSizeBytes + pm.ms.HeapSys -= pm.ballastSizeBytes + pm.ms.HeapInuse -= pm.ballastSizeBytes } } diff --git a/internal/otel_collector/service/internal/telemetrylogs/logger.go b/internal/otel_collector/service/internal/telemetrylogs/logger.go index 08ad6d39d7f..ca1e1893a23 100644 --- a/internal/otel_collector/service/internal/telemetrylogs/logger.go +++ b/internal/otel_collector/service/internal/telemetrylogs/logger.go @@ -20,10 +20,10 @@ import ( "go.uber.org/zap/zapgrpc" "google.golang.org/grpc/grpclog" - "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/telemetry" ) -func NewLogger(cfg config.ServiceTelemetryLogs, options []zap.Option) (*zap.Logger, error) { +func NewLogger(cfg telemetry.LogsConfig, options []zap.Option) (*zap.Logger, error) { // Copied from NewProductionConfig. zapCfg := &zap.Config{ Level: zap.NewAtomicLevelAt(cfg.Level), diff --git a/internal/otel_collector/service/internal/zpages/templates.go b/internal/otel_collector/service/internal/zpages/templates.go index 25efd48fe3f..9388e802355 100644 --- a/internal/otel_collector/service/internal/zpages/templates.go +++ b/internal/otel_collector/service/internal/zpages/templates.go @@ -51,6 +51,10 @@ var ( //go:embed templates/properties_table.html propertiesTableBytes []byte propertiesTableTemplate = parseTemplate("properties_table", propertiesTableBytes) + + //go:embed templates/features_table.html + featuresTableBytes []byte + featuresTableTemplate = parseTemplate("features_table", featuresTableBytes) ) func parseTemplate(name string, bytes []byte) *template.Template { @@ -156,3 +160,22 @@ func getKey(row [2]string) string { func getValue(row [2]string) string { return row[1] } + +// FeatureGateTableData contains data for feature gate table template. +type FeatureGateTableData struct { + Rows []FeatureGateTableRowData +} + +// FeatureGateTableRowData contains data for one row in feature gate table template. +type FeatureGateTableRowData struct { + ID string + Enabled bool + Description string +} + +// WriteHTMLFeaturesTable writes a table summarizing registered feature gates. +func WriteHTMLFeaturesTable(w io.Writer, ftd FeatureGateTableData) { + if err := featuresTableTemplate.Execute(w, ftd); err != nil { + log.Printf("zpages: executing template: %v", err) + } +} diff --git a/internal/otel_collector/service/internal/zpages/templates/features_table.html b/internal/otel_collector/service/internal/zpages/templates/features_table.html new file mode 100644 index 00000000000..4aced349adb --- /dev/null +++ b/internal/otel_collector/service/internal/zpages/templates/features_table.html @@ -0,0 +1,19 @@ + + + + + + + + + {{range $rowindex, $row := .Rows}} + {{- if even $rowindex}} + + {{else}} + {{end -}} + + + + + {{end}} +
ID  |  Enabled  |  Description
{{$row.ID}}  |  {{$row.Enabled}}  |  {{$row.Description}}  |  
diff --git a/internal/otel_collector/service/service.go b/internal/otel_collector/service/service.go index 526cbc16ef9..1afa0694d15 100644 --- a/internal/otel_collector/service/service.go +++ b/internal/otel_collector/service/service.go @@ -18,150 +18,124 @@ import ( "context" "fmt" - "go.opentelemetry.io/contrib/zpages" + "go.opentelemetry.io/otel/metric" + sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.uber.org/multierr" + "go.uber.org/zap" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/service/internal/builder" + "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/collector/service/internal" "go.opentelemetry.io/collector/service/internal/extensions" + "go.opentelemetry.io/collector/service/internal/pipelines" + "go.opentelemetry.io/collector/service/internal/telemetry" + "go.opentelemetry.io/collector/service/internal/telemetrylogs" ) // service represents the implementation of a component.Host. type service struct { - factories component.Factories - buildInfo component.BuildInfo - config *config.Config - telemetry component.TelemetrySettings - zPagesSpanProcessor *zpages.SpanProcessor - asyncErrorChannel chan error - - builtExporters builder.Exporters - builtReceivers builder.Receivers - builtPipelines builder.BuiltPipelines - builtExtensions extensions.Extensions + buildInfo component.BuildInfo + config *Config + telemetrySettings component.TelemetrySettings + host *serviceHost + telemetryInitializer *telemetryInitializer } -func newService(set *svcSettings) (*service, error) { +func newService(set *settings) (*service, error) { srv := &service{ - factories: set.Factories, - buildInfo: set.BuildInfo, - config: set.Config, - telemetry: set.Telemetry, - zPagesSpanProcessor: set.ZPagesSpanProcessor, - asyncErrorChannel: set.AsyncErrorChannel, + buildInfo: set.BuildInfo, + config: set.Config, + telemetrySettings: component.TelemetrySettings{ + Logger: zap.NewNop(), + TracerProvider: sdktrace.NewTracerProvider( + // needed for supporting the zpages extension + sdktrace.WithSampler(internal.AlwaysRecord()), + ), + MeterProvider: metric.NewNoopMeterProvider(), + MetricsLevel: set.Config.Telemetry.Metrics.Level, + }, + host: &serviceHost{ + factories: set.Factories, + buildInfo: set.BuildInfo, + asyncErrorChannel: set.AsyncErrorChannel, + }, + telemetryInitializer: set.telemetry, } var err error - if srv.builtExtensions, err = extensions.Build(srv.telemetry, srv.buildInfo, srv.config, srv.factories.Extensions); err != nil { - return nil, fmt.Errorf("cannot build extensions: %w", err) + if srv.telemetrySettings.Logger, err = telemetrylogs.NewLogger(set.Config.Service.Telemetry.Logs, set.LoggingOptions); err != nil { + return nil, fmt.Errorf("failed to get logger: %w", err) } - // Pipeline is built backwards, starting from exporters, so that we create objects - // which are referenced before objects which reference them. - - // First create exporters. - if srv.builtExporters, err = builder.BuildExporters(srv.telemetry, srv.buildInfo, srv.config, srv.factories.Exporters); err != nil { - return nil, fmt.Errorf("cannot build exporters: %w", err) + if err = srv.telemetryInitializer.init(set.BuildInfo, srv.telemetrySettings.Logger, set.Config.Service.Telemetry, set.AsyncErrorChannel); err != nil { + return nil, fmt.Errorf("failed to initialize telemetry: %w", err) + } + srv.telemetrySettings.MeterProvider = srv.telemetryInitializer.mp + + extensionsSettings := extensions.Settings{ + Telemetry: srv.telemetrySettings, + BuildInfo: srv.buildInfo, + Configs: srv.config.Extensions, + Factories: srv.host.factories.Extensions, + ServiceExtensions: srv.config.Service.Extensions, + } + if srv.host.extensions, err = extensions.Build(context.Background(), extensionsSettings); err != nil { + return nil, fmt.Errorf("failed build extensions: %w", err) } - // Create pipelines and their processors and plug exporters to the end of the pipelines. - if srv.builtPipelines, err = builder.BuildPipelines(srv.telemetry, srv.buildInfo, srv.config, srv.builtExporters, srv.factories.Processors); err != nil { + pipelinesSettings := pipelines.Settings{ + Telemetry: srv.telemetrySettings, + BuildInfo: srv.buildInfo, + ReceiverFactories: srv.host.factories.Receivers, + ReceiverConfigs: srv.config.Receivers, + ProcessorFactories: srv.host.factories.Processors, + ProcessorConfigs: srv.config.Processors, + ExporterFactories: srv.host.factories.Exporters, + ExporterConfigs: srv.config.Exporters, + PipelineConfigs: srv.config.Service.Pipelines, + } + if srv.host.pipelines, err = pipelines.Build(context.Background(), pipelinesSettings); err != nil { return nil, fmt.Errorf("cannot build pipelines: %w", err) } - // Create receivers and plug them into the start of the pipelines. - if srv.builtReceivers, err = builder.BuildReceivers(srv.telemetry, srv.buildInfo, srv.config, srv.builtPipelines, srv.factories.Receivers); err != nil { - return nil, fmt.Errorf("cannot build receivers: %w", err) + if set.Config.Telemetry.Metrics.Level != configtelemetry.LevelNone && set.Config.Telemetry.Metrics.Address != "" { + // The process telemetry initialization requires the ballast size, which is available after the extensions are initialized. + if err = telemetry.RegisterProcessMetrics(srv.telemetryInitializer.ocRegistry, getBallastSize(srv.host)); err != nil { + return nil, fmt.Errorf("failed to register process metrics: %w", err) + } } return srv, nil } func (srv *service) Start(ctx context.Context) error { - srv.telemetry.Logger.Info("Starting extensions...") - if err := srv.builtExtensions.StartAll(ctx, srv); err != nil { + if err := srv.host.extensions.StartAll(ctx, srv.host); err != nil { return fmt.Errorf("failed to start extensions: %w", err) } - srv.telemetry.Logger.Info("Starting exporters...") - if err := srv.builtExporters.StartAll(ctx, srv); err != nil { - return fmt.Errorf("cannot start exporters: %w", err) - } - - srv.telemetry.Logger.Info("Starting processors...") - if err := srv.builtPipelines.StartProcessors(ctx, srv); err != nil { - return fmt.Errorf("cannot start processors: %w", err) + if err := srv.host.pipelines.StartAll(ctx, srv.host); err != nil { + return fmt.Errorf("cannot start pipelines: %w", err) } - srv.telemetry.Logger.Info("Starting receivers...") - if err := srv.builtReceivers.StartAll(ctx, srv); err != nil { - return fmt.Errorf("cannot start receivers: %w", err) - } - - return srv.builtExtensions.NotifyPipelineReady() + return srv.host.extensions.NotifyPipelineReady() } func (srv *service) Shutdown(ctx context.Context) error { // Accumulate errors and proceed with shutting down remaining components. var errs error - if err := srv.builtExtensions.NotifyPipelineNotReady(); err != nil { + if err := srv.host.extensions.NotifyPipelineNotReady(); err != nil { errs = multierr.Append(errs, fmt.Errorf("failed to notify that pipeline is not ready: %w", err)) } - // Pipeline shutdown order is the reverse of building/starting: first receivers, then flushing pipelines - // giving senders a chance to send all their data. This may take time, the allowed - // time should be part of configuration. - - srv.telemetry.Logger.Info("Stopping receivers...") - if err := srv.builtReceivers.ShutdownAll(ctx); err != nil { - errs = multierr.Append(errs, fmt.Errorf("failed to shutdown receivers: %w", err)) - } - - srv.telemetry.Logger.Info("Stopping processors...") - if err := srv.builtPipelines.ShutdownProcessors(ctx); err != nil { - errs = multierr.Append(errs, fmt.Errorf("failed to shutdown processors: %w", err)) + if err := srv.host.pipelines.ShutdownAll(ctx); err != nil { + errs = multierr.Append(errs, fmt.Errorf("failed to shutdown pipelines: %w", err)) } - srv.telemetry.Logger.Info("Stopping exporters...") - if err := srv.builtExporters.ShutdownAll(ctx); err != nil { - errs = multierr.Append(errs, fmt.Errorf("failed to shutdown exporters: %w", err)) - } - - srv.telemetry.Logger.Info("Stopping extensions...") - if err := srv.builtExtensions.ShutdownAll(ctx); err != nil { + if err := srv.host.extensions.ShutdownAll(ctx); err != nil { errs = multierr.Append(errs, fmt.Errorf("failed to shutdown extensions: %w", err)) } + // TODO: Shutdown TracerProvider, MeterProvider, and Sync Logger. return errs } - -// ReportFatalError is used to report to the host that the receiver encountered -// a fatal error (i.e.: an error that the instance can't recover from) after -// its start function has already returned. -func (srv *service) ReportFatalError(err error) { - srv.asyncErrorChannel <- err -} - -func (srv *service) GetFactory(kind component.Kind, componentType config.Type) component.Factory { - switch kind { - case component.KindReceiver: - return srv.factories.Receivers[componentType] - case component.KindProcessor: - return srv.factories.Processors[componentType] - case component.KindExporter: - return srv.factories.Exporters[componentType] - case component.KindExtension: - return srv.factories.Extensions[componentType] - } - return nil -} - -func (srv *service) GetExtensions() map[config.ComponentID]component.Extension { - return srv.builtExtensions.ToMap() -} - -func (srv *service) GetExporters() map[config.DataType]map[config.ComponentID]component.Exporter { - return srv.builtExporters.ToMapByDataType() -} diff --git a/internal/otel_collector/service/servicetest/configprovider.go b/internal/otel_collector/service/servicetest/configprovider.go index 9bd6a258ce3..6f69ef785fe 100644 --- a/internal/otel_collector/service/servicetest/configprovider.go +++ b/internal/otel_collector/service/servicetest/configprovider.go @@ -17,18 +17,18 @@ package servicetest // import "go.opentelemetry.io/collector/service/servicetest import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configtest" - "go.opentelemetry.io/collector/config/configunmarshaler" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/service/internal/configunmarshaler" ) // LoadConfig loads a config.Config from file, and does NOT validate the configuration. func LoadConfig(fileName string, factories component.Factories) (*config.Config, error) { // Read yaml config from file - cfgMap, err := configtest.LoadConfigMap(fileName) + conf, err := confmaptest.LoadConf(fileName) if err != nil { return nil, err } - return configunmarshaler.NewDefault().Unmarshal(cfgMap, factories) + return configunmarshaler.New().Unmarshal(conf, factories) } // LoadConfigAndValidate loads a config from the file, and validates the configuration. diff --git a/internal/otel_collector/service/settings.go b/internal/otel_collector/service/settings.go index 9a8f6ff8be8..070d6911b0c 100644 --- a/internal/otel_collector/service/settings.go +++ b/internal/otel_collector/service/settings.go @@ -15,15 +15,13 @@ package service // import "go.opentelemetry.io/collector/service" import ( - "go.opentelemetry.io/contrib/zpages" "go.uber.org/zap" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" ) -// svcSettings holds configuration for building a new service. -type svcSettings struct { +// settings holds configuration for building a new service. +type settings struct { // Factories component factories. Factories component.Factories @@ -31,16 +29,16 @@ type svcSettings struct { BuildInfo component.BuildInfo // Config represents the configuration of the service. - Config *config.Config - - // Telemetry represents the service configured telemetry for all the components. - Telemetry component.TelemetrySettings - - // ZPagesSpanProcessor represents the SpanProcessor for tracez page. - ZPagesSpanProcessor *zpages.SpanProcessor + Config *Config // AsyncErrorChannel is the channel that is used to report fatal errors. AsyncErrorChannel chan error + + // LoggingOptions provides a way to change behavior of zap logging. + LoggingOptions []zap.Option + + // For testing purpose only. + telemetry *telemetryInitializer } // CollectorSettings holds configuration for creating a new Collector. @@ -63,4 +61,10 @@ type CollectorSettings struct { // LoggingOptions provides a way to change behavior of zap logging. LoggingOptions []zap.Option + + // SkipSettingGRPCLogger avoids setting the grpc logger + SkipSettingGRPCLogger bool + + // For testing purpose only. + telemetry *telemetryInitializer } diff --git a/internal/otel_collector/service/telemetry.go b/internal/otel_collector/service/telemetry.go index 75be2d403a6..7379964b1fa 100644 --- a/internal/otel_collector/service/telemetry.go +++ b/internal/otel_collector/service/telemetry.go @@ -15,7 +15,7 @@ package service // import "go.opentelemetry.io/collector/service" import ( - "fmt" + "errors" "net/http" "strings" "sync" @@ -23,140 +23,154 @@ import ( "contrib.go.opencensus.io/exporter/prometheus" "github.com/google/uuid" + ocmetric "go.opencensus.io/metric" + "go.opencensus.io/metric/metricproducer" "go.opencensus.io/stats/view" otelprometheus "go.opentelemetry.io/otel/exporters/prometheus" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" + "go.opentelemetry.io/otel/sdk/metric/export/aggregation" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" selector "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.uber.org/zap" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/internal/obsreportconfig" - "go.opentelemetry.io/collector/internal/version" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" "go.opentelemetry.io/collector/processor/batchprocessor" - telemetry2 "go.opentelemetry.io/collector/service/internal/telemetry" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" + "go.opentelemetry.io/collector/service/featuregate" ) -// collectorTelemetry is collector's own telemetry. -var collectorTelemetry collectorTelemetryExporter = &colTelemetry{} - -// AddCollectorVersionTag indicates if the collector version tag should be added to all telemetry metrics -const AddCollectorVersionTag = true +// collectorTelemetry is collector's own telemetrySettings. +var collectorTelemetry = newColTelemetry(featuregate.GetRegistry()) const ( zapKeyTelemetryAddress = "address" zapKeyTelemetryLevel = "level" + + // useOtelForInternalMetricsfeatureGateID is the feature gate ID that controls whether the collector uses open + // telemetrySettings for internal metrics. + useOtelForInternalMetricsfeatureGateID = "telemetry.useOtelForInternalMetrics" ) -type collectorTelemetryExporter interface { - init(col *Collector) error - shutdown() error -} +type telemetryInitializer struct { + registry *featuregate.Registry + views []*view.View + + ocRegistry *ocmetric.Registry + + mp metric.MeterProvider -type colTelemetry struct { - views []*view.View server *http.Server doInitOnce sync.Once } -func (tel *colTelemetry) init(col *Collector) error { +func newColTelemetry(registry *featuregate.Registry) *telemetryInitializer { + registry.MustRegister(featuregate.Gate{ + ID: useOtelForInternalMetricsfeatureGateID, + Description: "controls whether the collector to uses OpenTelemetry for internal metrics", + Enabled: false, + }) + return &telemetryInitializer{ + registry: registry, + mp: metric.NewNoopMeterProvider(), + } +} + +func (tel *telemetryInitializer) init(buildInfo component.BuildInfo, logger *zap.Logger, cfg ConfigServiceTelemetry, asyncErrorChannel chan error) error { var err error tel.doInitOnce.Do( func() { - err = tel.initOnce(col) + err = tel.initOnce(buildInfo, logger, cfg, asyncErrorChannel) }, ) - if err != nil { - return fmt.Errorf("failed to initialize telemetry: %w", err) - } - return nil + return err } -func (tel *colTelemetry) initOnce(col *Collector) error { - logger := col.logger - cfg := col.service.config.Telemetry - - level := cfg.Metrics.Level - metricsAddr := cfg.Metrics.Address - - if level == configtelemetry.LevelNone || metricsAddr == "" { +func (tel *telemetryInitializer) initOnce(buildInfo component.BuildInfo, logger *zap.Logger, cfg ConfigServiceTelemetry, asyncErrorChannel chan error) error { + if cfg.Metrics.Level == configtelemetry.LevelNone || cfg.Metrics.Address == "" { logger.Info( "Skipping telemetry setup.", - zap.String(zapKeyTelemetryAddress, metricsAddr), - zap.String(zapKeyTelemetryLevel, level.String()), + zap.String(zapKeyTelemetryAddress, cfg.Metrics.Address), + zap.String(zapKeyTelemetryLevel, cfg.Metrics.Level.String()), ) return nil } logger.Info("Setting up own telemetry...") - instanceUUID, _ := uuid.NewRandom() - instanceID := instanceUUID.String() + // Construct telemetry attributes from resource attributes. + telAttrs := map[string]string{} + for k, v := range cfg.Resource { + // nil value indicates that the attribute should not be included in the telemetry. + if v != nil { + telAttrs[k] = *v + } + } + + if _, ok := cfg.Resource[semconv.AttributeServiceInstanceID]; !ok { + // AttributeServiceInstanceID is not specified in the config. Auto-generate one. + instanceUUID, _ := uuid.NewRandom() + instanceID := instanceUUID.String() + telAttrs[semconv.AttributeServiceInstanceID] = instanceID + } + + if _, ok := cfg.Resource[semconv.AttributeServiceVersion]; !ok { + // AttributeServiceVersion is not specified in the config. Use the actual + // build version. + telAttrs[semconv.AttributeServiceVersion] = buildInfo.Version + } var pe http.Handler - if configtelemetry.UseOpenTelemetryForInternalMetrics { - otelHandler, err := tel.initOpenTelemetry() - if err != nil { - return err - } - pe = otelHandler + var err error + if tel.registry.IsEnabled(useOtelForInternalMetricsfeatureGateID) { + pe, err = tel.initOpenTelemetry() } else { - ocHandler, err := tel.initOpenCensus(col, instanceID) - if err != nil { - return err - } - pe = ocHandler + pe, err = tel.initOpenCensus(cfg, telAttrs) + } + if err != nil { + return err } logger.Info( "Serving Prometheus metrics", - zap.String(zapKeyTelemetryAddress, metricsAddr), - zap.String(zapKeyTelemetryLevel, level.String()), - zap.String(semconv.AttributeServiceInstanceID, instanceID), - zap.String(semconv.AttributeServiceVersion, version.Version), + zap.String(zapKeyTelemetryAddress, cfg.Metrics.Address), + zap.String(zapKeyTelemetryLevel, cfg.Metrics.Level.String()), ) mux := http.NewServeMux() mux.Handle("/metrics", pe) tel.server = &http.Server{ - Addr: metricsAddr, + Addr: cfg.Metrics.Address, Handler: mux, } go func() { - serveErr := tel.server.ListenAndServe() - if serveErr != nil && serveErr != http.ErrServerClosed { - col.asyncErrorChannel <- serveErr + if serveErr := tel.server.ListenAndServe(); serveErr != nil && !errors.Is(serveErr, http.ErrServerClosed) { + asyncErrorChannel <- serveErr } }() return nil } -func (tel *colTelemetry) initOpenCensus(col *Collector, instanceID string) (http.Handler, error) { - processMetricsViews, err := telemetry2.NewProcessMetricsViews(getBallastSize(col.service)) - if err != nil { - return nil, err - } +func (tel *telemetryInitializer) initOpenCensus(cfg ConfigServiceTelemetry, telAttrs map[string]string) (http.Handler, error) { + tel.ocRegistry = ocmetric.NewRegistry() + metricproducer.GlobalManager().AddProducer(tel.ocRegistry) var views []*view.View - obsMetrics := obsreportconfig.Configure(col.service.config.Telemetry.Metrics.Level) + obsMetrics := obsreportconfig.Configure(cfg.Metrics.Level) views = append(views, batchprocessor.MetricViews()...) views = append(views, obsMetrics.Views...) - views = append(views, processMetricsViews.Views()...) tel.views = views - if err = view.Register(views...); err != nil { + if err := view.Register(views...); err != nil { return nil, err } - processMetricsViews.StartCollection() - // Until we can use a generic metrics exporter, default to Prometheus. opts := prometheus.Options{ Namespace: "otelcol", @@ -164,10 +178,8 @@ func (tel *colTelemetry) initOpenCensus(col *Collector, instanceID string) (http opts.ConstLabels = make(map[string]string) - opts.ConstLabels[sanitizePrometheusKey(semconv.AttributeServiceInstanceID)] = instanceID - - if AddCollectorVersionTag { - opts.ConstLabels[sanitizePrometheusKey(semconv.AttributeServiceVersion)] = version.Version + for k, v := range telAttrs { + opts.ConstLabels[sanitizePrometheusKey(k)] = v } pe, err := prometheus.NewExporter(opts) @@ -179,7 +191,9 @@ func (tel *colTelemetry) initOpenCensus(col *Collector, instanceID string) (http return pe, nil } -func (tel *colTelemetry) initOpenTelemetry() (http.Handler, error) { +func (tel *telemetryInitializer) initOpenTelemetry() (http.Handler, error) { + // Initialize the ocRegistry, still used by the process metrics. + tel.ocRegistry = ocmetric.NewRegistry() config := otelprometheus.Config{} c := controller.New( processor.NewFactory( @@ -196,11 +210,13 @@ func (tel *colTelemetry) initOpenTelemetry() (http.Handler, error) { return nil, err } - global.SetMeterProvider(pe.MeterProvider()) + tel.mp = pe.MeterProvider() return pe, err } -func (tel *colTelemetry) shutdown() error { +func (tel *telemetryInitializer) shutdown() error { + metricproducer.GlobalManager().DeleteProducer(tel.ocRegistry) + view.Unregister(tel.views...) if tel.server != nil { diff --git a/internal/otel_collector/config/service.go b/internal/otel_collector/service/telemetry/config.go similarity index 65% rename from internal/otel_collector/config/service.go rename to internal/otel_collector/service/telemetry/config.go index d53fcf7b14d..5a2f9a7ed92 100644 --- a/internal/otel_collector/config/service.go +++ b/internal/otel_collector/service/telemetry/config.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package config // import "go.opentelemetry.io/collector/config" +package telemetry // import "go.opentelemetry.io/collector/service/telemetry" import ( "go.uber.org/zap/zapcore" @@ -20,28 +20,22 @@ import ( "go.opentelemetry.io/collector/config/configtelemetry" ) -// Service defines the configurable components of the service. -type Service struct { - // Telemetry is the configuration for collector's own telemetry. - Telemetry ServiceTelemetry `mapstructure:"telemetry"` +// Config defines the configurable settings for service telemetry. +type Config struct { + Logs LogsConfig `mapstructure:"logs"` + Metrics MetricsConfig `mapstructure:"metrics"` - // Extensions are the ordered list of extensions configured for the service. - Extensions []ComponentID `mapstructure:"extensions"` - - // Pipelines are the set of data pipelines configured for the service. - Pipelines Pipelines `mapstructure:"pipelines"` -} - -// ServiceTelemetry defines the configurable settings for service telemetry. -type ServiceTelemetry struct { - Logs ServiceTelemetryLogs `mapstructure:"logs"` - Metrics ServiceTelemetryMetrics `mapstructure:"metrics"` + // Resource specifies user-defined attributes to include with all emitted telemetry. + // Note that some attributes are added automatically (e.g. service.version) even + // if they are not specified here. In order to suppress such attributes the + // attribute must be specified in this map with null YAML value (nil string pointer). + Resource map[string]*string `mapstructure:"resource"` } -// ServiceTelemetryLogs defines the configurable settings for service telemetry logs. +// LogsConfig defines the configurable settings for service telemetry logs. // This MUST be compatible with zap.Config. Cannot use directly zap.Config because // the collector uses mapstructure and not yaml tags. -type ServiceTelemetryLogs struct { +type LogsConfig struct { // Level is the minimum enabled logging level. // (default = "INFO") Level zapcore.Level `mapstructure:"level"` @@ -96,9 +90,9 @@ type ServiceTelemetryLogs struct { InitialFields map[string]interface{} `mapstructure:"initial_fields"` } -// ServiceTelemetryMetrics exposes the common Telemetry configuration for one component. +// MetricsConfig exposes the common Telemetry configuration for one component. // Experimental: *NOTE* this structure is subject to change or removal in the future. -type ServiceTelemetryMetrics struct { +type MetricsConfig struct { // Level is the level of telemetry metrics, the possible values are: // - "none" indicates that no telemetry data should be collected; // - "basic" is the recommended and covers the basics of the service telemetry. @@ -109,29 +103,3 @@ type ServiceTelemetryMetrics struct { // Address is the [address]:port that metrics exposition should be bound to. Address string `mapstructure:"address"` } - -// DataType is a special Type that represents the data types supported by the collector. We currently support -// collecting metrics, traces and logs, this can expand in the future. -type DataType = Type - -// Currently supported data types. Add new data types here when new types are supported in the future. -const ( - // TracesDataType is the data type tag for traces. - TracesDataType DataType = "traces" - - // MetricsDataType is the data type tag for metrics. - MetricsDataType DataType = "metrics" - - // LogsDataType is the data type tag for logs. - LogsDataType DataType = "logs" -) - -// Pipeline defines a single pipeline. -type Pipeline struct { - Receivers []ComponentID `mapstructure:"receivers"` - Processors []ComponentID `mapstructure:"processors"` - Exporters []ComponentID `mapstructure:"exporters"` -} - -// Pipelines is a map of names to Pipelines. -type Pipelines map[ComponentID]*Pipeline diff --git a/internal/otel_collector/service/testdata/otelcol-config.yaml b/internal/otel_collector/service/testdata/otelcol-config.yaml deleted file mode 100644 index 1ad880dfc05..00000000000 --- a/internal/otel_collector/service/testdata/otelcol-config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -receivers: - otlp: - protocols: - grpc: - -exporters: - otlp: - endpoint: "locahost:4317" - -processors: - batch: - -extensions: - zpages: - -service: - extensions: [zpages] - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [otlp] diff --git a/internal/otel_collector/service/testdata/otelcol-noaddress.yaml b/internal/otel_collector/service/testdata/otelcol-noaddress.yaml new file mode 100644 index 00000000000..c363f848e53 --- /dev/null +++ b/internal/otel_collector/service/testdata/otelcol-noaddress.yaml @@ -0,0 +1,14 @@ +receivers: + nop: + +exporters: + nop: + +service: + telemetry: + metrics: + address: "" + pipelines: + metrics: + receivers: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/testdata/otelcol-nometrics.yaml b/internal/otel_collector/service/testdata/otelcol-nometrics.yaml new file mode 100644 index 00000000000..a35cf1fbbff --- /dev/null +++ b/internal/otel_collector/service/testdata/otelcol-nometrics.yaml @@ -0,0 +1,14 @@ +receivers: + nop: + +exporters: + nop: + +service: + telemetry: + metrics: + level: none + pipelines: + metrics: + receivers: [nop] + exporters: [nop] diff --git a/internal/otel_collector/service/zpages.go b/internal/otel_collector/service/zpages.go index b9cfedeb019..189e7c0bc85 100644 --- a/internal/otel_collector/service/zpages.go +++ b/internal/otel_collector/service/zpages.go @@ -17,39 +17,32 @@ package service // import "go.opentelemetry.io/collector/service" import ( "net/http" "path" - "sort" - - otelzpages "go.opentelemetry.io/contrib/zpages" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/internal/version" + "go.opentelemetry.io/collector/service/featuregate" + "go.opentelemetry.io/collector/service/internal/runtimeinfo" "go.opentelemetry.io/collector/service/internal/zpages" ) const ( - tracezPath = "tracez" servicezPath = "servicez" pipelinezPath = "pipelinez" extensionzPath = "extensionz" - - zPipelineName = "zpipelinename" - zComponentName = "zcomponentname" - zComponentKind = "zcomponentkind" - zExtensionName = "zextensionname" + featurezPath = "featurez" ) -func (srv *service) RegisterZPages(mux *http.ServeMux, pathPrefix string) { - mux.Handle(path.Join(pathPrefix, tracezPath), otelzpages.NewTracezHandler(srv.zPagesSpanProcessor)) - mux.HandleFunc(path.Join(pathPrefix, servicezPath), srv.handleServicezRequest) - mux.HandleFunc(path.Join(pathPrefix, pipelinezPath), srv.handlePipelinezRequest) - mux.HandleFunc(path.Join(pathPrefix, extensionzPath), func(w http.ResponseWriter, r *http.Request) { - handleExtensionzRequest(srv, w, r) - }) +func (host *serviceHost) RegisterZPages(mux *http.ServeMux, pathPrefix string) { + mux.HandleFunc(path.Join(pathPrefix, servicezPath), host.zPagesRequest) + mux.HandleFunc(path.Join(pathPrefix, pipelinezPath), host.pipelines.HandleZPages) + mux.HandleFunc(path.Join(pathPrefix, extensionzPath), host.extensions.HandleZPages) + mux.HandleFunc(path.Join(pathPrefix, featurezPath), handleFeaturezRequest) } -func (srv *service) handleServicezRequest(w http.ResponseWriter, r *http.Request) { +func (host *serviceHost) zPagesRequest(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") - zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "service"}) + zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Service " + host.buildInfo.Command}) + zpages.WriteHTMLPropertiesTable(w, zpages.PropertiesTableData{Name: "Build Info", Properties: getBuildInfoProperties(host.buildInfo)}) + zpages.WriteHTMLPropertiesTable(w, zpages.PropertiesTableData{Name: "Runtime Info", Properties: runtimeinfo.Info()}) zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ Name: "Pipelines", ComponentEndpoint: pipelinezPath, @@ -60,94 +53,38 @@ func (srv *service) handleServicezRequest(w http.ResponseWriter, r *http.Request ComponentEndpoint: extensionzPath, Link: true, }) - zpages.WriteHTMLPropertiesTable(w, zpages.PropertiesTableData{Name: "Build And Runtime", Properties: version.RuntimeVar()}) + zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ + Name: "Features", + ComponentEndpoint: featurezPath, + Link: true, + }) zpages.WriteHTMLPageFooter(w) } -func (srv *service) handlePipelinezRequest(w http.ResponseWriter, r *http.Request) { - qValues := r.URL.Query() - pipelineName := qValues.Get(zPipelineName) - componentName := qValues.Get(zComponentName) - componentKind := qValues.Get(zComponentKind) - +func handleFeaturezRequest(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") - zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Pipelines"}) - zpages.WriteHTMLPipelinesSummaryTable(w, srv.getPipelinesSummaryTableData()) - if pipelineName != "" && componentName != "" && componentKind != "" { - fullName := componentName - if componentKind == "processor" { - fullName = pipelineName + "/" + componentName - } - zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ - Name: componentKind + ": " + fullName, - }) - // TODO: Add config + status info. - } + zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Feature Gates"}) + zpages.WriteHTMLFeaturesTable(w, getFeaturesTableData()) zpages.WriteHTMLPageFooter(w) } -func (srv *service) getPipelinesSummaryTableData() zpages.SummaryPipelinesTableData { - data := zpages.SummaryPipelinesTableData{} - - data.Rows = make([]zpages.SummaryPipelinesTableRowData, 0, len(srv.builtPipelines)) - for c, p := range srv.builtPipelines { - // TODO: Change the template to use ID. - var recvs []string - for _, recvID := range p.Config.Receivers { - recvs = append(recvs, recvID.String()) - } - var procs []string - for _, procID := range p.Config.Processors { - procs = append(procs, procID.String()) - } - var exps []string - for _, expID := range p.Config.Exporters { - exps = append(exps, expID.String()) - } - row := zpages.SummaryPipelinesTableRowData{ - FullName: c.String(), - InputType: string(c.Type()), - MutatesData: p.MutatesData, - Receivers: recvs, - Processors: procs, - Exporters: exps, - } - data.Rows = append(data.Rows, row) +func getFeaturesTableData() zpages.FeatureGateTableData { + data := zpages.FeatureGateTableData{} + for _, g := range featuregate.GetRegistry().List() { + data.Rows = append(data.Rows, zpages.FeatureGateTableRowData{ + ID: g.ID, + Enabled: g.Enabled, + Description: g.Description, + }) } - sort.Slice(data.Rows, func(i, j int) bool { - return data.Rows[i].FullName < data.Rows[j].FullName - }) return data } -func handleExtensionzRequest(host component.Host, w http.ResponseWriter, r *http.Request) { - extensionName := r.URL.Query().Get(zExtensionName) - - w.Header().Set("Content-Type", "text/html; charset=utf-8") - zpages.WriteHTMLPageHeader(w, zpages.HeaderData{Title: "Extensions"}) - zpages.WriteHTMLExtensionsSummaryTable(w, getExtensionsSummaryTableData(host)) - if extensionName != "" { - zpages.WriteHTMLComponentHeader(w, zpages.ComponentHeaderData{ - Name: extensionName, - }) - // TODO: Add config + status info. +func getBuildInfoProperties(buildInfo component.BuildInfo) [][2]string { + return [][2]string{ + {"Command", buildInfo.Command}, + {"Description", buildInfo.Description}, + {"Version", buildInfo.Version}, } - zpages.WriteHTMLPageFooter(w) -} - -func getExtensionsSummaryTableData(host component.Host) zpages.SummaryExtensionsTableData { - data := zpages.SummaryExtensionsTableData{} - - extensions := host.GetExtensions() - data.Rows = make([]zpages.SummaryExtensionsTableRowData, 0, len(extensions)) - for c := range extensions { - row := zpages.SummaryExtensionsTableRowData{FullName: c.String()} - data.Rows = append(data.Rows, row) - } - - sort.Slice(data.Rows, func(i, j int) bool { - return data.Rows[i].FullName < data.Rows[j].FullName - }) - return data } diff --git a/internal/otel_collector/versions.yaml b/internal/otel_collector/versions.yaml index ec009177052..78e60097ebe 100644 --- a/internal/otel_collector/versions.yaml +++ b/internal/otel_collector/versions.yaml @@ -13,12 +13,14 @@ # limitations under the License. module-sets: - collector-base: - version: v0.44.0 + collector-core: + version: v0.56.0 modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/cmd/builder - - go.opentelemetry.io/collector/model + - go.opentelemetry.io/collector/semconv + - go.opentelemetry.io/collector/pdata + excluded-modules: - go.opentelemetry.io/collector/cmd/otelcorecol - go.opentelemetry.io/collector/internal/tools From 26df4b4764a6f8668a8d1a5e97355982b86b55d5 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Mon, 1 Aug 2022 16:52:50 +0800 Subject: [PATCH 2/3] Adjust code to opentelemetry-collector changes Mostly just adjusting to API changes, but there are some functional changes related to Jaeger span events. https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/10273 uncovered an issue where we were recording the "event" tag as a label, when we should have been recording it as the "message" field in some circumstances. --- changelogs/head.asciidoc | 3 + .../receiver/otlpreceiver/mixin.go | 21 +- internal/beater/jaeger/grpc.go | 5 +- internal/beater/jaeger/grpc_test.go | 17 +- internal/beater/otlp/grpc_test.go | 38 +- internal/beater/otlp/http_test.go | 38 +- internal/model/modeldecoder/v2/decoder.go | 55 +- internal/processor/otel/exceptions_test.go | 25 +- internal/processor/otel/logs.go | 29 +- internal/processor/otel/logs_test.go | 39 +- internal/processor/otel/metadata.go | 22 +- internal/processor/otel/metadata_test.go | 106 ++-- internal/processor/otel/metrics.go | 94 +-- internal/processor/otel/metrics_test.go | 244 ++++---- .../span_jaeger_http.approved.json | 2 +- .../transaction_jaeger_full.approved.json | 2 +- internal/processor/otel/timestamps.go | 4 +- internal/processor/otel/traces.go | 153 ++--- internal/processor/otel/traces_test.go | 554 +++++++++--------- testdata/jaeger/batch_0.approved.json | 6 +- testdata/jaeger/batch_1.approved.json | 2 +- 21 files changed, 724 insertions(+), 735 deletions(-) diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 36178dece46..011c44815e4 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -5,12 +5,14 @@ https://github.com/elastic/apm-server/compare/8.5\...main[View commits] [float] ==== Breaking Changes +- `event.action` is no longer recorded for OTLP logs, due to breaking OTLP changes {pull}8765[8765] [float] ==== Deprecations [float] ==== Bug fixes +- Set `message` instead of `labels.event` for Jaeger span events {pull}8765[8765] [float] ==== Intake API Changes @@ -18,3 +20,4 @@ https://github.com/elastic/apm-server/compare/8.5\...main[View commits] [float] ==== Added - Set a default User-Agent field value when making HTTP requests {pull}8758[8758] +- OTLP support updated to opentelemetry-collector v0.56.0 {pull}8765[8765] diff --git a/internal/.otel_collector_mixin/receiver/otlpreceiver/mixin.go b/internal/.otel_collector_mixin/receiver/otlpreceiver/mixin.go index 628a933034a..385d2a7e38b 100644 --- a/internal/.otel_collector_mixin/receiver/otlpreceiver/mixin.go +++ b/internal/.otel_collector_mixin/receiver/otlpreceiver/mixin.go @@ -18,8 +18,6 @@ import ( "context" "net/http" - "go.opentelemetry.io/collector/component/componenterror" - "go.opentelemetry.io/otel/metric" apitrace "go.opentelemetry.io/otel/trace" "go.uber.org/zap" @@ -29,7 +27,9 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlpgrpc" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics" "go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace" @@ -62,21 +62,21 @@ type HTTPHandlers struct { // RegisterGRPCTraceReceiver registers the trace receiver with a gRPC server. func RegisterGRPCTraceReceiver(ctx context.Context, consumer consumer.Traces, serverGRPC *grpc.Server) error { receiver := trace.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterTracesServer(serverGRPC, receiver) + ptraceotlp.RegisterServer(serverGRPC, receiver) return nil } // RegisterGRPCMetricsReceiver registers the metrics receiver with a gRPC server. func RegisterGRPCMetricsReceiver(ctx context.Context, consumer consumer.Metrics, serverGRPC *grpc.Server) error { receiver := metrics.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterMetricsServer(serverGRPC, receiver) + pmetricotlp.RegisterServer(serverGRPC, receiver) return nil } // RegisterGRPCLogsReceiver registers the logs receiver with a gRPC server. func RegisterGRPCLogsReceiver(ctx context.Context, consumer consumer.Logs, serverGRPC *grpc.Server) error { receiver := logs.New(config.NewComponentID("otlp"), consumer, settings) - otlpgrpc.RegisterLogsServer(serverGRPC, receiver) + plogotlp.RegisterServer(serverGRPC, receiver) return nil } @@ -84,9 +84,6 @@ func RegisterGRPCLogsReceiver(ctx context.Context, consumer consumer.Logs, serve func TracesHTTPHandler(ctx context.Context, consumer consumer.Traces) (http.HandlerFunc, error) { receiver := trace.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleTraces(w, r, receiver, pbEncoder) }, nil @@ -94,9 +91,6 @@ func TracesHTTPHandler(ctx context.Context, consumer consumer.Traces) (http.Hand func MetricsHTTPHandler(ctx context.Context, consumer consumer.Metrics) (http.HandlerFunc, error) { receiver := metrics.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleMetrics(w, r, receiver, pbEncoder) }, nil @@ -104,9 +98,6 @@ func MetricsHTTPHandler(ctx context.Context, consumer consumer.Metrics) (http.Ha func LogsHTTPHandler(ctx context.Context, consumer consumer.Logs) (http.HandlerFunc, error) { receiver := logs.New(config.NewComponentID("otlp"), consumer, settings) - if consumer == nil { - return nil, componenterror.ErrNilNextConsumer - } return func(w http.ResponseWriter, r *http.Request) { handleLogs(w, r, receiver, pbEncoder) }, nil diff --git a/internal/beater/jaeger/grpc.go b/internal/beater/jaeger/grpc.go index a61eed9ec98..5147e318d03 100644 --- a/internal/beater/jaeger/grpc.go +++ b/internal/beater/jaeger/grpc.go @@ -108,7 +108,10 @@ func (c *grpcCollector) PostSpans(ctx context.Context, r *api_v2.PostSpansReques func (c *grpcCollector) postSpans(ctx context.Context, batch jaegermodel.Batch) error { spanCount := int64(len(batch.Spans)) gRPCCollectorMonitoringMap.add(request.IDEventReceivedCount, spanCount) - traces := jaegertranslator.ProtoBatchToInternalTraces(batch) + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{&batch}) + if err != nil { + return err + } return c.consumer.ConsumeTraces(ctx, traces) } diff --git a/internal/beater/jaeger/grpc_test.go b/internal/beater/jaeger/grpc_test.go index 054f2fa4684..7349f39c19e 100644 --- a/internal/beater/jaeger/grpc_test.go +++ b/internal/beater/jaeger/grpc_test.go @@ -31,7 +31,8 @@ import ( jaegertranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" @@ -97,17 +98,17 @@ func TestPostSpans(t *testing.T) { } func newPostSpansRequest(t *testing.T) *api_v2.PostSpansRequest { - traces := pdata.NewTraces() + traces := ptrace.NewTraces() resourceSpans := traces.ResourceSpans().AppendEmpty() - spans := resourceSpans.InstrumentationLibrarySpans().AppendEmpty() + spans := resourceSpans.ScopeSpans().AppendEmpty() span0 := spans.Spans().AppendEmpty() - span0.SetTraceID(pdata.NewTraceID([16]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})) - span0.SetSpanID(pdata.NewSpanID([8]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})) + span0.SetTraceID(pcommon.NewTraceID([16]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})) + span0.SetSpanID(pcommon.NewSpanID([8]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})) span1 := spans.Spans().AppendEmpty() - span1.SetTraceID(pdata.NewTraceID([16]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})) - span1.SetSpanID(pdata.NewSpanID([8]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})) + span1.SetTraceID(pcommon.NewTraceID([16]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})) + span1.SetSpanID(pcommon.NewSpanID([8]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})) - batches, err := jaegertranslator.InternalTracesToJaegerProto(traces) + batches, err := jaegertranslator.ProtoFromTraces(traces) require.NoError(t, err) require.Len(t, batches, 1) return &api_v2.PostSpansRequest{Batch: *batches[0]} diff --git a/internal/beater/otlp/grpc_test.go b/internal/beater/otlp/grpc_test.go index 0b755fdec04..cef13e4d339 100644 --- a/internal/beater/otlp/grpc_test.go +++ b/internal/beater/otlp/grpc_test.go @@ -25,8 +25,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/otlpgrpc" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/status" @@ -47,18 +51,17 @@ func TestConsumeTracesGRPC(t *testing.T) { } conn := newGRPCServer(t, batchProcessor) - client := otlpgrpc.NewTracesClient(conn) + client := ptraceotlp.NewClient(conn) // Send a minimal trace to verify that everything is connected properly. // // We intentionally do not check the published event contents; those are // tested in processor/otel. - traces := pdata.NewTraces() - span := traces.ResourceSpans().AppendEmpty().InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty() + traces := ptrace.NewTraces() + span := traces.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty() span.SetName("operation_name") - tracesRequest := otlpgrpc.NewTracesRequest() - tracesRequest.SetTraces(traces) + tracesRequest := ptraceotlp.NewRequestFromTraces(traces) _, err := client.Export(context.Background(), tracesRequest) assert.NoError(t, err) require.Len(t, batches, 1) @@ -94,20 +97,19 @@ func TestConsumeMetricsGRPC(t *testing.T) { } conn := newGRPCServer(t, batchProcessor) - client := otlpgrpc.NewMetricsClient(conn) + client := pmetricotlp.NewClient(conn) // Send a minimal metric to verify that everything is connected properly. // // We intentionally do not check the published event contents; those are // tested in processor/otel. - metrics := pdata.NewMetrics() - metric := metrics.ResourceMetrics().AppendEmpty().InstrumentationLibraryMetrics().AppendEmpty().Metrics().AppendEmpty() + metrics := pmetric.NewMetrics() + metric := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() metric.SetName("metric_type") - metric.SetDataType(pdata.MetricDataTypeSummary) + metric.SetDataType(pmetric.MetricDataTypeSummary) metric.Summary().DataPoints().AppendEmpty() - metricsRequest := otlpgrpc.NewMetricsRequest() - metricsRequest.SetMetrics(metrics) + metricsRequest := pmetricotlp.NewRequestFromMetrics(metrics) _, err := client.Export(context.Background(), metricsRequest) assert.NoError(t, err) @@ -144,18 +146,16 @@ func TestConsumeLogsGRPC(t *testing.T) { } conn := newGRPCServer(t, batchProcessor) - client := otlpgrpc.NewLogsClient(conn) + client := plogotlp.NewClient(conn) // Send a minimal log record to verify that everything is connected properly. // // We intentionally do not check the published event contents; those are // tested in processor/otel. - logs := pdata.NewLogs() - logRecord := logs.ResourceLogs().AppendEmpty().InstrumentationLibraryLogs().AppendEmpty().LogRecords().AppendEmpty() - logRecord.SetName("log_name") + logs := plog.NewLogs() + logs.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() - logsRequest := otlpgrpc.NewLogsRequest() - logsRequest.SetLogs(logs) + logsRequest := plogotlp.NewRequestFromLogs(logs) _, err := client.Export(context.Background(), logsRequest) assert.NoError(t, err) require.Len(t, batches, 1) diff --git a/internal/beater/otlp/http_test.go b/internal/beater/otlp/http_test.go index 06345b881e4..bee07461ef6 100644 --- a/internal/beater/otlp/http_test.go +++ b/internal/beater/otlp/http_test.go @@ -27,8 +27,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/otlpgrpc" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" "github.com/elastic/apm-server/internal/agentcfg" "github.com/elastic/apm-server/internal/beater/api" @@ -54,13 +58,12 @@ func TestConsumeTracesHTTP(t *testing.T) { // // We intentionally do not check the published event contents; those are // tested in processor/otel. - traces := pdata.NewTraces() - span := traces.ResourceSpans().AppendEmpty().InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty() + traces := ptrace.NewTraces() + span := traces.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty() span.SetName("operation_name") - tracesRequest := otlpgrpc.NewTracesRequest() - tracesRequest.SetTraces(traces) - request, err := tracesRequest.Marshal() + tracesRequest := ptraceotlp.NewRequestFromTraces(traces) + request, err := tracesRequest.MarshalProto() assert.NoError(t, err) req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("http://%s/v1/traces", addr), bytes.NewReader(request)) assert.NoError(t, err) @@ -98,15 +101,14 @@ func TestConsumeMetricsHTTP(t *testing.T) { // // We intentionally do not check the published event contents; those are // tested in processor/otel. - metrics := pdata.NewMetrics() - metric := metrics.ResourceMetrics().AppendEmpty().InstrumentationLibraryMetrics().AppendEmpty().Metrics().AppendEmpty() + metrics := pmetric.NewMetrics() + metric := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() metric.SetName("metric_type") - metric.SetDataType(pdata.MetricDataTypeSummary) + metric.SetDataType(pmetric.MetricDataTypeSummary) metric.Summary().DataPoints().AppendEmpty() - metricsRequest := otlpgrpc.NewMetricsRequest() - metricsRequest.SetMetrics(metrics) - request, err := metricsRequest.Marshal() + metricsRequest := pmetricotlp.NewRequestFromMetrics(metrics) + request, err := metricsRequest.MarshalProto() assert.NoError(t, err) req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("http://%s/v1/metrics", addr), bytes.NewReader(request)) assert.NoError(t, err) @@ -146,13 +148,11 @@ func TestConsumeLogsHTTP(t *testing.T) { // // We intentionally do not check the published event contents; those are // tested in processor/otel. - logs := pdata.NewLogs() - logRecord := logs.ResourceLogs().AppendEmpty().InstrumentationLibraryLogs().AppendEmpty().LogRecords().AppendEmpty() - logRecord.SetName("log_name") + logs := plog.NewLogs() + logs.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() - logsRequest := otlpgrpc.NewLogsRequest() - logsRequest.SetLogs(logs) - request, err := logsRequest.Marshal() + logsRequest := plogotlp.NewRequestFromLogs(logs) + request, err := logsRequest.MarshalProto() assert.NoError(t, err) req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("http://%s/v1/logs", addr), bytes.NewReader(request)) assert.NoError(t, err) diff --git a/internal/model/modeldecoder/v2/decoder.go b/internal/model/modeldecoder/v2/decoder.go index 177e1a7a81b..be85177a7ad 100644 --- a/internal/model/modeldecoder/v2/decoder.go +++ b/internal/model/modeldecoder/v2/decoder.go @@ -37,7 +37,8 @@ import ( "github.com/elastic/apm-server/internal/netutil" otel_processor "github.com/elastic/apm-server/internal/processor/otel" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" ) var ( @@ -1284,7 +1285,7 @@ func mapToTransactionModel(from *transaction, event *model.APMEvent) { } func mapOTelAttributesTransaction(from otel, out *model.APMEvent) { - library := pdata.NewInstrumentationLibrary() + scope := pcommon.NewInstrumentationScope() m := otelAttributeMap(&from) if from.SpanKind.IsSet() { out.Span.Kind = from.SpanKind.Val @@ -1297,9 +1298,9 @@ func mapOTelAttributesTransaction(from otel, out *model.APMEvent) { } // TODO: Does this work? Is there a way we can infer the status code, // potentially in the actual attributes map? - spanStatus := pdata.NewSpanStatus() - spanStatus.SetCode(pdata.StatusCodeUnset) - otel_processor.TranslateTransaction(m, spanStatus, library, out) + spanStatus := ptrace.NewSpanStatus() + spanStatus.SetCode(ptrace.StatusCodeUnset) + otel_processor.TranslateTransaction(m, spanStatus, scope, out) if out.Span.Kind == "" { switch out.Transaction.Type { @@ -1323,27 +1324,27 @@ func mapOTelAttributesSpan(from otel, out *model.APMEvent) { if out.NumericLabels == nil { out.NumericLabels = make(model.NumericLabels) } - var spanKind pdata.SpanKind + var spanKind ptrace.SpanKind if from.SpanKind.IsSet() { switch from.SpanKind.Val { - case pdata.SpanKindInternal.String()[len(spanKindStringPrefix):]: - spanKind = pdata.SpanKindInternal - case pdata.SpanKindServer.String()[len(spanKindStringPrefix):]: - spanKind = pdata.SpanKindServer - case pdata.SpanKindClient.String()[len(spanKindStringPrefix):]: - spanKind = pdata.SpanKindClient - case pdata.SpanKindProducer.String()[len(spanKindStringPrefix):]: - spanKind = pdata.SpanKindProducer - case pdata.SpanKindConsumer.String()[len(spanKindStringPrefix):]: - spanKind = pdata.SpanKindConsumer + case ptrace.SpanKindInternal.String()[len(spanKindStringPrefix):]: + spanKind = ptrace.SpanKindInternal + case ptrace.SpanKindServer.String()[len(spanKindStringPrefix):]: + spanKind = ptrace.SpanKindServer + case ptrace.SpanKindClient.String()[len(spanKindStringPrefix):]: + spanKind = ptrace.SpanKindClient + case ptrace.SpanKindProducer.String()[len(spanKindStringPrefix):]: + spanKind = ptrace.SpanKindProducer + case ptrace.SpanKindConsumer.String()[len(spanKindStringPrefix):]: + spanKind = ptrace.SpanKindConsumer default: - spanKind = pdata.SpanKindUnspecified + spanKind = ptrace.SpanKindUnspecified } out.Span.Kind = from.SpanKind.Val } otel_processor.TranslateSpan(spanKind, m, out) - if spanKind == pdata.SpanKindUnspecified { + if spanKind == ptrace.SpanKindUnspecified { switch out.Span.Type { case "db", "external", "storage": out.Span.Kind = "CLIENT" @@ -1384,8 +1385,8 @@ func overwriteUserInMetadataModel(from user, out *model.APMEvent) { } } -func otelAttributeMap(o *otel) pdata.AttributeMap { - m := pdata.NewAttributeMap() +func otelAttributeMap(o *otel) pcommon.Map { + m := pcommon.NewMap() for k, v := range o.Attributes { if attr, ok := otelAttributeValue(k, v); ok { m.Insert(k, attr) @@ -1394,29 +1395,29 @@ func otelAttributeMap(o *otel) pdata.AttributeMap { return m } -func otelAttributeValue(k string, v interface{}) (pdata.AttributeValue, bool) { +func otelAttributeValue(k string, v interface{}) (pcommon.Value, bool) { // According to the spec, these are the allowed primitive types // Additionally, homogeneous arrays (single type) of primitive types are allowed // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes switch v := v.(type) { case string: - return pdata.NewAttributeValueString(v), true + return pcommon.NewValueString(v), true case bool: - return pdata.NewAttributeValueBool(v), true + return pcommon.NewValueBool(v), true case json.Number: // Semantic conventions have specified types, and we rely on this // in processor/otel when mapping to our data model. For example, // `http.status_code` is expected to be an int. if !isOTelDoubleAttribute(k) { if v, err := v.Int64(); err == nil { - return pdata.NewAttributeValueInt(v), true + return pcommon.NewValueInt(v), true } } if v, err := v.Float64(); err == nil { - return pdata.NewAttributeValueDouble(v), true + return pcommon.NewValueDouble(v), true } case []interface{}: - array := pdata.NewAttributeValueArray() + array := pcommon.NewValueSlice() array.SliceVal().EnsureCapacity(len(v)) for i := range v { if elem, ok := otelAttributeValue(k, v[i]); ok { @@ -1425,7 +1426,7 @@ func otelAttributeValue(k string, v interface{}) (pdata.AttributeValue, bool) { } return array, true } - return pdata.AttributeValue{}, false + return pcommon.Value{}, false } // isOTelDoubleAttribute indicates whether k is an OpenTelemetry semantic convention attribute diff --git a/internal/processor/otel/exceptions_test.go b/internal/processor/otel/exceptions_test.go index 3db3b4d6788..8dda3aab9ce 100644 --- a/internal/processor/otel/exceptions_test.go +++ b/internal/processor/otel/exceptions_test.go @@ -40,17 +40,18 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "github.com/elastic/apm-server/internal/model" ) func TestEncodeSpanEventsNonExceptions(t *testing.T) { - nonExceptionEvent := pdata.NewSpanEvent() + nonExceptionEvent := ptrace.NewSpanEvent() nonExceptionEvent.SetName("not_exception") - incompleteExceptionEvent := pdata.NewSpanEvent() + incompleteExceptionEvent := ptrace.NewSpanEvent() incompleteExceptionEvent.SetName("exception") incompleteExceptionEvent.Attributes().InsertString( // At least one of exception.message and exception.type is required. @@ -66,8 +67,8 @@ func TestEncodeSpanEventsNonExceptions(t *testing.T) { func TestEncodeSpanEventsJavaExceptions(t *testing.T) { timestamp := time.Unix(123, 0).UTC() - exceptionEvent1 := pdata.NewSpanEvent() - exceptionEvent1.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + exceptionEvent1 := ptrace.NewSpanEvent() + exceptionEvent1.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exceptionEvent1.SetName("exception") exceptionEvent1.Attributes().InsertString("exception.type", "java.net.ConnectException.OSError") exceptionEvent1.Attributes().InsertString("exception.message", "Division by zero") @@ -82,8 +83,8 @@ Exception in thread "main" java.lang.RuntimeException: Test exception at java.base/java.lang.Thread.run(Unknown Source) `[1:]) - exceptionEvent2 := pdata.NewSpanEvent() - exceptionEvent2.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + exceptionEvent2 := ptrace.NewSpanEvent() + exceptionEvent2.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exceptionEvent2.SetName("exception") exceptionEvent2.Attributes().InsertString("exception.type", "HighLevelException") exceptionEvent2.Attributes().InsertString("exception.message", "MidLevelException: LowLevelException") @@ -282,9 +283,9 @@ Caused by: whatever at the movies`, } - var events []pdata.SpanEvent + var events []ptrace.SpanEvent for _, stacktrace := range stacktraces { - event := pdata.NewSpanEvent() + event := ptrace.NewSpanEvent() event.SetName("exception") event.Attributes().InsertString("exception.type", "ExceptionType") event.Attributes().InsertString("exception.stacktrace", stacktrace) @@ -303,8 +304,8 @@ Caused by: whatever func TestEncodeSpanEventsNonJavaExceptions(t *testing.T) { timestamp := time.Unix(123, 0).UTC() - exceptionEvent := pdata.NewSpanEvent() - exceptionEvent.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + exceptionEvent := ptrace.NewSpanEvent() + exceptionEvent.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) exceptionEvent.SetName("exception") exceptionEvent.Attributes().InsertString("exception.type", "the_type") exceptionEvent.Attributes().InsertString("exception.message", "the_message") diff --git a/internal/processor/otel/logs.go b/internal/processor/otel/logs.go index 32399f9c6a4..b3a39bfc436 100644 --- a/internal/processor/otel/logs.go +++ b/internal/processor/otel/logs.go @@ -38,17 +38,17 @@ import ( "context" "time" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" apmserverlogs "github.com/elastic/apm-server/internal/logs" "github.com/elastic/apm-server/internal/model" "github.com/elastic/elastic-agent-libs/logp" ) -var jsonLogsMarshaler = otlp.NewJSONLogsMarshaler() +var jsonLogsMarshaler = plog.NewJSONMarshaler() -func (c *Consumer) ConsumeLogs(ctx context.Context, logs pdata.Logs) error { +func (c *Consumer) ConsumeLogs(ctx context.Context, logs plog.Logs) error { receiveTimestamp := time.Now() logger := logp.NewLogger(apmserverlogs.Otel) if logger.IsDebug() { @@ -67,7 +67,7 @@ func (c *Consumer) ConsumeLogs(ctx context.Context, logs pdata.Logs) error { return c.Processor.ProcessBatch(ctx, &batch) } -func (c *Consumer) convertResourceLogs(resourceLogs pdata.ResourceLogs, receiveTimestamp time.Time, out *model.Batch) { +func (c *Consumer) convertResourceLogs(resourceLogs plog.ResourceLogs, receiveTimestamp time.Time, out *model.Batch) { var timeDelta time.Duration resource := resourceLogs.Resource() baseEvent := model.APMEvent{Processor: model.LogProcessor} @@ -76,14 +76,14 @@ func (c *Consumer) convertResourceLogs(resourceLogs pdata.ResourceLogs, receiveT if exportTimestamp, ok := exportTimestamp(resource); ok { timeDelta = receiveTimestamp.Sub(exportTimestamp) } - instrumentationLibraryLogs := resourceLogs.InstrumentationLibraryLogs() - for i := 0; i < instrumentationLibraryLogs.Len(); i++ { - c.convertInstrumentationLibraryLogs(instrumentationLibraryLogs.At(i), baseEvent, timeDelta, out) + scopeLogs := resourceLogs.ScopeLogs() + for i := 0; i < scopeLogs.Len(); i++ { + c.convertInstrumentationLibraryLogs(scopeLogs.At(i), baseEvent, timeDelta, out) } } func (c *Consumer) convertInstrumentationLibraryLogs( - in pdata.InstrumentationLibraryLogs, + in plog.ScopeLogs, baseEvent model.APMEvent, timeDelta time.Duration, out *model.Batch, @@ -96,7 +96,7 @@ func (c *Consumer) convertInstrumentationLibraryLogs( } func (c *Consumer) convertLogRecord( - record pdata.LogRecord, + record plog.LogRecord, baseEvent model.APMEvent, timeDelta time.Duration, ) model.APMEvent { @@ -104,11 +104,10 @@ func (c *Consumer) convertLogRecord( initEventLabels(&event) event.Timestamp = record.Timestamp().AsTime().Add(timeDelta) event.Event.Severity = int64(record.SeverityNumber()) - event.Event.Action = record.Name() event.Log.Level = record.SeverityText() - if body := record.Body(); body.Type() != pdata.AttributeValueTypeEmpty { + if body := record.Body(); body.Type() != pcommon.ValueTypeEmpty { event.Message = body.AsString() - if body.Type() == pdata.AttributeValueTypeMap { + if body.Type() == pcommon.ValueTypeMap { setLabels(body.MapVal(), &event) } } @@ -127,8 +126,8 @@ func (c *Consumer) convertLogRecord( return event } -func setLabels(m pdata.AttributeMap, event *model.APMEvent) { - m.Range(func(k string, v pdata.AttributeValue) bool { +func setLabels(m pcommon.Map, event *model.APMEvent) { + m.Range(func(k string, v pcommon.Value) bool { setLabel(k, event, ifaceAttributeValue(v)) return true }) diff --git a/internal/processor/otel/logs_test.go b/internal/processor/otel/logs_test.go index ab4db6d18dd..dce655feddf 100644 --- a/internal/processor/otel/logs_test.go +++ b/internal/processor/otel/logs_test.go @@ -40,8 +40,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "github.com/elastic/apm-server/internal/model" "github.com/elastic/apm-server/internal/processor/otel" @@ -55,7 +56,7 @@ func TestConsumerConsumeLogs(t *testing.T) { } consumer := otel.Consumer{Processor: processor} - logs := pdata.NewLogs() + logs := plog.NewLogs() assert.NoError(t, consumer.ConsumeLogs(context.Background(), logs)) }) @@ -71,8 +72,7 @@ func TestConsumerConsumeLogs(t *testing.T) { }, Message: "a random log message", Event: model.Event{ - Severity: int64(pdata.SeverityNumberINFO), - Action: "doOperation()", + Severity: int64(plog.SeverityNumberINFO), }, Log: model.Log{Level: "Info"}, Span: &model.Span{ID: "0200000000000000"}, @@ -82,11 +82,11 @@ func TestConsumerConsumeLogs(t *testing.T) { } test := func(name string, body interface{}, expectedMessage string) { t.Run(name, func(t *testing.T) { - logs := pdata.NewLogs() + logs := plog.NewLogs() resourceLogs := logs.ResourceLogs().AppendEmpty() logs.ResourceLogs().At(0).Resource().Attributes().InsertString(semconv.AttributeTelemetrySDKLanguage, "go") - instrumentationLogs := resourceLogs.InstrumentationLibraryLogs().AppendEmpty() - newLogRecord(body).CopyTo(instrumentationLogs.LogRecords().AppendEmpty()) + scopeLogs := resourceLogs.ScopeLogs().AppendEmpty() + newLogRecord(body).CopyTo(scopeLogs.LogRecords().AppendEmpty()) var processed model.Batch var processor model.ProcessBatchFunc = func(_ context.Context, batch *model.Batch) error { @@ -114,25 +114,25 @@ func TestConsumerConsumeLogs(t *testing.T) { } func TestConsumerConsumeLogsLabels(t *testing.T) { - logs := pdata.NewLogs() + logs := plog.NewLogs() resourceLogs := logs.ResourceLogs().AppendEmpty() resourceAttrs := logs.ResourceLogs().At(0).Resource().Attributes() resourceAttrs.InsertString(semconv.AttributeTelemetrySDKLanguage, "go") resourceAttrs.InsertString("key0", "zero") - instrumentationLogs := resourceLogs.InstrumentationLibraryLogs().AppendEmpty() + scopeLogs := resourceLogs.ScopeLogs().AppendEmpty() record1 := newLogRecord("whatever") record1.Attributes().InsertString("key1", "one") - record1.CopyTo(instrumentationLogs.LogRecords().AppendEmpty()) + record1.CopyTo(scopeLogs.LogRecords().AppendEmpty()) record2 := newLogRecord("andever") record2.Attributes().InsertDouble("key2", 2) - record2.CopyTo(instrumentationLogs.LogRecords().AppendEmpty()) + record2.CopyTo(scopeLogs.LogRecords().AppendEmpty()) record3 := newLogRecord("amen") record3.Attributes().InsertString("key3", "three") record3.Attributes().InsertInt("key4", 4) - record3.CopyTo(instrumentationLogs.LogRecords().AppendEmpty()) + record3.CopyTo(scopeLogs.LogRecords().AppendEmpty()) var processed model.Batch var processor model.ProcessBatchFunc = func(_ context.Context, batch *model.Batch) error { @@ -156,14 +156,13 @@ func TestConsumerConsumeLogsLabels(t *testing.T) { assert.Equal(t, model.NumericLabels{"key4": {Value: 4}}, processed[2].NumericLabels) } -func newLogRecord(body interface{}) pdata.LogRecord { - otelLogRecord := pdata.NewLogRecord() - otelLogRecord.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelLogRecord.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelLogRecord.SetName("doOperation()") - otelLogRecord.SetSeverityNumber(pdata.SeverityNumberINFO) +func newLogRecord(body interface{}) plog.LogRecord { + otelLogRecord := plog.NewLogRecord() + otelLogRecord.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelLogRecord.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelLogRecord.SetSeverityNumber(plog.SeverityNumberINFO) otelLogRecord.SetSeverityText("Info") - otelLogRecord.SetTimestamp(pdata.NewTimestampFromTime(time.Now())) + otelLogRecord.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) switch b := body.(type) { case string: diff --git a/internal/processor/otel/metadata.go b/internal/processor/otel/metadata.go index a76ecb654f0..143e6a76e31 100644 --- a/internal/processor/otel/metadata.go +++ b/internal/processor/otel/metadata.go @@ -24,8 +24,8 @@ import ( "strconv" "strings" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + "go.opentelemetry.io/collector/pdata/pcommon" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "github.com/elastic/apm-server/internal/model" ) @@ -38,9 +38,9 @@ var ( serviceNameInvalidRegexp = regexp.MustCompile("[^a-zA-Z0-9 _-]") ) -func translateResourceMetadata(resource pdata.Resource, out *model.APMEvent) { +func translateResourceMetadata(resource pcommon.Resource, out *model.APMEvent) { var exporterVersion string - resource.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + resource.Attributes().Range(func(k string, v pcommon.Value) bool { switch k { // service.* case semconv.AttributeServiceName: @@ -201,23 +201,23 @@ func cleanServiceName(name string) string { return serviceNameInvalidRegexp.ReplaceAllString(truncate(name), "_") } -func ifaceAttributeValue(v pdata.AttributeValue) interface{} { +func ifaceAttributeValue(v pcommon.Value) interface{} { switch v.Type() { - case pdata.AttributeValueTypeString: + case pcommon.ValueTypeString: return truncate(v.StringVal()) - case pdata.AttributeValueTypeBool: + case pcommon.ValueTypeBool: return strconv.FormatBool(v.BoolVal()) - case pdata.AttributeValueTypeInt: + case pcommon.ValueTypeInt: return float64(v.IntVal()) - case pdata.AttributeValueTypeDouble: + case pcommon.ValueTypeDouble: return v.DoubleVal() - case pdata.AttributeValueTypeArray: + case pcommon.ValueTypeSlice: return ifaceAttributeValueSlice(v.SliceVal()) } return nil } -func ifaceAttributeValueSlice(slice pdata.AttributeValueSlice) []interface{} { +func ifaceAttributeValueSlice(slice pcommon.Slice) []interface{} { values := make([]interface{}, slice.Len()) for i := range values { values[i] = ifaceAttributeValue(slice.At(i)) diff --git a/internal/processor/otel/metadata_test.go b/internal/processor/otel/metadata_test.go index 977f5f01f10..8503ab43f07 100644 --- a/internal/processor/otel/metadata_test.go +++ b/internal/processor/otel/metadata_test.go @@ -22,7 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" "github.com/elastic/apm-server/internal/model" ) @@ -35,7 +35,7 @@ func TestResourceConventions(t *testing.T) { } for name, test := range map[string]struct { - attrs map[string]pdata.AttributeValue + attrs map[string]interface{} expected model.APMEvent }{ "empty": { @@ -43,10 +43,10 @@ func TestResourceConventions(t *testing.T) { expected: model.APMEvent{Agent: defaultAgent, Service: defaultService}, }, "service": { - attrs: map[string]pdata.AttributeValue{ - "service.name": pdata.NewAttributeValueString("service_name"), - "service.version": pdata.NewAttributeValueString("service_version"), - "deployment.environment": pdata.NewAttributeValueString("service_environment"), + attrs: map[string]interface{}{ + "service.name": "service_name", + "service.version": "service_version", + "deployment.environment": "service_environment", }, expected: model.APMEvent{ Agent: model.Agent{Name: "otlp", Version: "unknown"}, @@ -59,10 +59,10 @@ func TestResourceConventions(t *testing.T) { }, }, "agent": { - attrs: map[string]pdata.AttributeValue{ - "telemetry.sdk.name": pdata.NewAttributeValueString("sdk_name"), - "telemetry.sdk.version": pdata.NewAttributeValueString("sdk_version"), - "telemetry.sdk.language": pdata.NewAttributeValueString("language_name"), + attrs: map[string]interface{}{ + "telemetry.sdk.name": "sdk_name", + "telemetry.sdk.version": "sdk_version", + "telemetry.sdk.language": "language_name", }, expected: model.APMEvent{ Agent: model.Agent{Name: "sdk_name/language_name", Version: "sdk_version"}, @@ -73,9 +73,9 @@ func TestResourceConventions(t *testing.T) { }, }, "runtime": { - attrs: map[string]pdata.AttributeValue{ - "process.runtime.name": pdata.NewAttributeValueString("runtime_name"), - "process.runtime.version": pdata.NewAttributeValueString("runtime_version"), + attrs: map[string]interface{}{ + "process.runtime.name": "runtime_name", + "process.runtime.version": "runtime_version", }, expected: model.APMEvent{ Agent: model.Agent{Name: "otlp", Version: "unknown"}, @@ -90,12 +90,12 @@ func TestResourceConventions(t *testing.T) { }, }, "cloud": { - attrs: map[string]pdata.AttributeValue{ - "cloud.provider": pdata.NewAttributeValueString("provider_name"), - "cloud.region": pdata.NewAttributeValueString("region_name"), - "cloud.account.id": pdata.NewAttributeValueString("account_id"), - "cloud.availability_zone": pdata.NewAttributeValueString("availability_zone"), - "cloud.platform": pdata.NewAttributeValueString("platform_name"), + attrs: map[string]interface{}{ + "cloud.provider": "provider_name", + "cloud.region": "region_name", + "cloud.account.id": "account_id", + "cloud.availability_zone": "availability_zone", + "cloud.platform": "platform_name", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -110,12 +110,12 @@ func TestResourceConventions(t *testing.T) { }, }, "container": { - attrs: map[string]pdata.AttributeValue{ - "container.name": pdata.NewAttributeValueString("container_name"), - "container.id": pdata.NewAttributeValueString("container_id"), - "container.image.name": pdata.NewAttributeValueString("container_image_name"), - "container.image.tag": pdata.NewAttributeValueString("container_image_tag"), - "container.runtime": pdata.NewAttributeValueString("container_runtime"), + attrs: map[string]interface{}{ + "container.name": "container_name", + "container.id": "container_id", + "container.image.name": "container_image_name", + "container.image.tag": "container_image_tag", + "container.runtime": "container_runtime", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -130,11 +130,11 @@ func TestResourceConventions(t *testing.T) { }, }, "kubernetes": { - attrs: map[string]pdata.AttributeValue{ - "k8s.namespace.name": pdata.NewAttributeValueString("kubernetes_namespace"), - "k8s.node.name": pdata.NewAttributeValueString("kubernetes_node_name"), - "k8s.pod.name": pdata.NewAttributeValueString("kubernetes_pod_name"), - "k8s.pod.uid": pdata.NewAttributeValueString("kubernetes_pod_uid"), + attrs: map[string]interface{}{ + "k8s.namespace.name": "kubernetes_namespace", + "k8s.node.name": "kubernetes_node_name", + "k8s.pod.name": "kubernetes_pod_name", + "k8s.pod.uid": "kubernetes_pod_uid", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -148,11 +148,11 @@ func TestResourceConventions(t *testing.T) { }, }, "host": { - attrs: map[string]pdata.AttributeValue{ - "host.name": pdata.NewAttributeValueString("host_name"), - "host.id": pdata.NewAttributeValueString("host_id"), - "host.type": pdata.NewAttributeValueString("host_type"), - "host.arch": pdata.NewAttributeValueString("host_arch"), + attrs: map[string]interface{}{ + "host.name": "host_name", + "host.id": "host_id", + "host.type": "host_type", + "host.arch": "host_arch", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -166,10 +166,10 @@ func TestResourceConventions(t *testing.T) { }, }, "process": { - attrs: map[string]pdata.AttributeValue{ - "process.pid": pdata.NewAttributeValueInt(123), - "process.command_line": pdata.NewAttributeValueString("command_line"), - "process.executable.path": pdata.NewAttributeValueString("executable_path"), + attrs: map[string]interface{}{ + "process.pid": 123, + "process.command_line": "command_line", + "process.executable.path": "executable_path", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -182,9 +182,9 @@ func TestResourceConventions(t *testing.T) { }, }, "os": { - attrs: map[string]pdata.AttributeValue{ - "os.type": pdata.NewAttributeValueString("DARWIN"), - "os.description": pdata.NewAttributeValueString("Mac OS Mojave"), + attrs: map[string]interface{}{ + "os.type": "DARWIN", + "os.description": "Mac OS Mojave", }, expected: model.APMEvent{ Agent: defaultAgent, @@ -207,17 +207,9 @@ func TestResourceConventions(t *testing.T) { } func TestResourceLabels(t *testing.T) { - stringArray := pdata.NewAttributeValueArray() - stringArray.SliceVal().AppendEmpty().SetStringVal("abc") - stringArray.SliceVal().AppendEmpty().SetStringVal("def") - - intArray := pdata.NewAttributeValueArray() - intArray.SliceVal().AppendEmpty().SetIntVal(123) - intArray.SliceVal().AppendEmpty().SetIntVal(456) - - metadata := transformResourceMetadata(t, map[string]pdata.AttributeValue{ - "string_array": stringArray, - "int_array": intArray, + metadata := transformResourceMetadata(t, map[string]interface{}{ + "string_array": []interface{}{"abc", "def"}, + "int_array": []interface{}{123, 456}, }) assert.Equal(t, model.Labels{ "string_array": {Values: []string{"abc", "def"}}, @@ -227,12 +219,12 @@ func TestResourceLabels(t *testing.T) { }, metadata.NumericLabels) } -func transformResourceMetadata(t *testing.T, resourceAttrs map[string]pdata.AttributeValue) model.APMEvent { +func transformResourceMetadata(t *testing.T, resourceAttrs map[string]interface{}) model.APMEvent { traces, spans := newTracesSpans() - pdata.NewAttributeMapFromMap(resourceAttrs).CopyTo(traces.ResourceSpans().At(0).Resource().Attributes()) + pcommon.NewMapFromRaw(resourceAttrs).CopyTo(traces.ResourceSpans().At(0).Resource().Attributes()) otelSpan := spans.Spans().AppendEmpty() - otelSpan.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan.SetSpanID(pcommon.NewSpanID([8]byte{2})) events := transformTraces(t, traces) events[0].Transaction = nil events[0].Trace = model.Trace{} diff --git a/internal/processor/otel/metrics.go b/internal/processor/otel/metrics.go index 37b75861529..5e752edc4c6 100644 --- a/internal/processor/otel/metrics.go +++ b/internal/processor/otel/metrics.go @@ -43,7 +43,8 @@ import ( "sync/atomic" "time" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" "github.com/elastic/apm-server/internal/logs" "github.com/elastic/apm-server/internal/model" @@ -52,7 +53,7 @@ import ( // ConsumeMetrics consumes OpenTelemetry metrics data, converting into // the Elastic APM metrics model and sending to the reporter. -func (c *Consumer) ConsumeMetrics(ctx context.Context, metrics pdata.Metrics) error { +func (c *Consumer) ConsumeMetrics(ctx context.Context, metrics pmetric.Metrics) error { receiveTimestamp := time.Now() logger := logp.NewLogger(logs.Otel) if logger.IsDebug() { @@ -67,7 +68,7 @@ func (c *Consumer) ConsumeMetrics(ctx context.Context, metrics pdata.Metrics) er return c.Processor.ProcessBatch(ctx, batch) } -func (c *Consumer) convertMetrics(metrics pdata.Metrics, receiveTimestamp time.Time) *model.Batch { +func (c *Consumer) convertMetrics(metrics pmetric.Metrics, receiveTimestamp time.Time) *model.Batch { batch := model.Batch{} resourceMetrics := metrics.ResourceMetrics() for i := 0; i < resourceMetrics.Len(); i++ { @@ -76,7 +77,7 @@ func (c *Consumer) convertMetrics(metrics pdata.Metrics, receiveTimestamp time.T return &batch } -func (c *Consumer) convertResourceMetrics(resourceMetrics pdata.ResourceMetrics, receiveTimestamp time.Time, out *model.Batch) { +func (c *Consumer) convertResourceMetrics(resourceMetrics pmetric.ResourceMetrics, receiveTimestamp time.Time, out *model.Batch) { var baseEvent model.APMEvent var timeDelta time.Duration resource := resourceMetrics.Resource() @@ -84,9 +85,9 @@ func (c *Consumer) convertResourceMetrics(resourceMetrics pdata.ResourceMetrics, if exportTimestamp, ok := exportTimestamp(resource); ok { timeDelta = receiveTimestamp.Sub(exportTimestamp) } - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics() - for i := 0; i < instrumentationLibraryMetrics.Len(); i++ { - c.convertInstrumentationLibraryMetrics(instrumentationLibraryMetrics.At(i), baseEvent, timeDelta, out) + scopeMetrics := resourceMetrics.ScopeMetrics() + for i := 0; i < scopeMetrics.Len(); i++ { + c.convertScopeMetrics(scopeMetrics.At(i), baseEvent, timeDelta, out) } } @@ -126,10 +127,10 @@ type jvmMemoryKey struct { } // accumulate processes m, translating to and accumulating equivalent Elastic APM metrics in b. -func (b *apmMetricsBuilder) accumulate(m pdata.Metric) { +func (b *apmMetricsBuilder) accumulate(m pmetric.Metric) { switch m.DataType() { - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: dpsCounter := m.Sum().DataPoints() for i := 0; i < dpsCounter.Len(); i++ { dp := dpsCounter.At(i) @@ -155,7 +156,7 @@ func (b *apmMetricsBuilder) accumulate(m pdata.Metric) { } } } - case pdata.MetricDataTypeGauge: + case pmetric.MetricDataTypeGauge: // Gauge metrics accumulation dpsGauge := m.Gauge().DataPoints() for i := 0; i < dpsGauge.Len(); i++ { @@ -177,7 +178,7 @@ func (b *apmMetricsBuilder) accumulate(m pdata.Metric) { } case "runtime.jvm.memory.area": var key jvmMemoryKey - dp.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + dp.Attributes().Range(func(k string, v pcommon.Value) bool { switch k { case "area": key.area = v.AsString() @@ -203,7 +204,7 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { // Direct translation of system.memory.usage (state = free) if b.freeMemoryBytes.value > 0 { ms.upsertOne( - b.freeMemoryBytes.timestamp, "system.memory.actual.free", pdata.NewAttributeMap(), + b.freeMemoryBytes.timestamp, "system.memory.actual.free", pcommon.NewMap(), model.MetricsetSample{Value: b.freeMemoryBytes.value}, ) } @@ -212,7 +213,7 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { totalMemoryBytes := b.freeMemoryBytes.value + b.usedMemoryBytes.value if totalMemoryBytes > 0 { ms.upsertOne( - b.freeMemoryBytes.timestamp, "system.memory.total", pdata.NewAttributeMap(), + b.freeMemoryBytes.timestamp, "system.memory.total", pcommon.NewMap(), model.MetricsetSample{Value: totalMemoryBytes}, ) } @@ -220,15 +221,15 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { // Averaging of non-idle CPU utilization over all CPU cores if b.nonIdleCPUUtilizationSum.value > 0 && b.cpuCount > 0 { ms.upsertOne( - b.nonIdleCPUUtilizationSum.timestamp, "system.cpu.total.norm.pct", pdata.NewAttributeMap(), + b.nonIdleCPUUtilizationSum.timestamp, "system.cpu.total.norm.pct", pcommon.NewMap(), model.MetricsetSample{Value: b.nonIdleCPUUtilizationSum.value / float64(b.cpuCount)}, ) } // jvm.gc.time // Direct translation of runtime.jvm.gc.time or runtime.jvm.gc.collection for k, v := range b.jvmGCTime { - elasticapmAttributes := pdata.NewAttributeMap() - elasticapmAttributes.Insert("name", pdata.NewAttributeValueString(k)) + elasticapmAttributes := pcommon.NewMap() + elasticapmAttributes.Insert("name", pcommon.NewValueString(k)) ms.upsertOne( v.timestamp, "jvm.gc.time", elasticapmAttributes, model.MetricsetSample{Value: v.value}, @@ -237,8 +238,8 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { // jvm.gc.count // Direct translation of runtime.jvm.gc.count for k, v := range b.jvmGCCount { - elasticapmAttributes := pdata.NewAttributeMap() - elasticapmAttributes.Insert("name", pdata.NewAttributeValueString(k)) + elasticapmAttributes := pcommon.NewMap() + elasticapmAttributes.Insert("name", pcommon.NewValueString(k)) ms.upsertOne( v.timestamp, "jvm.gc.count", elasticapmAttributes, model.MetricsetSample{Value: v.value}, @@ -247,10 +248,10 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { // jvm.memory.. // Direct translation of runtime.jvm.memory.area (area = xxx, type = xxx) for k, v := range b.jvmMemory { - elasticapmAttributes := pdata.NewAttributeMap() + elasticapmAttributes := pcommon.NewMap() var elasticapmMetricName string if k.pool != "" { - elasticapmAttributes.Insert("name", pdata.NewAttributeValueString(k.pool)) + elasticapmAttributes.Insert("name", pcommon.NewValueString(k.pool)) elasticapmMetricName = fmt.Sprintf("jvm.memory.%s.pool.%s", k.area, k.jvmType) } else { elasticapmMetricName = fmt.Sprintf("jvm.memory.%s.%s", k.area, k.jvmType) @@ -262,8 +263,8 @@ func (b *apmMetricsBuilder) emit(ms metricsets) { } } -func (c *Consumer) convertInstrumentationLibraryMetrics( - in pdata.InstrumentationLibraryMetrics, +func (c *Consumer) convertScopeMetrics( + in pmetric.ScopeMetrics, baseEvent model.APMEvent, timeDelta time.Duration, out *model.Batch, @@ -286,7 +287,7 @@ func (c *Consumer) convertInstrumentationLibraryMetrics( event.Metricset = &model.Metricset{Samples: ms.samples} if ms.attributes.Len() > 0 { initEventLabels(&event) - ms.attributes.Range(func(k string, v pdata.AttributeValue) bool { + ms.attributes.Range(func(k string, v pcommon.Value) bool { setLabel(k, &event, ifaceAttributeValue(v)) return true }) @@ -304,11 +305,11 @@ func (c *Consumer) convertInstrumentationLibraryMetrics( } } -func (c *Consumer) addMetric(metric pdata.Metric, ms metricsets) bool { +func (c *Consumer) addMetric(metric pmetric.Metric, ms metricsets) bool { // TODO(axw) support units anyDropped := false switch metric.DataType() { - case pdata.MetricDataTypeGauge: + case pmetric.MetricDataTypeGauge: dps := metric.Gauge().DataPoints() for i := 0; i < dps.Len(); i++ { dp := dps.At(i) @@ -319,7 +320,7 @@ func (c *Consumer) addMetric(metric pdata.Metric, ms metricsets) bool { } } return !anyDropped - case pdata.MetricDataTypeSum: + case pmetric.MetricDataTypeSum: dps := metric.Sum().DataPoints() for i := 0; i < dps.Len(); i++ { dp := dps.At(i) @@ -330,7 +331,7 @@ func (c *Consumer) addMetric(metric pdata.Metric, ms metricsets) bool { } } return !anyDropped - case pdata.MetricDataTypeHistogram: + case pmetric.MetricDataTypeHistogram: dps := metric.Histogram().DataPoints() for i := 0; i < dps.Len(); i++ { dp := dps.At(i) @@ -340,7 +341,7 @@ func (c *Consumer) addMetric(metric pdata.Metric, ms metricsets) bool { anyDropped = true } } - case pdata.MetricDataTypeSummary: + case pmetric.MetricDataTypeSummary: dps := metric.Summary().DataPoints() for i := 0; i < dps.Len(); i++ { dp := dps.At(i) @@ -354,12 +355,12 @@ func (c *Consumer) addMetric(metric pdata.Metric, ms metricsets) bool { return !anyDropped } -func numberSample(dp pdata.NumberDataPoint, metricType model.MetricType) (model.MetricsetSample, bool) { +func numberSample(dp pmetric.NumberDataPoint, metricType model.MetricType) (model.MetricsetSample, bool) { var value float64 - switch dp.Type() { - case pdata.MetricValueTypeInt: + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeInt: value = float64(dp.IntVal()) - case pdata.MetricValueTypeDouble: + case pmetric.NumberDataPointValueTypeDouble: value = dp.DoubleVal() if math.IsNaN(value) || math.IsInf(value, 0) { return model.MetricsetSample{}, false @@ -373,7 +374,7 @@ func numberSample(dp pdata.NumberDataPoint, metricType model.MetricType) (model. }, true } -func summarySample(dp pdata.SummaryDataPoint) model.MetricsetSample { +func summarySample(dp pmetric.SummaryDataPoint) model.MetricsetSample { return model.MetricsetSample{ Type: model.MetricTypeSummary, SummaryMetric: model.SummaryMetric{ @@ -383,7 +384,7 @@ func summarySample(dp pdata.SummaryDataPoint) model.MetricsetSample { } } -func histogramSample(bucketCounts []uint64, explicitBounds []float64) (model.MetricsetSample, bool) { +func histogramSample(bucketCounts pcommon.ImmutableUInt64Slice, explicitBounds pcommon.ImmutableFloat64Slice) (model.MetricsetSample, bool) { // (From opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto) // // This defines size(explicit_bounds) + 1 (= N) buckets. The boundaries for @@ -395,7 +396,7 @@ func histogramSample(bucketCounts []uint64, explicitBounds []float64) (model.Met // // The values in the explicit_bounds array must be strictly increasing. // - if len(bucketCounts) != len(explicitBounds)+1 || len(explicitBounds) == 0 { + if bucketCounts.Len() != explicitBounds.Len()+1 || explicitBounds.Len() == 0 { return model.MetricsetSample{}, false } @@ -409,9 +410,10 @@ func histogramSample(bucketCounts []uint64, explicitBounds []float64) (model.Met // bucket is assumed to be 0 if the upper bound of that bucket is greater than 0. In that // case, the usual linear interpolation is applied within that bucket. Otherwise, the upper // bound of the lowest bucket is returned for quantiles located in the lowest bucket." - values := make([]float64, 0, len(bucketCounts)) - counts := make([]int64, 0, len(bucketCounts)) - for i, count := range bucketCounts { + values := make([]float64, 0, bucketCounts.Len()) + counts := make([]int64, 0, bucketCounts.Len()) + for i := 0; i < bucketCounts.Len(); i++ { + count := bucketCounts.At(i) if count == 0 { continue } @@ -420,19 +422,19 @@ func histogramSample(bucketCounts []uint64, explicitBounds []float64) (model.Met switch i { // (-infinity, explicit_bounds[i]] case 0: - value = explicitBounds[i] + value = explicitBounds.At(i) if value > 0 { value /= 2 } // (explicit_bounds[i], +infinity) - case len(bucketCounts) - 1: - value = explicitBounds[i-1] + case bucketCounts.Len() - 1: + value = explicitBounds.At(i - 1) // [explicit_bounds[i-1], explicit_bounds[i]) default: // Use the midpoint between the boundaries. - value = explicitBounds[i-1] + (explicitBounds[i]-explicitBounds[i-1])/2.0 + value = explicitBounds.At(i-1) + (explicitBounds.At(i)-explicitBounds.At(i-1))/2.0 } counts = append(counts, int64(count)) @@ -455,22 +457,22 @@ type metricsetKey struct { } type metricset struct { - attributes pdata.AttributeMap + attributes pcommon.Map samples map[string]model.MetricsetSample } // upsert searches for an existing metricset with the given timestamp and labels, // and appends the sample to it. If there is no such existing metricset, a new one // is created. -func (ms metricsets) upsert(timestamp time.Time, name string, attributes pdata.AttributeMap, sample model.MetricsetSample) { +func (ms metricsets) upsert(timestamp time.Time, name string, attributes pcommon.Map, sample model.MetricsetSample) { // We always record metrics as they are given. We also copy some // well-known OpenTelemetry metrics to their Elastic APM equivalents. ms.upsertOne(timestamp, name, attributes, sample) } -func (ms metricsets) upsertOne(timestamp time.Time, name string, attributes pdata.AttributeMap, sample model.MetricsetSample) { +func (ms metricsets) upsertOne(timestamp time.Time, name string, attributes pcommon.Map, sample model.MetricsetSample) { var signatureBuilder strings.Builder - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pcommon.Value) bool { signatureBuilder.WriteString(k) signatureBuilder.WriteString(v.AsString()) return true diff --git a/internal/processor/otel/metrics_test.go b/internal/processor/otel/metrics_test.go index c865807d4c3..2862d2b51e4 100644 --- a/internal/processor/otel/metrics_test.go +++ b/internal/processor/otel/metrics_test.go @@ -42,7 +42,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" "github.com/elastic/apm-server/internal/model" "github.com/elastic/apm-server/internal/processor/otel" @@ -50,11 +51,11 @@ import ( ) func TestConsumeMetrics(t *testing.T) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metricSlice := instrumentationLibraryMetrics.Metrics() - appendMetric := func(name string, dataType pdata.MetricDataType) pdata.Metric { + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeMetrics.Metrics() + appendMetric := func(name string, dataType pmetric.MetricDataType) pmetric.Metric { metric := metricSlice.AppendEmpty() metric.SetName(name) metric.SetDataType(dataType) @@ -66,69 +67,70 @@ func TestConsumeMetrics(t *testing.T) { var expectDropped int64 - metric := appendMetric("gauge_metric", pdata.MetricDataTypeGauge) + metric := appendMetric("gauge_metric", pmetric.MetricDataTypeGauge) gauge := metric.Gauge() gaugeDP0 := gauge.DataPoints().AppendEmpty() - gaugeDP0.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) + gaugeDP0.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) gaugeDP0.SetIntVal(1) gaugeDP1 := gauge.DataPoints().AppendEmpty() - gaugeDP1.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + gaugeDP1.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) gaugeDP1.SetDoubleVal(2.3) gaugeDP1.Attributes().InsertString("k", "v") gaugeDP2 := gauge.DataPoints().AppendEmpty() - gaugeDP2.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + gaugeDP2.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) gaugeDP2.SetIntVal(4) gaugeDP3 := gauge.DataPoints().AppendEmpty() - gaugeDP3.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + gaugeDP3.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) gaugeDP3.SetDoubleVal(5.6) gaugeDP3.Attributes().InsertString("k", "v2") - metric = appendMetric("sum_metric", pdata.MetricDataTypeSum) + metric = appendMetric("sum_metric", pmetric.MetricDataTypeSum) sum := metric.Sum() sumDP0 := sum.DataPoints().AppendEmpty() - sumDP0.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) + sumDP0.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) sumDP0.SetIntVal(7) sumDP1 := sum.DataPoints().AppendEmpty() - sumDP1.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + sumDP1.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) sumDP1.SetDoubleVal(8.9) sumDP1.Attributes().InsertString("k", "v") sumDP2 := sum.DataPoints().AppendEmpty() - sumDP2.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + sumDP2.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) sumDP2.SetIntVal(10) sumDP2.Attributes().InsertString("k2", "v") sumDP3 := sum.DataPoints().AppendEmpty() - sumDP3.SetTimestamp(pdata.NewTimestampFromTime(timestamp1)) + sumDP3.SetTimestamp(pcommon.NewTimestampFromTime(timestamp1)) sumDP3.SetDoubleVal(11.12) sumDP3.Attributes().InsertString("k", "v2") - metric = appendMetric("histogram_metric", pdata.MetricDataTypeHistogram) + metric = appendMetric("histogram_metric", pmetric.MetricDataTypeHistogram) histogram := metric.Histogram() histogramDP := histogram.DataPoints().AppendEmpty() - histogramDP.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) - histogramDP.SetBucketCounts([]uint64{1, 1, 2, 3}) - histogramDP.SetExplicitBounds([]float64{-1.0, 2.0, 3.5}) + histogramDP.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) + histogramDP.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 1, 2, 3})) + histogramDP.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{-1.0, 2.0, 3.5})) - metric = appendMetric("summary_metric", pdata.MetricDataTypeSummary) + metric = appendMetric("summary_metric", pmetric.MetricDataTypeSummary) summaryDP := metric.Summary().DataPoints().AppendEmpty() - summaryDP.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) + summaryDP.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) summaryDP.SetCount(10) summaryDP.SetSum(123.456) summaryDP.QuantileValues().AppendEmpty() // quantiles are not stored - metric = appendMetric("invalid_histogram_metric", pdata.MetricDataTypeHistogram) + metric = appendMetric("invalid_histogram_metric", pmetric.MetricDataTypeHistogram) invalidHistogram := metric.Histogram() invalidHistogramDP := invalidHistogram.DataPoints().AppendEmpty() - invalidHistogramDP.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) - invalidHistogramDP.SetBucketCounts([]uint64{1, 2, 3}) // should be one more bucket count than bounds - invalidHistogramDP.SetExplicitBounds([]float64{1, 2, 3}) + invalidHistogramDP.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) + // should be one more bucket count than bounds + invalidHistogramDP.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 2, 3})) + invalidHistogramDP.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3})) expectDropped++ - metric = appendMetric("invalid_histogram_metric2", pdata.MetricDataTypeHistogram) + metric = appendMetric("invalid_histogram_metric2", pmetric.MetricDataTypeHistogram) invalidHistogram = metric.Histogram() invalidHistogramDP = invalidHistogram.DataPoints().AppendEmpty() - invalidHistogramDP.SetTimestamp(pdata.NewTimestampFromTime(timestamp0)) - invalidHistogramDP.SetBucketCounts([]uint64{1}) - invalidHistogramDP.SetExplicitBounds([]float64{}) // should be non-empty + invalidHistogramDP.SetTimestamp(pcommon.NewTimestampFromTime(timestamp0)) + invalidHistogramDP.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1})) + invalidHistogramDP.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{})) // should be non-empty expectDropped++ events, stats := transformMetrics(t, metrics) @@ -211,11 +213,11 @@ func TestConsumeMetrics(t *testing.T) { func TestConsumeMetricsNaN(t *testing.T) { timestamp := time.Unix(123, 0).UTC() - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metricSlice := instrumentationLibraryMetrics.Metrics() - appendMetric := func(name string, dataType pdata.MetricDataType) pdata.Metric { + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeMetrics.Metrics() + appendMetric := func(name string, dataType pmetric.MetricDataType) pmetric.Metric { metric := metricSlice.AppendEmpty() metric.SetName(name) metric.SetDataType(dataType) @@ -223,10 +225,10 @@ func TestConsumeMetricsNaN(t *testing.T) { } for _, value := range []float64{math.NaN(), math.Inf(-1), math.Inf(1)} { - metric := appendMetric("gauge", pdata.MetricDataTypeGauge) + metric := appendMetric("gauge", pmetric.MetricDataTypeGauge) gauge := metric.Gauge() dp := gauge.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dp.SetDoubleVal(value) } @@ -236,11 +238,11 @@ func TestConsumeMetricsNaN(t *testing.T) { } func TestConsumeMetricsHostCPU(t *testing.T) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metricSlice := instrumentationLibraryMetrics.Metrics() - appendMetric := func(name string, dataType pdata.MetricDataType) pdata.Metric { + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeMetrics.Metrics() + appendMetric := func(name string, dataType pmetric.MetricDataType) pmetric.Metric { metric := metricSlice.AppendEmpty() metric.SetName(name) metric.SetDataType(dataType) @@ -248,65 +250,65 @@ func TestConsumeMetricsHostCPU(t *testing.T) { } timestamp := time.Unix(123, 0).UTC() - addFloat64Gauge := func(name string, value float64, attributes map[string]pdata.AttributeValue) { - metric := appendMetric(name, pdata.MetricDataTypeGauge) + addFloat64Gauge := func(name string, value float64, attributes map[string]interface{}) { + metric := appendMetric(name, pmetric.MetricDataTypeGauge) sum := metric.Gauge() dp := sum.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dp.SetDoubleVal(value) - pdata.NewAttributeMapFromMap(attributes).CopyTo(dp.Attributes()) + pcommon.NewMapFromRaw(attributes).CopyTo(dp.Attributes()) } - addFloat64Gauge("system.cpu.utilization", 0.8, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("idle"), - "cpu": pdata.NewAttributeValueString("0"), + addFloat64Gauge("system.cpu.utilization", 0.8, map[string]interface{}{ + "state": "idle", + "cpu": "0", }) - addFloat64Gauge("system.cpu.utilization", 0.1, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("system"), - "cpu": pdata.NewAttributeValueString("0"), + addFloat64Gauge("system.cpu.utilization", 0.1, map[string]interface{}{ + "state": "system", + "cpu": "0", }) - addFloat64Gauge("system.cpu.utilization", 0.1, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), - "cpu": pdata.NewAttributeValueString("0"), + addFloat64Gauge("system.cpu.utilization", 0.1, map[string]interface{}{ + "state": "user", + "cpu": "0", }) - addFloat64Gauge("system.cpu.utilization", 0.45, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("idle"), - "cpu": pdata.NewAttributeValueString("1"), + addFloat64Gauge("system.cpu.utilization", 0.45, map[string]interface{}{ + "state": "idle", + "cpu": "1", }) - addFloat64Gauge("system.cpu.utilization", 0.05, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("system"), - "cpu": pdata.NewAttributeValueString("1"), + addFloat64Gauge("system.cpu.utilization", 0.05, map[string]interface{}{ + "state": "system", + "cpu": "1", }) - addFloat64Gauge("system.cpu.utilization", 0.5, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), - "cpu": pdata.NewAttributeValueString("1"), + addFloat64Gauge("system.cpu.utilization", 0.5, map[string]interface{}{ + "state": "user", + "cpu": "1", }) - addFloat64Gauge("system.cpu.utilization", 0.59, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("idle"), - "cpu": pdata.NewAttributeValueString("2"), + addFloat64Gauge("system.cpu.utilization", 0.59, map[string]interface{}{ + "state": "idle", + "cpu": "2", }) - addFloat64Gauge("system.cpu.utilization", 0.01, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("system"), - "cpu": pdata.NewAttributeValueString("2"), + addFloat64Gauge("system.cpu.utilization", 0.01, map[string]interface{}{ + "state": "system", + "cpu": "2", }) - addFloat64Gauge("system.cpu.utilization", 0.4, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), - "cpu": pdata.NewAttributeValueString("2"), + addFloat64Gauge("system.cpu.utilization", 0.4, map[string]interface{}{ + "state": "user", + "cpu": "2", }) - addFloat64Gauge("system.cpu.utilization", 0.6, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("idle"), - "cpu": pdata.NewAttributeValueString("3"), + addFloat64Gauge("system.cpu.utilization", 0.6, map[string]interface{}{ + "state": "idle", + "cpu": "3", }) - addFloat64Gauge("system.cpu.utilization", 0.3, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("system"), - "cpu": pdata.NewAttributeValueString("3"), + addFloat64Gauge("system.cpu.utilization", 0.3, map[string]interface{}{ + "state": "system", + "cpu": "3", }) - addFloat64Gauge("system.cpu.utilization", 0.1, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), - "cpu": pdata.NewAttributeValueString("3"), + addFloat64Gauge("system.cpu.utilization", 0.1, map[string]interface{}{ + "state": "user", + "cpu": "3", }) events, _ := transformMetrics(t, metrics) @@ -496,11 +498,11 @@ func TestConsumeMetricsHostCPU(t *testing.T) { } func TestConsumeMetricsHostMemory(t *testing.T) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metricSlice := instrumentationLibraryMetrics.Metrics() - appendMetric := func(name string, dataType pdata.MetricDataType) pdata.Metric { + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeMetrics.Metrics() + appendMetric := func(name string, dataType pmetric.MetricDataType) pmetric.Metric { metric := metricSlice.AppendEmpty() metric.SetName(name) metric.SetDataType(dataType) @@ -508,19 +510,19 @@ func TestConsumeMetricsHostMemory(t *testing.T) { } timestamp := time.Unix(123, 0).UTC() - addInt64Sum := func(name string, value int64, attributes map[string]pdata.AttributeValue) { - metric := appendMetric(name, pdata.MetricDataTypeSum) + addInt64Sum := func(name string, value int64, attributes map[string]interface{}) { + metric := appendMetric(name, pmetric.MetricDataTypeSum) sum := metric.Sum() dp := sum.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dp.SetIntVal(value) - pdata.NewAttributeMapFromMap(attributes).CopyTo(dp.Attributes()) + pcommon.NewMapFromRaw(attributes).CopyTo(dp.Attributes()) } - addInt64Sum("system.memory.usage", 4773351424, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("free"), + addInt64Sum("system.memory.usage", 4773351424, map[string]interface{}{ + "state": "free", }) - addInt64Sum("system.memory.usage", 3563778048, map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("used"), + addInt64Sum("system.memory.usage", 3563778048, map[string]interface{}{ + "state": "used", }) events, _ := transformMetrics(t, metrics) service := model.Service{Name: "unknown", Language: model.Language{Name: "unknown"}} @@ -572,11 +574,11 @@ func TestConsumeMetricsHostMemory(t *testing.T) { } func TestConsumeMetrics_JVM(t *testing.T) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metricSlice := instrumentationLibraryMetrics.Metrics() - appendMetric := func(name string, dataType pdata.MetricDataType) pdata.Metric { + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeMetrics.Metrics() + appendMetric := func(name string, dataType pmetric.MetricDataType) pmetric.Metric { metric := metricSlice.AppendEmpty() metric.SetName(name) metric.SetDataType(dataType) @@ -584,36 +586,36 @@ func TestConsumeMetrics_JVM(t *testing.T) { } timestamp := time.Unix(123, 0).UTC() - addInt64Sum := func(name string, value int64, attributes map[string]pdata.AttributeValue) { - metric := appendMetric(name, pdata.MetricDataTypeSum) + addInt64Sum := func(name string, value int64, attributes map[string]interface{}) { + metric := appendMetric(name, pmetric.MetricDataTypeSum) sum := metric.Sum() dp := sum.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dp.SetIntVal(value) - pdata.NewAttributeMapFromMap(attributes).CopyTo(dp.Attributes()) + pcommon.NewMapFromRaw(attributes).CopyTo(dp.Attributes()) } - addInt64Gauge := func(name string, value int64, attributes map[string]pdata.AttributeValue) { - metric := appendMetric(name, pdata.MetricDataTypeGauge) + addInt64Gauge := func(name string, value int64, attributes map[string]interface{}) { + metric := appendMetric(name, pmetric.MetricDataTypeGauge) sum := metric.Gauge() dp := sum.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(timestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(timestamp)) dp.SetIntVal(value) - pdata.NewAttributeMapFromMap(attributes).CopyTo(dp.Attributes()) + pcommon.NewMapFromRaw(attributes).CopyTo(dp.Attributes()) } - addInt64Sum("runtime.jvm.gc.time", 9, map[string]pdata.AttributeValue{ - "gc": pdata.NewAttributeValueString("G1 Young Generation"), + addInt64Sum("runtime.jvm.gc.time", 9, map[string]interface{}{ + "gc": "G1 Young Generation", }) - addInt64Sum("runtime.jvm.gc.count", 2, map[string]pdata.AttributeValue{ - "gc": pdata.NewAttributeValueString("G1 Young Generation"), + addInt64Sum("runtime.jvm.gc.count", 2, map[string]interface{}{ + "gc": "G1 Young Generation", }) - addInt64Gauge("runtime.jvm.memory.area", 42, map[string]pdata.AttributeValue{ - "area": pdata.NewAttributeValueString("heap"), - "type": pdata.NewAttributeValueString("used"), + addInt64Gauge("runtime.jvm.memory.area", 42, map[string]interface{}{ + "area": "heap", + "type": "used", }) - addInt64Gauge("runtime.jvm.memory.area", 24, map[string]pdata.AttributeValue{ - "area": pdata.NewAttributeValueString("heap"), - "type": pdata.NewAttributeValueString("used"), - "pool": pdata.NewAttributeValueString("eden"), + addInt64Gauge("runtime.jvm.memory.area", 24, map[string]interface{}{ + "area": "heap", + "type": "used", + "pool": "eden", }) events, _ := transformMetrics(t, metrics) @@ -710,7 +712,7 @@ func TestConsumeMetrics_JVM(t *testing.T) { } func TestConsumeMetricsExportTimestamp(t *testing.T) { - metrics := pdata.NewMetrics() + metrics := pmetric.NewMetrics() resourceMetrics := metrics.ResourceMetrics().AppendEmpty() // The actual timestamps will be non-deterministic, as they are adjusted @@ -729,13 +731,13 @@ func TestConsumeMetricsExportTimestamp(t *testing.T) { dataPointOffset := -time.Second exportedDataPointTimestamp := exportTimestamp.Add(dataPointOffset) - instrumentationLibraryMetrics := resourceMetrics.InstrumentationLibraryMetrics().AppendEmpty() - metric := instrumentationLibraryMetrics.Metrics().AppendEmpty() + scopeMetrics := resourceMetrics.ScopeMetrics().AppendEmpty() + metric := scopeMetrics.Metrics().AppendEmpty() metric.SetName("int_gauge") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetDataType(pmetric.MetricDataTypeGauge) intGauge := metric.Gauge() dp := intGauge.DataPoints().AppendEmpty() - dp.SetTimestamp(pdata.NewTimestampFromTime(exportedDataPointTimestamp)) + dp.SetTimestamp(pcommon.NewTimestampFromTime(exportedDataPointTimestamp)) dp.SetIntVal(1) events, _ := transformMetrics(t, metrics) @@ -747,7 +749,7 @@ func TestMetricsLogging(t *testing.T) { for _, level := range []logp.Level{logp.InfoLevel, logp.DebugLevel} { t.Run(level.String(), func(t *testing.T) { logp.DevelopmentSetup(logp.ToObserverOutput(), logp.WithLevel(level)) - transformMetrics(t, pdata.NewMetrics()) + transformMetrics(t, pmetric.NewMetrics()) logs := logp.ObserverLogs().TakeAll() if level == logp.InfoLevel { assert.Empty(t, logs) @@ -758,7 +760,7 @@ func TestMetricsLogging(t *testing.T) { } } -func transformMetrics(t *testing.T, metrics pdata.Metrics) ([]model.APMEvent, otel.ConsumerStats) { +func transformMetrics(t *testing.T, metrics pmetric.Metrics) ([]model.APMEvent, otel.ConsumerStats) { var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) diff --git a/internal/processor/otel/test_approved/span_jaeger_http.approved.json b/internal/processor/otel/test_approved/span_jaeger_http.approved.json index ae829d5c68a..e9fc64d7ec0 100644 --- a/internal/processor/otel/test_approved/span_jaeger_http.approved.json +++ b/internal/processor/otel/test_approved/span_jaeger_http.approved.json @@ -398,9 +398,9 @@ } }, "labels": { - "event": "baggage", "isValid": "false" }, + "message": "baggage", "parent": { "id": "0000000058585858" }, diff --git a/internal/processor/otel/test_approved/transaction_jaeger_full.approved.json b/internal/processor/otel/test_approved/transaction_jaeger_full.approved.json index b68ee894867..cab73d7b9d6 100644 --- a/internal/processor/otel/test_approved/transaction_jaeger_full.approved.json +++ b/internal/processor/otel/test_approved/transaction_jaeger_full.approved.json @@ -430,9 +430,9 @@ "version": "1.1" }, "labels": { - "event": "baggage", "isValid": "false" }, + "message": "baggage", "processor": { "event": "log", "name": "log" diff --git a/internal/processor/otel/timestamps.go b/internal/processor/otel/timestamps.go index 17f0403f329..5913b337a1e 100644 --- a/internal/processor/otel/timestamps.go +++ b/internal/processor/otel/timestamps.go @@ -20,13 +20,13 @@ package otel import ( "time" - "go.opentelemetry.io/collector/model/pdata" + "go.opentelemetry.io/collector/pdata/pcommon" ) // exportTimestamp extracts the `telemetry.sdk.elastic_export_timestamp` // resource attribute as a timestamp, and returns a boolean indicating // whether the attribute was found. -func exportTimestamp(resource pdata.Resource) (time.Time, bool) { +func exportTimestamp(resource pcommon.Resource) (time.Time, bool) { attr, ok := resource.Attributes().Get("telemetry.sdk.elastic_export_timestamp") if !ok { return time.Time{}, false diff --git a/internal/processor/otel/traces.go b/internal/processor/otel/traces.go index 8b813847cc1..d38e834bac2 100644 --- a/internal/processor/otel/traces.go +++ b/internal/processor/otel/traces.go @@ -45,9 +45,10 @@ import ( "time" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/model/otlp" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "google.golang.org/grpc/codes" "github.com/elastic/elastic-agent-libs/logp" @@ -78,8 +79,8 @@ const ( ) var ( - jsonTracesMarshaler = otlp.NewJSONTracesMarshaler() - jsonMetricsMarshaler = otlp.NewJSONMetricsMarshaler() + jsonTracesMarshaler = ptrace.NewJSONMarshaler() + jsonMetricsMarshaler = pmetric.NewJSONMarshaler() ) // Consumer transforms open-telemetry data to be compatible with elastic APM data @@ -118,7 +119,7 @@ func (c *Consumer) Capabilities() consumer.Capabilities { // ConsumeTraces consumes OpenTelemetry trace data, // converting into Elastic APM events and reporting to the Elastic APM schema. -func (c *Consumer) ConsumeTraces(ctx context.Context, traces pdata.Traces) error { +func (c *Consumer) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { receiveTimestamp := time.Now() logger := logp.NewLogger(logs.Otel) if logger.IsDebug() { @@ -133,7 +134,7 @@ func (c *Consumer) ConsumeTraces(ctx context.Context, traces pdata.Traces) error return c.Processor.ProcessBatch(ctx, batch) } -func (c *Consumer) convert(td pdata.Traces, receiveTimestamp time.Time, logger *logp.Logger) *model.Batch { +func (c *Consumer) convert(td ptrace.Traces, receiveTimestamp time.Time, logger *logp.Logger) *model.Batch { batch := model.Batch{} resourceSpans := td.ResourceSpans() for i := 0; i < resourceSpans.Len(); i++ { @@ -143,7 +144,7 @@ func (c *Consumer) convert(td pdata.Traces, receiveTimestamp time.Time, logger * } func (c *Consumer) convertResourceSpans( - resourceSpans pdata.ResourceSpans, + resourceSpans ptrace.ResourceSpans, receiveTimestamp time.Time, logger *logp.Logger, out *model.Batch, @@ -155,16 +156,14 @@ func (c *Consumer) convertResourceSpans( if exportTimestamp, ok := exportTimestamp(resource); ok { timeDelta = receiveTimestamp.Sub(exportTimestamp) } - instrumentationLibrarySpans := resourceSpans.InstrumentationLibrarySpans() - for i := 0; i < instrumentationLibrarySpans.Len(); i++ { - c.convertInstrumentationLibrarySpans( - instrumentationLibrarySpans.At(i), baseEvent, timeDelta, logger, out, - ) + scopeSpans := resourceSpans.ScopeSpans() + for i := 0; i < scopeSpans.Len(); i++ { + c.convertScopeSpans(scopeSpans.At(i), baseEvent, timeDelta, logger, out) } } -func (c *Consumer) convertInstrumentationLibrarySpans( - in pdata.InstrumentationLibrarySpans, +func (c *Consumer) convertScopeSpans( + in ptrace.ScopeSpans, baseEvent model.APMEvent, timeDelta time.Duration, logger *logp.Logger, @@ -172,13 +171,13 @@ func (c *Consumer) convertInstrumentationLibrarySpans( ) { otelSpans := in.Spans() for i := 0; i < otelSpans.Len(); i++ { - c.convertSpan(otelSpans.At(i), in.InstrumentationLibrary(), baseEvent, timeDelta, logger, out) + c.convertSpan(otelSpans.At(i), in.Scope(), baseEvent, timeDelta, logger, out) } } func (c *Consumer) convertSpan( - otelSpan pdata.Span, - otelLibrary pdata.InstrumentationLibrary, + otelSpan ptrace.Span, + otelLibrary pcommon.InstrumentationScope, baseEvent model.APMEvent, timeDelta time.Duration, logger *logp.Logger, @@ -208,7 +207,7 @@ func (c *Consumer) convertSpan( event.Event.Duration = duration event.Event.Outcome = spanStatusOutcome(otelSpan.Status()) event.Parent.ID = parentID - if root || otelSpan.Kind() == pdata.SpanKindServer || otelSpan.Kind() == pdata.SpanKindConsumer { + if root || otelSpan.Kind() == ptrace.SpanKindServer || otelSpan.Kind() == ptrace.SpanKindConsumer { event.Processor = model.TransactionProcessor event.Transaction = &model.Transaction{ ID: spanID, @@ -246,9 +245,9 @@ func (c *Consumer) convertSpan( // TranslateTransaction converts incoming otlp/otel trace data into the // expected elasticsearch format. func TranslateTransaction( - attributes pdata.AttributeMap, - spanStatus pdata.SpanStatus, - library pdata.InstrumentationLibrary, + attributes pcommon.Map, + spanStatus ptrace.SpanStatus, + library pcommon.InstrumentationScope, event *model.APMEvent, ) { isJaeger := strings.HasPrefix(event.Agent.Name, "Jaeger") @@ -271,8 +270,8 @@ func TranslateTransaction( var foundSpanType int var message model.Message - var samplerType, samplerParam pdata.AttributeValue - attributes.Range(func(kDots string, v pdata.AttributeValue) bool { + var samplerType, samplerParam pcommon.Value + attributes.Range(func(kDots string, v pcommon.Value) bool { if isJaeger { switch kDots { case "sampler.type": @@ -286,13 +285,13 @@ func TranslateTransaction( k := replaceDots(kDots) switch v.Type() { - case pdata.AttributeValueTypeArray: + case pcommon.ValueTypeSlice: setLabel(k, event, ifaceAttributeValue(v)) - case pdata.AttributeValueTypeBool: + case pcommon.ValueTypeBool: setLabel(k, event, ifaceAttributeValue(v)) - case pdata.AttributeValueTypeDouble: + case pcommon.ValueTypeDouble: setLabel(k, event, ifaceAttributeValue(v)) - case pdata.AttributeValueTypeInt: + case pcommon.ValueTypeInt: switch kDots { case semconv.AttributeHTTPStatusCode: foundSpanType = httpSpan @@ -307,8 +306,8 @@ func TranslateTransaction( default: setLabel(k, event, ifaceAttributeValue(v)) } - case pdata.AttributeValueTypeMap: - case pdata.AttributeValueTypeString: + case pcommon.ValueTypeMap: + case pcommon.ValueTypeString: stringval := truncate(v.StringVal()) switch kDots { // http.* @@ -449,7 +448,7 @@ func TranslateTransaction( event.Client = model.Client{IP: event.Source.IP, Port: event.Source.Port, Domain: event.Source.Domain} } - if samplerType != (pdata.AttributeValue{}) { + if samplerType != (pcommon.Value{}) { // The client has reported its sampling rate, so we can use it to extrapolate span metrics. parseSamplerAttributes(samplerType, samplerParam, event) } else { @@ -475,7 +474,7 @@ const ( // TranslateSpan converts incoming otlp/otel trace data into the // expected elasticsearch format. -func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event *model.APMEvent) { +func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *model.APMEvent) { isJaeger := strings.HasPrefix(event.Agent.Name, "Jaeger") var ( @@ -515,8 +514,8 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event var destinationService model.DestinationService var serviceTarget model.ServiceTarget var foundSpanType int - var samplerType, samplerParam pdata.AttributeValue - attributes.Range(func(kDots string, v pdata.AttributeValue) bool { + var samplerType, samplerParam pcommon.Value + attributes.Range(func(kDots string, v pcommon.Value) bool { if isJaeger { switch kDots { case "sampler.type": @@ -530,9 +529,9 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event k := replaceDots(kDots) switch v.Type() { - case pdata.AttributeValueTypeArray: + case pcommon.ValueTypeSlice: setLabel(k, event, ifaceAttributeValueSlice(v.SliceVal())) - case pdata.AttributeValueTypeBool: + case pcommon.ValueTypeBool: switch kDots { case semconv.AttributeMessagingTempDestination: messageTempDestination = v.BoolVal() @@ -540,9 +539,9 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event default: setLabel(k, event, strconv.FormatBool(v.BoolVal())) } - case pdata.AttributeValueTypeDouble: + case pcommon.ValueTypeDouble: setLabel(k, event, v.DoubleVal()) - case pdata.AttributeValueTypeInt: + case pcommon.ValueTypeInt: switch kDots { case "http.status_code": httpResponse.StatusCode = int(v.IntVal()) @@ -555,7 +554,7 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event default: setLabel(k, event, v.IntVal()) } - case pdata.AttributeValueTypeString: + case pcommon.ValueTypeString: stringval := truncate(v.StringVal()) switch kDots { @@ -761,7 +760,7 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event case messagingSpan: event.Span.Type = "messaging" event.Span.Subtype = messageSystem - if messageOperation == "" && spanKind == pdata.SpanKindProducer { + if messageOperation == "" && spanKind == ptrace.SpanKindProducer { messageOperation = "send" } event.Span.Action = messageOperation @@ -800,7 +799,7 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event // Only set event.Span.Type if not already set if event.Span.Type == "" { switch spanKind { - case pdata.SpanKindInternal: + case ptrace.SpanKindInternal: event.Span.Type = "app" event.Span.Subtype = "internal" default: @@ -824,7 +823,7 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event event.Service.Target = &serviceTarget } - if samplerType != (pdata.AttributeValue{}) { + if samplerType != (pcommon.Value{}) { // The client has reported its sampling rate, so we can use it to extrapolate transaction metrics. parseSamplerAttributes(samplerType, samplerParam, event) } else { @@ -832,7 +831,7 @@ func TranslateSpan(spanKind pdata.SpanKind, attributes pdata.AttributeMap, event } } -func parseSamplerAttributes(samplerType, samplerParam pdata.AttributeValue, event *model.APMEvent) { +func parseSamplerAttributes(samplerType, samplerParam pcommon.Value, event *model.APMEvent) { switch samplerType := samplerType.StringVal(); samplerType { case "probabilistic": probability := samplerParam.DoubleVal() @@ -847,9 +846,9 @@ func parseSamplerAttributes(samplerType, samplerParam pdata.AttributeValue, even default: event.Labels.Set("sampler_type", samplerType) switch samplerParam.Type() { - case pdata.AttributeValueTypeBool: + case pcommon.ValueTypeBool: event.Labels.Set("sampler_param", strconv.FormatBool(samplerParam.BoolVal())) - case pdata.AttributeValueTypeDouble: + case pcommon.ValueTypeDouble: event.NumericLabels.Set("sampler_param", samplerParam.DoubleVal()) } } @@ -857,7 +856,7 @@ func parseSamplerAttributes(samplerType, samplerParam pdata.AttributeValue, even func convertSpanEvent( logger *logp.Logger, - spanEvent pdata.SpanEvent, + spanEvent ptrace.SpanEvent, parent model.APMEvent, // either span or transaction timeDelta time.Duration, ) model.APMEvent { @@ -878,7 +877,7 @@ func convertSpanEvent( // `The name of the event MUST be "exception"` var exceptionEscaped bool var exceptionMessage, exceptionStacktrace, exceptionType string - spanEvent.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + spanEvent.Attributes().Range(func(k string, v pcommon.Value) bool { switch k { case semconv.AttributeExceptionMessage: exceptionMessage = v.StringVal() @@ -912,46 +911,50 @@ func convertSpanEvent( event.Processor = model.LogProcessor event.DataStream.Type = datastreams.LogsType event.Message = spanEvent.Name() - spanEvent.Attributes().Range(func(k string, v pdata.AttributeValue) bool { - setLabel(replaceDots(k), &event, ifaceAttributeValue(v)) + spanEvent.Attributes().Range(func(k string, v pcommon.Value) bool { + k = replaceDots(k) + if isJaeger && k == "message" { + event.Message = truncate(v.StringVal()) + return true + } + setLabel(k, &event, ifaceAttributeValue(v)) return true }) } return event } -func convertJaegerErrorSpanEvent(logger *logp.Logger, event pdata.SpanEvent, apmEvent *model.APMEvent) *model.Error { +func convertJaegerErrorSpanEvent(logger *logp.Logger, event ptrace.SpanEvent, apmEvent *model.APMEvent) *model.Error { var isError bool var exMessage, exType string - logMessage := event.Name() - hasMinimalInfo := logMessage != "" - event.Attributes().Range(func(k string, v pdata.AttributeValue) bool { - if v.Type() != pdata.AttributeValueTypeString { + var logMessage string + + if name := truncate(event.Name()); name == "error" { + isError = true // according to opentracing spec + } else { + // Jaeger seems to send the message in the 'event' field. + // + // In case 'message' is sent we will use that, otherwise + // we will use 'event'. + logMessage = name + } + + event.Attributes().Range(func(k string, v pcommon.Value) bool { + if v.Type() != pcommon.ValueTypeString { return true } stringval := truncate(v.StringVal()) switch k { case "error", "error.object": exMessage = stringval - hasMinimalInfo = true isError = true - case "event": - if stringval == "error" { // according to opentracing spec - isError = true - } else if logMessage == "" { - // Jaeger seems to send the message in the 'event' field. - // - // In case 'message' is sent, the event's name will be set - // and we will use that. Otherwise we use 'event'. - logMessage = stringval - hasMinimalInfo = true - } case "error.kind": exType = stringval - hasMinimalInfo = true isError = true case "level": isError = stringval == "error" + case "message": + logMessage = stringval default: setLabel(replaceDots(k), apmEvent, ifaceAttributeValue(v)) } @@ -960,7 +963,7 @@ func convertJaegerErrorSpanEvent(logger *logp.Logger, event pdata.SpanEvent, apm if !isError { return nil } - if !hasMinimalInfo { + if logMessage == "" && exMessage == "" && exType == "" { logger.Debugf("Cannot convert span event (name=%q) into elastic apm error: %v", event.Name()) return nil } @@ -995,7 +998,7 @@ func setErrorContext(out *model.APMEvent, parent model.APMEvent) { } } -func translateSpanLinks(out *model.APMEvent, in pdata.SpanLinkSlice) { +func translateSpanLinks(out *model.APMEvent, in ptrace.SpanLinkSlice) { n := in.Len() if n == 0 { return @@ -1019,11 +1022,11 @@ func replaceDots(s string) string { // spanStatusOutcome returns the outcome for transactions and spans based on // the given OTLP span status. -func spanStatusOutcome(status pdata.SpanStatus) string { +func spanStatusOutcome(status ptrace.SpanStatus) string { switch status.Code() { - case pdata.StatusCodeOk: + case ptrace.StatusCodeOk: return outcomeSuccess - case pdata.StatusCodeError: + case ptrace.StatusCodeError: return outcomeFailure } return outcomeUnknown @@ -1032,11 +1035,11 @@ func spanStatusOutcome(status pdata.SpanStatus) string { // spanStatusResult returns the result for transactions based on the given // OTLP span status. If the span status is unknown, an empty result string // is returned. -func spanStatusResult(status pdata.SpanStatus) string { +func spanStatusResult(status ptrace.SpanStatus) string { switch status.Code() { - case pdata.StatusCodeOk: + case ptrace.StatusCodeOk: return "Success" - case pdata.StatusCodeError: + case ptrace.StatusCodeError: return "Error" } return "" diff --git a/internal/processor/otel/traces_test.go b/internal/processor/otel/traces_test.go index 7a95d8cf715..5e989152830 100644 --- a/internal/processor/otel/traces_test.go +++ b/internal/processor/otel/traces_test.go @@ -47,8 +47,9 @@ import ( jaegertranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "google.golang.org/grpc/codes" "github.com/elastic/elastic-agent-libs/logp" @@ -66,23 +67,23 @@ func TestConsumer_ConsumeTraces_Empty(t *testing.T) { } consumer := otel.Consumer{Processor: processor} - traces := pdata.NewTraces() + traces := ptrace.NewTraces() assert.NoError(t, consumer.ConsumeTraces(context.Background(), traces)) } func TestOutcome(t *testing.T) { - test := func(t *testing.T, expectedOutcome, expectedResult string, statusCode pdata.StatusCode) { + test := func(t *testing.T, expectedOutcome, expectedResult string, statusCode ptrace.StatusCode) { t.Helper() traces, spans := newTracesSpans() otelSpan1 := spans.Spans().AppendEmpty() - otelSpan1.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan1.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan1.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan1.SetSpanID(pcommon.NewSpanID([8]byte{2})) otelSpan1.Status().SetCode(statusCode) otelSpan2 := spans.Spans().AppendEmpty() - otelSpan2.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan2.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelSpan2.SetParentSpanID(pdata.NewSpanID([8]byte{3})) + otelSpan2.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan2.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelSpan2.SetParentSpanID(pcommon.NewSpanID([8]byte{3})) otelSpan2.Status().SetCode(statusCode) batch := transformTraces(t, traces) @@ -93,20 +94,20 @@ func TestOutcome(t *testing.T) { assert.Equal(t, expectedOutcome, batch[1].Event.Outcome) } - test(t, "unknown", "", pdata.StatusCodeUnset) - test(t, "success", "Success", pdata.StatusCodeOk) - test(t, "failure", "Error", pdata.StatusCodeError) + test(t, "unknown", "", ptrace.StatusCodeUnset) + test(t, "success", "Success", ptrace.StatusCodeOk) + test(t, "failure", "Error", ptrace.StatusCodeError) } func TestRepresentativeCount(t *testing.T) { traces, spans := newTracesSpans() otelSpan1 := spans.Spans().AppendEmpty() - otelSpan1.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan1.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan1.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan1.SetSpanID(pcommon.NewSpanID([8]byte{2})) otelSpan2 := spans.Spans().AppendEmpty() - otelSpan2.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan2.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelSpan2.SetParentSpanID(pdata.NewSpanID([8]byte{3})) + otelSpan2.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan2.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelSpan2.SetParentSpanID(pcommon.NewSpanID([8]byte{3})) batch := transformTraces(t, traces) require.Len(t, batch, 2) @@ -116,7 +117,7 @@ func TestRepresentativeCount(t *testing.T) { } func TestHTTPTransactionURL(t *testing.T) { - test := func(t *testing.T, expected model.URL, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expected model.URL, attrs map[string]interface{}) { t.Helper() event := transformTransactionWithAttributes(t, attrs) assert.Equal(t, expected, event.URL) @@ -131,10 +132,10 @@ func TestHTTPTransactionURL(t *testing.T) { Query: "bar", Domain: "testing.invalid", Port: 80, - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("testing.invalid:80"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.host": "testing.invalid:80", + "http.target": "/foo?bar", }) }) t.Run("scheme_servername_nethostport_target", func(t *testing.T) { @@ -146,11 +147,11 @@ func TestHTTPTransactionURL(t *testing.T) { Query: "bar", Domain: "testing.invalid", Port: 80, - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.server_name": pdata.NewAttributeValueString("testing.invalid"), - "net.host.port": pdata.NewAttributeValueInt(80), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.server_name": "testing.invalid", + "net.host.port": 80, + "http.target": "/foo?bar", }) }) t.Run("scheme_nethostname_nethostport_target", func(t *testing.T) { @@ -162,11 +163,11 @@ func TestHTTPTransactionURL(t *testing.T) { Query: "bar", Domain: "testing.invalid", Port: 80, - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.host.name": pdata.NewAttributeValueString("testing.invalid"), - "net.host.port": pdata.NewAttributeValueInt(80), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + }, map[string]interface{}{ + "http.scheme": "https", + "net.host.name": "testing.invalid", + "net.host.port": 80, + "http.target": "/foo?bar", }) }) t.Run("http.url", func(t *testing.T) { @@ -178,8 +179,8 @@ func TestHTTPTransactionURL(t *testing.T) { Query: "bar", Domain: "testing.invalid", Port: 80, - }, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:80/foo?bar"), + }, map[string]interface{}{ + "http.url": "https://testing.invalid:80/foo?bar", }) }) t.Run("host_no_port", func(t *testing.T) { @@ -189,10 +190,10 @@ func TestHTTPTransactionURL(t *testing.T) { Full: "https://testing.invalid/foo", Path: "/foo", Domain: "testing.invalid", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("testing.invalid"), - "http.target": pdata.NewAttributeValueString("/foo"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.host": "testing.invalid", + "http.target": "/foo", }) }) t.Run("ipv6_host_no_port", func(t *testing.T) { @@ -202,10 +203,10 @@ func TestHTTPTransactionURL(t *testing.T) { Full: "https://[::1]/foo", Path: "/foo", Domain: "::1", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("[::1]"), - "http.target": pdata.NewAttributeValueString("/foo"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.host": "[::1]", + "http.target": "/foo", }) }) t.Run("default_scheme", func(t *testing.T) { @@ -216,60 +217,60 @@ func TestHTTPTransactionURL(t *testing.T) { Full: "http://testing.invalid/foo", Path: "/foo", Domain: "testing.invalid", - }, map[string]pdata.AttributeValue{ - "http.host": pdata.NewAttributeValueString("testing.invalid"), - "http.target": pdata.NewAttributeValueString("/foo"), + }, map[string]interface{}{ + "http.host": "testing.invalid", + "http.target": "/foo", }) }) } func TestHTTPSpanURL(t *testing.T) { - test := func(t *testing.T, expected string, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expected string, attrs map[string]interface{}) { t.Helper() event := transformSpanWithAttributes(t, attrs) assert.Equal(t, model.URL{Original: expected}, event.URL) } t.Run("host.url", func(t *testing.T) { - test(t, "https://testing.invalid:80/foo?bar", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:80/foo?bar"), + test(t, "https://testing.invalid:80/foo?bar", map[string]interface{}{ + "http.url": "https://testing.invalid:80/foo?bar", }) }) t.Run("scheme_host_target", func(t *testing.T) { - test(t, "https://testing.invalid:80/foo?bar", map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("testing.invalid:80"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "https://testing.invalid:80/foo?bar", map[string]interface{}{ + "http.scheme": "https", + "http.host": "testing.invalid:80", + "http.target": "/foo?bar", }) }) t.Run("scheme_netpeername_netpeerport_target", func(t *testing.T) { - test(t, "https://testing.invalid:80/foo?bar", map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.peer.name": pdata.NewAttributeValueString("testing.invalid"), - "net.peer.ip": pdata.NewAttributeValueString("::1"), // net.peer.name preferred - "net.peer.port": pdata.NewAttributeValueInt(80), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "https://testing.invalid:80/foo?bar", map[string]interface{}{ + "http.scheme": "https", + "net.peer.name": "testing.invalid", + "net.peer.ip": "::1", // net.peer.name preferred + "net.peer.port": 80, + "http.target": "/foo?bar", }) }) t.Run("scheme_netpeerip_netpeerport_target", func(t *testing.T) { - test(t, "https://[::1]:80/foo?bar", map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.peer.ip": pdata.NewAttributeValueString("::1"), - "net.peer.port": pdata.NewAttributeValueInt(80), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "https://[::1]:80/foo?bar", map[string]interface{}{ + "http.scheme": "https", + "net.peer.ip": "::1", + "net.peer.port": 80, + "http.target": "/foo?bar", }) }) t.Run("default_scheme", func(t *testing.T) { // scheme is set to "http" if it can't be deduced from attributes. - test(t, "http://testing.invalid/foo", map[string]pdata.AttributeValue{ - "http.host": pdata.NewAttributeValueString("testing.invalid"), - "http.target": pdata.NewAttributeValueString("/foo"), + test(t, "http://testing.invalid/foo", map[string]interface{}{ + "http.host": "testing.invalid", + "http.target": "/foo", }) }) } func TestHTTPSpanDestination(t *testing.T) { - test := func(t *testing.T, expectedDestination model.Destination, expectedDestinationService *model.DestinationService, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedDestination model.Destination, expectedDestinationService *model.DestinationService, attrs map[string]interface{}) { t.Helper() event := transformSpanWithAttributes(t, attrs) assert.Equal(t, expectedDestination, event.Destination) @@ -284,8 +285,8 @@ func TestHTTPSpanDestination(t *testing.T) { Type: "external", Name: "https://testing.invalid", Resource: "testing.invalid:443", - }, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:443/foo?bar"), + }, map[string]interface{}{ + "http.url": "https://testing.invalid:443/foo?bar", }) }) t.Run("url_port_scheme", func(t *testing.T) { @@ -296,8 +297,8 @@ func TestHTTPSpanDestination(t *testing.T) { Type: "external", Name: "https://testing.invalid", Resource: "testing.invalid:443", - }, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid/foo?bar"), + }, map[string]interface{}{ + "http.url": "https://testing.invalid/foo?bar", }) }) t.Run("url_non_default_port", func(t *testing.T) { @@ -308,8 +309,8 @@ func TestHTTPSpanDestination(t *testing.T) { Type: "external", Name: "https://testing.invalid:444", Resource: "testing.invalid:444", - }, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:444/foo?bar"), + }, map[string]interface{}{ + "http.url": "https://testing.invalid:444/foo?bar", }) }) t.Run("scheme_host_target", func(t *testing.T) { @@ -320,10 +321,10 @@ func TestHTTPSpanDestination(t *testing.T) { Type: "external", Name: "https://testing.invalid:444", Resource: "testing.invalid:444", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("testing.invalid:444"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.host": "testing.invalid:444", + "http.target": "/foo?bar", }) }) t.Run("scheme_netpeername_nethostport_target", func(t *testing.T) { @@ -334,21 +335,21 @@ func TestHTTPSpanDestination(t *testing.T) { Type: "external", Name: "https://[::1]:444", Resource: "[::1]:444", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.peer.ip": pdata.NewAttributeValueString("::1"), - "net.peer.port": pdata.NewAttributeValueInt(444), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + }, map[string]interface{}{ + "http.scheme": "https", + "net.peer.ip": "::1", + "net.peer.port": 444, + "http.target": "/foo?bar", }) }) } func TestHTTPTransactionSource(t *testing.T) { - test := func(t *testing.T, expectedDomain, expectedIP string, expectedPort int, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedDomain, expectedIP string, expectedPort int, attrs map[string]interface{}) { // "http.method" is a required attribute for HTTP spans, // and its presence causes the transaction's HTTP request // context to be built. - attrs["http.method"] = pdata.NewAttributeValueString("POST") + attrs["http.method"] = "POST" event := transformTransactionWithAttributes(t, attrs) require.NotNil(t, event.HTTP) @@ -365,51 +366,51 @@ func TestHTTPTransactionSource(t *testing.T) { } t.Run("net.peer.ip_port", func(t *testing.T) { - test(t, "", "192.168.0.1", 1234, map[string]pdata.AttributeValue{ - "net.peer.ip": pdata.NewAttributeValueString("192.168.0.1"), - "net.peer.port": pdata.NewAttributeValueInt(1234), + test(t, "", "192.168.0.1", 1234, map[string]interface{}{ + "net.peer.ip": "192.168.0.1", + "net.peer.port": 1234, }) }) t.Run("net.peer.ip", func(t *testing.T) { - test(t, "", "192.168.0.1", 0, map[string]pdata.AttributeValue{ - "net.peer.ip": pdata.NewAttributeValueString("192.168.0.1"), + test(t, "", "192.168.0.1", 0, map[string]interface{}{ + "net.peer.ip": "192.168.0.1", }) }) t.Run("net.peer.ip_name", func(t *testing.T) { - test(t, "source.domain", "192.168.0.1", 0, map[string]pdata.AttributeValue{ - "net.peer.name": pdata.NewAttributeValueString("source.domain"), - "net.peer.ip": pdata.NewAttributeValueString("192.168.0.1"), + test(t, "source.domain", "192.168.0.1", 0, map[string]interface{}{ + "net.peer.name": "source.domain", + "net.peer.ip": "192.168.0.1", }) }) } func TestHTTPTransactionFlavor(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.flavor": pdata.NewAttributeValueString("1.1"), + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "http.flavor": "1.1", }) assert.Equal(t, "1.1", event.HTTP.Version) } func TestHTTPTransactionUserAgent(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.user_agent": pdata.NewAttributeValueString("Foo/bar (baz)"), + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "http.user_agent": "Foo/bar (baz)", }) assert.Equal(t, model.UserAgent{Original: "Foo/bar (baz)"}, event.UserAgent) } func TestHTTPTransactionClientIP(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "net.peer.ip": pdata.NewAttributeValueString("1.2.3.4"), - "net.peer.port": pdata.NewAttributeValueInt(5678), - "http.client_ip": pdata.NewAttributeValueString("9.10.11.12"), + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "net.peer.ip": "1.2.3.4", + "net.peer.port": 5678, + "http.client_ip": "9.10.11.12", }) assert.Equal(t, model.Source{IP: net.ParseIP("1.2.3.4"), Port: 5678}, event.Source) assert.Equal(t, model.Client{IP: net.ParseIP("9.10.11.12")}, event.Client) } func TestHTTPTransactionStatusCode(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.status_code": pdata.NewAttributeValueInt(200), + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "http.status_code": 200, }) assert.Equal(t, 200, event.HTTP.Response.StatusCode) } @@ -418,16 +419,16 @@ func TestDatabaseSpan(t *testing.T) { // https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/database.md#mysql connectionString := "Server=shopdb.example.com;Database=ShopDb;Uid=billing_user;TableCache=true;UseCompression=True;MinimumPoolSize=10;MaximumPoolSize=50;" dbStatement := fmt.Sprintf("SELECT * FROM orders WHERE order_id = '%s'", strings.Repeat("*", 1024)) // should not be truncated! - event := transformSpanWithAttributes(t, map[string]pdata.AttributeValue{ - "db.system": pdata.NewAttributeValueString("mysql"), - "db.connection_string": pdata.NewAttributeValueString(connectionString), - "db.user": pdata.NewAttributeValueString("billing_user"), - "db.name": pdata.NewAttributeValueString("ShopDb"), - "db.statement": pdata.NewAttributeValueString(dbStatement), - "net.peer.name": pdata.NewAttributeValueString("shopdb.example.com"), - "net.peer.ip": pdata.NewAttributeValueString("192.0.2.12"), - "net.peer.port": pdata.NewAttributeValueInt(3306), - "net.transport": pdata.NewAttributeValueString("IP.TCP"), + event := transformSpanWithAttributes(t, map[string]interface{}{ + "db.system": "mysql", + "db.connection_string": connectionString, + "db.user": "billing_user", + "db.name": "ShopDb", + "db.statement": dbStatement, + "net.peer.name": "shopdb.example.com", + "net.peer.ip": "192.0.2.12", + "net.peer.port": 3306, + "net.transport": "IP.TCP", }) assert.Equal(t, "db", event.Span.Type) @@ -460,11 +461,11 @@ func TestDatabaseSpan(t *testing.T) { func TestInstrumentationLibrary(t *testing.T) { traces, spans := newTracesSpans() - spans.InstrumentationLibrary().SetName("library-name") - spans.InstrumentationLibrary().SetVersion("1.2.3") + spans.Scope().SetName("library-name") + spans.Scope().SetVersion("1.2.3") otelSpan := spans.Spans().AppendEmpty() - otelSpan.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan.SetSpanID(pcommon.NewSpanID([8]byte{2})) events := transformTraces(t, traces) event := events[0] @@ -473,14 +474,14 @@ func TestInstrumentationLibrary(t *testing.T) { } func TestRPCTransaction(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "rpc.system": pdata.NewAttributeValueString("grpc"), - "rpc.service": pdata.NewAttributeValueString("myservice.EchoService"), - "rpc.method": pdata.NewAttributeValueString("exampleMethod"), - "rpc.grpc.status_code": pdata.NewAttributeValueInt(int64(codes.Unavailable)), - "net.peer.name": pdata.NewAttributeValueString("peer_name"), - "net.peer.ip": pdata.NewAttributeValueString("10.20.30.40"), - "net.peer.port": pdata.NewAttributeValueInt(123), + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "rpc.system": "grpc", + "rpc.service": "myservice.EchoService", + "rpc.method": "exampleMethod", + "rpc.grpc.status_code": int64(codes.Unavailable), + "net.peer.name": "peer_name", + "net.peer.ip": "10.20.30.40", + "net.peer.port": 123, }) assert.Equal(t, "request", event.Transaction.Type) assert.Equal(t, "Unavailable", event.Transaction.Result) @@ -493,13 +494,13 @@ func TestRPCTransaction(t *testing.T) { } func TestRPCSpan(t *testing.T) { - event := transformSpanWithAttributes(t, map[string]pdata.AttributeValue{ - "rpc.system": pdata.NewAttributeValueString("grpc"), - "rpc.service": pdata.NewAttributeValueString("myservice.EchoService"), - "rpc.method": pdata.NewAttributeValueString("exampleMethod"), - "rpc.grpc.status_code": pdata.NewAttributeValueInt(int64(codes.Unavailable)), - "net.peer.ip": pdata.NewAttributeValueString("10.20.30.40"), - "net.peer.port": pdata.NewAttributeValueInt(123), + event := transformSpanWithAttributes(t, map[string]interface{}{ + "rpc.system": "grpc", + "rpc.service": "myservice.EchoService", + "rpc.method": "exampleMethod", + "rpc.grpc.status_code": int64(codes.Unavailable), + "net.peer.ip": "10.20.30.40", + "net.peer.port": 123, }) assert.Equal(t, "external", event.Span.Type) assert.Equal(t, "grpc", event.Span.Subtype) @@ -516,14 +517,14 @@ func TestRPCSpan(t *testing.T) { } func TestMessagingTransaction(t *testing.T) { - event := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ - "messaging.destination": pdata.NewAttributeValueString("myQueue"), - }, func(s pdata.Span) { - s.SetKind(pdata.SpanKindConsumer) + event := transformTransactionWithAttributes(t, map[string]interface{}{ + "messaging.destination": "myQueue", + }, func(s ptrace.Span) { + s.SetKind(ptrace.SpanKindConsumer) // Set parentID to imply this isn't the root, but // kind==Consumer should still force the span to be translated // as a transaction. - s.SetParentSpanID(pdata.NewSpanID([8]byte{3})) + s.SetParentSpanID(pcommon.NewSpanID([8]byte{3})) }) assert.Equal(t, "messaging", event.Transaction.Type) assert.Empty(t, event.Labels) @@ -533,13 +534,13 @@ func TestMessagingTransaction(t *testing.T) { } func TestMessagingSpan(t *testing.T) { - event := transformSpanWithAttributes(t, map[string]pdata.AttributeValue{ - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("myTopic"), - "net.peer.ip": pdata.NewAttributeValueString("10.20.30.40"), - "net.peer.port": pdata.NewAttributeValueInt(123), - }, func(s pdata.Span) { - s.SetKind(pdata.SpanKindProducer) + event := transformSpanWithAttributes(t, map[string]interface{}{ + "messaging.system": "kafka", + "messaging.destination": "myTopic", + "net.peer.ip": "10.20.30.40", + "net.peer.port": 123, + }, func(s ptrace.Span) { + s.SetKind(ptrace.SpanKindProducer) }) assert.Equal(t, "messaging", event.Span.Type) assert.Equal(t, "kafka", event.Span.Subtype) @@ -557,7 +558,7 @@ func TestMessagingSpan(t *testing.T) { } func TestMessagingSpan_DestinationResource(t *testing.T) { - test := func(t *testing.T, expectedDestination model.Destination, expectedDestinationService *model.DestinationService, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedDestination model.Destination, expectedDestinationService *model.DestinationService, attrs map[string]interface{}) { t.Helper() event := transformSpanWithAttributes(t, attrs) assert.Equal(t, expectedDestination, event.Destination) @@ -571,11 +572,11 @@ func TestMessagingSpan_DestinationResource(t *testing.T) { Type: "messaging", Name: "testsvc", Resource: "127.0.0.1/testtopic", - }, map[string]pdata.AttributeValue{ - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("testtopic"), - "peer.service": pdata.NewAttributeValueString("testsvc"), - "peer.address": pdata.NewAttributeValueString("127.0.0.1"), + }, map[string]interface{}{ + "messaging.system": "kafka", + "messaging.destination": "testtopic", + "peer.service": "testsvc", + "peer.address": "127.0.0.1", }) }) t.Run("system_destination_peerservice", func(t *testing.T) { @@ -583,10 +584,10 @@ func TestMessagingSpan_DestinationResource(t *testing.T) { Type: "messaging", Name: "testsvc", Resource: "testsvc/testtopic", - }, map[string]pdata.AttributeValue{ - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("testtopic"), - "peer.service": pdata.NewAttributeValueString("testsvc"), + }, map[string]interface{}{ + "messaging.system": "kafka", + "messaging.destination": "testtopic", + "peer.service": "testsvc", }) }) t.Run("system_destination", func(t *testing.T) { @@ -594,37 +595,37 @@ func TestMessagingSpan_DestinationResource(t *testing.T) { Type: "messaging", Name: "kafka", Resource: "kafka/testtopic", - }, map[string]pdata.AttributeValue{ - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("testtopic"), + }, map[string]interface{}{ + "messaging.system": "kafka", + "messaging.destination": "testtopic", }) }) } func TestSpanType(t *testing.T) { // Internal spans default to app.internal. - event := transformSpanWithAttributes(t, map[string]pdata.AttributeValue{}, func(s pdata.Span) { - s.SetKind(pdata.SpanKindInternal) + event := transformSpanWithAttributes(t, map[string]interface{}{}, func(s ptrace.Span) { + s.SetKind(ptrace.SpanKindInternal) }) assert.Equal(t, "app", event.Span.Type) assert.Equal(t, "internal", event.Span.Subtype) // All other spans default to unknown. - event = transformSpanWithAttributes(t, map[string]pdata.AttributeValue{}, func(s pdata.Span) { - s.SetKind(pdata.SpanKindClient) + event = transformSpanWithAttributes(t, map[string]interface{}{}, func(s ptrace.Span) { + s.SetKind(ptrace.SpanKindClient) }) assert.Equal(t, "unknown", event.Span.Type) assert.Equal(t, "", event.Span.Subtype) } func TestSpanNetworkAttributes(t *testing.T) { - networkAttributes := map[string]pdata.AttributeValue{ - "net.host.connection.type": pdata.NewAttributeValueString("cell"), - "net.host.connection.subtype": pdata.NewAttributeValueString("LTE"), - "net.host.carrier.name": pdata.NewAttributeValueString("Vodafone"), - "net.host.carrier.mnc": pdata.NewAttributeValueString("01"), - "net.host.carrier.mcc": pdata.NewAttributeValueString("101"), - "net.host.carrier.icc": pdata.NewAttributeValueString("UK"), + networkAttributes := map[string]interface{}{ + "net.host.connection.type": "cell", + "net.host.connection.subtype": "LTE", + "net.host.carrier.name": "Vodafone", + "net.host.carrier.mnc": "01", + "net.host.carrier.mcc": "101", + "net.host.carrier.icc": "UK", } txEvent := transformTransactionWithAttributes(t, networkAttributes) spanEvent := transformSpanWithAttributes(t, networkAttributes) @@ -646,23 +647,12 @@ func TestSpanNetworkAttributes(t *testing.T) { } func TestArrayLabels(t *testing.T) { - stringArray := pdata.NewAttributeValueArray() - stringArray.SliceVal().AppendEmpty().SetStringVal("string1") - stringArray.SliceVal().AppendEmpty().SetStringVal("string2") + stringArray := []interface{}{"string1", "string2"} + boolArray := []interface{}{false, true} + intArray := []interface{}{1234, 5678} + floatArray := []interface{}{1234.5678, 9123.234123123} - boolArray := pdata.NewAttributeValueArray() - boolArray.SliceVal().AppendEmpty().SetBoolVal(false) - boolArray.SliceVal().AppendEmpty().SetBoolVal(true) - - intArray := pdata.NewAttributeValueArray() - intArray.SliceVal().AppendEmpty().SetIntVal(1234) - intArray.SliceVal().AppendEmpty().SetIntVal(5678) - - floatArray := pdata.NewAttributeValueArray() - floatArray.SliceVal().AppendEmpty().SetDoubleVal(1234.5678) - floatArray.SliceVal().AppendEmpty().SetDoubleVal(9123.234123123) - - txEvent := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{ + txEvent := transformTransactionWithAttributes(t, map[string]interface{}{ "string_array": stringArray, "bool_array": boolArray, "int_array": intArray, @@ -677,7 +667,7 @@ func TestArrayLabels(t *testing.T) { "float_array": {Values: []float64{1234.5678, 9123.234123123}}, }, txEvent.NumericLabels) - spanEvent := transformSpanWithAttributes(t, map[string]pdata.AttributeValue{ + spanEvent := transformSpanWithAttributes(t, map[string]interface{}{ "string_array": stringArray, "bool_array": boolArray, "int_array": intArray, @@ -720,20 +710,20 @@ func TestConsumeTracesExportTimestamp(t *testing.T) { exportedExceptionTimestamp := exportTimestamp.Add(exceptionOffset) otelSpan1 := otelSpans.Spans().AppendEmpty() - otelSpan1.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan1.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelSpan1.SetStartTimestamp(pdata.NewTimestampFromTime(exportedTransactionTimestamp)) - otelSpan1.SetEndTimestamp(pdata.NewTimestampFromTime(exportedTransactionTimestamp.Add(transactionDuration))) + otelSpan1.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan1.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelSpan1.SetStartTimestamp(pcommon.NewTimestampFromTime(exportedTransactionTimestamp)) + otelSpan1.SetEndTimestamp(pcommon.NewTimestampFromTime(exportedTransactionTimestamp.Add(transactionDuration))) otelSpan2 := otelSpans.Spans().AppendEmpty() - otelSpan2.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan2.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelSpan2.SetParentSpanID(pdata.NewSpanID([8]byte{3})) - otelSpan2.SetStartTimestamp(pdata.NewTimestampFromTime(exportedSpanTimestamp)) - otelSpan2.SetEndTimestamp(pdata.NewTimestampFromTime(exportedSpanTimestamp.Add(spanDuration))) + otelSpan2.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan2.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelSpan2.SetParentSpanID(pcommon.NewSpanID([8]byte{3})) + otelSpan2.SetStartTimestamp(pcommon.NewTimestampFromTime(exportedSpanTimestamp)) + otelSpan2.SetEndTimestamp(pcommon.NewTimestampFromTime(exportedSpanTimestamp.Add(spanDuration))) otelSpanEvent := otelSpan2.Events().AppendEmpty() - otelSpanEvent.SetTimestamp(pdata.NewTimestampFromTime(exportedExceptionTimestamp)) + otelSpanEvent.SetTimestamp(pcommon.NewTimestampFromTime(exportedExceptionTimestamp)) otelSpanEvent.SetName("exception") otelSpanEvent.Attributes().InsertString("exception.type", "the_type") otelSpanEvent.Attributes().InsertString("exception.message", "the_message") @@ -753,16 +743,16 @@ func TestConsumeTracesExportTimestamp(t *testing.T) { } func TestSpanLinks(t *testing.T) { - linkedTraceID := pdata.NewTraceID([16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}) - linkedSpanID := pdata.NewSpanID([8]byte{7, 6, 5, 4, 3, 2, 1, 0}) - spanLink := pdata.NewSpanLink() + linkedTraceID := pcommon.NewTraceID([16]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}) + linkedSpanID := pcommon.NewSpanID([8]byte{7, 6, 5, 4, 3, 2, 1, 0}) + spanLink := ptrace.NewSpanLink() spanLink.SetSpanID(linkedSpanID) spanLink.SetTraceID(linkedTraceID) - txEvent := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{}, func(span pdata.Span) { + txEvent := transformTransactionWithAttributes(t, map[string]interface{}{}, func(span ptrace.Span) { spanLink.CopyTo(span.Links().AppendEmpty()) }) - spanEvent := transformTransactionWithAttributes(t, map[string]pdata.AttributeValue{}, func(span pdata.Span) { + spanEvent := transformTransactionWithAttributes(t, map[string]interface{}{}, func(span ptrace.Span) { spanLink.CopyTo(span.Links().AppendEmpty()) }) for _, event := range []model.APMEvent{txEvent, spanEvent} { @@ -774,7 +764,7 @@ func TestSpanLinks(t *testing.T) { } func TestConsumer_JaegerMetadata(t *testing.T) { - jaegerBatch := jaegermodel.Batch{ + jaegerBatch := &jaegermodel.Batch{ Spans: []*jaegermodel.Span{{ StartTime: testStartTime(), Tags: []jaegermodel.KeyValue{jaegerKeyValue("span.kind", "client")}, @@ -812,7 +802,8 @@ func TestConsumer_JaegerMetadata(t *testing.T) { var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) jaegerBatch.Process = tc.process - traces := jaegertranslator.ProtoBatchToInternalTraces(jaegerBatch) + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{jaegerBatch}) + require.NoError(t, err) require.NoError(t, (&otel.Consumer{Processor: recorder}).ConsumeTraces(context.Background(), traces)) docs := encodeBatch(t, batches...) @@ -822,7 +813,7 @@ func TestConsumer_JaegerMetadata(t *testing.T) { } func TestConsumer_JaegerSampleRate(t *testing.T) { - jaegerBatch := jaegermodel.Batch{ + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{{ Process: jaegermodel.NewProcess("", jaegerKeyValues( "jaeger.version", "unknown", "hostname", "host-abc", @@ -858,8 +849,8 @@ func TestConsumer_JaegerSampleRate(t *testing.T) { jaegerKeyValue("sampler.param", 2.0), // 2 traces per second }, }}, - } - traces := jaegertranslator.ProtoBatchToInternalTraces(jaegerBatch) + }}) + require.NoError(t, err) var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) @@ -882,7 +873,7 @@ func TestConsumer_JaegerTraceID(t *testing.T) { var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) - jaegerBatch := jaegermodel.Batch{ + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{{ Process: jaegermodel.NewProcess("", jaegerKeyValues("jaeger.version", "unknown")), Spans: []*jaegermodel.Span{{ TraceID: jaegermodel.NewTraceID(0, 0x000046467830), @@ -891,8 +882,8 @@ func TestConsumer_JaegerTraceID(t *testing.T) { TraceID: jaegermodel.NewTraceID(0x000046467830, 0x000046467830), SpanID: jaegermodel.NewSpanID(789), }}, - } - traces := jaegertranslator.ProtoBatchToInternalTraces(jaegerBatch) + }}) + require.NoError(t, err) require.NoError(t, (&otel.Consumer{Processor: recorder}).ConsumeTraces(context.Background(), traces)) batch := *batches[0] @@ -1007,14 +998,14 @@ func TestConsumer_JaegerTransaction(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - batch := jaegermodel.Batch{ + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{{ Process: jaegermodel.NewProcess("", []jaegermodel.KeyValue{ jaegerKeyValue("hostname", "host-abc"), jaegerKeyValue("jaeger.version", "unknown"), }), Spans: tc.spans, - } - traces := jaegertranslator.ProtoBatchToInternalTraces(batch) + }}) + require.NoError(t, err) var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) @@ -1111,7 +1102,7 @@ func TestConsumer_JaegerSpan(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - batch := jaegermodel.Batch{ + batch := &jaegermodel.Batch{ Process: jaegermodel.NewProcess("", []jaegermodel.KeyValue{ jaegerKeyValue("hostname", "host-abc"), jaegerKeyValue("jaeger.version", "unknown"), @@ -1129,7 +1120,8 @@ func TestConsumer_JaegerSpan(t *testing.T) { SpanID: 0x58585858, }} } - traces := jaegertranslator.ProtoBatchToInternalTraces(batch) + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{batch}) + require.NoError(t, err) var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) @@ -1142,7 +1134,7 @@ func TestConsumer_JaegerSpan(t *testing.T) { } func TestJaegerServiceVersion(t *testing.T) { - jaegerBatch := jaegermodel.Batch{ + traces, err := jaegertranslator.ProtoToTraces([]*jaegermodel.Batch{{ Process: jaegermodel.NewProcess("", jaegerKeyValues( "jaeger.version", "unknown", "service.version", "process_tag_value", @@ -1157,8 +1149,8 @@ func TestJaegerServiceVersion(t *testing.T) { jaegerKeyValue("service.version", "span_tag_value"), }, }}, - } - traces := jaegertranslator.ProtoBatchToInternalTraces(jaegerBatch) + }}) + require.NoError(t, err) var batches []*model.Batch recorder := batchRecorderBatchProcessor(&batches) @@ -1173,7 +1165,7 @@ func TestTracesLogging(t *testing.T) { for _, level := range []logp.Level{logp.InfoLevel, logp.DebugLevel} { t.Run(level.String(), func(t *testing.T) { logp.DevelopmentSetup(logp.ToObserverOutput(), logp.WithLevel(level)) - transformTraces(t, pdata.NewTraces()) + transformTraces(t, ptrace.NewTraces()) logs := logp.ObserverLogs().TakeAll() if level == logp.InfoLevel { assert.Empty(t, logs) @@ -1185,7 +1177,7 @@ func TestTracesLogging(t *testing.T) { } func TestServiceTarget(t *testing.T) { - test := func(t *testing.T, expected *model.ServiceTarget, input map[string]pdata.AttributeValue) { + test := func(t *testing.T, expected *model.ServiceTarget, input map[string]interface{}) { t.Helper() event := transformSpanWithAttributes(t, input) assert.Equal(t, expected, event.Service.Target) @@ -1194,9 +1186,9 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Type: "postgresql", Name: "testsvc", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "db.system": pdata.NewAttributeValueString("postgresql"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "db.system": "postgresql", }) }) @@ -1204,10 +1196,10 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Type: "postgresql", Name: "testdb", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "db.name": pdata.NewAttributeValueString("testdb"), - "db.system": pdata.NewAttributeValueString("postgresql"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "db.name": "testdb", + "db.system": "postgresql", }) }) @@ -1215,8 +1207,8 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Type: "db", Name: "testdb", - }, map[string]pdata.AttributeValue{ - "db.name": pdata.NewAttributeValueString("testdb"), + }, map[string]interface{}{ + "db.name": "testdb", }) }) @@ -1224,9 +1216,9 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "test-url:443", Type: "http", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "http.url": pdata.NewAttributeValueString("https://test-url:443/"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "http.url": "https://test-url:443/", }) }) @@ -1234,10 +1226,10 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "test-url:443", Type: "http", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("test-url:443"), - "http.target": pdata.NewAttributeValueString("/"), + }, map[string]interface{}{ + "http.scheme": "https", + "http.host": "test-url:443", + "http.target": "/", }) }) @@ -1245,12 +1237,12 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "test-url:443", Type: "http", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.peer.name": pdata.NewAttributeValueString("test-url"), - "net.peer.ip": pdata.NewAttributeValueString("::1"), // net.peer.name preferred - "net.peer.port": pdata.NewAttributeValueInt(443), - "http.target": pdata.NewAttributeValueString("/"), + }, map[string]interface{}{ + "http.scheme": "https", + "net.peer.name": "test-url", + "net.peer.ip": "::1", // net.peer.name preferred + "net.peer.port": 443, + "http.target": "/", }) }) @@ -1258,11 +1250,11 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "[::1]:443", Type: "http", - }, map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "net.peer.ip": pdata.NewAttributeValueString("::1"), // net.peer.name preferred - "net.peer.port": pdata.NewAttributeValueInt(443), - "http.target": pdata.NewAttributeValueString("/"), + }, map[string]interface{}{ + "http.scheme": "https", + "net.peer.ip": "::1", // net.peer.name preferred + "net.peer.port": 443, + "http.target": "/", }) }) @@ -1270,9 +1262,9 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "testsvc", Type: "grpc", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "rpc.system": pdata.NewAttributeValueString("grpc"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "rpc.system": "grpc", }) }) @@ -1280,10 +1272,10 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "test", Type: "grpc", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "rpc.system": pdata.NewAttributeValueString("grpc"), - "rpc.service": pdata.NewAttributeValueString("test"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "rpc.system": "grpc", + "rpc.service": "test", }) }) @@ -1291,8 +1283,8 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "test", Type: "external", - }, map[string]pdata.AttributeValue{ - "rpc.service": pdata.NewAttributeValueString("test"), + }, map[string]interface{}{ + "rpc.service": "test", }) }) @@ -1300,10 +1292,10 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "myTopic", Type: "kafka", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("myTopic"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "messaging.system": "kafka", + "messaging.destination": "myTopic", }) }) @@ -1311,11 +1303,11 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "testsvc", Type: "kafka", - }, map[string]pdata.AttributeValue{ - "peer.service": pdata.NewAttributeValueString("testsvc"), - "messaging.temp_destination": pdata.NewAttributeValueBool(true), - "messaging.system": pdata.NewAttributeValueString("kafka"), - "messaging.destination": pdata.NewAttributeValueString("myTopic"), + }, map[string]interface{}{ + "peer.service": "testsvc", + "messaging.temp_destination": true, + "messaging.system": "kafka", + "messaging.destination": "myTopic", }) }) @@ -1323,8 +1315,8 @@ func TestServiceTarget(t *testing.T) { test(t, &model.ServiceTarget{ Name: "myTopic", Type: "messaging", - }, map[string]pdata.AttributeValue{ - "messaging.destination": pdata.NewAttributeValueString("myTopic"), + }, map[string]interface{}{ + "messaging.destination": "myTopic", }) }) } @@ -1451,39 +1443,39 @@ func jaegerKeyValue(k string, v interface{}) jaegermodel.KeyValue { return kv } -func transformTransactionWithAttributes(t *testing.T, attrs map[string]pdata.AttributeValue, configFns ...func(pdata.Span)) model.APMEvent { +func transformTransactionWithAttributes(t *testing.T, attrs map[string]interface{}, configFns ...func(ptrace.Span)) model.APMEvent { traces, spans := newTracesSpans() otelSpan := spans.Spans().AppendEmpty() - otelSpan.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan.SetSpanID(pcommon.NewSpanID([8]byte{2})) for _, fn := range configFns { fn(otelSpan) } - pdata.NewAttributeMapFromMap(attrs).CopyTo(otelSpan.Attributes()) + pcommon.NewMapFromRaw(attrs).CopyTo(otelSpan.Attributes()) events := transformTraces(t, traces) return events[0] } -func transformSpanWithAttributes(t *testing.T, attrs map[string]pdata.AttributeValue, configFns ...func(pdata.Span)) model.APMEvent { +func transformSpanWithAttributes(t *testing.T, attrs map[string]interface{}, configFns ...func(ptrace.Span)) model.APMEvent { traces, spans := newTracesSpans() otelSpan := spans.Spans().AppendEmpty() - otelSpan.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelSpan.SetParentSpanID(pdata.NewSpanID([8]byte{3})) + otelSpan.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelSpan.SetParentSpanID(pcommon.NewSpanID([8]byte{3})) for _, fn := range configFns { fn(otelSpan) } - pdata.NewAttributeMapFromMap(attrs).CopyTo(otelSpan.Attributes()) + pcommon.NewMapFromRaw(attrs).CopyTo(otelSpan.Attributes()) events := transformTraces(t, traces) return events[0] } -func transformTransactionSpanEvents(t *testing.T, language string, spanEvents ...pdata.SpanEvent) (transaction model.APMEvent, events []model.APMEvent) { +func transformTransactionSpanEvents(t *testing.T, language string, spanEvents ...ptrace.SpanEvent) (transaction model.APMEvent, events []model.APMEvent) { traces, spans := newTracesSpans() traces.ResourceSpans().At(0).Resource().Attributes().InsertString(semconv.AttributeTelemetrySDKLanguage, language) otelSpan := spans.Spans().AppendEmpty() - otelSpan.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelSpan.SetSpanID(pdata.NewSpanID([8]byte{2})) + otelSpan.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelSpan.SetSpanID(pcommon.NewSpanID([8]byte{2})) for _, spanEvent := range spanEvents { spanEvent.CopyTo(otelSpan.Events().AppendEmpty()) } @@ -1493,7 +1485,7 @@ func transformTransactionSpanEvents(t *testing.T, language string, spanEvents .. return allEvents[0], allEvents[1:] } -func transformTraces(t *testing.T, traces pdata.Traces) model.Batch { +func transformTraces(t *testing.T, traces ptrace.Traces) model.Batch { var processed model.Batch processor := model.ProcessBatchFunc(func(ctx context.Context, batch *model.Batch) error { if processed != nil { @@ -1506,11 +1498,11 @@ func transformTraces(t *testing.T, traces pdata.Traces) model.Batch { return processed } -func newTracesSpans() (pdata.Traces, pdata.InstrumentationLibrarySpans) { - traces := pdata.NewTraces() +func newTracesSpans() (ptrace.Traces, ptrace.ScopeSpans) { + traces := ptrace.NewTraces() resourceSpans := traces.ResourceSpans().AppendEmpty() - librarySpans := resourceSpans.InstrumentationLibrarySpans().AppendEmpty() - return traces, librarySpans + scopeSpans := resourceSpans.ScopeSpans().AppendEmpty() + return traces, scopeSpans } func newInt(v int) *int { diff --git a/testdata/jaeger/batch_0.approved.json b/testdata/jaeger/batch_0.approved.json index 703a4467d32..8d591e671c4 100644 --- a/testdata/jaeger/batch_0.approved.json +++ b/testdata/jaeger/batch_0.approved.json @@ -65,10 +65,10 @@ ] }, "labels": { - "event": "baggage", "key": "customer", "value": "Japanese Desserts" }, + "message": "baggage", "processor": { "event": "log", "name": "log" @@ -98,10 +98,10 @@ ] }, "labels": { - "event": "Searching for nearby drivers", "level": "info", "location": "728,326" }, + "message": "Searching for nearby drivers", "processor": { "event": "log", "name": "log" @@ -275,9 +275,9 @@ ] }, "labels": { - "event": "Search successful", "level": "info" }, + "message": "Search successful", "numeric_labels": { "num_drivers": 10 }, diff --git a/testdata/jaeger/batch_1.approved.json b/testdata/jaeger/batch_1.approved.json index 4c3ee722627..eac4a70bef6 100644 --- a/testdata/jaeger/batch_1.approved.json +++ b/testdata/jaeger/batch_1.approved.json @@ -60,9 +60,9 @@ ] }, "labels": { - "event": "Found drivers", "level": "info" }, + "message": "Found drivers", "parent": { "id": "7be2fd98d0973be3" }, From bff66c5fdcc868fdc32eaf3ba406b870f5dd9bce Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Mon, 1 Aug 2022 20:22:18 +0800 Subject: [PATCH 3/3] systemtest: update otel libraries --- .../approvals/TestOTLPGRPCLogs.approved.json | 1 - .../TestOTLPGRPCMetrics.approved.json | 2 +- .../TestOTLPGRPCTraces.approved.json | 6 +- systemtest/cmd/sendotlp/main.go | 2 +- systemtest/go.mod | 48 ++++---- systemtest/go.sum | 105 ++++++++---------- systemtest/otlp_test.go | 53 ++++----- 7 files changed, 105 insertions(+), 112 deletions(-) diff --git a/systemtest/approvals/TestOTLPGRPCLogs.approved.json b/systemtest/approvals/TestOTLPGRPCLogs.approved.json index e9df3af01af..e984a5ada14 100644 --- a/systemtest/approvals/TestOTLPGRPCLogs.approved.json +++ b/systemtest/approvals/TestOTLPGRPCLogs.approved.json @@ -13,7 +13,6 @@ "version": "dynamic" }, "event": { - "action": "doOperation()", "agent_id_status": "missing", "ingested": "dynamic", "severity": 9 diff --git a/systemtest/approvals/TestOTLPGRPCMetrics.approved.json b/systemtest/approvals/TestOTLPGRPCMetrics.approved.json index 7df94620bc5..ce75940c394 100644 --- a/systemtest/approvals/TestOTLPGRPCMetrics.approved.json +++ b/systemtest/approvals/TestOTLPGRPCMetrics.approved.json @@ -43,7 +43,7 @@ "@timestamp": "dynamic", "agent": { "name": "opentelemetry/go", - "version": "1.7.0" + "version": "1.8.0" }, "data_stream.dataset": "apm.app.unknown_service_systemtest_test", "data_stream.namespace": "default", diff --git a/systemtest/approvals/TestOTLPGRPCTraces.approved.json b/systemtest/approvals/TestOTLPGRPCTraces.approved.json index 0c6024b4d0f..8db0fdf2eab 100644 --- a/systemtest/approvals/TestOTLPGRPCTraces.approved.json +++ b/systemtest/approvals/TestOTLPGRPCTraces.approved.json @@ -4,7 +4,7 @@ "@timestamp": "1970-01-01T00:02:03.002Z", "agent": { "name": "opentelemetry/go", - "version": "1.7.0" + "version": "1.8.0" }, "data_stream.dataset": "apm.error", "data_stream.namespace": "default", @@ -87,7 +87,7 @@ "@timestamp": "1970-01-01T00:02:03.001Z", "agent": { "name": "opentelemetry/go", - "version": "1.7.0" + "version": "1.8.0" }, "data_stream.dataset": "apm.app", "data_stream.namespace": "default", @@ -147,7 +147,7 @@ "@timestamp": "1970-01-01T00:02:03.000Z", "agent": { "name": "opentelemetry/go", - "version": "1.7.0" + "version": "1.8.0" }, "data_stream.dataset": "apm", "data_stream.namespace": "default", diff --git a/systemtest/cmd/sendotlp/main.go b/systemtest/cmd/sendotlp/main.go index 9b97f8672f8..524e994a726 100644 --- a/systemtest/cmd/sendotlp/main.go +++ b/systemtest/cmd/sendotlp/main.go @@ -35,11 +35,11 @@ import ( "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk/export/metric/aggregation" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" controller "go.opentelemetry.io/otel/sdk/metric/controller/basic" "go.opentelemetry.io/otel/sdk/metric/export" + "go.opentelemetry.io/otel/sdk/metric/export/aggregation" processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" "go.opentelemetry.io/otel/sdk/metric/sdkapi" "go.opentelemetry.io/otel/sdk/metric/selector/simple" diff --git a/systemtest/go.mod b/systemtest/go.mod index 70f89d38a8e..9dae42bd6d1 100644 --- a/systemtest/go.mod +++ b/systemtest/go.mod @@ -11,37 +11,38 @@ require ( github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 github.com/jaegertracing/jaeger v1.18.1 github.com/mitchellh/mapstructure v1.1.2 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 github.com/testcontainers/testcontainers-go v0.11.2-0.20211110075312-4b5710b46477 github.com/tidwall/gjson v1.9.3 go.elastic.co/apm/v2 v2.0.0 go.elastic.co/fastjson v1.1.0 - go.opentelemetry.io/otel v1.7.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.30.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.30.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.30.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0 - go.opentelemetry.io/otel/metric v0.30.0 - go.opentelemetry.io/otel/sdk v1.7.0 - go.opentelemetry.io/otel/sdk/export/metric v0.28.0 - go.opentelemetry.io/otel/sdk/metric v0.30.0 - go.opentelemetry.io/otel/trace v1.7.0 + go.opentelemetry.io/collector/pdata v0.56.0 + go.opentelemetry.io/collector/semconv v0.56.0 + go.opentelemetry.io/otel v1.8.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.31.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.8.0 + go.opentelemetry.io/otel/metric v0.31.0 + go.opentelemetry.io/otel/sdk v1.8.0 + go.opentelemetry.io/otel/sdk/metric v0.31.0 + go.opentelemetry.io/otel/trace v1.8.0 go.uber.org/zap v1.21.0 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad + golang.org/x/sys v0.0.0-20220731174439-a90be440212d golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac - google.golang.org/grpc v1.46.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + google.golang.org/grpc v1.48.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/containerd/containerd v1.6.1 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 // indirect ) require ( @@ -62,7 +63,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.7 // indirect + github.com/google/go-cmp v0.5.8 // indirect github.com/google/uuid v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/jcchavezs/porto v0.1.0 // indirect @@ -85,17 +86,16 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.1.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.34.0 - go.opentelemetry.io/proto/otlp v0.16.0 // indirect + go.opentelemetry.io/proto/otlp v0.18.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/mod v0.5.1 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/tools v0.1.9 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v2 v2.4.0 howett.net/plist v1.0.0 // indirect ) diff --git a/systemtest/go.sum b/systemtest/go.sum index 1b7fef250e8..a7b8a39c602 100644 --- a/systemtest/go.sum +++ b/systemtest/go.sum @@ -97,7 +97,6 @@ github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:o github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -437,8 +436,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -481,8 +480,9 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 h1:/sDbPb60SusIXjiJGYLUoS/rAQurQmvGWmwn2bBPM9c= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -789,6 +789,7 @@ github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8t github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -796,8 +797,9 @@ github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= @@ -870,63 +872,57 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector/model v0.34.0 h1:JmuBhBvX0l0bYDBAG9GtJVQKcIQRspPLgHfZqgHLpJc= -go.opentelemetry.io/collector/model v0.34.0/go.mod h1:+7YCSjJG+MqiIFjauzt7oM2qkqBsaJWh5hcsO4fwsAc= +go.opentelemetry.io/collector/pdata v0.56.0 h1:JD8KjQ7dNZ441xMuVZVu5NRYmkA4vOYGV7w8tkCdyrE= +go.opentelemetry.io/collector/pdata v0.56.0/go.mod h1:mYcCREWiIJyHss0dbU+GSiz2tmGZ6u09vtfkKTciog4= +go.opentelemetry.io/collector/semconv v0.56.0 h1:zpQ6IBimBsiVsJibsSM2/13vKtaeteFFIx4bmIiOS6E= +go.opentelemetry.io/collector/semconv v0.56.0/go.mod h1:EH1wbDvTyqKpKBBpoMIe0KQk2plCcFS66Mo17WtR7CQ= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= -go.opentelemetry.io/otel v1.6.0/go.mod h1:bfJD2DZVw0LBxghOTlgnlI0CV3hLDu9XF/QKOUXMTQQ= -go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= -go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= +go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0 h1:7Yxsak1q4XrJ5y7XBnNwqWx9amMZvoidCctv62XOQ6Y= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0/go.mod h1:M1hVZHNxcbkAlcvrOMlpQ4YOO3Awf+4N2dxkZL3xm04= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.30.0 h1:Os0ds8fJp2AUa9DNraFWIycgUzevz47i6UvnSh+8LQ0= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.30.0/go.mod h1:8Lz1GGcrx1kPGE3zqDrK7ZcPzABEfIQqBjq7roQa5ZA= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.30.0 h1:7E8znQuiqnaFDDl1zJYUpoqHteZI6u2rrcxH3Gwoiis= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.30.0/go.mod h1:RejW0QAFotPIixlFZKZka4/70S5UaFOqDO9DYOgScIs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.30.0 h1:MrUowGDjf4jKGMgjDAIP5Czh6YGdCHc46gfTwlF6eQI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.30.0/go.mod h1:WulNodDa6sY6ZADi664BgKD6SvXLLQXVZEQ81q5ps9U= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 h1:ao8CJIShCaIbaMsGxy+jp2YHSudketpDgDRcbirov78= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0 h1:H0+xwv4shKw0gfj/ZqR13qO2N/dBQogB1OcRjJjV39Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0/go.mod h1:nkenGD8vcvs0uN6WhR90ZVHQlgDsRmXicnNadMnk+XQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0 h1:BaQ2xM5cPmldVCMvbLoy5tcLUhXCtIhItDYBNw83B7Y= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0/go.mod h1:VRr8tlXQEsTdesDCh0qBe2iKDWhpi3ZqDYw6VlZ8MhI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.31.0 h1:MuEG0gG27QZQrqhNl0f7vQ5Nl03OQfFeDAqWkGt+1zM= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.31.0/go.mod h1:52qtPFDDaa0FaSyyzPnxWMehx2SZv0xuobTlNEZA2JA= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0 h1:cMDtmgJ5FpRvqx9x2Aq+Mm0O6K/zcUkH73SFz20TuBw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0/go.mod h1:ceUgdyfNv4h4gLxHR0WNfDiiVmZFodZhZSbOLhpxqXE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 h1:LrHL1A3KqIgAgi6mK7Q0aczmzU414AONAGT5xtnp+uo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0/go.mod h1:w8aZL87GMOvOBa2lU/JlVXE1q4chk/0FX+8ai4513bw= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0 h1:MFAyzUPrTwLOwCi+cltN0ZVyy4phU41lwH+lyMyQTS4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0/go.mod h1:E+/KKhwOSw8yoPxSSuUHG6vKppkvhN+S1Jc7Nib3k3o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 h1:00hCSGLIxdYK/Z7r8GkaX0QIlfvgU3tmnLlQvcnix6U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0/go.mod h1:twhIvtDQW2sWP1O2cT1N8nkSBgKCRZv2z6COTTBrf8Q= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0 h1:pLP0MH4MAqeTEV0g/4flxw9O8Is48uAIauAnjznbW50= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0/go.mod h1:aFXT9Ng2seM9eizF+LfKiyPBGy8xIZKwhusC1gIu3hA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.8.0 h1:SMO1HopgdAqNRit+WA3w3dcJSGANuH/ihKXDekEHfuY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.8.0/go.mod h1:tsw+QO2+pGo7xOrPXrS27HxW8uqGQkw5AzJwdsoyvgw= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v0.28.0/go.mod h1:TrzsfQAmQaB1PDcdhBauLMk7nyyg9hm+GoQq/ekE9Iw= -go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= -go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= +go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= -go.opentelemetry.io/otel/sdk v1.6.0/go.mod h1:PjLRUfDsoPy0zl7yrDGSUqjj43tL7rEtFdCEiGlxXRM= -go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= -go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= +go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk= +go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/export/metric v0.28.0 h1:Ob5e5X1BsFPs8kfEuonHjGUu0Gt8rO/rH4KqyvIS2ns= -go.opentelemetry.io/otel/sdk/export/metric v0.28.0/go.mod h1:2HTuv+l3ia7NquArnWavCoKhXi9yBJPpKqMHr1trKa0= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/sdk/metric v0.28.0/go.mod h1:DqJmT0ovBgoW6TJ8CAQyTnwxZPIp3KWtCiDDZ1uHAzU= -go.opentelemetry.io/otel/sdk/metric v0.30.0 h1:XTqQ4y3erR2Oj8xSAOL5ovO5011ch2ELg51z4fVkpME= -go.opentelemetry.io/otel/sdk/metric v0.30.0/go.mod h1:8AKFRi5HyvTR0RRty3paN1aMC9HMT+NzcEhw/BLkLX8= +go.opentelemetry.io/otel/sdk/metric v0.31.0 h1:2sZx4R43ZMhJdteKAlKoHvRgrMp53V1aRxvEf5lCq8Q= +go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= -go.opentelemetry.io/otel/trace v1.6.0/go.mod h1:qs7BrU5cZ8dXQHBGxHMOxwME/27YH2qEp4/+tZLLwJE= -go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= -go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= -go.opentelemetry.io/proto/otlp v0.16.0 h1:WHzDWdXUvbc5bG2ObdrGfaNpQz7ft7QN9HHmJlbiB1E= -go.opentelemetry.io/proto/otlp v0.16.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.18.0 h1:W5hyXNComRa23tGpKwG+FRAc4rfF6ZUg1JReK+QHS80= +go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1049,15 +1045,14 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 h1:UreQrH7DbFXSi9ZFox6FNT3WBooWmdANpU+IfkT1T4I= +golang.org/x/net v0.0.0-20220728211354-c7608f3a8462/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1157,7 +1152,6 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1171,13 +1165,13 @@ golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= +golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1334,12 +1328,11 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg= -google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 h1:d3fKQZK+1rWQMg3xLKQbPMirUCo29I/NRdI2WarSzTg= +google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1363,9 +1356,8 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1379,8 +1371,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1417,8 +1409,9 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/systemtest/otlp_test.go b/systemtest/otlp_test.go index cd11f81f359..22090e465da 100644 --- a/systemtest/otlp_test.go +++ b/systemtest/otlp_test.go @@ -26,9 +26,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" - "go.opentelemetry.io/collector/model/otlpgrpc" - "go.opentelemetry.io/collector/model/pdata" - semconv "go.opentelemetry.io/collector/model/semconv/v1.5.0" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + semconv "go.opentelemetry.io/collector/semconv/v1.5.0" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric" @@ -205,15 +209,15 @@ func TestOTLPGRPCMetrics(t *testing.T) { conn, err := grpc.Dial(serverAddr(srv), grpc.WithInsecure(), grpc.WithBlock()) require.NoError(t, err) defer conn.Close() - metricsClient := otlpgrpc.NewMetricsClient(conn) - metrics := pdata.NewMetrics() - metric := metrics.ResourceMetrics().AppendEmpty().InstrumentationLibraryMetrics().AppendEmpty().Metrics().AppendEmpty() + metricsClient := pmetricotlp.NewClient(conn) + metrics := pmetric.NewMetrics() + metric := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() metric.SetName("summary") - metric.SetDataType(pdata.MetricDataTypeSummary) + metric.SetDataType(pmetric.MetricDataTypeSummary) summaryDP := metric.Summary().DataPoints().AppendEmpty() summaryDP.SetCount(10) summaryDP.SetSum(123.456) - metricsClient.Export(context.Background(), metrics) + metricsClient.Export(context.Background(), pmetricotlp.NewRequestFromMetrics(metrics)) result := systemtest.Elasticsearch.ExpectMinDocs(t, 2, "metrics-apm.app.*", estest.BoolQuery{Filter: []interface{}{ estest.TermQuery{Field: "processor.event", Value: "metric"}, @@ -235,10 +239,10 @@ func TestOTLPGRPCLogs(t *testing.T) { require.NoError(t, err) defer conn.Close() - logsClient := otlpgrpc.NewLogsClient(conn) + logsClient := plogotlp.NewClient(conn) logs := newLogs("a log message") - _, err = logsClient.Export(ctx, logs) + _, err = logsClient.Export(ctx, plogotlp.NewRequestFromLogs(logs)) require.NoError(t, err) result := systemtest.Elasticsearch.ExpectDocs(t, "logs-apm*", estest.TermQuery{ @@ -548,24 +552,21 @@ func (m *idGeneratorFuncs) NewSpanID(ctx context.Context, traceID trace.TraceID) return m.newSpanID(ctx, traceID) } -func newLogs(body interface{}) pdata.Logs { - logs := pdata.NewLogs() +func newLogs(body interface{}) plog.Logs { + logs := plog.NewLogs() resourceLogs := logs.ResourceLogs().AppendEmpty() - logs.ResourceLogs().At(0).Resource().Attributes().InitFromMap(map[string]pdata.AttributeValue{ - semconv.AttributeTelemetrySDKLanguage: pdata.NewAttributeValueString("go"), - }) - instrumentationLogs := resourceLogs.InstrumentationLibraryLogs().AppendEmpty() - otelLog := instrumentationLogs.Logs().AppendEmpty() - otelLog.SetTraceID(pdata.NewTraceID([16]byte{1})) - otelLog.SetSpanID(pdata.NewSpanID([8]byte{2})) - otelLog.SetName("doOperation()") - otelLog.SetSeverityNumber(pdata.SeverityNumberINFO) + logs.ResourceLogs().At(0).Resource().Attributes().InsertString( + semconv.AttributeTelemetrySDKLanguage, "go", + ) + scopeLogs := resourceLogs.ScopeLogs().AppendEmpty() + otelLog := scopeLogs.LogRecords().AppendEmpty() + otelLog.SetTraceID(pcommon.NewTraceID([16]byte{1})) + otelLog.SetSpanID(pcommon.NewSpanID([8]byte{2})) + otelLog.SetSeverityNumber(plog.SeverityNumberINFO) otelLog.SetSeverityText("Info") - otelLog.SetTimestamp(pdata.NewTimestampFromTime(time.Unix(1, 0))) - otelLog.Attributes().InitFromMap(map[string]pdata.AttributeValue{ - "key": pdata.NewAttributeValueString("value"), - "numeric_key": pdata.NewAttributeValueDouble(1234), - }) + otelLog.SetTimestamp(pcommon.NewTimestampFromTime(time.Unix(1, 0))) + otelLog.Attributes().InsertString("key", "value") + otelLog.Attributes().InsertDouble("numeric_key", 1234) switch b := body.(type) { case string: