From 14dcf5a44b6d96b8d1f5039ff2132d4577049412 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 16 Mar 2022 16:22:32 -0700 Subject: [PATCH] Update core dependency and adopt to recent changes Changes to adopt pdata API renames: - pdata.AttributeValue(\w*) -> pdata.Value$1 - pdata.NewAttributeValue(\w*) -> pdata.NewValue$1 --- cmd/configschema/go.mod | 4 +- cmd/configschema/go.sum | 7 +- cmd/mdatagen/go.mod | 4 +- cmd/mdatagen/go.sum | 8 +- cmd/mdatagen/metrics_v2.tmpl | 2 +- .../alibabacloudlogserviceexporter/go.mod | 4 +- .../alibabacloudlogserviceexporter/go.sum | 8 +- .../logsdata_to_logservice.go | 6 +- .../logsdata_to_logservice_test.go | 10 +- .../metricsdata_to_logservice.go | 8 +- .../awscloudwatchlogsexporter/exporter.go | 20 +- .../exporter_test.go | 38 +- exporter/awscloudwatchlogsexporter/go.mod | 4 +- exporter/awscloudwatchlogsexporter/go.sum | 8 +- exporter/awsemfexporter/datapoint.go | 2 +- exporter/awsemfexporter/datapoint_test.go | 18 +- exporter/awsemfexporter/emf_exporter.go | 2 +- exporter/awsemfexporter/go.mod | 4 +- exporter/awsemfexporter/go.sum | 8 +- .../awsemfexporter/metric_translator_test.go | 40 +- exporter/awsemfexporter/util.go | 8 +- exporter/awskinesisexporter/go.mod | 4 +- exporter/awskinesisexporter/go.sum | 8 +- .../awsprometheusremotewriteexporter/go.mod | 4 +- .../awsprometheusremotewriteexporter/go.sum | 8 +- exporter/awsxrayexporter/go.mod | 4 +- exporter/awsxrayexporter/go.sum | 8 +- .../internal/translator/aws.go | 8 +- .../internal/translator/aws_test.go | 62 +- .../internal/translator/cause.go | 6 +- .../internal/translator/http.go | 6 +- .../internal/translator/segment.go | 30 +- .../internal/translator/segment_test.go | 8 +- .../internal/translator/sql.go | 4 +- .../internal/translator/sql_test.go | 48 +- exporter/azuremonitorexporter/conventions.go | 16 +- .../azuremonitorexporter/conventions_test.go | 116 +-- exporter/azuremonitorexporter/go.mod | 4 +- exporter/azuremonitorexporter/go.sum | 8 +- .../azuremonitorexporter/trace_to_envelope.go | 24 +- .../trace_to_envelope_test.go | 214 +++--- exporter/carbonexporter/go.mod | 4 +- exporter/carbonexporter/go.sum | 8 +- exporter/clickhouseexporter/exporter.go | 2 +- exporter/clickhouseexporter/go.mod | 4 +- exporter/clickhouseexporter/go.sum | 8 +- exporter/coralogixexporter/go.mod | 4 +- exporter/coralogixexporter/go.sum | 8 +- exporter/datadogexporter/go.mod | 4 +- exporter/datadogexporter/go.sum | 8 +- .../internal/metrics/consumer_test.go | 6 +- .../internal/model/attributes/attributes.go | 2 +- .../model/attributes/attributes_test.go | 36 +- .../internal/model/attributes/ec2/ec2.go | 4 +- .../model/internal/testutils/test_utils.go | 2 +- .../internal/model/translator/dimensions.go | 2 +- .../model/translator/dimensions_test.go | 12 +- .../internal/testutils/test_utils.go | 2 +- exporter/datadogexporter/translate_traces.go | 4 +- .../datadogexporter/translate_traces_test.go | 38 +- exporter/dynatraceexporter/go.mod | 4 +- exporter/dynatraceexporter/go.sum | 8 +- .../serialization/serialization.go | 2 +- .../dynatraceexporter/serialization/sum.go | 2 +- .../serialization/sum_test.go | 16 +- exporter/elasticexporter/go.mod | 4 +- exporter/elasticexporter/go.sum | 8 +- .../internal/translator/elastic/metadata.go | 2 +- .../translator/elastic/metadata_test.go | 52 +- .../internal/translator/elastic/metrics.go | 2 +- .../internal/translator/elastic/traces.go | 6 +- .../translator/elastic/traces_test.go | 214 +++--- .../internal/translator/elastic/utils.go | 10 +- exporter/elasticsearchexporter/go.mod | 4 +- exporter/elasticsearchexporter/go.sum | 8 +- .../internal/objmodel/objmodel.go | 28 +- .../internal/objmodel/objmodel_test.go | 120 +-- exporter/f5cloudexporter/go.mod | 4 +- exporter/f5cloudexporter/go.sum | 8 +- exporter/fileexporter/go.mod | 4 +- exporter/fileexporter/go.sum | 8 +- exporter/googlecloudexporter/go.mod | 4 +- exporter/googlecloudexporter/go.sum | 7 +- exporter/googlecloudpubsubexporter/go.mod | 4 +- exporter/googlecloudpubsubexporter/go.sum | 8 +- exporter/honeycombexporter/go.mod | 4 +- exporter/honeycombexporter/go.sum | 8 +- exporter/honeycombexporter/translator.go | 10 +- exporter/honeycombexporter/translator_test.go | 16 +- exporter/humioexporter/go.mod | 4 +- exporter/humioexporter/go.sum | 8 +- exporter/humioexporter/traces_exporter.go | 16 +- .../humioexporter/traces_exporter_test.go | 4 +- exporter/influxdbexporter/go.mod | 4 +- exporter/influxdbexporter/go.sum | 8 +- exporter/jaegerexporter/go.mod | 4 +- exporter/jaegerexporter/go.sum | 8 +- exporter/jaegerthrifthttpexporter/go.mod | 4 +- exporter/jaegerthrifthttpexporter/go.sum | 8 +- exporter/kafkaexporter/go.mod | 4 +- exporter/kafkaexporter/go.sum | 8 +- exporter/loadbalancingexporter/go.mod | 4 +- exporter/loadbalancingexporter/go.sum | 8 +- exporter/logzioexporter/go.mod | 4 +- exporter/logzioexporter/go.sum | 8 +- exporter/lokiexporter/encode_json.go | 30 +- exporter/lokiexporter/encode_json_test.go | 34 +- exporter/lokiexporter/exporter.go | 6 +- exporter/lokiexporter/exporter_test.go | 36 +- exporter/lokiexporter/go.mod | 4 +- exporter/lokiexporter/go.sum | 8 +- exporter/newrelicexporter/go.mod | 4 +- exporter/newrelicexporter/go.sum | 8 +- exporter/newrelicexporter/metrics.go | 2 +- exporter/newrelicexporter/metrics_test.go | 14 +- exporter/newrelicexporter/transformer.go | 4 +- exporter/newrelicexporter/transformer_test.go | 8 +- exporter/observiqexporter/converter.go | 22 +- exporter/observiqexporter/converter_test.go | 22 +- exporter/observiqexporter/go.mod | 4 +- exporter/observiqexporter/go.sum | 8 +- exporter/opencensusexporter/go.mod | 4 +- exporter/opencensusexporter/go.sum | 8 +- exporter/parquetexporter/go.mod | 4 +- exporter/parquetexporter/go.sum | 8 +- exporter/prometheusexporter/accumulator.go | 2 +- .../prometheusexporter/accumulator_test.go | 2 +- exporter/prometheusexporter/collector.go | 2 +- exporter/prometheusexporter/go.mod | 4 +- exporter/prometheusexporter/go.sum | 8 +- exporter/prometheusremotewriteexporter/go.mod | 4 +- exporter/prometheusremotewriteexporter/go.sum | 8 +- .../testutil_test.go | 2 +- exporter/sapmexporter/go.mod | 4 +- exporter/sapmexporter/go.sum | 7 +- exporter/sentryexporter/go.mod | 4 +- exporter/sentryexporter/go.sum | 8 +- exporter/sentryexporter/sentry_exporter.go | 12 +- .../sentryexporter/sentry_exporter_test.go | 30 +- exporter/signalfxexporter/eventclient.go | 2 +- exporter/signalfxexporter/exporter_test.go | 8 +- exporter/signalfxexporter/go.mod | 4 +- exporter/signalfxexporter/go.sum | 8 +- .../internal/translation/converter.go | 2 +- .../internal/translation/converter_test.go | 6 +- .../translation/logdata_to_signalfxv2.go | 24 +- .../translation/logdata_to_signalfxv2_test.go | 8 +- exporter/skywalkingexporter/go.mod | 4 +- exporter/skywalkingexporter/go.sum | 8 +- .../logrecord_to_logdata.go | 6 +- .../logrecord_to_logdata_test.go | 10 +- .../metricrecord_to_metricdata.go | 8 +- exporter/splunkhecexporter/go.mod | 4 +- exporter/splunkhecexporter/go.sum | 8 +- .../splunkhecexporter/logdata_to_splunk.go | 22 +- .../logdata_to_splunk_test.go | 4 +- .../splunkhecexporter/metricdata_to_splunk.go | 4 +- .../splunkhecexporter/tracedata_to_splunk.go | 8 +- .../tracedata_to_splunk_test.go | 2 +- exporter/stackdriverexporter/go.mod | 4 +- exporter/stackdriverexporter/go.sum | 7 +- .../sumologicexporter/carbon_formatter.go | 2 +- exporter/sumologicexporter/exporter.go | 2 +- exporter/sumologicexporter/fields.go | 2 +- exporter/sumologicexporter/filter.go | 4 +- exporter/sumologicexporter/go.mod | 4 +- exporter/sumologicexporter/go.sum | 8 +- .../sumologicexporter/prometheus_formatter.go | 6 +- exporter/sumologicexporter/sender_test.go | 8 +- exporter/tanzuobservabilityexporter/go.mod | 4 +- exporter/tanzuobservabilityexporter/go.sum | 8 +- .../metrics_test.go | 10 +- .../tanzuobservabilityexporter/transformer.go | 4 +- .../tencentcloudlogserviceexporter/go.mod | 4 +- .../tencentcloudlogserviceexporter/go.sum | 8 +- .../logsdata_to_logservice.go | 6 +- .../logsdata_to_logservice_test.go | 10 +- exporter/zipkinexporter/go.mod | 4 +- exporter/zipkinexporter/go.sum | 8 +- extension/asapauthextension/go.mod | 4 +- extension/asapauthextension/go.sum | 8 +- extension/awsproxy/go.mod | 4 +- extension/awsproxy/go.sum | 8 +- extension/basicauthextension/go.mod | 4 +- extension/basicauthextension/go.sum | 8 +- extension/bearertokenauthextension/go.mod | 4 +- extension/bearertokenauthextension/go.sum | 8 +- extension/fluentbitextension/go.mod | 4 +- extension/fluentbitextension/go.sum | 8 +- extension/healthcheckextension/go.mod | 4 +- extension/healthcheckextension/go.sum | 8 +- extension/httpforwarder/go.mod | 4 +- extension/httpforwarder/go.sum | 8 +- extension/jaegerremotesampling/go.mod | 4 +- extension/jaegerremotesampling/go.sum | 8 +- extension/oauth2clientauthextension/go.mod | 4 +- extension/oauth2clientauthextension/go.sum | 8 +- extension/observer/dockerobserver/go.mod | 4 +- extension/observer/dockerobserver/go.sum | 8 +- extension/observer/ecsobserver/go.mod | 4 +- extension/observer/ecsobserver/go.sum | 8 +- extension/observer/ecstaskobserver/go.mod | 4 +- extension/observer/ecstaskobserver/go.sum | 8 +- extension/observer/hostobserver/go.mod | 4 +- extension/observer/hostobserver/go.sum | 8 +- extension/observer/k8sobserver/go.mod | 4 +- extension/observer/k8sobserver/go.sum | 8 +- extension/oidcauthextension/go.mod | 4 +- extension/oidcauthextension/go.sum | 8 +- extension/pprofextension/go.mod | 4 +- extension/pprofextension/go.sum | 8 +- extension/sigv4authextension/go.mod | 4 +- extension/sigv4authextension/go.sum | 8 +- extension/storage/go.mod | 4 +- extension/storage/go.sum | 8 +- go.mod | 4 +- go.sum | 7 +- internal/aws/containerinsight/go.mod | 2 +- internal/aws/containerinsight/go.sum | 4 +- internal/aws/cwlogs/go.mod | 4 +- internal/aws/cwlogs/go.sum | 8 +- internal/aws/ecsutil/go.mod | 4 +- internal/aws/ecsutil/go.sum | 8 +- internal/aws/proxy/go.mod | 2 +- internal/aws/proxy/go.sum | 4 +- .../coreinternal/attraction/attraction.go | 12 +- .../attraction/attraction_test.go | 428 +++++------ internal/coreinternal/attraction/hasher.go | 10 +- .../coreinternal/attraction/type_converter.go | 20 +- internal/coreinternal/go.mod | 4 +- internal/coreinternal/go.sum | 8 +- .../coreinternal/goldendataset/metrics_gen.go | 2 +- .../goldendataset/resource_generator.go | 4 +- .../goldendataset/span_generator.go | 4 +- .../processor/filterexpr/matcher_test.go | 8 +- .../processor/filterhelper/filterhelper.go | 12 +- .../filterhelper/filterhelper_test.go | 16 +- .../filtermatcher/attributematcher.go | 14 +- .../filtermatcher/filtermatcher_test.go | 18 +- internal/coreinternal/testdata/common.go | 10 +- internal/kubelet/go.mod | 2 +- internal/kubelet/go.sum | 4 +- internal/scrapertest/go.mod | 2 +- internal/scrapertest/go.sum | 4 +- internal/scrapertest/golden/golden_test.go | 14 +- internal/scrapertest/mask.go | 2 +- internal/sharedcomponent/go.mod | 4 +- internal/sharedcomponent/go.sum | 8 +- internal/splunk/go.mod | 4 +- internal/splunk/go.sum | 8 +- internal/splunk/hostid_test.go | 6 +- internal/stanza/converter.go | 10 +- internal/stanza/converter_test.go | 10 +- internal/stanza/go.mod | 4 +- internal/stanza/go.sum | 8 +- .../batchperresourceattr_test.go | 114 +-- pkg/batchperresourceattr/go.mod | 4 +- pkg/batchperresourceattr/go.sum | 8 +- pkg/batchpersignal/go.mod | 2 +- pkg/batchpersignal/go.sum | 4 +- pkg/resourcetotelemetry/go.mod | 4 +- pkg/resourcetotelemetry/go.sum | 8 +- .../resource_to_telemetry.go | 2 +- pkg/translator/jaeger/go.mod | 2 +- pkg/translator/jaeger/go.sum | 4 +- .../jaeger/jaegerproto_to_traces.go | 8 +- .../jaeger/jaegerproto_to_traces_test.go | 66 +- .../jaeger/traces_to_jaegerproto.go | 16 +- pkg/translator/opencensus/go.mod | 2 +- pkg/translator/opencensus/go.sum | 4 +- pkg/translator/opencensus/metrics_to_oc.go | 6 +- .../opencensus/metrics_to_oc_test.go | 12 +- .../opencensus/oc_to_resource_test.go | 4 +- .../opencensus/oc_to_traces_test.go | 18 +- pkg/translator/opencensus/resource_to_oc.go | 2 +- .../opencensus/resource_to_oc_test.go | 6 +- pkg/translator/opencensus/traces_to_oc.go | 20 +- .../opencensus/traces_to_oc_test.go | 14 +- pkg/translator/prometheusremotewrite/go.mod | 4 +- pkg/translator/prometheusremotewrite/go.sum | 8 +- .../prometheusremotewrite/helper.go | 4 +- .../prometheusremotewrite/helper_test.go | 30 +- .../prometheusremotewrite/testutils_test.go | 6 +- pkg/translator/signalfx/from_metrics.go | 2 +- pkg/translator/signalfx/from_metrics_test.go | 6 +- pkg/translator/signalfx/go.mod | 2 +- pkg/translator/signalfx/go.sum | 4 +- pkg/translator/zipkin/go.mod | 2 +- pkg/translator/zipkin/go.sum | 4 +- .../zipkin/internal/zipkin/attributes.go | 20 +- pkg/translator/zipkin/zipkinv1/json.go | 6 +- .../zipkin/zipkinv2/from_translator.go | 4 +- .../zipkin/zipkinv2/to_translator.go | 6 +- .../attributes_log_test.go | 198 ++--- .../attributes_metric_test.go | 182 ++--- .../attributes_trace_test.go | 222 +++--- processor/attributesprocessor/go.mod | 4 +- processor/attributesprocessor/go.sum | 8 +- processor/cumulativetodeltaprocessor/go.mod | 4 +- processor/cumulativetodeltaprocessor/go.sum | 8 +- .../internal/tracking/identity.go | 4 +- .../processor_test.go | 4 +- processor/deltatorateprocessor/go.mod | 4 +- processor/deltatorateprocessor/go.sum | 8 +- processor/filterprocessor/expr_test.go | 4 +- .../filter_processor_logs_test.go | 76 +- .../filterprocessor/filter_processor_test.go | 18 +- processor/filterprocessor/go.mod | 4 +- processor/filterprocessor/go.sum | 8 +- .../groupbyattrsprocessor/attribute_groups.go | 6 +- .../attribute_groups_test.go | 6 +- processor/groupbyattrsprocessor/go.mod | 4 +- processor/groupbyattrsprocessor/go.sum | 8 +- processor/groupbyattrsprocessor/processor.go | 2 +- .../groupbyattrsprocessor/processor_test.go | 8 +- processor/groupbytraceprocessor/go.mod | 4 +- processor/groupbytraceprocessor/go.sum | 8 +- processor/k8sattributesprocessor/go.mod | 4 +- processor/k8sattributesprocessor/go.sum | 8 +- .../k8sattributesprocessor/pod_association.go | 2 +- processor/k8sattributesprocessor/processor.go | 6 +- .../k8sattributesprocessor/processor_test.go | 12 +- processor/metricsgenerationprocessor/go.mod | 4 +- processor/metricsgenerationprocessor/go.sum | 8 +- processor/metricstransformprocessor/go.mod | 4 +- processor/metricstransformprocessor/go.sum | 8 +- .../probabilisticsamplerprocessor/go.mod | 4 +- .../probabilisticsamplerprocessor/go.sum | 8 +- .../probabilisticsampler.go | 6 +- .../probabilisticsampler_test.go | 52 +- processor/redactionprocessor/go.mod | 4 +- processor/redactionprocessor/go.sum | 8 +- processor/resourcedetectionprocessor/go.mod | 4 +- processor/resourcedetectionprocessor/go.sum | 8 +- .../internal/aws/ecs/ecs.go | 12 +- .../internal/aws/ecs/ecs_test.go | 4 +- .../internal/resourcedetection.go | 18 +- .../internal/resourcedetection_test.go | 4 +- .../internal/testutils.go | 8 +- .../resourcedetection_processor_test.go | 2 +- processor/resourceprocessor/go.mod | 4 +- processor/resourceprocessor/go.sum | 8 +- processor/routingprocessor/go.mod | 4 +- processor/routingprocessor/go.sum | 8 +- processor/spanmetricsprocessor/go.mod | 4 +- processor/spanmetricsprocessor/go.sum | 8 +- processor/spanmetricsprocessor/processor.go | 6 +- .../spanmetricsprocessor/processor_test.go | 46 +- processor/spanprocessor/go.mod | 4 +- processor/spanprocessor/go.sum | 8 +- processor/spanprocessor/span.go | 8 +- processor/spanprocessor/span_test.go | 208 +++--- processor/tailsamplingprocessor/go.mod | 4 +- processor/tailsamplingprocessor/go.sum | 8 +- .../internal/sampling/always_sample_test.go | 2 +- .../sampling/numeric_tag_filter_test.go | 12 +- .../internal/sampling/probabilistic_test.go | 2 +- .../internal/sampling/rate_limiting_test.go | 2 +- .../sampling/string_tag_filter_test.go | 34 +- processor/transformprocessor/go.mod | 4 +- processor/transformprocessor/go.sum | 8 +- .../internal/traces/functions.go | 2 +- .../internal/traces/traces.go | 24 +- .../internal/traces/traces_test.go | 20 +- receiver/apachereceiver/go.mod | 4 +- receiver/apachereceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 16 +- receiver/awscontainerinsightreceiver/go.mod | 4 +- receiver/awscontainerinsightreceiver/go.sum | 8 +- .../awsecscontainermetricsreceiver/go.mod | 4 +- .../awsecscontainermetricsreceiver/go.sum | 8 +- .../awsecscontainermetrics/accumulator.go | 2 +- receiver/awsfirehosereceiver/go.mod | 4 +- receiver/awsfirehosereceiver/go.sum | 8 +- receiver/awsxrayreceiver/go.mod | 4 +- receiver/awsxrayreceiver/go.sum | 8 +- .../internal/translator/annotations_test.go | 14 +- .../internal/translator/translator_test.go | 244 +++--- receiver/carbonreceiver/go.mod | 4 +- receiver/carbonreceiver/go.sum | 8 +- receiver/cloudfoundryreceiver/go.mod | 4 +- receiver/cloudfoundryreceiver/go.sum | 8 +- receiver/collectdreceiver/go.mod | 4 +- receiver/collectdreceiver/go.sum | 8 +- receiver/couchbasereceiver/go.mod | 4 +- receiver/couchbasereceiver/go.sum | 8 +- receiver/couchdbreceiver/go.mod | 4 +- receiver/couchdbreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 8 +- receiver/dockerstatsreceiver/go.mod | 4 +- receiver/dockerstatsreceiver/go.sum | 8 +- receiver/dotnetdiagnosticsreceiver/go.mod | 4 +- receiver/dotnetdiagnosticsreceiver/go.sum | 8 +- receiver/elasticsearchreceiver/go.mod | 4 +- receiver/elasticsearchreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 34 +- receiver/filelogreceiver/go.mod | 4 +- receiver/filelogreceiver/go.sum | 8 +- receiver/fluentforwardreceiver/conversion.go | 28 +- .../fluentforwardreceiver/conversion_test.go | 62 +- receiver/fluentforwardreceiver/go.mod | 4 +- receiver/fluentforwardreceiver/go.sum | 8 +- .../fluentforwardreceiver/receiver_test.go | 128 ++-- receiver/fluentforwardreceiver/util_test.go | 4 +- receiver/googlecloudpubsubreceiver/go.mod | 4 +- receiver/googlecloudpubsubreceiver/go.sum | 8 +- receiver/googlecloudspannerreceiver/go.mod | 4 +- receiver/googlecloudspannerreceiver/go.sum | 8 +- receiver/hostmetricsreceiver/go.mod | 4 +- receiver/hostmetricsreceiver/go.sum | 8 +- .../scraper/cpuscraper/cpu_scraper_test.go | 32 +- .../internal/metadata/generated_metrics_v2.go | 8 +- .../scraper/diskscraper/disk_scraper_test.go | 8 +- .../internal/metadata/generated_metrics_v2.go | 22 +- .../filesystem_scraper_test.go | 28 +- .../internal/metadata/generated_metrics_v2.go | 28 +- .../internal/metadata/generated_metrics_v2.go | 4 +- .../memoryscraper/memory_scraper_test.go | 28 +- .../internal/metadata/generated_metrics_v2.go | 20 +- .../networkscraper/network_scraper_test.go | 6 +- .../internal/metadata/generated_metrics_v2.go | 14 +- .../pagingscraper/paging_scraper_test.go | 32 +- .../internal/metadata/generated_metrics_v2.go | 4 +- .../processscraper/process_scraper_test.go | 10 +- .../hostmetricsreceiver/internal/testutils.go | 4 +- receiver/influxdbreceiver/go.mod | 4 +- receiver/influxdbreceiver/go.sum | 8 +- receiver/jaegerreceiver/go.mod | 4 +- receiver/jaegerreceiver/go.sum | 8 +- receiver/jmxreceiver/go.mod | 4 +- receiver/jmxreceiver/go.sum | 8 +- receiver/journaldreceiver/go.mod | 4 +- receiver/journaldreceiver/go.sum | 8 +- receiver/k8sclusterreceiver/go.mod | 4 +- receiver/k8sclusterreceiver/go.sum | 8 +- receiver/k8seventsreceiver/go.mod | 4 +- receiver/k8seventsreceiver/go.sum | 8 +- receiver/kafkametricsreceiver/go.mod | 4 +- receiver/kafkametricsreceiver/go.sum | 8 +- receiver/kafkareceiver/go.mod | 4 +- receiver/kafkareceiver/go.sum | 8 +- receiver/kubeletstatsreceiver/go.mod | 4 +- receiver/kubeletstatsreceiver/go.sum | 8 +- .../internal/kubelet/volume_test.go | 74 +- receiver/memcachedreceiver/go.mod | 4 +- receiver/memcachedreceiver/go.sum | 8 +- receiver/memcachedreceiver/scraper.go | 46 +- receiver/mongodbatlasreceiver/go.mod | 4 +- receiver/mongodbatlasreceiver/go.sum | 8 +- .../internal/metadata/metric_name_mapping.go | 702 +++++++++--------- receiver/mongodbreceiver/go.mod | 4 +- receiver/mongodbreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 26 +- receiver/mysqlreceiver/go.mod | 4 +- receiver/mysqlreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 30 +- receiver/nginxreceiver/go.mod | 4 +- receiver/nginxreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 2 +- receiver/opencensusreceiver/go.mod | 4 +- receiver/opencensusreceiver/go.sum | 8 +- receiver/podmanreceiver/go.mod | 4 +- receiver/podmanreceiver/go.sum | 8 +- receiver/postgresqlreceiver/go.mod | 4 +- receiver/postgresqlreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 26 +- receiver/prometheusexecreceiver/go.mod | 4 +- receiver/prometheusexecreceiver/go.sum | 8 +- receiver/prometheusreceiver/go.mod | 4 +- receiver/prometheusreceiver/go.sum | 8 +- .../internal/otlp_metrics_adjuster.go | 2 +- .../metrics_receiver_labels_test.go | 8 +- receiver/rabbitmqreceiver/go.mod | 4 +- receiver/rabbitmqreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 2 +- receiver/receivercreator/go.mod | 4 +- receiver/receivercreator/go.sum | 8 +- receiver/redisreceiver/go.mod | 4 +- receiver/redisreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 8 +- receiver/sapmreceiver/go.mod | 4 +- receiver/sapmreceiver/go.sum | 7 +- receiver/signalfxreceiver/go.mod | 4 +- receiver/signalfxreceiver/go.sum | 8 +- receiver/signalfxreceiver/receiver.go | 2 +- .../signalfxv2_event_to_logdata.go | 2 +- .../signalfxv2_event_to_logdata_test.go | 6 +- receiver/simpleprometheusreceiver/go.mod | 4 +- receiver/simpleprometheusreceiver/go.sum | 8 +- receiver/skywalkingreceiver/go.mod | 4 +- receiver/skywalkingreceiver/go.sum | 8 +- receiver/splunkhecreceiver/go.mod | 4 +- receiver/splunkhecreceiver/go.sum | 8 +- .../splunkhecreceiver/splunk_to_logdata.go | 26 +- .../splunk_to_logdata_test.go | 24 +- receiver/statsdreceiver/go.mod | 4 +- receiver/statsdreceiver/go.sum | 8 +- receiver/syslogreceiver/go.mod | 4 +- receiver/syslogreceiver/go.sum | 8 +- receiver/tcplogreceiver/go.mod | 4 +- receiver/tcplogreceiver/go.sum | 8 +- receiver/udplogreceiver/go.mod | 4 +- receiver/udplogreceiver/go.sum | 8 +- receiver/wavefrontreceiver/go.mod | 4 +- receiver/wavefrontreceiver/go.sum | 8 +- receiver/windowsperfcountersreceiver/go.mod | 4 +- receiver/windowsperfcountersreceiver/go.sum | 8 +- receiver/zipkinreceiver/go.mod | 4 +- receiver/zipkinreceiver/go.sum | 8 +- .../zipkinreceiver/trace_receiver_test.go | 22 +- receiver/zookeeperreceiver/go.mod | 4 +- receiver/zookeeperreceiver/go.sum | 8 +- .../internal/metadata/generated_metrics_v2.go | 4 +- .../correctnesstests/metrics/metric_diff.go | 2 +- testbed/datasenders/fluent.go | 22 +- testbed/datasenders/fluentbit.go | 10 +- testbed/datasenders/k8s.go | 12 +- testbed/datasenders/stanza.go | 12 +- testbed/datasenders/syslog.go | 2 +- testbed/datasenders/tcpudp.go | 2 +- testbed/go.mod | 4 +- testbed/go.sum | 7 +- .../mockawsxrayreceiver/go.mod | 4 +- .../mockawsxrayreceiver/go.sum | 8 +- testbed/testbed/validator.go | 12 +- 525 files changed, 3788 insertions(+), 3781 deletions(-) diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 6c0eadea0568..5cf1326c5e6f 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 golang.org/x/mod v0.5.1 ) diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index 7b32a2d7898e..cb3afb9167ab 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -2270,13 +2270,14 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= 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.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index 58c3fa1c9b36..52426fc46f22 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -7,8 +7,8 @@ require ( github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.10.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum index c5478afaca5d..9db2b445bdf3 100644 --- a/cmd/mdatagen/go.sum +++ b/cmd/mdatagen/go.sum @@ -137,10 +137,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.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= diff --git a/cmd/mdatagen/metrics_v2.tmpl b/cmd/mdatagen/metrics_v2.tmpl index 8fdf348d3c8c..be3916d53be8 100644 --- a/cmd/mdatagen/metrics_v2.tmpl +++ b/cmd/mdatagen/metrics_v2.tmpl @@ -67,7 +67,7 @@ func (m *metric{{ $name.Render }}) recordDataPoint(start pdata.Timestamp, ts pda dp.Set{{ $metric.Data.MetricValueType }}Val(val) {{- end }} {{- range $metric.Attributes }} - dp.Attributes().Insert(A.{{ .Render }}, pdata.NewAttributeValueString({{ .RenderUnexported }}AttributeValue)) + dp.Attributes().Insert(A.{{ .Render }}, pdata.NewValueString({{ .RenderUnexported }}AttributeValue)) {{- end }} } diff --git a/exporter/alibabacloudlogserviceexporter/go.mod b/exporter/alibabacloudlogserviceexporter/go.mod index 58668cfa035e..5307ced7c1df 100644 --- a/exporter/alibabacloudlogserviceexporter/go.mod +++ b/exporter/alibabacloudlogserviceexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/alibabacloudlogserviceexporter/go.sum b/exporter/alibabacloudlogserviceexporter/go.sum index 2105a05ec9f6..af3efb3a4b7e 100644 --- a/exporter/alibabacloudlogserviceexporter/go.sum +++ b/exporter/alibabacloudlogserviceexporter/go.sum @@ -366,10 +366,10 @@ go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/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 v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go index e72497eba66e..3ffad1f5b6e6 100644 --- a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go +++ b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go @@ -92,7 +92,7 @@ func resourceToLogContents(resource pdata.Resource) []*sls.LogContent { } fields := map[string]interface{}{} - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { if k == conventions.AttributeServiceName || k == conventions.AttributeHostName { return true } @@ -124,7 +124,7 @@ func instrumentationLibraryToLogContents(instrumentationLibrary pdata.Instrument func mapLogRecordToLogService(lr pdata.LogRecord, resourceContents, instrumentationLibraryContents []*sls.LogContent) *sls.Log { - if lr.Body().Type() == pdata.AttributeValueTypeEmpty { + if lr.Body().Type() == pdata.ValueTypeEmpty { return nil } var slsLog sls.Log @@ -153,7 +153,7 @@ func mapLogRecordToLogService(lr pdata.LogRecord, }) fields := map[string]interface{}{} - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { fields[k] = v.AsString() return true }) diff --git a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice_test.go b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice_test.go index 78d0bd202ef6..441a298224c1 100644 --- a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice_test.go +++ b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice_test.go @@ -25,19 +25,19 @@ import ( conventions "go.opentelemetry.io/collector/model/semconv/v1.6.1" ) -func getComplexAttributeValueMap() pdata.AttributeValue { - mapVal := pdata.NewAttributeValueMap() +func getComplexAttributeValueMap() pdata.Value { + mapVal := pdata.NewValueMap() mapValReal := mapVal.MapVal() mapValReal.InsertBool("result", true) mapValReal.InsertString("status", "ok") mapValReal.InsertDouble("value", 1.3) mapValReal.InsertInt("code", 200) mapValReal.InsertNull("null") - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") mapValReal.Insert("array", arrayVal) - subMapVal := pdata.NewAttributeValueMap() + subMapVal := pdata.NewValueMap() subMapVal.MapVal().InsertString("data", "hello world") mapValReal.Insert("map", subMapVal) @@ -75,7 +75,7 @@ func createLogData(numberOfLogs int) pdata.Logs { logRecord.Attributes().Insert("map-value", getComplexAttributeValueMap()) logRecord.Body().SetStringVal("log contents") case 6: - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") logRecord.Attributes().Insert("array-value", arrayVal) logRecord.Body().SetStringVal("log contents") diff --git a/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go b/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go index d11d2cd148d1..f46ba2c1c1cc 100644 --- a/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go +++ b/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go @@ -158,7 +158,7 @@ func min(l, r int) int { func resourceToMetricLabels(labels *KeyValues, resource pdata.Resource) { attrs := resource.Attributes() - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { labels.keyValues = append(labels.keyValues, KeyValue{ Key: k, Value: v.AsString(), @@ -172,7 +172,7 @@ func numberMetricsToLogs(name string, data pdata.NumberDataPointSlice, defaultLa dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := defaultLabels.Clone() - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels.Append(k, v.AsString()) return true }) @@ -203,7 +203,7 @@ func doubleHistogramMetricsToLogs(name string, data pdata.HistogramDataPointSlic dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := defaultLabels.Clone() - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels.Append(k, v.AsString()) return true }) @@ -251,7 +251,7 @@ func doubleSummaryMetricsToLogs(name string, data pdata.SummaryDataPointSlice, d dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := defaultLabels.Clone() - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels.Append(k, v.AsString()) return true }) diff --git a/exporter/awscloudwatchlogsexporter/exporter.go b/exporter/awscloudwatchlogsexporter/exporter.go index bd6cc5f261ec..9f0234937122 100644 --- a/exporter/awscloudwatchlogsexporter/exporter.go +++ b/exporter/awscloudwatchlogsexporter/exporter.go @@ -216,38 +216,38 @@ func attrsValue(attrs pdata.AttributeMap) map[string]interface{} { return nil } out := make(map[string]interface{}, attrs.Len()) - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { out[k] = attrValue(v) return true }) return out } -func attrValue(value pdata.AttributeValue) interface{} { +func attrValue(value pdata.Value) interface{} { switch value.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return value.IntVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return value.BoolVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return value.DoubleVal() - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return value.StringVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: values := map[string]interface{}{} - value.MapVal().Range(func(k string, v pdata.AttributeValue) bool { + value.MapVal().Range(func(k string, v pdata.Value) bool { values[k] = attrValue(v) return true }) return values - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: arrayVal := value.SliceVal() values := make([]interface{}, arrayVal.Len()) for i := 0; i < arrayVal.Len(); i++ { values[i] = attrValue(arrayVal.At(i)) } return values - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: return nil default: return nil diff --git a/exporter/awscloudwatchlogsexporter/exporter_test.go b/exporter/awscloudwatchlogsexporter/exporter_test.go index 593da00bdbd0..69cc7fc73e98 100644 --- a/exporter/awscloudwatchlogsexporter/exporter_test.go +++ b/exporter/awscloudwatchlogsexporter/exporter_test.go @@ -149,41 +149,41 @@ func testLogRecordWithoutTrace() pdata.LogRecord { func TestAttrValue(t *testing.T) { tests := []struct { name string - builder func() pdata.AttributeValue + builder func() pdata.Value want interface{} }{ { name: "null", - builder: func() pdata.AttributeValue { - return pdata.NewAttributeValueEmpty() + builder: func() pdata.Value { + return pdata.NewValueEmpty() }, want: nil, }, { name: "bool", - builder: func() pdata.AttributeValue { - return pdata.NewAttributeValueBool(true) + builder: func() pdata.Value { + return pdata.NewValueBool(true) }, want: true, }, { name: "int", - builder: func() pdata.AttributeValue { - return pdata.NewAttributeValueInt(5) + builder: func() pdata.Value { + return pdata.NewValueInt(5) }, want: int64(5), }, { name: "double", - builder: func() pdata.AttributeValue { - return pdata.NewAttributeValueDouble(6.7) + builder: func() pdata.Value { + return pdata.NewValueDouble(6.7) }, want: float64(6.7), }, { name: "map", - builder: func() pdata.AttributeValue { - mAttr := pdata.NewAttributeValueMap() + builder: func() pdata.Value { + mAttr := pdata.NewValueMap() m := mAttr.MapVal() m.InsertString("key1", "value1") m.InsertNull("key2") @@ -202,15 +202,15 @@ func TestAttrValue(t *testing.T) { }, { name: "array", - builder: func() pdata.AttributeValue { - arrAttr := pdata.NewAttributeValueArray() + builder: func() pdata.Value { + arrAttr := pdata.NewValueArray() arr := arrAttr.SliceVal() - for _, av := range []pdata.AttributeValue{ - pdata.NewAttributeValueDouble(1.2), - pdata.NewAttributeValueDouble(1.6), - pdata.NewAttributeValueBool(true), - pdata.NewAttributeValueString("hello"), - pdata.NewAttributeValueEmpty(), + for _, av := range []pdata.Value{ + pdata.NewValueDouble(1.2), + pdata.NewValueDouble(1.6), + pdata.NewValueBool(true), + pdata.NewValueString("hello"), + pdata.NewValueEmpty(), } { tgt := arr.AppendEmpty() av.CopyTo(tgt) diff --git a/exporter/awscloudwatchlogsexporter/go.mod b/exporter/awscloudwatchlogsexporter/go.mod index e31374e91414..c7606ec9ba67 100644 --- a/exporter/awscloudwatchlogsexporter/go.mod +++ b/exporter/awscloudwatchlogsexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/awscloudwatchlogsexporter/go.sum b/exporter/awscloudwatchlogsexporter/go.sum index 4aac5bf09dc2..6e1b124c39d5 100644 --- a/exporter/awscloudwatchlogsexporter/go.sum +++ b/exporter/awscloudwatchlogsexporter/go.sum @@ -168,10 +168,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/awsemfexporter/datapoint.go b/exporter/awsemfexporter/datapoint.go index 98245e5d82af..8fcea6312953 100644 --- a/exporter/awsemfexporter/datapoint.go +++ b/exporter/awsemfexporter/datapoint.go @@ -200,7 +200,7 @@ func (dps summaryDataPointSlice) At(i int) (dataPoint, bool) { // and optionally adds in the OTel instrumentation library name func createLabels(attributes pdata.AttributeMap, instrLibName string) map[string]string { labels := make(map[string]string, attributes.Len()+1) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { labels[k] = v.AsString() return true }) diff --git a/exporter/awsemfexporter/datapoint_test.go b/exporter/awsemfexporter/datapoint_test.go index 06ac8d9dd6db..5d33f3e8ffad 100644 --- a/exporter/awsemfexporter/datapoint_test.go +++ b/exporter/awsemfexporter/datapoint_test.go @@ -263,7 +263,7 @@ func TestIntDataPointSliceAt(t *testing.T) { setupDataPointCache() instrLibName := "cloudwatch-otel" - labels := map[string]pdata.AttributeValue{"label": pdata.NewAttributeValueString("value")} + labels := map[string]pdata.Value{"label": pdata.NewValueString("value")} testDeltaCases := []struct { testName string @@ -334,7 +334,7 @@ func TestDoubleDataPointSliceAt(t *testing.T) { setupDataPointCache() instrLibName := "cloudwatch-otel" - labels := map[string]pdata.AttributeValue{"label1": pdata.NewAttributeValueString("value1")} + labels := map[string]pdata.Value{"label1": pdata.NewValueString("value1")} testDeltaCases := []struct { testName string @@ -394,7 +394,7 @@ func TestDoubleDataPointSliceAt(t *testing.T) { func TestHistogramDataPointSliceAt(t *testing.T) { instrLibName := "cloudwatch-otel" - labels := map[string]pdata.AttributeValue{"label1": pdata.NewAttributeValueString("value1")} + labels := map[string]pdata.Value{"label1": pdata.NewValueString("value1")} testDPS := pdata.NewHistogramDataPointSlice() testDP := testDPS.AppendEmpty() @@ -429,7 +429,7 @@ func TestSummaryDataPointSliceAt(t *testing.T) { setupDataPointCache() instrLibName := "cloudwatch-otel" - labels := map[string]pdata.AttributeValue{"label1": pdata.NewAttributeValueString("value1")} + labels := map[string]pdata.Value{"label1": pdata.NewValueString("value1")} metadataTimeStamp := time.Now().UnixNano() / int64(time.Millisecond) testCases := []struct { @@ -518,10 +518,10 @@ func TestCreateLabels(t *testing.T) { "b": "B", "c": "C", } - labelsMap := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": pdata.NewAttributeValueString("A"), - "b": pdata.NewAttributeValueString("B"), - "c": pdata.NewAttributeValueString("C"), + labelsMap := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": pdata.NewValueString("A"), + "b": pdata.NewValueString("B"), + "c": pdata.NewValueString("C"), }) labels := createLabels(labelsMap, noInstrumentationLibraryName) @@ -646,7 +646,7 @@ func TestGetDataPoints(t *testing.T) { logger := zap.NewNop() - expectedAttributes := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{"label1": pdata.NewAttributeValueString("value1")}) + expectedAttributes := pdata.NewAttributeMapFromMap(map[string]pdata.Value{"label1": pdata.NewValueString("value1")}) t.Run(tc.testName, func(t *testing.T) { setupDataPointCache() diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index 837e3b53291f..f18b83d0a787 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -124,7 +124,7 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pdata.Metrics) err rm := rms.At(i) am := rm.Resource().Attributes() if am.Len() > 0 { - am.Range(func(k string, v pdata.AttributeValue) bool { + am.Range(func(k string, v pdata.Value) bool { labels[k] = v.StringVal() return true }) diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index 9cc4d179d4a9..ede4d5c5e743 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -13,8 +13,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 ) diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index 0720f0a6a611..1ffcb1e61eae 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -194,10 +194,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/awsemfexporter/metric_translator_test.go b/exporter/awsemfexporter/metric_translator_test.go index 83a91963cdb0..4580415e9785 100644 --- a/exporter/awsemfexporter/metric_translator_test.go +++ b/exporter/awsemfexporter/metric_translator_test.go @@ -2261,8 +2261,8 @@ func BenchmarkTranslateCWMetricToEMF(b *testing.B) { type testMetric struct { metricNames []string metricValues [][]float64 - resourceAttributeMap map[string]pdata.AttributeValue - attributeMap map[string]pdata.AttributeValue + resourceAttributeMap map[string]pdata.Value + attributeMap map[string]pdata.Value } type logGroupStreamTest struct { @@ -2292,9 +2292,9 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]pdata.AttributeValue{ - "ClusterName": pdata.NewAttributeValueString("test-cluster"), - "PodName": pdata.NewAttributeValueString("test-pod"), + resourceAttributeMap: map[string]pdata.Value{ + "ClusterName": pdata.NewValueString("test-cluster"), + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group-{ClusterName}", @@ -2307,9 +2307,9 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]pdata.AttributeValue{ - "ClusterName": pdata.NewAttributeValueString("test-cluster"), - "PodName": pdata.NewAttributeValueString("test-pod"), + resourceAttributeMap: map[string]pdata.Value{ + "ClusterName": pdata.NewValueString("test-cluster"), + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group", @@ -2322,9 +2322,9 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]pdata.AttributeValue{ - "ClusterName": pdata.NewAttributeValueString("test-cluster"), - "PodName": pdata.NewAttributeValueString("test-pod"), + attributeMap: map[string]pdata.Value{ + "ClusterName": pdata.NewValueString("test-cluster"), + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group-{ClusterName}", @@ -2337,9 +2337,9 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]pdata.AttributeValue{ - "ClusterName": pdata.NewAttributeValueString("test-cluster"), - "PodName": pdata.NewAttributeValueString("test-pod"), + attributeMap: map[string]pdata.Value{ + "ClusterName": pdata.NewValueString("test-cluster"), + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group", @@ -2352,11 +2352,11 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]pdata.AttributeValue{ - "ClusterName": pdata.NewAttributeValueString("test-cluster"), + resourceAttributeMap: map[string]pdata.Value{ + "ClusterName": pdata.NewValueString("test-cluster"), }, - attributeMap: map[string]pdata.AttributeValue{ - "PodName": pdata.NewAttributeValueString("test-pod"), + attributeMap: map[string]pdata.Value{ + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group-{ClusterName}", @@ -2380,8 +2380,8 @@ var ( inputMetrics: generateTestMetrics(testMetric{ metricNames: []string{"metric_1", "metric_2"}, metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]pdata.AttributeValue{ - "PodName": pdata.NewAttributeValueString("test-pod"), + attributeMap: map[string]pdata.Value{ + "PodName": pdata.NewValueString("test-pod"), }, }), inLogGroupName: "test-log-group-{ClusterName}", diff --git a/exporter/awsemfexporter/util.go b/exporter/awsemfexporter/util.go index c920a6e3c14e..a13ab88304af 100644 --- a/exporter/awsemfexporter/util.go +++ b/exporter/awsemfexporter/util.go @@ -72,11 +72,11 @@ func getNamespace(rm *pdata.ResourceMetrics, namespace string) string { if len(namespace) == 0 { serviceName, svcNameOk := rm.Resource().Attributes().Get(conventions.AttributeServiceName) serviceNamespace, svcNsOk := rm.Resource().Attributes().Get(conventions.AttributeServiceNamespace) - if svcNameOk && svcNsOk && serviceName.Type() == pdata.AttributeValueTypeString && serviceNamespace.Type() == pdata.AttributeValueTypeString { + if svcNameOk && svcNsOk && serviceName.Type() == pdata.ValueTypeString && serviceNamespace.Type() == pdata.ValueTypeString { namespace = fmt.Sprintf("%s/%s", serviceNamespace.StringVal(), serviceName.StringVal()) - } else if svcNameOk && serviceName.Type() == pdata.AttributeValueTypeString { + } else if svcNameOk && serviceName.Type() == pdata.ValueTypeString { namespace = serviceName.StringVal() - } else if svcNsOk && serviceNamespace.Type() == pdata.AttributeValueTypeString { + } else if svcNsOk && serviceNamespace.Type() == pdata.ValueTypeString { namespace = serviceNamespace.StringVal() } } @@ -171,7 +171,7 @@ func unixNanoToMilliseconds(timestamp pdata.Timestamp) int64 { func attrMaptoStringMap(attrMap pdata.AttributeMap) map[string]string { strMap := make(map[string]string, attrMap.Len()) - attrMap.Range(func(k string, v pdata.AttributeValue) bool { + attrMap.Range(func(k string, v pdata.Value) bool { strMap[k] = v.AsString() return true }) diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index afecbf138b4c..2c774dd6c4fd 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index c39475eb4f43..ee4240972782 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -242,10 +242,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/awsprometheusremotewriteexporter/go.mod b/exporter/awsprometheusremotewriteexporter/go.mod index 025a7fa85d80..4576364dd7c8 100644 --- a/exporter/awsprometheusremotewriteexporter/go.mod +++ b/exporter/awsprometheusremotewriteexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.43.20 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( @@ -41,7 +41,7 @@ require ( github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.7 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/exporter/awsprometheusremotewriteexporter/go.sum b/exporter/awsprometheusremotewriteexporter/go.sum index b53e1b072ebc..0cb452d9f9f5 100644 --- a/exporter/awsprometheusremotewriteexporter/go.sum +++ b/exporter/awsprometheusremotewriteexporter/go.sum @@ -1320,10 +1320,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index 1f8edb225cae..8ea072469b83 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index 19a6c7da4069..0393ee3dd554 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -170,10 +170,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/awsxrayexporter/internal/translator/aws.go b/exporter/awsxrayexporter/internal/translator/aws.go index 83c4e186d684..a388d00bed10 100644 --- a/exporter/awsxrayexporter/internal/translator/aws.go +++ b/exporter/awsxrayexporter/internal/translator/aws.go @@ -25,7 +25,7 @@ import ( awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) -func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource) (map[string]pdata.AttributeValue, *awsxray.AWSData) { +func makeAws(attributes map[string]pdata.Value, resource pdata.Resource) (map[string]pdata.Value, *awsxray.AWSData) { var ( cloud string service string @@ -65,8 +65,8 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource eks *awsxray.EKSMetadata ) - filtered := make(map[string]pdata.AttributeValue) - resource.Attributes().Range(func(key string, value pdata.AttributeValue) bool { + filtered := make(map[string]pdata.Value) + resource.Attributes().Range(func(key string, value pdata.Value) bool { switch key { case conventions.AttributeCloudProvider: cloud = value.StringVal() @@ -137,7 +137,7 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource case awsxray.AWSOperationAttribute: // Determinstically handled with if else above case awsxray.AWSAccountAttribute: - if value.Type() != pdata.AttributeValueTypeEmpty { + if value.Type() != pdata.ValueTypeEmpty { account = value.StringVal() } case awsxray.AWSRegionAttribute: diff --git a/exporter/awsxrayexporter/internal/translator/aws_test.go b/exporter/awsxrayexporter/internal/translator/aws_test.go index 5b866550ad3f..930b2850ea2d 100644 --- a/exporter/awsxrayexporter/internal/translator/aws_test.go +++ b/exporter/awsxrayexporter/internal/translator/aws_test.go @@ -40,7 +40,7 @@ func TestAwsFromEc2Resource(t *testing.T) { attrs.InsertString(conventions.AttributeHostImageID, imageID) attrs.CopyTo(resource.Attributes()) - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) filtered, awsData := makeAws(attributes, resource) @@ -89,7 +89,7 @@ func TestAwsFromEcsResource(t *testing.T) { attrs.CopyTo(resource.Attributes()) - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) filtered, awsData := makeAws(attributes, resource) @@ -125,7 +125,7 @@ func TestAwsFromBeanstalkResource(t *testing.T) { attrs.InsertString(conventions.AttributeServiceVersion, versionLabel) attrs.CopyTo(resource.Attributes()) - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) filtered, awsData := makeAws(attributes, resource) @@ -164,7 +164,7 @@ func TestAwsFromEksResource(t *testing.T) { attrs.InsertString(conventions.AttributeHostType, "m5.xlarge") attrs.CopyTo(resource.Attributes()) - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) filtered, awsData := makeAws(attributes, resource) @@ -203,12 +203,12 @@ func TestAwsWithAwsSqsResources(t *testing.T) { attrs.InsertString(conventions.AttributeHostType, "m5.xlarge") queueURL := "https://sqs.use1.amazonaws.com/Meltdown-Alerts" - attributes := make(map[string]pdata.AttributeValue) - attributes[awsxray.AWSOperationAttribute] = pdata.NewAttributeValueString("SendMessage") - attributes[awsxray.AWSAccountAttribute] = pdata.NewAttributeValueString("987654321") - attributes[awsxray.AWSRegionAttribute] = pdata.NewAttributeValueString("us-east-2") - attributes[awsxray.AWSQueueURLAttribute] = pdata.NewAttributeValueString(queueURL) - attributes["employee.id"] = pdata.NewAttributeValueString("XB477") + attributes := make(map[string]pdata.Value) + attributes[awsxray.AWSOperationAttribute] = pdata.NewValueString("SendMessage") + attributes[awsxray.AWSAccountAttribute] = pdata.NewValueString("987654321") + attributes[awsxray.AWSRegionAttribute] = pdata.NewValueString("us-east-2") + attributes[awsxray.AWSQueueURLAttribute] = pdata.NewValueString(queueURL) + attributes["employee.id"] = pdata.NewValueString("XB477") filtered, awsData := makeAws(attributes, resource) @@ -220,8 +220,8 @@ func TestAwsWithAwsSqsResources(t *testing.T) { func TestAwsWithRpcAttributes(t *testing.T) { resource := pdata.NewResource() - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeRPCMethod] = pdata.NewAttributeValueString("ListBuckets") + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeRPCMethod] = pdata.NewValueString("ListBuckets") _, awsData := makeAws(attributes, resource) @@ -231,8 +231,8 @@ func TestAwsWithRpcAttributes(t *testing.T) { func TestAwsWithSqsAlternateAttribute(t *testing.T) { queueURL := "https://sqs.use1.amazonaws.com/Meltdown-Alerts" - attributes := make(map[string]pdata.AttributeValue) - attributes[awsxray.AWSQueueURLAttribute2] = pdata.NewAttributeValueString(queueURL) + attributes := make(map[string]pdata.Value) + attributes[awsxray.AWSQueueURLAttribute2] = pdata.NewValueString(queueURL) filtered, awsData := makeAws(attributes, pdata.NewResource()) @@ -263,11 +263,11 @@ func TestAwsWithAwsDynamoDbResources(t *testing.T) { attrs.InsertString(conventions.AttributeHostType, "m5.xlarge") tableName := "WIDGET_TYPES" - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeRPCMethod] = pdata.NewAttributeValueString("IncorrectAWSSDKOperation") - attributes[awsxray.AWSOperationAttribute] = pdata.NewAttributeValueString("PutItem") - attributes[awsxray.AWSRequestIDAttribute] = pdata.NewAttributeValueString("75107C82-EC8A-4F75-883F-4440B491B0AB") - attributes[awsxray.AWSTableNameAttribute] = pdata.NewAttributeValueString(tableName) + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeRPCMethod] = pdata.NewValueString("IncorrectAWSSDKOperation") + attributes[awsxray.AWSOperationAttribute] = pdata.NewValueString("PutItem") + attributes[awsxray.AWSRequestIDAttribute] = pdata.NewValueString("75107C82-EC8A-4F75-883F-4440B491B0AB") + attributes[awsxray.AWSTableNameAttribute] = pdata.NewValueString(tableName) filtered, awsData := makeAws(attributes, resource) @@ -280,8 +280,8 @@ func TestAwsWithAwsDynamoDbResources(t *testing.T) { func TestAwsWithDynamoDbAlternateAttribute(t *testing.T) { tableName := "MyTable" - attributes := make(map[string]pdata.AttributeValue) - attributes[awsxray.AWSTableNameAttribute2] = pdata.NewAttributeValueString(tableName) + attributes := make(map[string]pdata.Value) + attributes[awsxray.AWSTableNameAttribute2] = pdata.NewValueString(tableName) filtered, awsData := makeAws(attributes, pdata.NewResource()) @@ -292,8 +292,8 @@ func TestAwsWithDynamoDbAlternateAttribute(t *testing.T) { func TestAwsWithRequestIdAlternateAttribute(t *testing.T) { requestid := "12345-request" - attributes := make(map[string]pdata.AttributeValue) - attributes[awsxray.AWSRequestIDAttribute2] = pdata.NewAttributeValueString(requestid) + attributes := make(map[string]pdata.Value) + attributes[awsxray.AWSRequestIDAttribute2] = pdata.NewValueString(requestid) filtered, awsData := makeAws(attributes, pdata.NewResource()) @@ -303,7 +303,7 @@ func TestAwsWithRequestIdAlternateAttribute(t *testing.T) { } func TestJavaSDK(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() resource.Attributes().InsertString(conventions.AttributeTelemetrySDKName, "opentelemetry") resource.Attributes().InsertString(conventions.AttributeTelemetrySDKLanguage, "java") @@ -318,7 +318,7 @@ func TestJavaSDK(t *testing.T) { } func TestJavaAutoInstrumentation(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() resource.Attributes().InsertString(conventions.AttributeTelemetrySDKName, "opentelemetry") resource.Attributes().InsertString(conventions.AttributeTelemetrySDKLanguage, "java") @@ -335,7 +335,7 @@ func TestJavaAutoInstrumentation(t *testing.T) { } func TestGoSDK(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() resource.Attributes().InsertString(conventions.AttributeTelemetrySDKName, "opentelemetry") resource.Attributes().InsertString(conventions.AttributeTelemetrySDKLanguage, "go") @@ -350,7 +350,7 @@ func TestGoSDK(t *testing.T) { } func TestCustomSDK(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() resource.Attributes().InsertString(conventions.AttributeTelemetrySDKName, "opentracing") resource.Attributes().InsertString(conventions.AttributeTelemetrySDKLanguage, "java") @@ -372,9 +372,9 @@ func TestLogGroups(t *testing.T) { LogGroup: awsxray.String("group2"), } - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() - lg := pdata.NewAttributeValueArray() + lg := pdata.NewValueArray() ava := lg.SliceVal() ava.EnsureCapacity(2) ava.AppendEmpty().SetStringVal("group1") @@ -403,9 +403,9 @@ func TestLogGroupsFromArns(t *testing.T) { Arn: awsxray.String(group2), } - attributes := make(map[string]pdata.AttributeValue) + attributes := make(map[string]pdata.Value) resource := pdata.NewResource() - lga := pdata.NewAttributeValueArray() + lga := pdata.NewValueArray() ava := lga.SliceVal() ava.EnsureCapacity(2) ava.AppendEmpty().SetStringVal(group1) diff --git a/exporter/awsxrayexporter/internal/translator/cause.go b/exporter/awsxrayexporter/internal/translator/cause.go index 8f69a75007c0..8c84f559798c 100644 --- a/exporter/awsxrayexporter/internal/translator/cause.go +++ b/exporter/awsxrayexporter/internal/translator/cause.go @@ -32,8 +32,8 @@ import ( // TODO: Remove this when collector defines this semantic convention. const ExceptionEventName = "exception" -func makeCause(span pdata.Span, attributes map[string]pdata.AttributeValue, resource pdata.Resource) (isError, isFault, isThrottle bool, - filtered map[string]pdata.AttributeValue, cause *awsxray.CauseData) { +func makeCause(span pdata.Span, attributes map[string]pdata.Value, resource pdata.Resource) (isError, isFault, isThrottle bool, + filtered map[string]pdata.Value, cause *awsxray.CauseData) { status := span.Status() if status.Code() != pdata.StatusCodeError { return false, false, false, attributes, nil @@ -91,7 +91,7 @@ func makeCause(span pdata.Span, attributes map[string]pdata.AttributeValue, reso } else { // Use OpenCensus behavior if we didn't find any exception events to ease migration. message = status.Message() - filtered = make(map[string]pdata.AttributeValue) + filtered = make(map[string]pdata.Value) for key, value := range attributes { switch key { case "http.status_text": diff --git a/exporter/awsxrayexporter/internal/translator/http.go b/exporter/awsxrayexporter/internal/translator/http.go index 1cf2c8eaf126..d7c353ec0a24 100644 --- a/exporter/awsxrayexporter/internal/translator/http.go +++ b/exporter/awsxrayexporter/internal/translator/http.go @@ -24,13 +24,13 @@ import ( awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) -func makeHTTP(span pdata.Span) (map[string]pdata.AttributeValue, *awsxray.HTTPData) { +func makeHTTP(span pdata.Span) (map[string]pdata.Value, *awsxray.HTTPData) { var ( info = awsxray.HTTPData{ Request: &awsxray.RequestData{}, Response: &awsxray.ResponseData{}, } - filtered = make(map[string]pdata.AttributeValue) + filtered = make(map[string]pdata.Value) urlParts = make(map[string]string) ) @@ -41,7 +41,7 @@ func makeHTTP(span pdata.Span) (map[string]pdata.AttributeValue, *awsxray.HTTPDa hasHTTP := false hasHTTPRequestURLAttributes := false - span.Attributes().Range(func(key string, value pdata.AttributeValue) bool { + span.Attributes().Range(func(key string, value pdata.Value) bool { switch key { case conventions.AttributeHTTPMethod: info.Request.Method = awsxray.String(value.StringVal()) diff --git a/exporter/awsxrayexporter/internal/translator/segment.go b/exporter/awsxrayexporter/internal/translator/segment.go index 70bffc53ea88..b618ef0a5aa5 100644 --- a/exporter/awsxrayexporter/internal/translator/segment.go +++ b/exporter/awsxrayexporter/internal/translator/segment.go @@ -318,7 +318,7 @@ func timestampToFloatSeconds(ts pdata.Timestamp) float64 { return float64(ts) / float64(time.Second) } -func makeXRayAttributes(attributes map[string]pdata.AttributeValue, resource pdata.Resource, storeResource bool, indexedAttrs []string, indexAllAttrs bool) ( +func makeXRayAttributes(attributes map[string]pdata.Value, resource pdata.Resource, storeResource bool, indexedAttrs []string, indexAllAttrs bool) ( string, map[string]interface{}, map[string]map[string]interface{}) { var ( annotations = map[string]interface{}{} @@ -345,7 +345,7 @@ func makeXRayAttributes(attributes map[string]pdata.AttributeValue, resource pda } if storeResource { - resource.Attributes().Range(func(key string, value pdata.AttributeValue) bool { + resource.Attributes().Range(func(key string, value pdata.Value) bool { key = "otel.resource." + key annoVal := annotationValue(value) indexed := indexAllAttrs || indexedKeys[key] @@ -394,38 +394,38 @@ func makeXRayAttributes(attributes map[string]pdata.AttributeValue, resource pda return user, annotations, metadata } -func annotationValue(value pdata.AttributeValue) interface{} { +func annotationValue(value pdata.Value) interface{} { switch value.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return value.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return value.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return value.DoubleVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return value.BoolVal() } return nil } -func metadataValue(value pdata.AttributeValue) interface{} { +func metadataValue(value pdata.Value) interface{} { switch value.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return value.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return value.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return value.DoubleVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return value.BoolVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: converted := map[string]interface{}{} - value.MapVal().Range(func(key string, value pdata.AttributeValue) bool { + value.MapVal().Range(func(key string, value pdata.Value) bool { converted[key] = metadataValue(value) return true }) return converted - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: arrVal := value.SliceVal() converted := make([]interface{}, arrVal.Len()) for i := 0; i < arrVal.Len(); i++ { diff --git a/exporter/awsxrayexporter/internal/translator/segment_test.go b/exporter/awsxrayexporter/internal/translator/segment_test.go index 285f1ce546cc..61ecca81d792 100644 --- a/exporter/awsxrayexporter/internal/translator/segment_test.go +++ b/exporter/awsxrayexporter/internal/translator/segment_test.go @@ -748,13 +748,13 @@ func TestFilteredAttributesMetadata(t *testing.T) { attrs.InsertBool("bool_value", false) attrs.InsertNull("null_value") - arrayValue := pdata.NewAttributeValueArray() + arrayValue := pdata.NewValueArray() arrayValue.SliceVal().AppendEmpty().SetIntVal(12) arrayValue.SliceVal().AppendEmpty().SetIntVal(34) arrayValue.SliceVal().AppendEmpty().SetIntVal(56) attrs.Insert("array_value", arrayValue) - mapValue := pdata.NewAttributeValueMap() + mapValue := pdata.NewValueMap() mapValue.MapVal().InsertDouble("value1", -987.65) mapValue.MapVal().InsertBool("value2", true) attrs.Insert("map_value", mapValue) @@ -866,13 +866,13 @@ func constructDefaultResource() pdata.Resource { attrs.InsertDouble(resourceDoubleKey, 5.0) attrs.InsertBool(resourceBoolKey, true) - resourceMapVal := pdata.NewAttributeValueMap() + resourceMapVal := pdata.NewValueMap() resourceMap := resourceMapVal.MapVal() resourceMap.InsertInt("key1", 1) resourceMap.InsertString("key2", "value") attrs.Insert(resourceMapKey, resourceMapVal) - resourceArrayVal := pdata.NewAttributeValueArray() + resourceArrayVal := pdata.NewValueArray() resourceArray := resourceArrayVal.SliceVal() resourceArray.AppendEmpty().SetStringVal("foo") resourceArray.AppendEmpty().SetStringVal("bar") diff --git a/exporter/awsxrayexporter/internal/translator/sql.go b/exporter/awsxrayexporter/internal/translator/sql.go index 759528bc3497..05c323ec0282 100644 --- a/exporter/awsxrayexporter/internal/translator/sql.go +++ b/exporter/awsxrayexporter/internal/translator/sql.go @@ -21,9 +21,9 @@ import ( awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) -func makeSQL(attributes map[string]pdata.AttributeValue) (map[string]pdata.AttributeValue, *awsxray.SQLData) { +func makeSQL(attributes map[string]pdata.Value) (map[string]pdata.Value, *awsxray.SQLData) { var ( - filtered = make(map[string]pdata.AttributeValue) + filtered = make(map[string]pdata.Value) sqlData awsxray.SQLData dbURL string dbSystem string diff --git a/exporter/awsxrayexporter/internal/translator/sql_test.go b/exporter/awsxrayexporter/internal/translator/sql_test.go index 7188c678fd14..d864e474aced 100644 --- a/exporter/awsxrayexporter/internal/translator/sql_test.go +++ b/exporter/awsxrayexporter/internal/translator/sql_test.go @@ -24,14 +24,14 @@ import ( ) func TestClientSpanWithStatementAttribute(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeDBSystem] = pdata.NewAttributeValueString("mysql") - attributes[conventions.AttributeDBName] = pdata.NewAttributeValueString("customers") - attributes[conventions.AttributeDBStatement] = pdata.NewAttributeValueString("SELECT * FROM user WHERE user_id = ?") - attributes[conventions.AttributeDBUser] = pdata.NewAttributeValueString("readonly_user") - attributes[conventions.AttributeDBConnectionString] = pdata.NewAttributeValueString("mysql://db.example.com:3306") - attributes[conventions.AttributeNetPeerName] = pdata.NewAttributeValueString("db.example.com") - attributes[conventions.AttributeNetPeerPort] = pdata.NewAttributeValueString("3306") + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeDBSystem] = pdata.NewValueString("mysql") + attributes[conventions.AttributeDBName] = pdata.NewValueString("customers") + attributes[conventions.AttributeDBStatement] = pdata.NewValueString("SELECT * FROM user WHERE user_id = ?") + attributes[conventions.AttributeDBUser] = pdata.NewValueString("readonly_user") + attributes[conventions.AttributeDBConnectionString] = pdata.NewValueString("mysql://db.example.com:3306") + attributes[conventions.AttributeNetPeerName] = pdata.NewValueString("db.example.com") + attributes[conventions.AttributeNetPeerPort] = pdata.NewValueString("3306") filtered, sqlData := makeSQL(attributes) @@ -48,14 +48,14 @@ func TestClientSpanWithStatementAttribute(t *testing.T) { } func TestClientSpanWithNonSQLDatabase(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeDBSystem] = pdata.NewAttributeValueString("redis") - attributes[conventions.AttributeDBName] = pdata.NewAttributeValueString("0") - attributes[conventions.AttributeDBStatement] = pdata.NewAttributeValueString("SET key value") - attributes[conventions.AttributeDBUser] = pdata.NewAttributeValueString("readonly_user") - attributes[conventions.AttributeDBConnectionString] = pdata.NewAttributeValueString("redis://db.example.com:3306") - attributes[conventions.AttributeNetPeerName] = pdata.NewAttributeValueString("db.example.com") - attributes[conventions.AttributeNetPeerPort] = pdata.NewAttributeValueString("3306") + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeDBSystem] = pdata.NewValueString("redis") + attributes[conventions.AttributeDBName] = pdata.NewValueString("0") + attributes[conventions.AttributeDBStatement] = pdata.NewValueString("SET key value") + attributes[conventions.AttributeDBUser] = pdata.NewValueString("readonly_user") + attributes[conventions.AttributeDBConnectionString] = pdata.NewValueString("redis://db.example.com:3306") + attributes[conventions.AttributeNetPeerName] = pdata.NewValueString("db.example.com") + attributes[conventions.AttributeNetPeerPort] = pdata.NewValueString("3306") filtered, sqlData := makeSQL(attributes) assert.Nil(t, sqlData) @@ -63,14 +63,14 @@ func TestClientSpanWithNonSQLDatabase(t *testing.T) { } func TestClientSpanWithoutDBurlAttribute(t *testing.T) { - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeDBSystem] = pdata.NewAttributeValueString("postgresql") - attributes[conventions.AttributeDBName] = pdata.NewAttributeValueString("customers") - attributes[conventions.AttributeDBStatement] = pdata.NewAttributeValueString("SELECT * FROM user WHERE user_id = ?") - attributes[conventions.AttributeDBUser] = pdata.NewAttributeValueString("readonly_user") - attributes[conventions.AttributeDBConnectionString] = pdata.NewAttributeValueString("") - attributes[conventions.AttributeNetPeerName] = pdata.NewAttributeValueString("db.example.com") - attributes[conventions.AttributeNetPeerPort] = pdata.NewAttributeValueString("3306") + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeDBSystem] = pdata.NewValueString("postgresql") + attributes[conventions.AttributeDBName] = pdata.NewValueString("customers") + attributes[conventions.AttributeDBStatement] = pdata.NewValueString("SELECT * FROM user WHERE user_id = ?") + attributes[conventions.AttributeDBUser] = pdata.NewValueString("readonly_user") + attributes[conventions.AttributeDBConnectionString] = pdata.NewValueString("") + attributes[conventions.AttributeNetPeerName] = pdata.NewValueString("db.example.com") + attributes[conventions.AttributeNetPeerPort] = pdata.NewValueString("3306") filtered, sqlData := makeSQL(attributes) assert.NotNil(t, filtered) assert.NotNil(t, sqlData) diff --git a/exporter/azuremonitorexporter/conventions.go b/exporter/azuremonitorexporter/conventions.go index ccfe667e86bf..27dd4a5122a6 100644 --- a/exporter/azuremonitorexporter/conventions.go +++ b/exporter/azuremonitorexporter/conventions.go @@ -45,7 +45,7 @@ type NetworkAttributes struct { } // MapAttribute attempts to map a Span attribute to one of the known types -func (attrs *NetworkAttributes) MapAttribute(k string, v pdata.AttributeValue) bool { +func (attrs *NetworkAttributes) MapAttribute(k string, v pdata.Value) bool { switch k { case conventions.AttributeNetTransport: attrs.NetTransport = v.StringVal() @@ -98,7 +98,7 @@ type HTTPAttributes struct { } // MapAttribute attempts to map a Span attribute to one of the known types -func (attrs *HTTPAttributes) MapAttribute(k string, v pdata.AttributeValue) bool { +func (attrs *HTTPAttributes) MapAttribute(k string, v pdata.Value) bool { switch k { case conventions.AttributeHTTPMethod: attrs.HTTPMethod = v.StringVal() @@ -161,7 +161,7 @@ type RPCAttributes struct { } // MapAttribute attempts to map a Span attribute to one of the known types -func (attrs *RPCAttributes) MapAttribute(k string, v pdata.AttributeValue) bool { +func (attrs *RPCAttributes) MapAttribute(k string, v pdata.Value) bool { switch k { case conventions.AttributeRPCSystem: attrs.RPCSystem = v.StringVal() @@ -196,7 +196,7 @@ type DatabaseAttributes struct { } // MapAttribute attempts to map a Span attribute to one of the known types -func (attrs *DatabaseAttributes) MapAttribute(k string, v pdata.AttributeValue) bool { +func (attrs *DatabaseAttributes) MapAttribute(k string, v pdata.Value) bool { switch k { case conventions.AttributeDBSystem: attrs.DBSystem = v.StringVal() @@ -245,7 +245,7 @@ type MessagingAttributes struct { } // MapAttribute attempts to map a Span attribute to one of the known types -func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.AttributeValue) bool { +func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.Value) bool { switch k { case conventions.AttributeMessagingSystem: attrs.MessagingSystem = v.StringVal() @@ -283,14 +283,14 @@ func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.AttributeValue) } // Tries to return the value of the attribute as an int64 -func getAttributeValueAsInt(attributeValue pdata.AttributeValue) (int64, error) { +func getAttributeValueAsInt(attributeValue pdata.Value) (int64, error) { switch attributeValue.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: // try to cast the string values to int64 if val, err := strconv.Atoi(attributeValue.StringVal()); err == nil { return int64(val), nil } - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return attributeValue.IntVal(), nil } diff --git a/exporter/azuremonitorexporter/conventions_test.go b/exporter/azuremonitorexporter/conventions_test.go index 708438ec2553..7574ed8348d9 100644 --- a/exporter/azuremonitorexporter/conventions_test.go +++ b/exporter/azuremonitorexporter/conventions_test.go @@ -23,26 +23,26 @@ import ( ) func TestHTTPAttributeMapping(t *testing.T) { - httpAttributeValues := map[string]pdata.AttributeValue{ - conventions.AttributeHTTPMethod: pdata.NewAttributeValueString(conventions.AttributeHTTPMethod), - conventions.AttributeHTTPURL: pdata.NewAttributeValueString(conventions.AttributeHTTPURL), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString(conventions.AttributeHTTPTarget), - conventions.AttributeHTTPHost: pdata.NewAttributeValueString(conventions.AttributeHTTPHost), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString(conventions.AttributeHTTPScheme), + httpAttributeValues := map[string]pdata.Value{ + conventions.AttributeHTTPMethod: pdata.NewValueString(conventions.AttributeHTTPMethod), + conventions.AttributeHTTPURL: pdata.NewValueString(conventions.AttributeHTTPURL), + conventions.AttributeHTTPTarget: pdata.NewValueString(conventions.AttributeHTTPTarget), + conventions.AttributeHTTPHost: pdata.NewValueString(conventions.AttributeHTTPHost), + conventions.AttributeHTTPScheme: pdata.NewValueString(conventions.AttributeHTTPScheme), // Exercise the INT or STRING logic - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueString("200"), - "http.status_text": pdata.NewAttributeValueString("http.status_text"), - conventions.AttributeHTTPFlavor: pdata.NewAttributeValueString(conventions.AttributeHTTPFlavor), - conventions.AttributeHTTPUserAgent: pdata.NewAttributeValueString(conventions.AttributeHTTPUserAgent), - conventions.AttributeHTTPRequestContentLength: pdata.NewAttributeValueInt(1), - conventions.AttributeHTTPRequestContentLengthUncompressed: pdata.NewAttributeValueInt(2), - conventions.AttributeHTTPResponseContentLength: pdata.NewAttributeValueInt(3), - conventions.AttributeHTTPResponseContentLengthUncompressed: pdata.NewAttributeValueInt(4), - - conventions.AttributeHTTPRoute: pdata.NewAttributeValueString(conventions.AttributeHTTPRoute), - conventions.AttributeHTTPServerName: pdata.NewAttributeValueString(conventions.AttributeHTTPServerName), - conventions.AttributeHTTPClientIP: pdata.NewAttributeValueString(conventions.AttributeHTTPClientIP), + conventions.AttributeHTTPStatusCode: pdata.NewValueString("200"), + "http.status_text": pdata.NewValueString("http.status_text"), + conventions.AttributeHTTPFlavor: pdata.NewValueString(conventions.AttributeHTTPFlavor), + conventions.AttributeHTTPUserAgent: pdata.NewValueString(conventions.AttributeHTTPUserAgent), + conventions.AttributeHTTPRequestContentLength: pdata.NewValueInt(1), + conventions.AttributeHTTPRequestContentLengthUncompressed: pdata.NewValueInt(2), + conventions.AttributeHTTPResponseContentLength: pdata.NewValueInt(3), + conventions.AttributeHTTPResponseContentLengthUncompressed: pdata.NewValueInt(4), + + conventions.AttributeHTTPRoute: pdata.NewValueString(conventions.AttributeHTTPRoute), + conventions.AttributeHTTPServerName: pdata.NewValueString(conventions.AttributeHTTPServerName), + conventions.AttributeHTTPClientIP: pdata.NewValueString(conventions.AttributeHTTPClientIP), } attributeMap := pdata.NewAttributeMapFromMap(httpAttributeValues) @@ -74,10 +74,10 @@ func TestHTTPAttributeMapping(t *testing.T) { } func TestRPCPAttributeMapping(t *testing.T) { - rpcAttributeValues := map[string]pdata.AttributeValue{ - conventions.AttributeRPCSystem: pdata.NewAttributeValueString(conventions.AttributeRPCSystem), - conventions.AttributeRPCService: pdata.NewAttributeValueString(conventions.AttributeRPCService), - conventions.AttributeRPCMethod: pdata.NewAttributeValueString(conventions.AttributeRPCMethod), + rpcAttributeValues := map[string]pdata.Value{ + conventions.AttributeRPCSystem: pdata.NewValueString(conventions.AttributeRPCSystem), + conventions.AttributeRPCService: pdata.NewValueString(conventions.AttributeRPCService), + conventions.AttributeRPCMethod: pdata.NewValueString(conventions.AttributeRPCMethod), } attributeMap := pdata.NewAttributeMapFromMap(rpcAttributeValues) @@ -96,18 +96,18 @@ func TestRPCPAttributeMapping(t *testing.T) { } func TestDatabaseAttributeMapping(t *testing.T) { - databaseAttributeValues := map[string]pdata.AttributeValue{ - conventions.AttributeDBSystem: pdata.NewAttributeValueString(conventions.AttributeDBSystem), - conventions.AttributeDBConnectionString: pdata.NewAttributeValueString(conventions.AttributeDBConnectionString), - conventions.AttributeDBUser: pdata.NewAttributeValueString(conventions.AttributeDBUser), - conventions.AttributeDBStatement: pdata.NewAttributeValueString(conventions.AttributeDBStatement), - conventions.AttributeDBOperation: pdata.NewAttributeValueString(conventions.AttributeDBOperation), - conventions.AttributeDBMSSQLInstanceName: pdata.NewAttributeValueString(conventions.AttributeDBMSSQLInstanceName), - conventions.AttributeDBJDBCDriverClassname: pdata.NewAttributeValueString(conventions.AttributeDBJDBCDriverClassname), - conventions.AttributeDBCassandraKeyspace: pdata.NewAttributeValueString(conventions.AttributeDBCassandraKeyspace), - conventions.AttributeDBHBaseNamespace: pdata.NewAttributeValueString(conventions.AttributeDBHBaseNamespace), - conventions.AttributeDBRedisDBIndex: pdata.NewAttributeValueString(conventions.AttributeDBRedisDBIndex), - conventions.AttributeDBMongoDBCollection: pdata.NewAttributeValueString(conventions.AttributeDBMongoDBCollection), + databaseAttributeValues := map[string]pdata.Value{ + conventions.AttributeDBSystem: pdata.NewValueString(conventions.AttributeDBSystem), + conventions.AttributeDBConnectionString: pdata.NewValueString(conventions.AttributeDBConnectionString), + conventions.AttributeDBUser: pdata.NewValueString(conventions.AttributeDBUser), + conventions.AttributeDBStatement: pdata.NewValueString(conventions.AttributeDBStatement), + conventions.AttributeDBOperation: pdata.NewValueString(conventions.AttributeDBOperation), + conventions.AttributeDBMSSQLInstanceName: pdata.NewValueString(conventions.AttributeDBMSSQLInstanceName), + conventions.AttributeDBJDBCDriverClassname: pdata.NewValueString(conventions.AttributeDBJDBCDriverClassname), + conventions.AttributeDBCassandraKeyspace: pdata.NewValueString(conventions.AttributeDBCassandraKeyspace), + conventions.AttributeDBHBaseNamespace: pdata.NewValueString(conventions.AttributeDBHBaseNamespace), + conventions.AttributeDBRedisDBIndex: pdata.NewValueString(conventions.AttributeDBRedisDBIndex), + conventions.AttributeDBMongoDBCollection: pdata.NewValueString(conventions.AttributeDBMongoDBCollection), } attributeMap := pdata.NewAttributeMapFromMap(databaseAttributeValues) @@ -132,19 +132,19 @@ func TestDatabaseAttributeMapping(t *testing.T) { } func TestMessagingAttributeMapping(t *testing.T) { - messagingAttributeValues := map[string]pdata.AttributeValue{ - conventions.AttributeMessagingSystem: pdata.NewAttributeValueString(conventions.AttributeMessagingSystem), - conventions.AttributeMessagingDestination: pdata.NewAttributeValueString(conventions.AttributeMessagingDestination), - conventions.AttributeMessagingDestinationKind: pdata.NewAttributeValueString(conventions.AttributeMessagingDestinationKind), - conventions.AttributeMessagingTempDestination: pdata.NewAttributeValueString(conventions.AttributeMessagingTempDestination), - conventions.AttributeMessagingProtocol: pdata.NewAttributeValueString(conventions.AttributeMessagingProtocol), - conventions.AttributeMessagingProtocolVersion: pdata.NewAttributeValueString(conventions.AttributeMessagingProtocolVersion), - conventions.AttributeMessagingURL: pdata.NewAttributeValueString(conventions.AttributeMessagingURL), - conventions.AttributeMessagingMessageID: pdata.NewAttributeValueString(conventions.AttributeMessagingMessageID), - conventions.AttributeMessagingConversationID: pdata.NewAttributeValueString(conventions.AttributeMessagingConversationID), - conventions.AttributeMessagingMessagePayloadSizeBytes: pdata.NewAttributeValueInt(1), - conventions.AttributeMessagingMessagePayloadCompressedSizeBytes: pdata.NewAttributeValueInt(2), - conventions.AttributeMessagingOperation: pdata.NewAttributeValueString(conventions.AttributeMessagingOperation), + messagingAttributeValues := map[string]pdata.Value{ + conventions.AttributeMessagingSystem: pdata.NewValueString(conventions.AttributeMessagingSystem), + conventions.AttributeMessagingDestination: pdata.NewValueString(conventions.AttributeMessagingDestination), + conventions.AttributeMessagingDestinationKind: pdata.NewValueString(conventions.AttributeMessagingDestinationKind), + conventions.AttributeMessagingTempDestination: pdata.NewValueString(conventions.AttributeMessagingTempDestination), + conventions.AttributeMessagingProtocol: pdata.NewValueString(conventions.AttributeMessagingProtocol), + conventions.AttributeMessagingProtocolVersion: pdata.NewValueString(conventions.AttributeMessagingProtocolVersion), + conventions.AttributeMessagingURL: pdata.NewValueString(conventions.AttributeMessagingURL), + conventions.AttributeMessagingMessageID: pdata.NewValueString(conventions.AttributeMessagingMessageID), + conventions.AttributeMessagingConversationID: pdata.NewValueString(conventions.AttributeMessagingConversationID), + conventions.AttributeMessagingMessagePayloadSizeBytes: pdata.NewValueInt(1), + conventions.AttributeMessagingMessagePayloadCompressedSizeBytes: pdata.NewValueInt(2), + conventions.AttributeMessagingOperation: pdata.NewValueString(conventions.AttributeMessagingOperation), } attributeMap := pdata.NewAttributeMapFromMap(messagingAttributeValues) @@ -173,8 +173,8 @@ func TestMessagingAttributeMapping(t *testing.T) { // Tests what happens when an attribute that should be an int is not func TestAttributeMappingWithSomeBadValues(t *testing.T) { // Try this out with any attribute struct with an int value - values := map[string]pdata.AttributeValue{ - conventions.AttributeNetPeerPort: pdata.NewAttributeValueString("xx"), + values := map[string]pdata.Value{ + conventions.AttributeNetPeerPort: pdata.NewValueString("xx"), } attributeMap := pdata.NewAttributeMapFromMap(values) @@ -186,15 +186,15 @@ func TestAttributeMappingWithSomeBadValues(t *testing.T) { assert.Equal(t, int64(0), attrs.NetPeerPort) } -func getNetworkAttributes() map[string]pdata.AttributeValue { - return map[string]pdata.AttributeValue{ - conventions.AttributeNetTransport: pdata.NewAttributeValueString(conventions.AttributeNetTransport), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString(conventions.AttributeNetPeerIP), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(1), - conventions.AttributeNetPeerName: pdata.NewAttributeValueString(conventions.AttributeNetPeerName), - conventions.AttributeNetHostIP: pdata.NewAttributeValueString(conventions.AttributeNetHostIP), - conventions.AttributeNetHostPort: pdata.NewAttributeValueInt(2), - conventions.AttributeNetHostName: pdata.NewAttributeValueString(conventions.AttributeNetHostName), +func getNetworkAttributes() map[string]pdata.Value { + return map[string]pdata.Value{ + conventions.AttributeNetTransport: pdata.NewValueString(conventions.AttributeNetTransport), + conventions.AttributeNetPeerIP: pdata.NewValueString(conventions.AttributeNetPeerIP), + conventions.AttributeNetPeerPort: pdata.NewValueInt(1), + conventions.AttributeNetPeerName: pdata.NewValueString(conventions.AttributeNetPeerName), + conventions.AttributeNetHostIP: pdata.NewValueString(conventions.AttributeNetHostIP), + conventions.AttributeNetHostPort: pdata.NewValueInt(2), + conventions.AttributeNetHostName: pdata.NewValueString(conventions.AttributeNetHostName), } } diff --git a/exporter/azuremonitorexporter/go.mod b/exporter/azuremonitorexporter/go.mod index 779774c0fb89..0f31ab77e3d0 100644 --- a/exporter/azuremonitorexporter/go.mod +++ b/exporter/azuremonitorexporter/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/microsoft/ApplicationInsights-Go v0.4.4 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d ) diff --git a/exporter/azuremonitorexporter/go.sum b/exporter/azuremonitorexporter/go.sum index ff6c19fb1a04..f6faa7fe440b 100644 --- a/exporter/azuremonitorexporter/go.sum +++ b/exporter/azuremonitorexporter/go.sum @@ -181,10 +181,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index 6106f766ab84..867ddd85000d 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -116,7 +116,7 @@ func spanToEnvelope( resourceAttributes := resource.Attributes() // Copy all the resource labels into the base data properties. Resource values are always strings - resourceAttributes.Range(func(k string, v pdata.AttributeValue) bool { + resourceAttributes.Range(func(k string, v pdata.Value) bool { dataProperties[k] = v.StringVal() return true }) @@ -494,9 +494,9 @@ func copyAndMapAttributes( attributeMap pdata.AttributeMap, properties map[string]string, measurements map[string]float64, - mappingFunc func(k string, v pdata.AttributeValue)) { + mappingFunc func(k string, v pdata.Value)) { - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { setAttributeValueAsPropertyOrMeasurement(k, v, properties, measurements) if mappingFunc != nil { mappingFunc(k, v) @@ -525,7 +525,7 @@ func copyAndExtractHTTPAttributes( attributeMap, properties, measurements, - func(k string, v pdata.AttributeValue) { attrs.MapAttribute(k, v) }) + func(k string, v pdata.Value) { attrs.MapAttribute(k, v) }) return attrs } @@ -541,7 +541,7 @@ func copyAndExtractRPCAttributes( attributeMap, properties, measurements, - func(k string, v pdata.AttributeValue) { attrs.MapAttribute(k, v) }) + func(k string, v pdata.Value) { attrs.MapAttribute(k, v) }) return attrs } @@ -557,7 +557,7 @@ func copyAndExtractDatabaseAttributes( attributeMap, properties, measurements, - func(k string, v pdata.AttributeValue) { attrs.MapAttribute(k, v) }) + func(k string, v pdata.Value) { attrs.MapAttribute(k, v) }) return attrs } @@ -573,7 +573,7 @@ func copyAndExtractMessagingAttributes( attributeMap, properties, measurements, - func(k string, v pdata.AttributeValue) { attrs.MapAttribute(k, v) }) + func(k string, v pdata.Value) { attrs.MapAttribute(k, v) }) return attrs } @@ -641,21 +641,21 @@ func writeFormattedPeerAddressFromNetworkAttributes(networkAttributes *NetworkAt func setAttributeValueAsPropertyOrMeasurement( key string, - attributeValue pdata.AttributeValue, + attributeValue pdata.Value, properties map[string]string, measurements map[string]float64) { switch attributeValue.Type() { - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: properties[key] = strconv.FormatBool(attributeValue.BoolVal()) - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: properties[key] = attributeValue.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: measurements[key] = float64(attributeValue.IntVal()) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: measurements[key] = attributeValue.DoubleVal() } } diff --git a/exporter/azuremonitorexporter/trace_to_envelope_test.go b/exporter/azuremonitorexporter/trace_to_envelope_test.go index 691050b2ed84..be8c50a09702 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope_test.go +++ b/exporter/azuremonitorexporter/trace_to_envelope_test.go @@ -72,23 +72,23 @@ var ( defaultMessagingStatusCodeAsString = strconv.FormatInt(defaultRPCStatusCode, 10) // Required attribute for any HTTP Span - requiredHTTPAttributes = map[string]pdata.AttributeValue{ - conventions.AttributeHTTPMethod: pdata.NewAttributeValueString(defaultHTTPMethod), + requiredHTTPAttributes = map[string]pdata.Value{ + conventions.AttributeHTTPMethod: pdata.NewValueString(defaultHTTPMethod), } // Required attribute for any RPC Span - requiredRPCAttributes = map[string]pdata.AttributeValue{ - conventions.AttributeRPCSystem: pdata.NewAttributeValueString(defaultRPCSystem), + requiredRPCAttributes = map[string]pdata.Value{ + conventions.AttributeRPCSystem: pdata.NewValueString(defaultRPCSystem), } - requiredDatabaseAttributes = map[string]pdata.AttributeValue{ - conventions.AttributeDBSystem: pdata.NewAttributeValueString(defaultDBSystem), - conventions.AttributeDBName: pdata.NewAttributeValueString(defaultDBName), + requiredDatabaseAttributes = map[string]pdata.Value{ + conventions.AttributeDBSystem: pdata.NewValueString(defaultDBSystem), + conventions.AttributeDBName: pdata.NewValueString(defaultDBName), } - requiredMessagingAttributes = map[string]pdata.AttributeValue{ - conventions.AttributeMessagingSystem: pdata.NewAttributeValueString(defaultMessagingSystem), - conventions.AttributeMessagingDestination: pdata.NewAttributeValueString(defaultMessagingDestination), + requiredMessagingAttributes = map[string]pdata.Value{ + conventions.AttributeMessagingSystem: pdata.NewValueString(defaultMessagingSystem), + conventions.AttributeMessagingDestination: pdata.NewValueString(defaultMessagingDestination), } defaultResource = getResource() @@ -118,21 +118,21 @@ func TestHTTPServerSpanToRequestDataAttributeSet1(t *testing.T) { span.Status().SetMessage("Fubar") spanAttributes := span.Attributes() - set := map[string]pdata.AttributeValue{ + set := map[string]pdata.Value{ // http.scheme, http.host, http.target => data.Url - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeHTTPHost: pdata.NewAttributeValueString("foo"), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("/bar?biz=baz"), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeHTTPHost: pdata.NewValueString("foo"), + conventions.AttributeHTTPTarget: pdata.NewValueString("/bar?biz=baz"), // A non 2xx status code - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(400), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(400), // A specific http route - conventions.AttributeHTTPRoute: pdata.NewAttributeValueString("bizzle"), + conventions.AttributeHTTPRoute: pdata.NewValueString("bizzle"), // Unused but should get copied to the RequestData .Properties and .Measurements - "somebool": pdata.NewAttributeValueBool(false), - "somedouble": pdata.NewAttributeValueDouble(0.1), + "somebool": pdata.NewValueBool(false), + "somedouble": pdata.NewValueDouble(0.1), } appendToAttributeMap(spanAttributes, set) @@ -162,14 +162,14 @@ func TestHTTPServerSpanToRequestDataAttributeSet2(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeHTTPServerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetHostPort: pdata.NewAttributeValueInt(81), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("/bar?biz=baz"), - - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), + map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeHTTPServerName: pdata.NewValueString("foo"), + conventions.AttributeNetHostPort: pdata.NewValueInt(81), + conventions.AttributeHTTPTarget: pdata.NewValueString("/bar?biz=baz"), + + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -191,15 +191,15 @@ func TestHTTPServerSpanToRequestDataAttributeSet3(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeNetHostName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetHostPort: pdata.NewAttributeValueInt(81), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("/bar?biz=baz"), - - conventions.AttributeHTTPClientIP: pdata.NewAttributeValueString("127.0.0.2"), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), + map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeNetHostName: pdata.NewValueString("foo"), + conventions.AttributeNetHostPort: pdata.NewValueInt(81), + conventions.AttributeHTTPTarget: pdata.NewValueString("/bar?biz=baz"), + + conventions.AttributeHTTPClientIP: pdata.NewValueString("127.0.0.2"), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -218,9 +218,9 @@ func TestHTTPServerSpanToRequestDataAttributeSet4(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPURL: pdata.NewAttributeValueString("https://foo:81/bar?biz=baz"), + map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPURL: pdata.NewValueString("https://foo:81/bar?biz=baz"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -249,10 +249,10 @@ func TestHTTPClientSpanToRemoteDependencyAttributeSet1(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPURL: pdata.NewAttributeValueString("https://foo:81/bar?biz=baz"), + map[string]pdata.Value{ + conventions.AttributeHTTPURL: pdata.NewValueString("https://foo:81/bar?biz=baz"), - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(400), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(400), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -277,15 +277,15 @@ func TestHTTPClientSpanToRemoteDependencyAttributeSet2(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ + map[string]pdata.Value{ // http.scheme, http.host, http.target => data.Url - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeHTTPHost: pdata.NewAttributeValueString("foo"), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("bar/12345?biz=baz"), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeHTTPHost: pdata.NewValueString("foo"), + conventions.AttributeHTTPTarget: pdata.NewValueString("bar/12345?biz=baz"), // A specific http.route - conventions.AttributeHTTPRoute: pdata.NewAttributeValueString("/bar/:baz_id"), + conventions.AttributeHTTPRoute: pdata.NewValueString("/bar/:baz_id"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -308,12 +308,12 @@ func TestHTTPClientSpanToRemoteDependencyAttributeSet3(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("/bar?biz=baz"), + map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), + conventions.AttributeHTTPTarget: pdata.NewValueString("/bar?biz=baz"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -331,12 +331,12 @@ func TestHTTPClientSpanToRemoteDependencyAttributeSet4(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(defaultHTTPStatusCode), - conventions.AttributeHTTPScheme: pdata.NewAttributeValueString("https"), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), - conventions.AttributeHTTPTarget: pdata.NewAttributeValueString("/bar?biz=baz"), + map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(defaultHTTPStatusCode), + conventions.AttributeHTTPScheme: pdata.NewValueString("https"), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), + conventions.AttributeHTTPTarget: pdata.NewValueString("/bar?biz=baz"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -353,10 +353,10 @@ func TestRPCServerSpanToRequestData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), + map[string]pdata.Value{ + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -367,9 +367,9 @@ func TestRPCServerSpanToRequestData(t *testing.T) { // test fallback to peerip appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeNetPeerName: pdata.NewAttributeValueString(""), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), + map[string]pdata.Value{ + conventions.AttributeNetPeerName: pdata.NewValueString(""), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), }) envelope, _ = spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -384,10 +384,10 @@ func TestRPCClientSpanToRemoteDependencyData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), + map[string]pdata.Value{ + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -398,9 +398,9 @@ func TestRPCClientSpanToRemoteDependencyData(t *testing.T) { // test fallback to peerip appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeNetPeerName: pdata.NewAttributeValueString(""), - conventions.AttributeNetPeerIP: pdata.NewAttributeValueString("127.0.0.1"), + map[string]pdata.Value{ + conventions.AttributeNetPeerName: pdata.NewValueString(""), + conventions.AttributeNetPeerIP: pdata.NewValueString("127.0.0.1"), }) envelope, _ = spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -427,10 +427,10 @@ func TestDatabaseClientSpanToRemoteDependencyData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeDBStatement: pdata.NewAttributeValueString(defaultDBStatement), - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), + map[string]pdata.Value{ + conventions.AttributeDBStatement: pdata.NewValueString(defaultDBStatement), + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -444,9 +444,9 @@ func TestDatabaseClientSpanToRemoteDependencyData(t *testing.T) { // Test the fallback to data.Data fallback to DBOperation appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeDBStatement: pdata.NewAttributeValueString(""), - conventions.AttributeDBOperation: pdata.NewAttributeValueString(defaultDBOperation), + map[string]pdata.Value{ + conventions.AttributeDBStatement: pdata.NewValueString(""), + conventions.AttributeDBOperation: pdata.NewValueString(defaultDBOperation), }) envelope, _ = spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -461,10 +461,10 @@ func TestMessagingConsumerSpanToRequestData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeMessagingURL: pdata.NewAttributeValueString(defaultMessagingURL), - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), + map[string]pdata.Value{ + conventions.AttributeMessagingURL: pdata.NewValueString(defaultMessagingURL), + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -477,8 +477,8 @@ func TestMessagingConsumerSpanToRequestData(t *testing.T) { // test fallback from MessagingURL to net.* properties appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeMessagingURL: pdata.NewAttributeValueString(""), + map[string]pdata.Value{ + conventions.AttributeMessagingURL: pdata.NewValueString(""), }) envelope, _ = spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -494,10 +494,10 @@ func TestMessagingProducerSpanToRequestData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeMessagingURL: pdata.NewAttributeValueString(defaultMessagingURL), - conventions.AttributeNetPeerName: pdata.NewAttributeValueString("foo"), - conventions.AttributeNetPeerPort: pdata.NewAttributeValueInt(81), + map[string]pdata.Value{ + conventions.AttributeMessagingURL: pdata.NewValueString(defaultMessagingURL), + conventions.AttributeNetPeerName: pdata.NewValueString("foo"), + conventions.AttributeNetPeerPort: pdata.NewValueInt(81), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -510,8 +510,8 @@ func TestMessagingProducerSpanToRequestData(t *testing.T) { // test fallback from MessagingURL to net.* properties appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - conventions.AttributeMessagingURL: pdata.NewAttributeValueString(""), + map[string]pdata.Value{ + conventions.AttributeMessagingURL: pdata.NewValueString(""), }) envelope, _ = spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -527,8 +527,8 @@ func TestUnknownInternalSpanToRemoteDependencyData(t *testing.T) { appendToAttributeMap( spanAttributes, - map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("bar"), + map[string]pdata.Value{ + "foo": pdata.NewValueString("bar"), }) envelope, _ := spanToEnvelope(defaultResource, defaultInstrumentationLibrary, span, zap.NewNop()) @@ -732,21 +732,21 @@ func assertAttributesCopiedToPropertiesOrMeasurements( properties map[string]string, measurements map[string]float64) { - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: p, exists := properties[k] assert.True(t, exists) assert.Equal(t, v.StringVal(), p) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: p, exists := properties[k] assert.True(t, exists) assert.Equal(t, strconv.FormatBool(v.BoolVal()), p) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: m, exists := measurements[k] assert.True(t, exists) assert.Equal(t, float64(v.IntVal()), m) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: m, exists := measurements[k] assert.True(t, exists) assert.Equal(t, v.DoubleVal(), m) @@ -758,7 +758,7 @@ func assertAttributesCopiedToPropertiesOrMeasurements( /* The remainder of these methods are for building up test assets */ -func getSpan(spanName string, spanKind pdata.SpanKind, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getSpan(spanName string, spanKind pdata.SpanKind, initialAttributes map[string]pdata.Value) pdata.Span { span := pdata.NewSpan() span.SetTraceID(pdata.NewTraceID(defaultTraceID)) span.SetSpanID(pdata.NewSpanID(defaultSpanID)) @@ -772,27 +772,27 @@ func getSpan(spanName string, spanKind pdata.SpanKind, initialAttributes map[str } // Returns a default server span -func getServerSpan(spanName string, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getServerSpan(spanName string, initialAttributes map[string]pdata.Value) pdata.Span { return getSpan(spanName, pdata.SpanKindServer, initialAttributes) } // Returns a default client span -func getClientSpan(spanName string, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getClientSpan(spanName string, initialAttributes map[string]pdata.Value) pdata.Span { return getSpan(spanName, pdata.SpanKindClient, initialAttributes) } // Returns a default consumer span -func getConsumerSpan(spanName string, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getConsumerSpan(spanName string, initialAttributes map[string]pdata.Value) pdata.Span { return getSpan(spanName, pdata.SpanKindConsumer, initialAttributes) } // Returns a default producer span -func getProducerSpan(spanName string, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getProducerSpan(spanName string, initialAttributes map[string]pdata.Value) pdata.Span { return getSpan(spanName, pdata.SpanKindProducer, initialAttributes) } // Returns a default internal span -func getInternalSpan(spanName string, initialAttributes map[string]pdata.AttributeValue) pdata.Span { +func getInternalSpan(spanName string, initialAttributes map[string]pdata.Value) pdata.Span { return getSpan(spanName, pdata.SpanKindInternal, initialAttributes) } @@ -841,7 +841,7 @@ func getDefaultMessagingProducerSpan() pdata.Span { func getDefaultInternalSpan() pdata.Span { return getInternalSpan( defaultInternalSpanName, - map[string]pdata.AttributeValue{}) + map[string]pdata.Value{}) } // Returns a default Resource @@ -862,7 +862,7 @@ func getInstrumentationLibrary() pdata.InstrumentationLibrary { } // Adds a map of AttributeValues to an existing AttributeMap -func appendToAttributeMap(attributeMap pdata.AttributeMap, maps ...map[string]pdata.AttributeValue) { +func appendToAttributeMap(attributeMap pdata.AttributeMap, maps ...map[string]pdata.Value) { for _, m := range maps { for k, v := range m { attributeMap.Upsert(k, v) diff --git a/exporter/carbonexporter/go.mod b/exporter/carbonexporter/go.mod index 154713fda4bf..79481caca87b 100644 --- a/exporter/carbonexporter/go.mod +++ b/exporter/carbonexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/protobuf v1.27.1 ) diff --git a/exporter/carbonexporter/go.sum b/exporter/carbonexporter/go.sum index 2941c8a1f3b3..29c4c9fcf7d0 100644 --- a/exporter/carbonexporter/go.sum +++ b/exporter/carbonexporter/go.sum @@ -185,10 +185,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/clickhouseexporter/exporter.go b/exporter/clickhouseexporter/exporter.go index ffaed2331a0d..1dee250cb71e 100644 --- a/exporter/clickhouseexporter/exporter.go +++ b/exporter/clickhouseexporter/exporter.go @@ -111,7 +111,7 @@ func (e *clickhouseExporter) pushLogsData(ctx context.Context, ld pdata.Logs) er func attributesToSlice(attributes pdata.AttributeMap) ([]string, []string) { keys := make([]string, 0, attributes.Len()) values := make([]string, 0, attributes.Len()) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { keys = append(keys, formatKey(k)) values = append(values, v.AsString()) return true diff --git a/exporter/clickhouseexporter/go.mod b/exporter/clickhouseexporter/go.mod index e13df6176f77..344cf2125ac9 100644 --- a/exporter/clickhouseexporter/go.mod +++ b/exporter/clickhouseexporter/go.mod @@ -3,8 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickh go 1.17 require ( - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/clickhouseexporter/go.sum b/exporter/clickhouseexporter/go.sum index 681879a4ad5e..520b1b8e1f9f 100644 --- a/exporter/clickhouseexporter/go.sum +++ b/exporter/clickhouseexporter/go.sum @@ -176,10 +176,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/coralogixexporter/go.mod b/exporter/coralogixexporter/go.mod index be64f1bb4c20..7eeafeb66106 100644 --- a/exporter/coralogixexporter/go.mod +++ b/exporter/coralogixexporter/go.mod @@ -4,13 +4,13 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( github.com/coralogix/opentelemetry-cx-protobuf-api/coralogixpb v0.0.0-20211201100428-d2a5d0ecf53e github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) diff --git a/exporter/coralogixexporter/go.sum b/exporter/coralogixexporter/go.sum index 8b32c3237b23..9e8dd9dd0037 100644 --- a/exporter/coralogixexporter/go.sum +++ b/exporter/coralogixexporter/go.sum @@ -219,10 +219,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 8160d32d9d65..cbaf6a2897c3 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -13,8 +13,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 gopkg.in/DataDog/dd-trace-go.v1 v1.37.0 diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index c0466890d1c0..f36d86712550 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -789,10 +789,10 @@ 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 v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= diff --git a/exporter/datadogexporter/internal/metrics/consumer_test.go b/exporter/datadogexporter/internal/metrics/consumer_test.go index c0a5a2fc21b1..d9610a73c245 100644 --- a/exporter/datadogexporter/internal/metrics/consumer_test.go +++ b/exporter/datadogexporter/internal/metrics/consumer_test.go @@ -52,15 +52,15 @@ func TestRunningMetrics(t *testing.T) { rm := rms.AppendEmpty() resAttrs := rm.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-1")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-1")) rm = rms.AppendEmpty() resAttrs = rm.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-1")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-1")) rm = rms.AppendEmpty() resAttrs = rm.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-2")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-2")) rms.AppendEmpty() diff --git a/exporter/datadogexporter/internal/model/attributes/attributes.go b/exporter/datadogexporter/internal/model/attributes/attributes.go index b004730b6499..6d2081a5c3b1 100644 --- a/exporter/datadogexporter/internal/model/attributes/attributes.go +++ b/exporter/datadogexporter/internal/model/attributes/attributes.go @@ -124,7 +124,7 @@ func TagsFromAttributes(attrs pdata.AttributeMap) []string { var processAttributes processAttributes var systemAttributes systemAttributes - attrs.Range(func(key string, value pdata.AttributeValue) bool { + attrs.Range(func(key string, value pdata.Value) bool { switch key { // Process attributes case conventions.AttributeProcessExecutableName: diff --git a/exporter/datadogexporter/internal/model/attributes/attributes_test.go b/exporter/datadogexporter/internal/model/attributes/attributes_test.go index 9d786ffad65c..4620d70bb820 100644 --- a/exporter/datadogexporter/internal/model/attributes/attributes_test.go +++ b/exporter/datadogexporter/internal/model/attributes/attributes_test.go @@ -24,17 +24,17 @@ import ( ) func TestTagsFromAttributes(t *testing.T) { - attributeMap := map[string]pdata.AttributeValue{ - conventions.AttributeProcessExecutableName: pdata.NewAttributeValueString("otelcol"), - conventions.AttributeProcessExecutablePath: pdata.NewAttributeValueString("/usr/bin/cmd/otelcol"), - conventions.AttributeProcessCommand: pdata.NewAttributeValueString("cmd/otelcol"), - conventions.AttributeProcessCommandLine: pdata.NewAttributeValueString("cmd/otelcol --config=\"/path/to/config.yaml\""), - conventions.AttributeProcessPID: pdata.NewAttributeValueInt(1), - conventions.AttributeProcessOwner: pdata.NewAttributeValueString("root"), - conventions.AttributeOSType: pdata.NewAttributeValueString("linux"), - conventions.AttributeK8SDaemonSetName: pdata.NewAttributeValueString("daemon_set_name"), - conventions.AttributeAWSECSClusterARN: pdata.NewAttributeValueString("cluster_arn"), - "tags.datadoghq.com/service": pdata.NewAttributeValueString("service_name"), + attributeMap := map[string]pdata.Value{ + conventions.AttributeProcessExecutableName: pdata.NewValueString("otelcol"), + conventions.AttributeProcessExecutablePath: pdata.NewValueString("/usr/bin/cmd/otelcol"), + conventions.AttributeProcessCommand: pdata.NewValueString("cmd/otelcol"), + conventions.AttributeProcessCommandLine: pdata.NewValueString("cmd/otelcol --config=\"/path/to/config.yaml\""), + conventions.AttributeProcessPID: pdata.NewValueInt(1), + conventions.AttributeProcessOwner: pdata.NewValueString("root"), + conventions.AttributeOSType: pdata.NewValueString("linux"), + conventions.AttributeK8SDaemonSetName: pdata.NewValueString("daemon_set_name"), + conventions.AttributeAWSECSClusterARN: pdata.NewValueString("cluster_arn"), + "tags.datadoghq.com/service": pdata.NewValueString("service_name"), } attrs := pdata.NewAttributeMapFromMap(attributeMap) @@ -90,23 +90,23 @@ func TestOriginIDFromAttributes(t *testing.T) { }{ { name: "pod UID and container ID", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeContainerID: pdata.NewAttributeValueString("container_id_goes_here"), - conventions.AttributeK8SPodUID: pdata.NewAttributeValueString("k8s_pod_uid_goes_here"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeContainerID: pdata.NewValueString("container_id_goes_here"), + conventions.AttributeK8SPodUID: pdata.NewValueString("k8s_pod_uid_goes_here"), }), originID: "container_id://container_id_goes_here", }, { name: "only container ID", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeContainerID: pdata.NewAttributeValueString("container_id_goes_here"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeContainerID: pdata.NewValueString("container_id_goes_here"), }), originID: "container_id://container_id_goes_here", }, { name: "only pod UID", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeK8SPodUID: pdata.NewAttributeValueString("k8s_pod_uid_goes_here"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeK8SPodUID: pdata.NewValueString("k8s_pod_uid_goes_here"), }), originID: "kubernetes_pod_uid://k8s_pod_uid_goes_here", }, diff --git a/exporter/datadogexporter/internal/model/attributes/ec2/ec2.go b/exporter/datadogexporter/internal/model/attributes/ec2/ec2.go index 083f9eed8a81..b92dbca49b95 100644 --- a/exporter/datadogexporter/internal/model/attributes/ec2/ec2.go +++ b/exporter/datadogexporter/internal/model/attributes/ec2/ec2.go @@ -74,7 +74,7 @@ func HostInfoFromAttributes(attrs pdata.AttributeMap) (hostInfo *HostInfo) { hostInfo.EC2Hostname = hostName.StringVal() } - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { if strings.HasPrefix(k, ec2TagPrefix) { tag := fmt.Sprintf("%s:%s", strings.TrimPrefix(k, ec2TagPrefix), v.StringVal()) hostInfo.EC2Tags = append(hostInfo.EC2Tags, tag) @@ -89,7 +89,7 @@ func HostInfoFromAttributes(attrs pdata.AttributeMap) (hostInfo *HostInfo) { func ClusterNameFromAttributes(attrs pdata.AttributeMap) (clusterName string, ok bool) { // Get cluster name from tag keys // https://github.com/DataDog/datadog-agent/blob/1c94b11/pkg/util/ec2/ec2.go#L238 - attrs.Range(func(k string, _ pdata.AttributeValue) bool { + attrs.Range(func(k string, _ pdata.Value) bool { if strings.HasPrefix(k, clusterTagPrefix) { clusterName = strings.Split(k, "/")[2] ok = true diff --git a/exporter/datadogexporter/internal/model/internal/testutils/test_utils.go b/exporter/datadogexporter/internal/model/internal/testutils/test_utils.go index c62911a7d1e1..7cc31ef27fa3 100644 --- a/exporter/datadogexporter/internal/model/internal/testutils/test_utils.go +++ b/exporter/datadogexporter/internal/model/internal/testutils/test_utils.go @@ -20,7 +20,7 @@ func fillAttributeMap(attrs pdata.AttributeMap, mp map[string]string) { attrs.Clear() attrs.EnsureCapacity(len(mp)) for k, v := range mp { - attrs.Insert(k, pdata.NewAttributeValueString(v)) + attrs.Insert(k, pdata.NewValueString(v)) } } diff --git a/exporter/datadogexporter/internal/model/translator/dimensions.go b/exporter/datadogexporter/internal/model/translator/dimensions.go index e33aa687680b..ef22c154bfed 100644 --- a/exporter/datadogexporter/internal/model/translator/dimensions.go +++ b/exporter/datadogexporter/internal/model/translator/dimensions.go @@ -60,7 +60,7 @@ func (d *Dimensions) OriginID() string { // getTags maps an attributeMap into a slice of Datadog tags func getTags(labels pdata.AttributeMap) []string { tags := make([]string, 0, labels.Len()) - labels.Range(func(key string, value pdata.AttributeValue) bool { + labels.Range(func(key string, value pdata.Value) bool { v := value.AsString() tags = append(tags, utils.FormatKeyValueTag(key, v)) return true diff --git a/exporter/datadogexporter/internal/model/translator/dimensions_test.go b/exporter/datadogexporter/internal/model/translator/dimensions_test.go index fcc641b87fec..0ba6ff7840d6 100644 --- a/exporter/datadogexporter/internal/model/translator/dimensions_test.go +++ b/exporter/datadogexporter/internal/model/translator/dimensions_test.go @@ -22,10 +22,10 @@ import ( ) func TestWithAttributeMap(t *testing.T) { - attributes := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("val1"), - "key2": pdata.NewAttributeValueString("val2"), - "key3": pdata.NewAttributeValueString(""), + attributes := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "key1": pdata.NewValueString("val1"), + "key2": pdata.NewValueString("val2"), + "key3": pdata.NewValueString(""), }) dims := Dimensions{} @@ -110,8 +110,8 @@ func TestAllFieldsAreCopied(t *testing.T) { newDims := dims. AddTags("tagThree:c"). WithSuffix("suffix"). - WithAttributeMap(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "tagFour": pdata.NewAttributeValueString("d"), + WithAttributeMap(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "tagFour": pdata.NewValueString("d"), })) assert.Equal(t, "example.name.suffix", newDims.Name()) diff --git a/exporter/datadogexporter/internal/testutils/test_utils.go b/exporter/datadogexporter/internal/testutils/test_utils.go index 9e97a7ca5d0c..46a92e5cd077 100644 --- a/exporter/datadogexporter/internal/testutils/test_utils.go +++ b/exporter/datadogexporter/internal/testutils/test_utils.go @@ -89,7 +89,7 @@ func fillAttributeMap(attrs pdata.AttributeMap, mp map[string]string) { attrs.Clear() attrs.EnsureCapacity(len(mp)) for k, v := range mp { - attrs.Insert(k, pdata.NewAttributeValueString(v)) + attrs.Insert(k, pdata.NewValueString(v)) } } diff --git a/exporter/datadogexporter/translate_traces.go b/exporter/datadogexporter/translate_traces.go index e4eeace1803d..1434823d8f2c 100644 --- a/exporter/datadogexporter/translate_traces.go +++ b/exporter/datadogexporter/translate_traces.go @@ -346,7 +346,7 @@ func resourceToDatadogServiceNameAndAttributeMap( return tracetranslator.ResourceNoServiceName, datadogTags } - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { datadogTags[k] = v.AsString() return true }) @@ -395,7 +395,7 @@ func aggregateSpanTags(span pdata.Span, datadogTags map[string]string) map[strin spanTags[utils.NormalizeTag(key)] = val } - span.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + span.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case keySamplingPriority: spanTags[k] = v.AsString() diff --git a/exporter/datadogexporter/translate_traces_test.go b/exporter/datadogexporter/translate_traces_test.go index 4947183f7dd2..c8367ec28eea 100644 --- a/exporter/datadogexporter/translate_traces_test.go +++ b/exporter/datadogexporter/translate_traces_test.go @@ -95,15 +95,15 @@ func NewResourceSpansData(mockTraceID [16]byte, mockSpanID [8]byte, mockParentSp evt.SetTimestamp(pdataEndTime) evt.SetName("end") evt.Attributes().InsertBool("flag", false) - attribs := map[string]pdata.AttributeValue{ - "cache_hit": pdata.NewAttributeValueBool(true), - "timeout_ns": pdata.NewAttributeValueInt(12e9), - "ping_count": pdata.NewAttributeValueInt(25), - "agent": pdata.NewAttributeValueString("ocagent"), + attribs := map[string]pdata.Value{ + "cache_hit": pdata.NewValueBool(true), + "timeout_ns": pdata.NewValueInt(12e9), + "ping_count": pdata.NewValueInt(25), + "agent": pdata.NewValueString("ocagent"), } if statusCode == pdata.StatusCodeError { - attribs["http.status_code"] = pdata.NewAttributeValueString("501") + attribs["http.status_code"] = pdata.NewValueString("501") } pdata.NewAttributeMapFromMap(attribs).CopyTo(span.Attributes()) @@ -159,15 +159,15 @@ func TestRunningTraces(t *testing.T) { rt := rts.AppendEmpty() resAttrs := rt.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-1")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-1")) rt = rts.AppendEmpty() resAttrs = rt.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-1")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-1")) rt = rts.AppendEmpty() resAttrs = rt.Resource().Attributes() - resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewAttributeValueString("resource-hostname-2")) + resAttrs.Insert(attributes.AttributeDatadogHostname, pdata.NewValueString("resource-hostname-2")) rts.AppendEmpty() @@ -479,10 +479,10 @@ func TestTracesTranslationErrorsFromEventsUsesLast(t *testing.T) { mockSpanID := [8]byte{0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8} mockParentSpanID := [8]byte{0xEF, 0xEE, 0xED, 0xEC, 0xEB, 0xEA, 0xE9, 0xE8} - attribs := map[string]pdata.AttributeValue{ - conventions.AttributeExceptionType: pdata.NewAttributeValueString("HttpError"), - conventions.AttributeExceptionStacktrace: pdata.NewAttributeValueString("HttpError at line 67\nthing at line 45"), - conventions.AttributeExceptionMessage: pdata.NewAttributeValueString("HttpError error occurred"), + attribs := map[string]pdata.Value{ + conventions.AttributeExceptionType: pdata.NewValueString("HttpError"), + conventions.AttributeExceptionStacktrace: pdata.NewValueString("HttpError at line 67\nthing at line 45"), + conventions.AttributeExceptionMessage: pdata.NewValueString("HttpError error occurred"), } mockEndTime := time.Now().Round(time.Second) @@ -548,10 +548,10 @@ func TestTracesTranslationErrorsFromEventsBounds(t *testing.T) { events.EnsureCapacity(3) // Start with the error as the first element in the list... - attribs := map[string]pdata.AttributeValue{ - conventions.AttributeExceptionType: pdata.NewAttributeValueString("HttpError"), - conventions.AttributeExceptionStacktrace: pdata.NewAttributeValueString("HttpError at line 67\nthing at line 45"), - conventions.AttributeExceptionMessage: pdata.NewAttributeValueString("HttpError error occurred"), + attribs := map[string]pdata.Value{ + conventions.AttributeExceptionType: pdata.NewValueString("HttpError"), + conventions.AttributeExceptionStacktrace: pdata.NewValueString("HttpError at line 67\nthing at line 45"), + conventions.AttributeExceptionMessage: pdata.NewValueString("HttpError error occurred"), } evt := events.AppendEmpty() @@ -1555,8 +1555,8 @@ func TestSpanRateLimitTag(t *testing.T) { instrumentationLibrary.SetVersion("v1") span := ilss.Spans().AppendEmpty() - attribs := map[string]pdata.AttributeValue{ - "_sample_rate": pdata.NewAttributeValueString("0.5"), + attribs := map[string]pdata.Value{ + "_sample_rate": pdata.NewValueString("0.5"), } pdata.NewAttributeMapFromMap(attribs).CopyTo(span.Attributes()) diff --git a/exporter/dynatraceexporter/go.mod b/exporter/dynatraceexporter/go.mod index e405df5c3ef7..fdc446cc0775 100644 --- a/exporter/dynatraceexporter/go.mod +++ b/exporter/dynatraceexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/dynatraceexporter/go.sum b/exporter/dynatraceexporter/go.sum index 191326e9c29b..0e64dbe32877 100644 --- a/exporter/dynatraceexporter/go.sum +++ b/exporter/dynatraceexporter/go.sum @@ -181,10 +181,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/dynatraceexporter/serialization/serialization.go b/exporter/dynatraceexporter/serialization/serialization.go index 2c863993dc77..95fa0f42273c 100644 --- a/exporter/dynatraceexporter/serialization/serialization.go +++ b/exporter/dynatraceexporter/serialization/serialization.go @@ -108,7 +108,7 @@ func SerializeMetric(logger *zap.Logger, prefix string, metric pdata.Metric, def func makeCombinedDimensions(labels pdata.AttributeMap, defaultDimensions, staticDimensions dimensions.NormalizedDimensionList) dimensions.NormalizedDimensionList { dimsFromLabels := []dimensions.Dimension{} - labels.Range(func(k string, v pdata.AttributeValue) bool { + labels.Range(func(k string, v pdata.Value) bool { dimsFromLabels = append(dimsFromLabels, dimensions.NewDimension(k, v.AsString())) return true }) diff --git a/exporter/dynatraceexporter/serialization/sum.go b/exporter/dynatraceexporter/serialization/sum.go index 27ec80d3dcc2..0bbea506a497 100644 --- a/exporter/dynatraceexporter/serialization/sum.go +++ b/exporter/dynatraceexporter/serialization/sum.go @@ -84,7 +84,7 @@ func serializeCumulativeCounter(name, prefix string, dims dimensions.NormalizedD func convertTotalCounterToDelta(name, prefix string, dims dimensions.NormalizedDimensionList, dp pdata.NumberDataPoint, prevCounters *ttlmap.TTLMap) (*dtMetric.Metric, error) { id := name - dp.Attributes().Sort().Range(func(k string, v pdata.AttributeValue) bool { + dp.Attributes().Sort().Range(func(k string, v pdata.Value) bool { id += fmt.Sprintf(",%s=%s", k, v.AsString()) return true }) diff --git a/exporter/dynatraceexporter/serialization/sum_test.go b/exporter/dynatraceexporter/serialization/sum_test.go index a3dcd780a416..eb404e752b16 100644 --- a/exporter/dynatraceexporter/serialization/sum_test.go +++ b/exporter/dynatraceexporter/serialization/sum_test.go @@ -100,26 +100,26 @@ func Test_serializeSum(t *testing.T) { t.Run("different dimensions should be treated as separate counters", func(t *testing.T) { dp := pdata.NewNumberDataPoint() dp.SetIntVal(5) - dp.Attributes().Insert("sort", pdata.NewAttributeValueString("unstable")) - dp.Attributes().Insert("group", pdata.NewAttributeValueString("a")) + dp.Attributes().Insert("sort", pdata.NewValueString("unstable")) + dp.Attributes().Insert("group", pdata.NewValueString("a")) dp.SetTimestamp(pdata.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano())) dp2 := pdata.NewNumberDataPoint() dp2.SetIntVal(10) - dp2.Attributes().Insert("sort", pdata.NewAttributeValueString("unstable")) - dp2.Attributes().Insert("group", pdata.NewAttributeValueString("b")) + dp2.Attributes().Insert("sort", pdata.NewValueString("unstable")) + dp2.Attributes().Insert("group", pdata.NewValueString("b")) dp2.SetTimestamp(pdata.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano())) dp3 := pdata.NewNumberDataPoint() dp3.SetIntVal(10) - dp3.Attributes().Insert("group", pdata.NewAttributeValueString("a")) - dp3.Attributes().Insert("sort", pdata.NewAttributeValueString("unstable")) + dp3.Attributes().Insert("group", pdata.NewValueString("a")) + dp3.Attributes().Insert("sort", pdata.NewValueString("unstable")) dp3.SetTimestamp(pdata.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano())) dp4 := pdata.NewNumberDataPoint() dp4.SetIntVal(20) - dp4.Attributes().Insert("group", pdata.NewAttributeValueString("b")) - dp4.Attributes().Insert("sort", pdata.NewAttributeValueString("unstable")) + dp4.Attributes().Insert("group", pdata.NewValueString("b")) + dp4.Attributes().Insert("sort", pdata.NewValueString("unstable")) dp4.SetTimestamp(pdata.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano())) prev := ttlmap.New(1, 1) diff --git a/exporter/elasticexporter/go.mod b/exporter/elasticexporter/go.mod index a8b18292b7bc..9de01056a0dd 100644 --- a/exporter/elasticexporter/go.mod +++ b/exporter/elasticexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/stretchr/testify v1.7.0 go.elastic.co/apm v1.15.0 go.elastic.co/fastjson v1.1.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/elasticexporter/go.sum b/exporter/elasticexporter/go.sum index 4282a444e11e..fce74597fa0c 100644 --- a/exporter/elasticexporter/go.sum +++ b/exporter/elasticexporter/go.sum @@ -188,10 +188,10 @@ go.elastic.co/fastjson v1.1.0 h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4= go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/elasticexporter/internal/translator/elastic/metadata.go b/exporter/elasticexporter/internal/translator/elastic/metadata.go index 005f5a9f7115..de49e2e2775c 100644 --- a/exporter/elasticexporter/internal/translator/elastic/metadata.go +++ b/exporter/elasticexporter/internal/translator/elastic/metadata.go @@ -35,7 +35,7 @@ func EncodeResourceMetadata(resource pdata.Resource, w *fastjson.Writer) { var k8sPod model.KubernetesPod var labels model.IfaceMap - resource.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + resource.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case conventions.AttributeServiceName: service.Name = cleanServiceName(v.StringVal()) diff --git a/exporter/elasticexporter/internal/translator/elastic/metadata_test.go b/exporter/elasticexporter/internal/translator/elastic/metadata_test.go index b86e4c0a6eda..588c0651960e 100644 --- a/exporter/elasticexporter/internal/translator/elastic/metadata_test.go +++ b/exporter/elasticexporter/internal/translator/elastic/metadata_test.go @@ -41,24 +41,24 @@ func TestMetadataDefaults(t *testing.T) { } func TestMetadataServiceName(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "service.name": pdata.NewAttributeValueString("foo"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "service.name": pdata.NewValueString("foo"), }) out := metadataWithResource(t, resource) assert.Equal(t, "foo", out.service.Name) } func TestMetadataServiceVersion(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "service.version": pdata.NewAttributeValueString("1.2.3"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "service.version": pdata.NewValueString("1.2.3"), }) out := metadataWithResource(t, resource) assert.Equal(t, "1.2.3", out.service.Version) } func TestMetadataServiceInstance(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "service.instance.id": pdata.NewAttributeValueString("foo-1"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "service.instance.id": pdata.NewValueString("foo-1"), }) out := metadataWithResource(t, resource) assert.Equal(t, &model.ServiceNode{ @@ -67,24 +67,24 @@ func TestMetadataServiceInstance(t *testing.T) { } func TestMetadataServiceEnvironment(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "deployment.environment": pdata.NewAttributeValueString("foo"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "deployment.environment": pdata.NewValueString("foo"), }) out := metadataWithResource(t, resource) assert.Equal(t, "foo", out.service.Environment) } func TestMetadataSystemHostname(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "host.name": pdata.NewAttributeValueString("foo"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "host.name": pdata.NewValueString("foo"), }) out := metadataWithResource(t, resource) assert.Equal(t, "foo", out.system.Hostname) } func TestMetadataServiceLanguageName(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "telemetry.sdk.language": pdata.NewAttributeValueString("java"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "telemetry.sdk.language": pdata.NewValueString("java"), }) out := metadataWithResource(t, resource) assert.Equal(t, "java", out.service.Language.Name) @@ -92,9 +92,9 @@ func TestMetadataServiceLanguageName(t *testing.T) { } func TestMetadataAgentName(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "telemetry.sdk.name": pdata.NewAttributeValueString("foo"), - "telemetry.sdk.version": pdata.NewAttributeValueString("bar"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "telemetry.sdk.name": pdata.NewValueString("foo"), + "telemetry.sdk.version": pdata.NewValueString("bar"), }) out := metadataWithResource(t, resource) assert.Equal(t, &model.Agent{ @@ -104,13 +104,13 @@ func TestMetadataAgentName(t *testing.T) { } func TestMetadataLabels(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "string": pdata.NewAttributeValueString("abc"), - "int": pdata.NewAttributeValueInt(123), - "double": pdata.NewAttributeValueDouble(123.456), - "bool": pdata.NewAttributeValueBool(true), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "string": pdata.NewValueString("abc"), + "int": pdata.NewValueInt(123), + "double": pdata.NewValueDouble(123.456), + "bool": pdata.NewValueBool(true), // well known resource label, not carried across - conventions.AttributeServiceVersion: pdata.NewAttributeValueString("..."), + conventions.AttributeServiceVersion: pdata.NewValueString("..."), }) out := metadataWithResource(t, resource) assert.Equal(t, model.IfaceMap{ @@ -122,10 +122,10 @@ func TestMetadataLabels(t *testing.T) { } func TestMetadataKubernetes(t *testing.T) { - resource := resourceFromAttributesMap(map[string]pdata.AttributeValue{ - "k8s.namespace.name": pdata.NewAttributeValueString("namespace_name"), - "k8s.pod.name": pdata.NewAttributeValueString("pod_name"), - "k8s.pod.uid": pdata.NewAttributeValueString("pod_uid"), + resource := resourceFromAttributesMap(map[string]pdata.Value{ + "k8s.namespace.name": pdata.NewValueString("namespace_name"), + "k8s.pod.name": pdata.NewValueString("pod_name"), + "k8s.pod.uid": pdata.NewValueString("pod_uid"), }) out := metadataWithResource(t, resource) assert.Equal(t, &model.Kubernetes{ @@ -137,7 +137,7 @@ func TestMetadataKubernetes(t *testing.T) { }, out.system.Kubernetes) } -func resourceFromAttributesMap(attrs map[string]pdata.AttributeValue) pdata.Resource { +func resourceFromAttributesMap(attrs map[string]pdata.Value) pdata.Resource { resource := pdata.NewResource() pdata.NewAttributeMapFromMap(attrs).CopyTo(resource.Attributes()) return resource diff --git a/exporter/elasticexporter/internal/translator/elastic/metrics.go b/exporter/elasticexporter/internal/translator/elastic/metrics.go index 33258e01afa0..8e0e63c394d2 100644 --- a/exporter/elasticexporter/internal/translator/elastic/metrics.go +++ b/exporter/elasticexporter/internal/translator/elastic/metrics.go @@ -104,7 +104,7 @@ func asTime(in pdata.Timestamp) model.Time { func asStringMap(in pdata.AttributeMap) model.StringMap { var out model.StringMap in.Sort() - in.Range(func(k string, v pdata.AttributeValue) bool { + in.Range(func(k string, v pdata.Value) bool { out = append(out, model.StringMapItem{ Key: k, Value: v.AsString(), diff --git a/exporter/elasticexporter/internal/translator/elastic/traces.go b/exporter/elasticexporter/internal/translator/elastic/traces.go index 81d2ec562d0b..07424205f25e 100644 --- a/exporter/elasticexporter/internal/translator/elastic/traces.go +++ b/exporter/elasticexporter/internal/translator/elastic/traces.go @@ -106,7 +106,7 @@ func setTransactionProperties( netPeerPort int ) - otlpSpan.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + otlpSpan.Attributes().Range(func(k string, v pdata.Value) bool { var storeTag bool switch k { // http.* @@ -226,7 +226,7 @@ func setSpanProperties(otlpSpan pdata.Span, span *model.Span) error { netPeerPort int ) - otlpSpan.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + otlpSpan.Attributes().Range(func(k string, v pdata.Value) bool { var storeTag bool switch k { // http.* @@ -381,7 +381,7 @@ func encodeSpanEvents( } var exceptionEscaped bool var exceptionMessage, exceptionStacktrace, exceptionType string - event.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + event.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case conventions.AttributeExceptionMessage: exceptionMessage = v.StringVal() diff --git a/exporter/elasticexporter/internal/translator/elastic/traces_test.go b/exporter/elasticexporter/internal/translator/elastic/traces_test.go index fa9b49adba7f..397dbfaead57 100644 --- a/exporter/elasticexporter/internal/translator/elastic/traces_test.go +++ b/exporter/elasticexporter/internal/translator/elastic/traces_test.go @@ -193,66 +193,66 @@ func TestEncodeSpanTruncation(t *testing.T) { } func TestTransactionHTTPRequestURL(t *testing.T) { - test := func(t *testing.T, expectedFull string, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedFull string, attrs map[string]pdata.Value) { transaction := transactionWithAttributes(t, attrs) assert.Equal(t, expectedFull, transaction.Context.Request.URL.Full) } 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]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.host": pdata.NewValueString("testing.invalid:80"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) t.Run("scheme_servername_nethostport_target", func(t *testing.T) { - test(t, "https://testing.invalid:80/foo?bar", 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"), + test(t, "https://testing.invalid:80/foo?bar", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.server_name": pdata.NewValueString("testing.invalid"), + "net.host.port": pdata.NewValueInt(80), + "http.target": pdata.NewValueString("/foo?bar"), }) }) t.Run("scheme_nethostname_nethostport_target", func(t *testing.T) { - test(t, "https://testing.invalid:80/foo?bar", 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"), + test(t, "https://testing.invalid:80/foo?bar", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "net.host.name": pdata.NewValueString("testing.invalid"), + "net.host.port": pdata.NewValueInt(80), + "http.target": pdata.NewValueString("/foo?bar"), }) }) t.Run("http.url", func(t *testing.T) { const httpURL = "https://testing.invalid:80/foo?bar" - test(t, httpURL, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString(httpURL), + test(t, httpURL, map[string]pdata.Value{ + "http.url": pdata.NewValueString(httpURL), }) }) t.Run("host_no_port", func(t *testing.T) { - test(t, "https://testing.invalid/foo?bar", map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("testing.invalid"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "https://testing.invalid/foo?bar", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.host": pdata.NewValueString("testing.invalid"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) t.Run("ipv6_host_no_port", func(t *testing.T) { - test(t, "https://[::1]/foo?bar", map[string]pdata.AttributeValue{ - "http.scheme": pdata.NewAttributeValueString("https"), - "http.host": pdata.NewAttributeValueString("[::1]"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "https://[::1]/foo?bar", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.host": pdata.NewValueString("[::1]"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) // Scheme is set to "http" if it can't be deduced from attributes. t.Run("default_scheme", func(t *testing.T) { - test(t, "http://testing.invalid:80/foo?bar", map[string]pdata.AttributeValue{ - "http.host": pdata.NewAttributeValueString("testing.invalid:80"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "http://testing.invalid:80/foo?bar", map[string]pdata.Value{ + "http.host": pdata.NewValueString("testing.invalid:80"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) } func TestTransactionHTTPRequestURLInvalid(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("0.0.0.0:8081"), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.url": pdata.NewValueString("0.0.0.0:8081"), }) require.NotNil(t, transaction.Context) assert.Nil(t, transaction.Context.Request) @@ -262,54 +262,54 @@ func TestTransactionHTTPRequestURLInvalid(t *testing.T) { } func TestTransactionHTTPRequestSocketRemoteAddr(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]pdata.Value) { transaction := transactionWithAttributes(t, attrs) assert.Equal(t, expected, transaction.Context.Request.Socket.RemoteAddress) } t.Run("net.peer.ip_port", func(t *testing.T) { - test(t, "192.168.0.1:1234", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("http://testing.invalid"), - "net.peer.ip": pdata.NewAttributeValueString("192.168.0.1"), - "net.peer.port": pdata.NewAttributeValueInt(1234), + test(t, "192.168.0.1:1234", map[string]pdata.Value{ + "http.url": pdata.NewValueString("http://testing.invalid"), + "net.peer.ip": pdata.NewValueString("192.168.0.1"), + "net.peer.port": pdata.NewValueInt(1234), }) }) t.Run("net.peer.ip", func(t *testing.T) { - test(t, "192.168.0.1", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("http://testing.invalid"), - "net.peer.ip": pdata.NewAttributeValueString("192.168.0.1"), + test(t, "192.168.0.1", map[string]pdata.Value{ + "http.url": pdata.NewValueString("http://testing.invalid"), + "net.peer.ip": pdata.NewValueString("192.168.0.1"), }) }) t.Run("http.remote_addr", func(t *testing.T) { - test(t, "192.168.0.1:1234", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("http://testing.invalid"), - "http.remote_addr": pdata.NewAttributeValueString("192.168.0.1:1234"), + test(t, "192.168.0.1:1234", map[string]pdata.Value{ + "http.url": pdata.NewValueString("http://testing.invalid"), + "http.remote_addr": pdata.NewValueString("192.168.0.1:1234"), }) }) t.Run("http.remote_addr_no_port", func(t *testing.T) { - test(t, "192.168.0.1", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("http://testing.invalid"), - "http.remote_addr": pdata.NewAttributeValueString("192.168.0.1"), + test(t, "192.168.0.1", map[string]pdata.Value{ + "http.url": pdata.NewValueString("http://testing.invalid"), + "http.remote_addr": pdata.NewValueString("192.168.0.1"), }) }) } func TestTransactionHTTPRequestHTTPVersion(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.flavor": pdata.NewAttributeValueString("1.1"), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.flavor": pdata.NewValueString("1.1"), }) assert.Equal(t, "1.1", transaction.Context.Request.HTTPVersion) } func TestTransactionHTTPRequestHTTPMethod(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.method": pdata.NewAttributeValueString("PATCH"), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.method": pdata.NewValueString("PATCH"), }) assert.Equal(t, "PATCH", transaction.Context.Request.Method) } func TestTransactionHTTPRequestUserAgent(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.user_agent": pdata.NewAttributeValueString("Foo/bar (baz)"), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.user_agent": pdata.NewValueString("Foo/bar (baz)"), }) assert.Equal(t, model.Headers{{ Key: "User-Agent", @@ -318,8 +318,8 @@ func TestTransactionHTTPRequestUserAgent(t *testing.T) { } func TestTransactionHTTPRequestClientIP(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.client_ip": pdata.NewAttributeValueString("256.257.258.259"), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.client_ip": pdata.NewValueString("256.257.258.259"), }) assert.Equal(t, model.Headers{{ Key: "X-Forwarded-For", @@ -328,59 +328,59 @@ func TestTransactionHTTPRequestClientIP(t *testing.T) { } func TestTransactionHTTPResponseStatusCode(t *testing.T) { - transaction := transactionWithAttributes(t, map[string]pdata.AttributeValue{ - "http.status_code": pdata.NewAttributeValueInt(200), + transaction := transactionWithAttributes(t, map[string]pdata.Value{ + "http.status_code": pdata.NewValueInt(200), }) assert.Equal(t, 200, transaction.Context.Response.StatusCode) } func TestSpanHTTPURL(t *testing.T) { - test := func(t *testing.T, expectedURL string, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedURL string, attrs map[string]pdata.Value) { span := spanWithAttributes(t, attrs) assert.Equal(t, expectedURL, span.Context.HTTP.URL.String()) } t.Run("http.url", func(t *testing.T) { const httpURL = "https://testing.invalid:80/foo?bar" - test(t, httpURL, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString(httpURL), + test(t, httpURL, map[string]pdata.Value{ + "http.url": pdata.NewValueString(httpURL), }) }) 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]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.host": pdata.NewValueString("testing.invalid:80"), + "http.target": pdata.NewValueString("/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]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "net.peer.name": pdata.NewValueString("testing.invalid"), + "net.peer.ip": pdata.NewValueString("::1"), // net.peer.name preferred + "net.peer.port": pdata.NewValueInt(80), + "http.target": pdata.NewValueString("/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]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "net.peer.ip": pdata.NewValueString("::1"), + "net.peer.port": pdata.NewValueInt(80), + "http.target": pdata.NewValueString("/foo?bar"), }) }) // Scheme is set to "http" if it can't be deduced from attributes. t.Run("default_scheme", func(t *testing.T) { - test(t, "http://testing.invalid:80/foo?bar", map[string]pdata.AttributeValue{ - "http.host": pdata.NewAttributeValueString("testing.invalid:80"), - "http.target": pdata.NewAttributeValueString("/foo?bar"), + test(t, "http://testing.invalid:80/foo?bar", map[string]pdata.Value{ + "http.host": pdata.NewValueString("testing.invalid:80"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) } func TestSpanHTTPDestination(t *testing.T) { - test := func(t *testing.T, expectedAddr string, expectedPort int, expectedName string, expectedResource string, attrs map[string]pdata.AttributeValue) { + test := func(t *testing.T, expectedAddr string, expectedPort int, expectedName string, expectedResource string, attrs map[string]pdata.Value) { span := spanWithAttributes(t, attrs) assert.Equal(t, &model.DestinationSpanContext{ Address: expectedAddr, @@ -393,40 +393,40 @@ func TestSpanHTTPDestination(t *testing.T) { }, span.Context.Destination) } t.Run("url_default_port_specified", func(t *testing.T) { - test(t, "testing.invalid", 443, "https://testing.invalid", "testing.invalid:443", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:443/foo?bar"), + test(t, "testing.invalid", 443, "https://testing.invalid", "testing.invalid:443", map[string]pdata.Value{ + "http.url": pdata.NewValueString("https://testing.invalid:443/foo?bar"), }) }) t.Run("url_port_scheme", func(t *testing.T) { - test(t, "testing.invalid", 443, "https://testing.invalid", "testing.invalid:443", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid/foo?bar"), + test(t, "testing.invalid", 443, "https://testing.invalid", "testing.invalid:443", map[string]pdata.Value{ + "http.url": pdata.NewValueString("https://testing.invalid/foo?bar"), }) }) t.Run("url_non_default_port", func(t *testing.T) { - test(t, "testing.invalid", 444, "https://testing.invalid:444", "testing.invalid:444", map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("https://testing.invalid:444/foo?bar"), + test(t, "testing.invalid", 444, "https://testing.invalid:444", "testing.invalid:444", map[string]pdata.Value{ + "http.url": pdata.NewValueString("https://testing.invalid:444/foo?bar"), }) }) t.Run("scheme_host_target", func(t *testing.T) { - test(t, "testing.invalid", 444, "https://testing.invalid:444", "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"), + test(t, "testing.invalid", 444, "https://testing.invalid:444", "testing.invalid:444", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "http.host": pdata.NewValueString("testing.invalid:444"), + "http.target": pdata.NewValueString("/foo?bar"), }) }) t.Run("scheme_netpeername_nethostport_target", func(t *testing.T) { - test(t, "::1", 444, "https://[::1]:444", "[::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"), + test(t, "::1", 444, "https://[::1]:444", "[::1]:444", map[string]pdata.Value{ + "http.scheme": pdata.NewValueString("https"), + "net.peer.ip": pdata.NewValueString("::1"), + "net.peer.port": pdata.NewValueInt(444), + "http.target": pdata.NewValueString("/foo?bar"), }) }) } func TestSpanHTTPURLInvalid(t *testing.T) { - span := spanWithAttributes(t, map[string]pdata.AttributeValue{ - "http.url": pdata.NewAttributeValueString("0.0.0.0:8081"), + span := spanWithAttributes(t, map[string]pdata.Value{ + "http.url": pdata.NewValueString("0.0.0.0:8081"), }) require.NotNil(t, span.Context) assert.Nil(t, span.Context.HTTP) @@ -436,8 +436,8 @@ func TestSpanHTTPURLInvalid(t *testing.T) { } func TestSpanHTTPStatusCode(t *testing.T) { - span := spanWithAttributes(t, map[string]pdata.AttributeValue{ - "http.status_code": pdata.NewAttributeValueInt(200), + span := spanWithAttributes(t, map[string]pdata.Value{ + "http.status_code": pdata.NewValueInt(200), }) assert.Equal(t, 200, span.Context.HTTP.StatusCode) } @@ -445,16 +445,16 @@ func TestSpanHTTPStatusCode(t *testing.T) { func TestSpanDatabaseContext(t *testing.T) { // https://github.com/open-telemetry/opentelemetry-specification/blob/main/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;" - span := spanWithAttributes(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("SELECT * FROM orders WHERE order_id = 'o4711'"), - "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"), + span := spanWithAttributes(t, map[string]pdata.Value{ + "db.system": pdata.NewValueString("mysql"), + "db.connection_string": pdata.NewValueString(connectionString), + "db.user": pdata.NewValueString("billing_user"), + "db.name": pdata.NewValueString("ShopDb"), + "db.statement": pdata.NewValueString("SELECT * FROM orders WHERE order_id = 'o4711'"), + "net.peer.name": pdata.NewValueString("shopdb.example.com"), + "net.peer.ip": pdata.NewValueString("192.0.2.12"), + "net.peer.port": pdata.NewValueInt(3306), + "net.transport": pdata.NewValueString("IP.TCP"), }) assert.Equal(t, "db", span.Type) @@ -513,7 +513,7 @@ func TestInstrumentationLibrary(t *testing.T) { }, payloads.Transactions[0].Context) } -func transactionWithAttributes(t *testing.T, attrs map[string]pdata.AttributeValue) model.Transaction { +func transactionWithAttributes(t *testing.T, attrs map[string]pdata.Value) model.Transaction { var w fastjson.Writer var recorder transporttest.RecorderTransport @@ -531,7 +531,7 @@ func transactionWithAttributes(t *testing.T, attrs map[string]pdata.AttributeVal return payloads.Transactions[0] } -func spanWithAttributes(t *testing.T, attrs map[string]pdata.AttributeValue) model.Span { +func spanWithAttributes(t *testing.T, attrs map[string]pdata.Value) model.Span { var w fastjson.Writer var recorder transporttest.RecorderTransport diff --git a/exporter/elasticexporter/internal/translator/elastic/utils.go b/exporter/elasticexporter/internal/translator/elastic/utils.go index 326ffc50e370..4e141ed35e2b 100644 --- a/exporter/elasticexporter/internal/translator/elastic/utils.go +++ b/exporter/elasticexporter/internal/translator/elastic/utils.go @@ -28,15 +28,15 @@ var ( labelKeyReplacer = strings.NewReplacer(`.`, `_`, `*`, `_`, `"`, `_`) ) -func ifaceAttributeValue(v pdata.AttributeValue) interface{} { +func ifaceAttributeValue(v pdata.Value) interface{} { switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return truncate(v.StringVal()) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return v.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return v.DoubleVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return v.BoolVal() } return nil diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index b38a53e9333d..e065bdbb2875 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/elastic/go-structform v0.0.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index bdeca46885b1..247562e63e8d 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -170,10 +170,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/elasticsearchexporter/internal/objmodel/objmodel.go b/exporter/elasticsearchexporter/internal/objmodel/objmodel.go index 2df52484b81b..ac52350793e9 100644 --- a/exporter/elasticsearchexporter/internal/objmodel/objmodel.go +++ b/exporter/elasticsearchexporter/internal/objmodel/objmodel.go @@ -160,11 +160,11 @@ func (doc *Document) AddAttributes(key string, attributes pdata.AttributeMap) { // AddAttribute converts and adds a AttributeValue to the document. If the attribute represents a map, // the fields will be flattened. -func (doc *Document) AddAttribute(key string, attribute pdata.AttributeValue) { +func (doc *Document) AddAttribute(key string, attribute pdata.Value) { switch attribute.Type() { - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: // do not add 'null' - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: doc.AddAttributes(key, attribute.MapVal()) default: doc.Add(key, ValueFromAttribute(attribute)) @@ -367,20 +367,20 @@ func TimestampValue(ts time.Time) Value { } // ValueFromAttribute converts a AttributeValue into a value. -func ValueFromAttribute(attr pdata.AttributeValue) Value { +func ValueFromAttribute(attr pdata.Value) Value { switch attr.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return IntValue(attr.IntVal()) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return DoubleValue(attr.DoubleVal()) - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return StringValue(attr.StringVal()) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return BoolValue(attr.BoolVal()) - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: sub := arrFromAttributes(attr.SliceVal()) return ArrValue(sub...) - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: sub := DocumentFromAttributes(attr.MapVal()) return Value{kind: KindObject, doc: sub} default: @@ -477,19 +477,19 @@ func arrFromAttributes(aa pdata.AttributeValueSlice) []Value { } func appendAttributeFields(fields []field, path string, am pdata.AttributeMap) []field { - am.Range(func(k string, val pdata.AttributeValue) bool { + am.Range(func(k string, val pdata.Value) bool { fields = appendAttributeValue(fields, path, k, val) return true }) return fields } -func appendAttributeValue(fields []field, path string, key string, attr pdata.AttributeValue) []field { - if attr.Type() == pdata.AttributeValueTypeEmpty { +func appendAttributeValue(fields []field, path string, key string, attr pdata.Value) []field { + if attr.Type() == pdata.ValueTypeEmpty { return fields } - if attr.Type() == pdata.AttributeValueTypeMap { + if attr.Type() == pdata.ValueTypeMap { return appendAttributeFields(fields, flattenKey(path, key), attr.MapVal()) } diff --git a/exporter/elasticsearchexporter/internal/objmodel/objmodel_test.go b/exporter/elasticsearchexporter/internal/objmodel/objmodel_test.go index 07004e9dcd68..1cb2effe1702 100644 --- a/exporter/elasticsearchexporter/internal/objmodel/objmodel_test.go +++ b/exporter/elasticsearchexporter/internal/objmodel/objmodel_test.go @@ -35,41 +35,41 @@ func TestObjectModel_CreateMap(t *testing.T) { }{ "from empty map": { build: func() Document { - return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{})) + return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{})) }, }, "from map": { build: func() Document { - return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "i": pdata.NewAttributeValueInt(42), - "str": pdata.NewAttributeValueString("test"), + return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "i": pdata.NewValueInt(42), + "str": pdata.NewValueString("test"), })) }, want: Document{[]field{{"i", IntValue(42)}, {"str", StringValue("test")}}}, }, "ignores nil values": { build: func() Document { - return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "null": pdata.NewAttributeValueEmpty(), - "str": pdata.NewAttributeValueString("test"), + return DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "null": pdata.NewValueEmpty(), + "str": pdata.NewValueString("test"), })) }, want: Document{[]field{{"str", StringValue("test")}}}, }, "from map with prefix": { build: func() Document { - return DocumentFromAttributesWithPath("prefix", pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "i": pdata.NewAttributeValueInt(42), - "str": pdata.NewAttributeValueString("test"), + return DocumentFromAttributesWithPath("prefix", pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "i": pdata.NewValueInt(42), + "str": pdata.NewValueString("test"), })) }, want: Document{[]field{{"prefix.i", IntValue(42)}, {"prefix.str", StringValue("test")}}}, }, "add attributes with key": { build: func() (doc Document) { - doc.AddAttributes("prefix", pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "i": pdata.NewAttributeValueInt(42), - "str": pdata.NewAttributeValueString("test"), + doc.AddAttributes("prefix", pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "i": pdata.NewValueInt(42), + "str": pdata.NewValueString("test"), })) return doc }, @@ -77,7 +77,7 @@ func TestObjectModel_CreateMap(t *testing.T) { }, "add attribute flattens a map value": { build: func() (doc Document) { - mapVal := pdata.NewAttributeValueMap() + mapVal := pdata.NewValueMap() m := mapVal.MapVal() m.InsertInt("i", 42) m.InsertString("str", "test") @@ -155,7 +155,7 @@ func TestObjectModel_Dedup(t *testing.T) { }, "duplicate after flattening from map: namespace object at end": { build: func() Document { - namespace := pdata.NewAttributeValueMap() + namespace := pdata.NewValueMap() namespace.MapVal().InsertInt("a", 23) am := pdata.NewAttributeMap() @@ -168,7 +168,7 @@ func TestObjectModel_Dedup(t *testing.T) { }, "duplicate after flattening from map: namespace object at beginning": { build: func() Document { - namespace := pdata.NewAttributeValueMap() + namespace := pdata.NewValueMap() namespace.MapVal().InsertInt("a", 23) am := pdata.NewAttributeMap() @@ -226,51 +226,51 @@ func TestObjectModel_Dedup(t *testing.T) { func TestValue_FromAttribute(t *testing.T) { tests := map[string]struct { - in pdata.AttributeValue + in pdata.Value want Value }{ "null": { - in: pdata.NewAttributeValueEmpty(), + in: pdata.NewValueEmpty(), want: nilValue, }, "string": { - in: pdata.NewAttributeValueString("test"), + in: pdata.NewValueString("test"), want: StringValue("test"), }, "int": { - in: pdata.NewAttributeValueInt(23), + in: pdata.NewValueInt(23), want: IntValue(23), }, "double": { - in: pdata.NewAttributeValueDouble(3.14), + in: pdata.NewValueDouble(3.14), want: DoubleValue(3.14), }, "bool": { - in: pdata.NewAttributeValueBool(true), + in: pdata.NewValueBool(true), want: BoolValue(true), }, "empty array": { - in: pdata.NewAttributeValueArray(), + in: pdata.NewValueArray(), want: Value{kind: KindArr}, }, "non-empty array": { - in: func() pdata.AttributeValue { - v := pdata.NewAttributeValueArray() + in: func() pdata.Value { + v := pdata.NewValueArray() tgt := v.SliceVal().AppendEmpty() - pdata.NewAttributeValueInt(1).CopyTo(tgt) + pdata.NewValueInt(1).CopyTo(tgt) return v }(), want: ArrValue(IntValue(1)), }, "empty map": { - in: pdata.NewAttributeValueMap(), + in: pdata.NewValueMap(), want: Value{kind: KindObject}, }, "non-empty map": { - in: func() pdata.AttributeValue { - v := pdata.NewAttributeValueMap() + in: func() pdata.Value { + v := pdata.NewValueMap() m := v.MapVal() - m.Insert("a", pdata.NewAttributeValueInt(1)) + m.Insert("a", pdata.NewValueInt(1)) return v }(), want: Value{kind: KindObject, doc: Document{[]field{{"a", IntValue(1)}}}}, @@ -291,30 +291,30 @@ func TestDocument_Serialize_Flat(t *testing.T) { want string }{ "no nesting with multiple fields": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": pdata.NewAttributeValueString("test"), - "b": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": pdata.NewValueString("test"), + "b": pdata.NewValueInt(1), })), want: `{"a":"test","b":1}`, }, "shared prefix": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a.str": pdata.NewAttributeValueString("test"), - "a.i": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a.str": pdata.NewValueString("test"), + "a.i": pdata.NewValueInt(1), })), want: `{"a.i":1,"a.str":"test"}`, }, "multiple namespaces with dot": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a.str": pdata.NewAttributeValueString("test"), - "b.i": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a.str": pdata.NewValueString("test"), + "b.i": pdata.NewValueInt(1), })), want: `{"a.str":"test","b.i":1}`, }, "nested maps": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": func() pdata.AttributeValue { - m := pdata.NewAttributeValueMap() + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": func() pdata.Value { + m := pdata.NewValueMap() m.MapVal().InsertString("str", "test") m.MapVal().InsertInt("i", 1) return m @@ -323,9 +323,9 @@ func TestDocument_Serialize_Flat(t *testing.T) { want: `{"a.i":1,"a.str":"test"}`, }, "multi-level nested namespace maps": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": func() pdata.AttributeValue { - m := pdata.NewAttributeValueMap() + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": func() pdata.Value { + m := pdata.NewValueMap() m.MapVal().InsertString("b.str", "test") m.MapVal().InsertInt("i", 1) return m @@ -353,30 +353,30 @@ func TestDocument_Serialize_Dedot(t *testing.T) { want string }{ "no nesting with multiple fields": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": pdata.NewAttributeValueString("test"), - "b": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": pdata.NewValueString("test"), + "b": pdata.NewValueInt(1), })), want: `{"a":"test","b":1}`, }, "shared prefix": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a.str": pdata.NewAttributeValueString("test"), - "a.i": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a.str": pdata.NewValueString("test"), + "a.i": pdata.NewValueInt(1), })), want: `{"a":{"i":1,"str":"test"}}`, }, "multiple namespaces": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a.str": pdata.NewAttributeValueString("test"), - "b.i": pdata.NewAttributeValueInt(1), + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a.str": pdata.NewValueString("test"), + "b.i": pdata.NewValueInt(1), })), want: `{"a":{"str":"test"},"b":{"i":1}}`, }, "nested maps": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": func() pdata.AttributeValue { - m := pdata.NewAttributeValueMap() + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": func() pdata.Value { + m := pdata.NewValueMap() m.MapVal().InsertString("str", "test") m.MapVal().InsertInt("i", 1) return m @@ -385,9 +385,9 @@ func TestDocument_Serialize_Dedot(t *testing.T) { want: `{"a":{"i":1,"str":"test"}}`, }, "multi-level nested namespace maps": { - doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "a": func() pdata.AttributeValue { - m := pdata.NewAttributeValueMap() + doc: DocumentFromAttributes(pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "a": func() pdata.Value { + m := pdata.NewValueMap() m.MapVal().InsertString("b.c.str", "test") m.MapVal().InsertInt("i", 1) return m diff --git a/exporter/f5cloudexporter/go.mod b/exporter/f5cloudexporter/go.mod index 365a3565b3d6..c7ed539144e0 100644 --- a/exporter/f5cloudexporter/go.mod +++ b/exporter/f5cloudexporter/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a google.golang.org/api v0.72.0 ) @@ -35,7 +35,7 @@ require ( github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/exporter/f5cloudexporter/go.sum b/exporter/f5cloudexporter/go.sum index eb2a1cb3b4ad..1e5572354c1f 100644 --- a/exporter/f5cloudexporter/go.sum +++ b/exporter/f5cloudexporter/go.sum @@ -309,10 +309,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/fileexporter/go.mod b/exporter/fileexporter/go.mod index 02a2194aaabe..d3399ee8dec1 100644 --- a/exporter/fileexporter/go.mod +++ b/exporter/fileexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/exporter/fileexporter/go.sum b/exporter/fileexporter/go.sum index c7ee36d2be91..41c2cc71b7a7 100644 --- a/exporter/fileexporter/go.sum +++ b/exporter/fileexporter/go.sum @@ -159,10 +159,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index 9fae940108ea..dc7762da2aee 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -10,8 +10,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/api v0.72.0 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 google.golang.org/grpc v1.45.0 diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index 34e389639d7a..1087eb2e1f2d 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -438,11 +438,12 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.24.0/go.mod h1:7W3JSDYTtH3qKKHrS1fMiwLtK7iZFLPq1+7htfspX/E= diff --git a/exporter/googlecloudpubsubexporter/go.mod b/exporter/googlecloudpubsubexporter/go.mod index aee4740f5fc8..00af5c517e11 100644 --- a/exporter/googlecloudpubsubexporter/go.mod +++ b/exporter/googlecloudpubsubexporter/go.mod @@ -6,8 +6,8 @@ require ( cloud.google.com/go/pubsub v1.17.1 github.com/google/uuid v1.3.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/api v0.72.0 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 diff --git a/exporter/googlecloudpubsubexporter/go.sum b/exporter/googlecloudpubsubexporter/go.sum index 8e5aad63313a..4cb992ebf848 100644 --- a/exporter/googlecloudpubsubexporter/go.sum +++ b/exporter/googlecloudpubsubexporter/go.sum @@ -313,10 +313,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/honeycombexporter/go.mod b/exporter/honeycombexporter/go.mod index 5d86a91e5190..ee8ef848c258 100644 --- a/exporter/honeycombexporter/go.mod +++ b/exporter/honeycombexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/honeycombio/libhoney-go v1.15.8 github.com/klauspost/compress v1.15.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 diff --git a/exporter/honeycombexporter/go.sum b/exporter/honeycombexporter/go.sum index 5708afec9f83..72a70729a772 100644 --- a/exporter/honeycombexporter/go.sum +++ b/exporter/honeycombexporter/go.sum @@ -189,10 +189,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/honeycombexporter/translator.go b/exporter/honeycombexporter/translator.go index f96bd567e714..324e22e42ece 100644 --- a/exporter/honeycombexporter/translator.go +++ b/exporter/honeycombexporter/translator.go @@ -25,15 +25,15 @@ import ( func spanAttributesToMap(spanAttrs pdata.AttributeMap) map[string]interface{} { var attrs = make(map[string]interface{}, spanAttrs.Len()) - spanAttrs.Range(func(key string, value pdata.AttributeValue) bool { + spanAttrs.Range(func(key string, value pdata.Value) bool { switch value.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: attrs[key] = value.StringVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: attrs[key] = value.BoolVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: attrs[key] = value.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: attrs[key] = value.DoubleVal() } return true diff --git a/exporter/honeycombexporter/translator_test.go b/exporter/honeycombexporter/translator_test.go index 34011126c2c5..ab68cbbe3ea5 100644 --- a/exporter/honeycombexporter/translator_test.go +++ b/exporter/honeycombexporter/translator_test.go @@ -26,17 +26,17 @@ import ( func TestSpanAttributesToMap(t *testing.T) { spanAttrs := []pdata.AttributeMap{ - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("bar"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "foo": pdata.NewValueString("bar"), }), - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueInt(1234), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "foo": pdata.NewValueInt(1234), }), - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueBool(true), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "foo": pdata.NewValueBool(true), }), - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueDouble(0.3145), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "foo": pdata.NewValueDouble(0.3145), }), pdata.NewAttributeMap(), } diff --git a/exporter/humioexporter/go.mod b/exporter/humioexporter/go.mod index d14846881487..0b9aaef69a78 100644 --- a/exporter/humioexporter/go.mod +++ b/exporter/humioexporter/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) diff --git a/exporter/humioexporter/go.sum b/exporter/humioexporter/go.sum index aaa5999029f0..03309772a8e2 100644 --- a/exporter/humioexporter/go.sum +++ b/exporter/humioexporter/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/humioexporter/traces_exporter.go b/exporter/humioexporter/traces_exporter.go index ef783b158a06..5b1a1565ea2d 100644 --- a/exporter/humioexporter/traces_exporter.go +++ b/exporter/humioexporter/traces_exporter.go @@ -212,7 +212,7 @@ func toHumioLinks(pLinks pdata.SpanLinkSlice) []*HumioLink { func toHumioAttributes(attrMaps ...pdata.AttributeMap) map[string]interface{} { attr := make(map[string]interface{}) for _, attrMap := range attrMaps { - attrMap.Range(func(k string, v pdata.AttributeValue) bool { + attrMap.Range(func(k string, v pdata.Value) bool { attr[k] = toHumioAttributeValue(v) return true }) @@ -220,19 +220,19 @@ func toHumioAttributes(attrMaps ...pdata.AttributeMap) map[string]interface{} { return attr } -func toHumioAttributeValue(rawVal pdata.AttributeValue) interface{} { +func toHumioAttributeValue(rawVal pdata.Value) interface{} { switch rawVal.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return rawVal.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return rawVal.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return rawVal.DoubleVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return rawVal.BoolVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: return toHumioAttributes(rawVal.MapVal()) - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: arrVal := rawVal.SliceVal() arr := make([]interface{}, 0, arrVal.Len()) for i := 0; i < arrVal.Len(); i++ { diff --git a/exporter/humioexporter/traces_exporter_test.go b/exporter/humioexporter/traces_exporter_test.go index f338c1342136..708ee6eb2e72 100644 --- a/exporter/humioexporter/traces_exporter_test.go +++ b/exporter/humioexporter/traces_exporter_test.go @@ -401,7 +401,7 @@ func TestToHumioAttributes(t *testing.T) { desc: "Array element", attr: func() pdata.AttributeMap { attrMap := pdata.NewAttributeMap() - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() arr.SliceVal().AppendEmpty().SetStringVal("a") arr.SliceVal().AppendEmpty().SetStringVal("b") arr.SliceVal().AppendEmpty().SetIntVal(4) @@ -418,7 +418,7 @@ func TestToHumioAttributes(t *testing.T) { desc: "Nested map", attr: func() pdata.AttributeMap { attrMap := pdata.NewAttributeMap() - nested := pdata.NewAttributeValueMap() + nested := pdata.NewValueMap() nested.MapVal().InsertString("key", "val") attrMap.Insert("nested", nested) attrMap.InsertBool("active", true) diff --git a/exporter/influxdbexporter/go.mod b/exporter/influxdbexporter/go.mod index 061210be38c1..e84178f1dd18 100644 --- a/exporter/influxdbexporter/go.mod +++ b/exporter/influxdbexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/influxdata/influxdb-observability/otel2influx v0.2.16 github.com/influxdata/line-protocol/v2 v2.2.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/influxdbexporter/go.sum b/exporter/influxdbexporter/go.sum index ec9e70b49515..906865452093 100644 --- a/exporter/influxdbexporter/go.sum +++ b/exporter/influxdbexporter/go.sum @@ -207,12 +207,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/jaegerexporter/go.mod b/exporter/jaegerexporter/go.mod index e4f69a6c9be4..bdd9dc90fb1b 100644 --- a/exporter/jaegerexporter/go.mod +++ b/exporter/jaegerexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) diff --git a/exporter/jaegerexporter/go.sum b/exporter/jaegerexporter/go.sum index 9c8663d4cfc7..f4064ec75736 100644 --- a/exporter/jaegerexporter/go.sum +++ b/exporter/jaegerexporter/go.sum @@ -217,10 +217,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/jaegerthrifthttpexporter/go.mod b/exporter/jaegerthrifthttpexporter/go.mod index 0eef7c77c830..b82ce5f4290a 100644 --- a/exporter/jaegerthrifthttpexporter/go.mod +++ b/exporter/jaegerthrifthttpexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/jaegertracing/jaeger v1.32.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/exporter/jaegerthrifthttpexporter/go.sum b/exporter/jaegerthrifthttpexporter/go.sum index 6af7216a7b17..1fdfbb96290f 100644 --- a/exporter/jaegerthrifthttpexporter/go.sum +++ b/exporter/jaegerthrifthttpexporter/go.sum @@ -200,10 +200,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index 55d0af728155..170c8cb9802f 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -11,8 +11,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/stretchr/testify v1.7.0 github.com/xdg-go/scram v1.1.1 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/kafkaexporter/go.sum b/exporter/kafkaexporter/go.sum index 7136bb68ab6d..1e20650cffce 100644 --- a/exporter/kafkaexporter/go.sum +++ b/exporter/kafkaexporter/go.sum @@ -232,10 +232,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/loadbalancingexporter/go.mod b/exporter/loadbalancingexporter/go.mod index da46d8755298..9e91b2da0545 100644 --- a/exporter/loadbalancingexporter/go.mod +++ b/exporter/loadbalancingexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/loadbalancingexporter/go.sum b/exporter/loadbalancingexporter/go.sum index 65257860cd23..9578abe648a0 100644 --- a/exporter/loadbalancingexporter/go.sum +++ b/exporter/loadbalancingexporter/go.sum @@ -319,10 +319,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/logzioexporter/go.mod b/exporter/logzioexporter/go.mod index 94e6d8d2ede2..5fddf40d4c72 100644 --- a/exporter/logzioexporter/go.mod +++ b/exporter/logzioexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/logzio/jaeger-logzio v1.0.4 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/logzioexporter/go.sum b/exporter/logzioexporter/go.sum index 2a8ba0cadc1c..d6bde751a4eb 100644 --- a/exporter/logzioexporter/go.sum +++ b/exporter/logzioexporter/go.sum @@ -843,10 +843,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/lokiexporter/encode_json.go b/exporter/lokiexporter/encode_json.go index 39b8e34c3f89..6d285963b34b 100644 --- a/exporter/lokiexporter/encode_json.go +++ b/exporter/lokiexporter/encode_json.go @@ -33,32 +33,32 @@ type lokiEntry struct { Resources map[string]interface{} `json:"resources,omitempty"` } -func serializeBody(body pdata.AttributeValue) ([]byte, error) { +func serializeBody(body pdata.Value) ([]byte, error) { var str []byte var err error switch body.Type() { - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: // no body - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: str, err = json.Marshal(body.StringVal()) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: str, err = json.Marshal(body.IntVal()) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: str, err = json.Marshal(body.DoubleVal()) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: str, err = json.Marshal(body.BoolVal()) - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: str, err = json.Marshal(body.MapVal().AsRaw()) - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: str, err = json.Marshal(attributeValueSliceAsRaw(body.SliceVal())) - case pdata.AttributeValueTypeBytes: + case pdata.ValueTypeBytes: str, err = json.Marshal(body.BytesVal()) default: @@ -101,17 +101,17 @@ func attributeValueSliceAsRaw(es pdata.AttributeValueSlice) []interface{} { for i := 0; i < es.Len(); i++ { v := es.At(i) switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: rawSlice = append(rawSlice, v.StringVal()) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: rawSlice = append(rawSlice, v.IntVal()) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: rawSlice = append(rawSlice, v.DoubleVal()) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: rawSlice = append(rawSlice, v.BoolVal()) - case pdata.AttributeValueTypeBytes: + case pdata.ValueTypeBytes: rawSlice = append(rawSlice, v.BytesVal()) - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: rawSlice = append(rawSlice, nil) default: rawSlice = append(rawSlice, "") diff --git a/exporter/lokiexporter/encode_json_test.go b/exporter/lokiexporter/encode_json_test.go index b6e96fd7cb26..9c130301158b 100644 --- a/exporter/lokiexporter/encode_json_test.go +++ b/exporter/lokiexporter/encode_json_test.go @@ -26,13 +26,13 @@ func exampleLog() (pdata.LogRecord, pdata.Resource) { buffer := pdata.NewLogRecord() buffer.Body().SetStringVal("Example log") buffer.SetSeverityText("error") - buffer.Attributes().Insert("attr1", pdata.NewAttributeValueString("1")) - buffer.Attributes().Insert("attr2", pdata.NewAttributeValueString("2")) + buffer.Attributes().Insert("attr1", pdata.NewValueString("1")) + buffer.Attributes().Insert("attr2", pdata.NewValueString("2")) buffer.SetTraceID(pdata.NewTraceID([16]byte{1, 2, 3, 4})) buffer.SetSpanID(pdata.NewSpanID([8]byte{5, 6, 7, 8})) resource := pdata.NewResource() - resource.Attributes().Insert("host.name", pdata.NewAttributeValueString("something")) + resource.Attributes().Insert("host.name", pdata.NewValueString("something")) return buffer, resource } @@ -49,9 +49,9 @@ func TestConvertWithMapBody(t *testing.T) { in := `{"body":{"key1":"value","key2":"value"},"traceid":"01020304000000000000000000000000","spanid":"0506070800000000","severity":"error","attributes":{"attr1":"1","attr2":"2"},"resources":{"host.name":"something"}}` log, resource := exampleLog() - mapVal := pdata.NewAttributeValueMap() - mapVal.MapVal().Insert("key1", pdata.NewAttributeValueString("value")) - mapVal.MapVal().Insert("key2", pdata.NewAttributeValueString("value")) + mapVal := pdata.NewValueMap() + mapVal.MapVal().Insert("key1", pdata.NewValueString("value")) + mapVal.MapVal().Insert("key2", pdata.NewValueString("value")) mapVal.CopyTo(log.Body()) out, err := encodeJSON(log, resource) @@ -61,14 +61,14 @@ func TestConvertWithMapBody(t *testing.T) { func TestSerializeBody(t *testing.T) { - arrayval := pdata.NewAttributeValueArray() + arrayval := pdata.NewValueArray() arrayval.SliceVal().AppendEmpty().SetStringVal("a") arrayval.SliceVal().AppendEmpty().SetStringVal("b") - simplemap := pdata.NewAttributeValueMap() + simplemap := pdata.NewValueMap() simplemap.MapVal().InsertString("key", "val") - complexmap := pdata.NewAttributeValueMap() + complexmap := pdata.NewValueMap() complexmap.MapVal().InsertString("keystr", "val") complexmap.MapVal().InsertInt("keyint", 1) complexmap.MapVal().InsertDouble("keyint", 1) @@ -76,30 +76,30 @@ func TestSerializeBody(t *testing.T) { complexmap.MapVal().InsertNull("keynull") complexmap.MapVal().Insert("keyarr", arrayval) complexmap.MapVal().Insert("keymap", simplemap) - complexmap.MapVal().Insert("keyempty", pdata.NewAttributeValueEmpty()) + complexmap.MapVal().Insert("keyempty", pdata.NewValueEmpty()) testcases := []struct { - input pdata.AttributeValue + input pdata.Value expected []byte }{ { - pdata.NewAttributeValueEmpty(), + pdata.NewValueEmpty(), nil, }, { - pdata.NewAttributeValueString("a"), + pdata.NewValueString("a"), []byte(`"a"`), }, { - pdata.NewAttributeValueInt(1), + pdata.NewValueInt(1), []byte(`1`), }, { - pdata.NewAttributeValueDouble(1.1), + pdata.NewValueDouble(1.1), []byte(`1.1`), }, { - pdata.NewAttributeValueBool(true), + pdata.NewValueBool(true), []byte(`true`), }, { @@ -115,7 +115,7 @@ func TestSerializeBody(t *testing.T) { []byte(`["a","b"]`), }, { - pdata.NewAttributeValueBytes([]byte(`abc`)), + pdata.NewValueBytes([]byte(`abc`)), []byte(`"YWJj"`), }, } diff --git a/exporter/lokiexporter/exporter.go b/exporter/lokiexporter/exporter.go index 026dd2e706e5..0dfb465ac1d3 100644 --- a/exporter/lokiexporter/exporter.go +++ b/exporter/lokiexporter/exporter.go @@ -234,7 +234,7 @@ func (l *lokiExporter) convertAttributesToLabels(attributes pdata.AttributeMap, for attr, attrLabelName := range allowedLabels { av, ok := attributes.Get(attr) if ok { - if av.Type() != pdata.AttributeValueTypeString { + if av.Type() != pdata.ValueTypeString { l.settings.Logger.Debug("Failed to convert attribute value to Loki label value, value is not a string", zap.String("attribute", attr)) continue } @@ -293,7 +293,7 @@ func (l *lokiExporter) convertLogBodyToEntry(lr pdata.LogRecord, res pdata.Resou // fields not added to the accept-list as part of the component's config // are added to the body, so that they can still be seen under "detected fields" - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { if _, found := l.config.Labels.Attributes[k]; !found { b.WriteString(k) b.WriteString("=") @@ -305,7 +305,7 @@ func (l *lokiExporter) convertLogBodyToEntry(lr pdata.LogRecord, res pdata.Resou // same for resources: include all, except the ones that are explicitly added // as part of the config, which are showing up at the top-level already - res.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + res.Attributes().Range(func(k string, v pdata.Value) bool { if _, found := l.config.Labels.ResourceAttributes[k]; !found { b.WriteString(k) b.WriteString("=") diff --git a/exporter/lokiexporter/exporter_test.go b/exporter/lokiexporter/exporter_test.go index d4c4d62f6c5a..fc5296a6deab 100644 --- a/exporter/lokiexporter/exporter_test.go +++ b/exporter/lokiexporter/exporter_test.go @@ -62,7 +62,7 @@ func createLogData(numberOfLogs int, attributes pdata.AttributeMap) pdata.Logs { ts := pdata.Timestamp(int64(i) * time.Millisecond.Nanoseconds()) logRecord := ill.LogRecords().AppendEmpty() logRecord.Body().SetStringVal("mylog") - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { logRecord.Attributes().Insert(k, v) return true }) @@ -107,11 +107,11 @@ func TestExporter_pushLogData(t *testing.T) { genericGenLogsFunc := func() pdata.Logs { return createLogData(10, - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeContainerName: pdata.NewAttributeValueString("api"), - conventions.AttributeK8SClusterName: pdata.NewAttributeValueString("local"), - "resource.name": pdata.NewAttributeValueString("myresource"), - "severity": pdata.NewAttributeValueString("debug"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeContainerName: pdata.NewValueString("api"), + conventions.AttributeK8SClusterName: pdata.NewValueString("local"), + "resource.name": pdata.NewValueString("myresource"), + "severity": pdata.NewValueString("debug"), })) } @@ -186,8 +186,8 @@ func TestExporter_pushLogData(t *testing.T) { testServer: true, genLogsFunc: func() pdata.Logs { return createLogData(10, - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "not.a.match": pdata.NewAttributeValueString("random"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "not.a.match": pdata.NewValueString("random"), })) }, errFunc: func(err error) { @@ -205,16 +205,16 @@ func TestExporter_pushLogData(t *testing.T) { outLogs := pdata.NewLogs() matchingLogs := createLogData(10, - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeContainerName: pdata.NewAttributeValueString("api"), - conventions.AttributeK8SClusterName: pdata.NewAttributeValueString("local"), - "severity": pdata.NewAttributeValueString("debug"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeContainerName: pdata.NewValueString("api"), + conventions.AttributeK8SClusterName: pdata.NewValueString("local"), + "severity": pdata.NewValueString("debug"), })) matchingLogs.ResourceLogs().MoveAndAppendTo(outLogs.ResourceLogs()) nonMatchingLogs := createLogData(5, - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "not.a.match": pdata.NewAttributeValueString("random"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "not.a.match": pdata.NewValueString("random"), })) nonMatchingLogs.ResourceLogs().MoveAndAppendTo(outLogs.ResourceLogs()) @@ -473,8 +473,8 @@ func TestExporter_convertAttributesToLabels(t *testing.T) { func TestExporter_convertLogBodyToEntry(t *testing.T) { res := pdata.NewResource() - res.Attributes().Insert("host.name", pdata.NewAttributeValueString("something")) - res.Attributes().Insert("pod.name", pdata.NewAttributeValueString("something123")) + res.Attributes().Insert("host.name", pdata.NewValueString("something")) + res.Attributes().Insert("pod.name", pdata.NewValueString("something123")) lr := pdata.NewLogRecord() lr.Body().SetStringVal("Payment succeeded") @@ -482,7 +482,7 @@ func TestExporter_convertLogBodyToEntry(t *testing.T) { lr.SetSpanID(pdata.NewSpanID([8]byte{5, 6, 7, 8})) lr.SetSeverityText("DEBUG") lr.SetSeverityNumber(pdata.SeverityNumberDEBUG) - lr.Attributes().Insert("payment_method", pdata.NewAttributeValueString("credit_card")) + lr.Attributes().Insert("payment_method", pdata.NewValueString("credit_card")) ts := pdata.Timestamp(int64(1) * time.Millisecond.Nanoseconds()) lr.SetTimestamp(ts) @@ -598,7 +598,7 @@ func TestExporter_convertLogtoJSONEntry(t *testing.T) { lr.Body().SetStringVal("log message") lr.SetTimestamp(ts) res := pdata.NewResource() - res.Attributes().Insert("host.name", pdata.NewAttributeValueString("something")) + res.Attributes().Insert("host.name", pdata.NewValueString("something")) exp := newExporter(&Config{}, componenttest.NewNopTelemetrySettings()) entry, err := exp.convertLogToJSONEntry(lr, res) diff --git a/exporter/lokiexporter/go.mod b/exporter/lokiexporter/go.mod index 75545b7114e2..c23fc4707eac 100644 --- a/exporter/lokiexporter/go.mod +++ b/exporter/lokiexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20220111145625-076109fa1910 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 diff --git a/exporter/lokiexporter/go.sum b/exporter/lokiexporter/go.sum index cf6b29aee853..71be3d14019a 100644 --- a/exporter/lokiexporter/go.sum +++ b/exporter/lokiexporter/go.sum @@ -1307,10 +1307,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/newrelicexporter/go.mod b/exporter/newrelicexporter/go.mod index 3d0d9a7a5047..6eab81ddb59f 100644 --- a/exporter/newrelicexporter/go.mod +++ b/exporter/newrelicexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa diff --git a/exporter/newrelicexporter/go.sum b/exporter/newrelicexporter/go.sum index 5757d1c0e20f..6ddcc8b68415 100644 --- a/exporter/newrelicexporter/go.sum +++ b/exporter/newrelicexporter/go.sum @@ -187,10 +187,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/newrelicexporter/metrics.go b/exporter/newrelicexporter/metrics.go index 7be767080a5a..e4b507558cd9 100644 --- a/exporter/newrelicexporter/metrics.go +++ b/exporter/newrelicexporter/metrics.go @@ -130,7 +130,7 @@ func (al attributeLocation) String() string { type attributeStatsKey struct { location attributeLocation - attributeType pdata.AttributeValueType + attributeType pdata.ValueType } type exportMetadata struct { diff --git a/exporter/newrelicexporter/metrics_test.go b/exporter/newrelicexporter/metrics_test.go index d223a8cefd4a..f14008d59a35 100644 --- a/exporter/newrelicexporter/metrics_test.go +++ b/exporter/newrelicexporter/metrics_test.go @@ -293,13 +293,13 @@ func TestRecordAttributeMetadata(t *testing.T) { dataOutputCount: 20, externalDuration: 50, attributeMetadataCount: map[attributeStatsKey]int{ - {attributeType: pdata.AttributeValueTypeArray, location: attributeLocationResource}: 1, - {attributeType: pdata.AttributeValueTypeBool, location: attributeLocationSpan}: 1, - {attributeType: pdata.AttributeValueTypeMap, location: attributeLocationSpanEvent}: 1, - {attributeType: pdata.AttributeValueTypeDouble, location: attributeLocationLog}: 1, - {attributeType: pdata.AttributeValueTypeInt, location: attributeLocationResource}: 1, - {attributeType: pdata.AttributeValueTypeEmpty, location: attributeLocationSpan}: 1, - {attributeType: pdata.AttributeValueTypeString, location: attributeLocationSpanEvent}: 1, + {attributeType: pdata.ValueTypeArray, location: attributeLocationResource}: 1, + {attributeType: pdata.ValueTypeBool, location: attributeLocationSpan}: 1, + {attributeType: pdata.ValueTypeMap, location: attributeLocationSpanEvent}: 1, + {attributeType: pdata.ValueTypeDouble, location: attributeLocationLog}: 1, + {attributeType: pdata.ValueTypeInt, location: attributeLocationResource}: 1, + {attributeType: pdata.ValueTypeEmpty, location: attributeLocationSpan}: 1, + {attributeType: pdata.ValueTypeString, location: attributeLocationSpanEvent}: 1, }, } diff --git a/exporter/newrelicexporter/transformer.go b/exporter/newrelicexporter/transformer.go index d1ed51d59dc2..6a51dfe8d007 100644 --- a/exporter/newrelicexporter/transformer.go +++ b/exporter/newrelicexporter/transformer.go @@ -413,7 +413,7 @@ func (t *transformer) MetricAttributes(baseAttributes map[string]interface{}, at for k, v := range baseAttributes { rawMap[k] = v } - attrMap.Range(func(k string, v pdata.AttributeValue) bool { + attrMap.Range(func(k string, v pdata.Value) bool { // Only include attribute if not an override attribute if _, isOverrideKey := t.OverrideAttributes[k]; !isOverrideKey { rawMap[k] = v.AsString() @@ -425,7 +425,7 @@ func (t *transformer) MetricAttributes(baseAttributes map[string]interface{}, at } func (t *transformer) TrackAttributes(location attributeLocation, attributeMap pdata.AttributeMap) { - attributeMap.Range(func(_ string, v pdata.AttributeValue) bool { + attributeMap.Range(func(_ string, v pdata.Value) bool { statsKey := attributeStatsKey{location: location, attributeType: v.Type()} t.details.attributeMetadataCount[statsKey]++ return true diff --git a/exporter/newrelicexporter/transformer_test.go b/exporter/newrelicexporter/transformer_test.go index baa8ed1526c4..05f39b52e418 100644 --- a/exporter/newrelicexporter/transformer_test.go +++ b/exporter/newrelicexporter/transformer_test.go @@ -53,7 +53,7 @@ func TestCommonAttributes(t *testing.T) { assert.Equal(t, "test version", commonAttrs[conventions.OtelLibraryVersion]) assert.Equal(t, 1, len(details.attributeMetadataCount)) - assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationResource, attributeType: pdata.AttributeValueTypeString}]) + assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationResource, attributeType: pdata.ValueTypeString}]) } func TestDoesNotCaptureResourceAttributeMetadata(t *testing.T) { @@ -168,8 +168,8 @@ func TestCaptureSpanAttributeMetadata(t *testing.T) { require.NoError(t, err) assert.Equal(t, 2, len(details.attributeMetadataCount)) - assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationSpan, attributeType: pdata.AttributeValueTypeInt}]) - assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationSpanEvent, attributeType: pdata.AttributeValueTypeBool}]) + assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationSpan, attributeType: pdata.ValueTypeInt}]) + assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationSpanEvent, attributeType: pdata.ValueTypeBool}]) } func TestDoesNotCaptureSpanAttributeMetadata(t *testing.T) { @@ -911,7 +911,7 @@ func TestCaptureLogAttributeMetadata(t *testing.T) { require.NoError(t, err) assert.Equal(t, 1, len(details.attributeMetadataCount)) - assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationLog, attributeType: pdata.AttributeValueTypeString}]) + assert.Equal(t, 1, details.attributeMetadataCount[attributeStatsKey{location: attributeLocationLog, attributeType: pdata.ValueTypeString}]) } func TestDoesNotCaptureLogAttributeMetadata(t *testing.T) { diff --git a/exporter/observiqexporter/converter.go b/exporter/observiqexporter/converter.go index dc6be4e4619e..b0d06523492e 100644 --- a/exporter/observiqexporter/converter.go +++ b/exporter/observiqexporter/converter.go @@ -131,7 +131,7 @@ func timestampFromRecord(log pdata.LogRecord) string { } func messageFromRecord(log pdata.LogRecord) string { - if log.Body().Type() == pdata.AttributeValueTypeString { + if log.Body().Type() == pdata.ValueTypeString { return log.Body().StringVal() } @@ -140,7 +140,7 @@ func messageFromRecord(log pdata.LogRecord) string { // bodyFromRecord returns what the "body" field should be on the observiq entry from the given LogRecord. func bodyFromRecord(log pdata.LogRecord) interface{} { - if log.Body().Type() != pdata.AttributeValueTypeString { + if log.Body().Type() != pdata.ValueTypeString { return attributeValueToBaseType(log.Body()) } return nil @@ -194,7 +194,7 @@ func severityFromRecord(log pdata.LogRecord) string { */ func attributeMapToBaseType(m pdata.AttributeMap) map[string]interface{} { mapOut := make(map[string]interface{}, m.Len()) - m.Range(func(k string, v pdata.AttributeValue) bool { + m.Range(func(k string, v pdata.Value) bool { val := attributeValueToBaseType(v) if val != nil { dedotedKey := strings.ReplaceAll(k, ".", "_") @@ -208,20 +208,20 @@ func attributeMapToBaseType(m pdata.AttributeMap) map[string]interface{} { /* attrib is the attribute value to convert to it's native Go type - skips nils in arrays/maps */ -func attributeValueToBaseType(attrib pdata.AttributeValue) interface{} { +func attributeValueToBaseType(attrib pdata.Value) interface{} { switch attrib.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return attrib.StringVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return attrib.BoolVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return attrib.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return attrib.DoubleVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: attribMap := attrib.MapVal() return attributeMapToBaseType(attribMap) - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: arrayVal := attrib.SliceVal() slice := make([]interface{}, 0, arrayVal.Len()) for i := 0; i < arrayVal.Len(); i++ { @@ -231,7 +231,7 @@ func attributeValueToBaseType(attrib pdata.AttributeValue) interface{} { } } return slice - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: return nil } return nil diff --git a/exporter/observiqexporter/converter_test.go b/exporter/observiqexporter/converter_test.go index eb9712b0106d..02a21a34901c 100644 --- a/exporter/observiqexporter/converter_test.go +++ b/exporter/observiqexporter/converter_test.go @@ -33,7 +33,7 @@ func resourceAndLogRecordsToLogs(r pdata.Resource, lrs []pdata.LogRecord) pdata. resLog := resLogs.AppendEmpty() resLogRes := resLog.Resource() - r.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + r.Attributes().Range(func(k string, v pdata.Value) bool { resLogRes.Attributes().Insert(k, v) return true }) @@ -102,11 +102,11 @@ func TestLogdataToObservIQFormat(t *testing.T) { logRecord.Attributes().InsertInt("int", 3) logRecord.Attributes().InsertNull("null") - mapVal := pdata.NewAttributeValueMap() - mapVal.MapVal().Insert("mapKey", pdata.NewAttributeValueString("value")) + mapVal := pdata.NewValueMap() + mapVal.MapVal().Insert("mapKey", pdata.NewValueString("value")) logRecord.Attributes().Insert("map", mapVal) - arrVal := pdata.NewAttributeValueArray() + arrVal := pdata.NewValueArray() arrVal.SliceVal().EnsureCapacity(2) arrVal.SliceVal().AppendEmpty().SetIntVal(1) arrVal.SliceVal().AppendEmpty().SetIntVal(2) @@ -122,13 +122,13 @@ func TestLogdataToObservIQFormat(t *testing.T) { res.Attributes().InsertInt("int", 1) res.Attributes().InsertNull("null") - mapVal := pdata.NewAttributeValueMap() + mapVal := pdata.NewValueMap() mapVal.MapVal().InsertDouble("double", 1.1) mapVal.MapVal().InsertBool("bool", false) mapVal.MapVal().InsertNull("null") res.Attributes().Insert("map", mapVal) - arrVal := pdata.NewAttributeValueArray() + arrVal := pdata.NewValueArray() arrVal.SliceVal().EnsureCapacity(2) arrVal.SliceVal().AppendEmpty().SetIntVal(1) arrVal.SliceVal().AppendEmpty().SetDoubleVal(2.0) @@ -193,8 +193,8 @@ func TestLogdataToObservIQFormat(t *testing.T) { func() pdata.LogRecord { logRecord := pdata.NewLogRecord() - mapVal := pdata.NewAttributeValueMap() - mapVal.MapVal().Insert("mapKey", pdata.NewAttributeValueString("value")) + mapVal := pdata.NewValueMap() + mapVal.MapVal().Insert("mapKey", pdata.NewValueString("value")) mapVal.CopyTo(logRecord.Body()) logRecord.SetTimestamp(nanoTs) @@ -219,7 +219,7 @@ func TestLogdataToObservIQFormat(t *testing.T) { func() pdata.LogRecord { logRecord := pdata.NewLogRecord() - pdata.NewAttributeValueArray().CopyTo(logRecord.Body()) + pdata.NewValueArray().CopyTo(logRecord.Body()) logRecord.Body().SliceVal().EnsureCapacity(2) logRecord.Body().SliceVal().AppendEmpty().SetStringVal("string") logRecord.Body().SliceVal().AppendEmpty().SetDoubleVal(1.0) @@ -269,8 +269,8 @@ func TestLogdataToObservIQFormat(t *testing.T) { func() pdata.LogRecord { logRecord := pdata.NewLogRecord() - bodyMapVal := pdata.NewAttributeValueMap() - bodyMapVal.MapVal().Insert("mapKey", pdata.NewAttributeValueString("body")) + bodyMapVal := pdata.NewValueMap() + bodyMapVal.MapVal().Insert("mapKey", pdata.NewValueString("body")) bodyMapVal.CopyTo(logRecord.Body()) logRecord.Attributes().InsertString("attrib", "logAttrib") diff --git a/exporter/observiqexporter/go.mod b/exporter/observiqexporter/go.mod index 1ca55e975de7..c80620c98f1d 100644 --- a/exporter/observiqexporter/go.mod +++ b/exporter/observiqexporter/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/google/uuid v1.3.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/observiqexporter/go.sum b/exporter/observiqexporter/go.sum index 6a62291de75e..36b650de03ef 100644 --- a/exporter/observiqexporter/go.sum +++ b/exporter/observiqexporter/go.sum @@ -158,10 +158,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/opencensusexporter/go.mod b/exporter/opencensusexporter/go.mod index 04f397fb4a20..c957cb7f7efb 100644 --- a/exporter/opencensusexporter/go.mod +++ b/exporter/opencensusexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/grpc v1.45.0 ) diff --git a/exporter/opencensusexporter/go.sum b/exporter/opencensusexporter/go.sum index 9ac483cd3077..edf69086b618 100644 --- a/exporter/opencensusexporter/go.sum +++ b/exporter/opencensusexporter/go.sum @@ -216,10 +216,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/parquetexporter/go.mod b/exporter/parquetexporter/go.mod index 2406b65e7ee7..a8af6da1ac50 100644 --- a/exporter/parquetexporter/go.mod +++ b/exporter/parquetexporter/go.mod @@ -3,8 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parque go 1.17 require ( - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/exporter/parquetexporter/go.sum b/exporter/parquetexporter/go.sum index 116066e526ed..4bded38129c3 100644 --- a/exporter/parquetexporter/go.sum +++ b/exporter/parquetexporter/go.sum @@ -148,10 +148,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/exporter/prometheusexporter/accumulator.go b/exporter/prometheusexporter/accumulator.go index 7a865298cf01..844861ff0435 100644 --- a/exporter/prometheusexporter/accumulator.go +++ b/exporter/prometheusexporter/accumulator.go @@ -276,7 +276,7 @@ func timeseriesSignature(ilmName string, metric pdata.Metric, attributes pdata.A b.WriteString(metric.DataType().String()) b.WriteString("*" + ilmName) b.WriteString("*" + metric.Name()) - attributes.Sort().Range(func(k string, v pdata.AttributeValue) bool { + attributes.Sort().Range(func(k string, v pdata.Value) bool { b.WriteString("*" + k + "*" + v.AsString()) return true }) diff --git a/exporter/prometheusexporter/accumulator_test.go b/exporter/prometheusexporter/accumulator_test.go index 09364675c6fd..9092fd0e7cd9 100644 --- a/exporter/prometheusexporter/accumulator_test.go +++ b/exporter/prometheusexporter/accumulator_test.go @@ -349,7 +349,7 @@ func TestAccumulateMetrics(t *testing.T) { require.Equal(t, v.instrumentationLibrary.Name(), "test") require.Equal(t, v.value.DataType(), ilm2.Metrics().At(0).DataType()) - vLabels.Range(func(k string, v pdata.AttributeValue) bool { + vLabels.Range(func(k string, v pdata.Value) bool { r, _ := m2Labels.Get(k) require.Equal(t, r, v) return true diff --git a/exporter/prometheusexporter/collector.go b/exporter/prometheusexporter/collector.go index 10f13483a2bf..b876206f4b86 100644 --- a/exporter/prometheusexporter/collector.go +++ b/exporter/prometheusexporter/collector.go @@ -83,7 +83,7 @@ func (c *collector) getMetricMetadata(metric pdata.Metric, attributes pdata.Attr keys := make([]string, 0, attributes.Len()) values := make([]string, 0, attributes.Len()) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { keys = append(keys, sanitize(k, c.skipSanitizeLabel)) values = append(values, v.AsString()) return true diff --git a/exporter/prometheusexporter/go.mod b/exporter/prometheusexporter/go.mod index 6c92805daa49..28bb2af21bd8 100644 --- a/exporter/prometheusexporter/go.mod +++ b/exporter/prometheusexporter/go.mod @@ -10,8 +10,8 @@ require ( github.com/prometheus/client_model v0.2.0 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/exporter/prometheusexporter/go.sum b/exporter/prometheusexporter/go.sum index 105cb738e7a4..3f04be6cd82a 100644 --- a/exporter/prometheusexporter/go.sum +++ b/exporter/prometheusexporter/go.sum @@ -1431,10 +1431,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/zpages v0.29.0 h1:rUnBzAxPP58lP7BApL21Ac2Fx8/5OflQa3sirlX0nQQ= diff --git a/exporter/prometheusremotewriteexporter/go.mod b/exporter/prometheusremotewriteexporter/go.mod index 1a998db00e83..0655ec907a0c 100644 --- a/exporter/prometheusremotewriteexporter/go.mod +++ b/exporter/prometheusremotewriteexporter/go.mod @@ -13,8 +13,8 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 github.com/tidwall/wal v1.1.7 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/prometheusremotewriteexporter/go.sum b/exporter/prometheusremotewriteexporter/go.sum index 33ddb0f9c2c8..167e678cb51d 100644 --- a/exporter/prometheusremotewriteexporter/go.sum +++ b/exporter/prometheusremotewriteexporter/go.sum @@ -1316,10 +1316,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/prometheusremotewriteexporter/testutil_test.go b/exporter/prometheusremotewriteexporter/testutil_test.go index 03e4fd87bd50..3d0d0c9cdcbb 100644 --- a/exporter/prometheusremotewriteexporter/testutil_test.go +++ b/exporter/prometheusremotewriteexporter/testutil_test.go @@ -324,7 +324,7 @@ func getSummaryMetric(name string, attributes pdata.AttributeMap, ts uint64, sum } dp.SetCount(count) dp.SetSum(sum) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { dp.Attributes().Upsert(k, v) return true }) diff --git a/exporter/sapmexporter/go.mod b/exporter/sapmexporter/go.mod index dcc0d1052638..6b9a2e75d246 100644 --- a/exporter/sapmexporter/go.mod +++ b/exporter/sapmexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/signalfx/sapm-proto v0.9.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/sapmexporter/go.sum b/exporter/sapmexporter/go.sum index 61e66b2d9b8d..283d388f13b3 100644 --- a/exporter/sapmexporter/go.sum +++ b/exporter/sapmexporter/go.sum @@ -835,13 +835,14 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/sentryexporter/go.mod b/exporter/sentryexporter/go.mod index b913c5d888b9..0371c11777ab 100644 --- a/exporter/sentryexporter/go.mod +++ b/exporter/sentryexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/getsentry/sentry-go v0.13.0 github.com/google/go-cmp v0.5.7 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/exporter/sentryexporter/go.sum b/exporter/sentryexporter/go.sum index ee2a0d28422c..cb04ffd891df 100644 --- a/exporter/sentryexporter/go.sum +++ b/exporter/sentryexporter/go.sum @@ -169,10 +169,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/sentryexporter/sentry_exporter.go b/exporter/sentryexporter/sentry_exporter.go index ceb33833799b..611385874c13 100644 --- a/exporter/sentryexporter/sentry_exporter.go +++ b/exporter/sentryexporter/sentry_exporter.go @@ -143,7 +143,7 @@ func convertEventsToSentryExceptions(eventList *[]*sentry.Event, events pdata.Sp continue } var exceptionMessage, exceptionType string - event.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + event.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case conventions.AttributeExceptionMessage: exceptionMessage = v.StringVal() @@ -342,15 +342,15 @@ func generateTagsFromResource(resource pdata.Resource) map[string]string { func generateTagsFromAttributes(attrs pdata.AttributeMap) map[string]string { tags := make(map[string]string) - attrs.Range(func(key string, attr pdata.AttributeValue) bool { + attrs.Range(func(key string, attr pdata.Value) bool { switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: tags[key] = attr.StringVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: tags[key] = strconv.FormatBool(attr.BoolVal()) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: tags[key] = strconv.FormatFloat(attr.DoubleVal(), 'g', -1, 64) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: tags[key] = strconv.FormatInt(attr.IntVal(), 10) } return true diff --git a/exporter/sentryexporter/sentry_exporter_test.go b/exporter/sentryexporter/sentry_exporter_test.go index 566b40a537b3..97bf073ec85a 100644 --- a/exporter/sentryexporter/sentry_exporter_test.go +++ b/exporter/sentryexporter/sentry_exporter_test.go @@ -374,8 +374,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "http-client", name: "/api/users/{user_id}", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeHTTPMethod: pdata.NewAttributeValueString("GET"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeHTTPMethod: pdata.NewValueString("GET"), }), spanKind: pdata.SpanKindClient, op: "http.client", @@ -384,8 +384,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "http-server", name: "/api/users/{user_id}", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeHTTPMethod: pdata.NewAttributeValueString("POST"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeHTTPMethod: pdata.NewValueString("POST"), }), spanKind: pdata.SpanKindServer, op: "http.server", @@ -394,8 +394,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "db-call-without-statement", name: "SET mykey 'Val'", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeDBSystem: pdata.NewAttributeValueString("redis"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeDBSystem: pdata.NewValueString("redis"), }), spanKind: pdata.SpanKindClient, op: "db", @@ -404,9 +404,9 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "db-call-with-statement", name: "mysql call", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeDBSystem: pdata.NewAttributeValueString("sqlite"), - conventions.AttributeDBStatement: pdata.NewAttributeValueString("SELECT * FROM table"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeDBSystem: pdata.NewValueString("sqlite"), + conventions.AttributeDBStatement: pdata.NewValueString("SELECT * FROM table"), }), spanKind: pdata.SpanKindClient, op: "db", @@ -415,8 +415,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "rpc", name: "grpc.test.EchoService/Echo", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeRPCService: pdata.NewAttributeValueString("EchoService"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeRPCService: pdata.NewValueString("EchoService"), }), spanKind: pdata.SpanKindClient, op: "rpc", @@ -425,8 +425,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "message-system", name: "message-destination", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "messaging.system": pdata.NewAttributeValueString("kafka"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "messaging.system": pdata.NewValueString("kafka"), }), spanKind: pdata.SpanKindProducer, op: "message", @@ -435,8 +435,8 @@ func TestGenerateSpanDescriptors(t *testing.T) { { testName: "faas", name: "message-destination", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "faas.trigger": pdata.NewAttributeValueString("pubsub"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "faas.trigger": pdata.NewValueString("pubsub"), }), spanKind: pdata.SpanKindServer, op: "pubsub", diff --git a/exporter/signalfxexporter/eventclient.go b/exporter/signalfxexporter/eventclient.go index ef952c623597..3b169a21b8bd 100644 --- a/exporter/signalfxexporter/eventclient.go +++ b/exporter/signalfxexporter/eventclient.go @@ -117,7 +117,7 @@ func (s *sfxEventClient) encodeBody(events []*sfxpb.Event) (bodyReader io.Reader func (s *sfxEventClient) retrieveAccessToken(rl pdata.ResourceLogs) string { attrs := rl.Resource().Attributes() - if accessToken, ok := attrs.Get(splunk.SFxAccessTokenLabel); ok && accessToken.Type() == pdata.AttributeValueTypeString { + if accessToken, ok := attrs.Get(splunk.SFxAccessTokenLabel); ok && accessToken.Type() == pdata.ValueTypeString { return accessToken.StringVal() } return "" diff --git a/exporter/signalfxexporter/exporter_test.go b/exporter/signalfxexporter/exporter_test.go index 3d11fb140788..684941b9677d 100644 --- a/exporter/signalfxexporter/exporter_test.go +++ b/exporter/signalfxexporter/exporter_test.go @@ -480,7 +480,7 @@ func makeSampleResourceLogs() pdata.Logs { attrs.InsertString("k1", "v1") attrs.InsertString("k2", "v2") - propMapVal := pdata.NewAttributeValueMap() + propMapVal := pdata.NewValueMap() propMap := propMapVal.MapVal() propMap.InsertString("env", "prod") propMap.InsertBool("isActive", true) @@ -488,8 +488,8 @@ func makeSampleResourceLogs() pdata.Logs { propMap.InsertDouble("temp", 40.5) propMap.Sort() attrs.Insert("com.splunk.signalfx.event_properties", propMapVal) - attrs.Insert("com.splunk.signalfx.event_category", pdata.NewAttributeValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) - attrs.Insert("com.splunk.signalfx.event_type", pdata.NewAttributeValueString("shutdown")) + attrs.Insert("com.splunk.signalfx.event_category", pdata.NewValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) + attrs.Insert("com.splunk.signalfx.event_type", pdata.NewValueString("shutdown")) l.Attributes().Sort() @@ -530,7 +530,7 @@ func TestConsumeEventData(t *testing.T) { out := makeSampleResourceLogs() attrs := out.ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords().At(0).Attributes() - mapAttr := pdata.NewAttributeValueMap() + mapAttr := pdata.NewValueMap() attrs.Insert("map", mapAttr) propsAttrs, _ := attrs.Get("com.splunk.signalfx.event_properties") diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index 02e1c9d9527f..68c5b29f89ed 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -14,8 +14,8 @@ require ( github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/signalfx/signalfx-agent/pkg/apm v0.0.0-20201202163743-65b4fa925fc8 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index bf36beb65ba4..132b582dffb4 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -273,10 +273,10 @@ go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.opencensus.io v0.22.2/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 v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/signalfxexporter/internal/translation/converter.go b/exporter/signalfxexporter/internal/translation/converter.go index 135e765fe45b..10d771f48d1d 100644 --- a/exporter/signalfxexporter/internal/translation/converter.go +++ b/exporter/signalfxexporter/internal/translation/converter.go @@ -138,7 +138,7 @@ func resourceToDimensions(res pdata.Resource) []*sfxpb.Dimension { }) } - res.Attributes().Range(func(k string, val pdata.AttributeValue) bool { + res.Attributes().Range(func(k string, val pdata.Value) bool { // Never send the SignalFX token if k == splunk.SFxAccessTokenLabel { return true diff --git a/exporter/signalfxexporter/internal/translation/converter_test.go b/exporter/signalfxexporter/internal/translation/converter_test.go index 0ea47554abab..5c8236bac012 100644 --- a/exporter/signalfxexporter/internal/translation/converter_test.go +++ b/exporter/signalfxexporter/internal/translation/converter_test.go @@ -898,10 +898,10 @@ func TestMetricsConverter_ConvertDimension(t *testing.T) { } } -func stringMapToAttributeMap(m map[string]string) map[string]pdata.AttributeValue { - ret := map[string]pdata.AttributeValue{} +func stringMapToAttributeMap(m map[string]string) map[string]pdata.Value { + ret := map[string]pdata.Value{} for k, v := range m { - ret[k] = pdata.NewAttributeValueString(v) + ret[k] = pdata.NewValueString(v) } return ret } diff --git a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go index f5b341b339fd..437df4b79aa4 100644 --- a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go +++ b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go @@ -55,13 +55,13 @@ func convertLogRecord(lr pdata.LogRecord, resourceAttrs pdata.AttributeMap, logg var event sfxpb.Event - if categoryVal.Type() == pdata.AttributeValueTypeInt { + if categoryVal.Type() == pdata.ValueTypeInt { asCat := sfxpb.EventCategory(categoryVal.IntVal()) event.Category = &asCat } - if mapVal, ok := attrs.Get(splunk.SFxEventPropertiesKey); ok && mapVal.Type() == pdata.AttributeValueTypeMap { - mapVal.MapVal().Range(func(k string, v pdata.AttributeValue) bool { + if mapVal, ok := attrs.Get(splunk.SFxEventPropertiesKey); ok && mapVal.Type() == pdata.ValueTypeMap { + mapVal.MapVal().Range(func(k string, v pdata.Value) bool { val, err := attributeValToPropertyVal(v) if err != nil { logger.Debug("Failed to convert log record property value to SignalFx property value", zap.Error(err), zap.String("key", k)) @@ -79,7 +79,7 @@ func convertLogRecord(lr pdata.LogRecord, resourceAttrs pdata.AttributeMap, logg // keep a record of Resource attributes to add as dimensions // so as not to modify LogRecord attributes resourceAttrsForDimensions := pdata.NewAttributeMap() - resourceAttrs.Range(func(k string, v pdata.AttributeValue) bool { + resourceAttrs.Range(func(k string, v pdata.Value) bool { // LogRecord attribute takes priority if _, ok := attrs.Get(k); !ok { resourceAttrsForDimensions.Insert(k, v) @@ -87,7 +87,7 @@ func convertLogRecord(lr pdata.LogRecord, resourceAttrs pdata.AttributeMap, logg return true }) - addDimension := func(k string, v pdata.AttributeValue) bool { + addDimension := func(k string, v pdata.Value) bool { // Skip internal attributes switch k { case splunk.SFxEventCategoryKey: @@ -95,13 +95,13 @@ func convertLogRecord(lr pdata.LogRecord, resourceAttrs pdata.AttributeMap, logg case splunk.SFxEventPropertiesKey: return true case splunk.SFxEventType: - if v.Type() == pdata.AttributeValueTypeString { + if v.Type() == pdata.ValueTypeString { event.EventType = v.StringVal() } return true } - if v.Type() != pdata.AttributeValueTypeString { + if v.Type() != pdata.ValueTypeString { logger.Debug("Failed to convert log record or resource attribute value to SignalFx property value, key is not a string", zap.String("key", k)) return true } @@ -123,19 +123,19 @@ func convertLogRecord(lr pdata.LogRecord, resourceAttrs pdata.AttributeMap, logg return &event, true } -func attributeValToPropertyVal(v pdata.AttributeValue) (*sfxpb.PropertyValue, error) { +func attributeValToPropertyVal(v pdata.Value) (*sfxpb.PropertyValue, error) { var val sfxpb.PropertyValue switch v.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: asInt := v.IntVal() val.IntValue = &asInt - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: asBool := v.BoolVal() val.BoolValue = &asBool - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: asDouble := v.DoubleVal() val.DoubleValue = &asDouble - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: asString := v.StringVal() val.StrValue = &asString default: diff --git a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go index 283f327341a8..cfbe60838754 100644 --- a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go +++ b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go @@ -70,7 +70,7 @@ func TestLogDataToSignalFxEvents(t *testing.T) { attrs.InsertString("k1", "v1") attrs.InsertString("k2", "v2") - propMapVal := pdata.NewAttributeValueMap() + propMapVal := pdata.NewValueMap() propMap := propMapVal.MapVal() propMap.InsertString("env", "prod") propMap.InsertBool("isActive", true) @@ -78,8 +78,8 @@ func TestLogDataToSignalFxEvents(t *testing.T) { propMap.InsertDouble("temp", 40.5) propMap.Sort() attrs.Insert("com.splunk.signalfx.event_properties", propMapVal) - attrs.Insert("com.splunk.signalfx.event_category", pdata.NewAttributeValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) - attrs.Insert("com.splunk.signalfx.event_type", pdata.NewAttributeValueString("shutdown")) + attrs.Insert("com.splunk.signalfx.event_category", pdata.NewValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) + attrs.Insert("com.splunk.signalfx.event_type", pdata.NewValueString("shutdown")) l.Attributes().Sort() @@ -107,7 +107,7 @@ func TestLogDataToSignalFxEvents(t *testing.T) { logData: func() pdata.Logs { logs := buildDefaultLogs() lrs := logs.ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords() - lrs.At(0).Attributes().Upsert("com.splunk.signalfx.event_category", pdata.NewAttributeValueEmpty()) + lrs.At(0).Attributes().Upsert("com.splunk.signalfx.event_category", pdata.NewValueEmpty()) return logs }(), }, diff --git a/exporter/skywalkingexporter/go.mod b/exporter/skywalkingexporter/go.mod index 0973ba935946..9acde6518838 100644 --- a/exporter/skywalkingexporter/go.mod +++ b/exporter/skywalkingexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/grpc v1.45.0 skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 ) diff --git a/exporter/skywalkingexporter/go.sum b/exporter/skywalkingexporter/go.sum index b40bb9ca8b12..10c7b09f7f72 100644 --- a/exporter/skywalkingexporter/go.sum +++ b/exporter/skywalkingexporter/go.sum @@ -205,10 +205,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/exporter/skywalkingexporter/logrecord_to_logdata.go b/exporter/skywalkingexporter/logrecord_to_logdata.go index b19f3762595d..e973e16981e5 100644 --- a/exporter/skywalkingexporter/logrecord_to_logdata.go +++ b/exporter/skywalkingexporter/logrecord_to_logdata.go @@ -70,7 +70,7 @@ func resourceToLogData(resource pdata.Resource, logData *logpb.LogData) { logData.ServiceInstance = serviceInstanceID.AsString() } - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { logData.Tags.Data = append(logData.Tags.Data, &common.KeyStringValuePair{ Key: k, Value: v.AsString(), @@ -95,7 +95,7 @@ func instrumentationLibraryToLogData(instrumentationLibrary pdata.Instrumentatio } func mapLogRecordToLogData(lr pdata.LogRecord, logData *logpb.LogData) { - if lr.Body().Type() == pdata.AttributeValueTypeEmpty { + if lr.Body().Type() == pdata.ValueTypeEmpty { return } @@ -117,7 +117,7 @@ func mapLogRecordToLogData(lr pdata.LogRecord, logData *logpb.LogData) { }) } - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { logData.Tags.Data = append(logData.Tags.Data, &common.KeyStringValuePair{ Key: k, Value: v.AsString(), diff --git a/exporter/skywalkingexporter/logrecord_to_logdata_test.go b/exporter/skywalkingexporter/logrecord_to_logdata_test.go index f8e8dc8bb33f..ec220559dadd 100644 --- a/exporter/skywalkingexporter/logrecord_to_logdata_test.go +++ b/exporter/skywalkingexporter/logrecord_to_logdata_test.go @@ -24,19 +24,19 @@ import ( logpb "skywalking.apache.org/repo/goapi/collect/logging/v3" ) -func getComplexAttributeValueMap() pdata.AttributeValue { - mapVal := pdata.NewAttributeValueMap() +func getComplexAttributeValueMap() pdata.Value { + mapVal := pdata.NewValueMap() mapValReal := mapVal.MapVal() mapValReal.InsertBool("result", true) mapValReal.InsertString("status", "ok") mapValReal.InsertDouble("value", 1.3) mapValReal.InsertInt("code", 200) mapValReal.InsertNull("null") - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") mapValReal.Insert("array", arrayVal) - subMapVal := pdata.NewAttributeValueMap() + subMapVal := pdata.NewValueMap() subMapVal.MapVal().InsertString("data", "hello world") mapValReal.Insert("map", subMapVal) @@ -80,7 +80,7 @@ func createLogData(numberOfLogs int) pdata.Logs { logRecord.Attributes().Insert("map-value", getComplexAttributeValueMap()) logRecord.Body().SetStringVal("log contents") case 6: - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") logRecord.Attributes().Insert("array-value", arrayVal) logRecord.Body().SetStringVal("log contents") diff --git a/exporter/skywalkingexporter/metricrecord_to_metricdata.go b/exporter/skywalkingexporter/metricrecord_to_metricdata.go index ea42898073f8..afff643b2824 100644 --- a/exporter/skywalkingexporter/metricrecord_to_metricdata.go +++ b/exporter/skywalkingexporter/metricrecord_to_metricdata.go @@ -29,7 +29,7 @@ const ( func resourceToMetricLabels(resource pdata.Resource) []*metricpb.Label { attrs := resource.Attributes() labels := make([]*metricpb.Label, 0, attrs.Len()) - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { labels = append(labels, &metricpb.Label{ Name: k, @@ -61,7 +61,7 @@ func numberMetricsToData(name string, data pdata.NumberDataPointSlice, defaultLa dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := make([]*metricpb.Label, 0, attributeMap.Len()+len(defaultLabels)) - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels = append(labels, &metricpb.Label{Name: k, Value: v.AsString()}) return true }) @@ -92,7 +92,7 @@ func doubleHistogramMetricsToData(name string, data pdata.HistogramDataPointSlic dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := make([]*metricpb.Label, 0, attributeMap.Len()+len(defaultLabels)) - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels = append(labels, &metricpb.Label{Name: k, Value: v.AsString()}) return true }) @@ -146,7 +146,7 @@ func doubleSummaryMetricsToData(name string, data pdata.SummaryDataPointSlice, d dataPoint := data.At(i) attributeMap := dataPoint.Attributes() labels := make([]*metricpb.Label, 0, attributeMap.Len()+len(defaultLabels)) - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { labels = append(labels, &metricpb.Label{Name: k, Value: v.AsString()}) return true }) diff --git a/exporter/splunkhecexporter/go.mod b/exporter/splunkhecexporter/go.mod index f34c39bc2d4e..cb8024a09df5 100644 --- a/exporter/splunkhecexporter/go.mod +++ b/exporter/splunkhecexporter/go.mod @@ -10,8 +10,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 diff --git a/exporter/splunkhecexporter/go.sum b/exporter/splunkhecexporter/go.sum index e0fda9576105..2c343c74c204 100644 --- a/exporter/splunkhecexporter/go.sum +++ b/exporter/splunkhecexporter/go.sum @@ -194,10 +194,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/splunkhecexporter/logdata_to_splunk.go b/exporter/splunkhecexporter/logdata_to_splunk.go index bae6790238da..333ea12cf54a 100644 --- a/exporter/splunkhecexporter/logdata_to_splunk.go +++ b/exporter/splunkhecexporter/logdata_to_splunk.go @@ -60,7 +60,7 @@ func mapLogRecordToSplunkEvent(res pdata.Resource, lr pdata.LogRecord, config *C fields[severityNumberKey] = lr.SeverityNumber() } - res.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + res.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case hostKey: host = v.StringVal() @@ -77,7 +77,7 @@ func mapLogRecordToSplunkEvent(res pdata.Resource, lr pdata.LogRecord, config *C } return true }) - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case hostKey: host = v.StringVal() @@ -107,31 +107,31 @@ func mapLogRecordToSplunkEvent(res pdata.Resource, lr pdata.LogRecord, config *C } } -func convertAttributeValue(value pdata.AttributeValue, logger *zap.Logger) interface{} { +func convertAttributeValue(value pdata.Value, logger *zap.Logger) interface{} { switch value.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return value.IntVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return value.BoolVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return value.DoubleVal() - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return value.StringVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: values := map[string]interface{}{} - value.MapVal().Range(func(k string, v pdata.AttributeValue) bool { + value.MapVal().Range(func(k string, v pdata.Value) bool { values[k] = convertAttributeValue(v, logger) return true }) return values - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: arrayVal := value.SliceVal() values := make([]interface{}, arrayVal.Len()) for i := 0; i < arrayVal.Len(); i++ { values[i] = convertAttributeValue(arrayVal.At(i), logger) } return values - case pdata.AttributeValueTypeEmpty: + case pdata.ValueTypeEmpty: return nil default: logger.Debug("Unhandled value type", zap.String("type", value.Type().String())) diff --git a/exporter/splunkhecexporter/logdata_to_splunk_test.go b/exporter/splunkhecexporter/logdata_to_splunk_test.go index 626f529ecb17..0e981ea49b6e 100644 --- a/exporter/splunkhecexporter/logdata_to_splunk_test.go +++ b/exporter/splunkhecexporter/logdata_to_splunk_test.go @@ -299,7 +299,7 @@ func Test_mapLogRecordToSplunkEvent(t *testing.T) { name: "with map body", logRecordFn: func() pdata.LogRecord { logRecord := pdata.NewLogRecord() - attVal := pdata.NewAttributeValueMap() + attVal := pdata.NewValueMap() attMap := attVal.MapVal() attMap.InsertDouble("23", 45) attMap.InsertString("foo", "bar") @@ -351,7 +351,7 @@ func Test_mapLogRecordToSplunkEvent(t *testing.T) { name: "with array body", logRecordFn: func() pdata.LogRecord { logRecord := pdata.NewLogRecord() - attVal := pdata.NewAttributeValueArray() + attVal := pdata.NewValueArray() attArray := attVal.SliceVal() attArray.AppendEmpty().SetStringVal("foo") attVal.CopyTo(logRecord.Body()) diff --git a/exporter/splunkhecexporter/metricdata_to_splunk.go b/exporter/splunkhecexporter/metricdata_to_splunk.go index d1003f145295..666c42898fb0 100644 --- a/exporter/splunkhecexporter/metricdata_to_splunk.go +++ b/exporter/splunkhecexporter/metricdata_to_splunk.go @@ -69,7 +69,7 @@ func mapMetricToSplunkEvent(res pdata.Resource, m pdata.Metric, config *Config, index := config.Index commonFields := map[string]interface{}{} - res.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + res.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case hostKey: host = v.StringVal() @@ -235,7 +235,7 @@ func createEvent(timestamp pdata.Timestamp, host string, source string, sourceTy } func populateAttributes(fields map[string]interface{}, attributeMap pdata.AttributeMap) { - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { fields[k] = v.AsString() return true }) diff --git a/exporter/splunkhecexporter/tracedata_to_splunk.go b/exporter/splunkhecexporter/tracedata_to_splunk.go index 6a7647bf47a3..264a2d81c258 100644 --- a/exporter/splunkhecexporter/tracedata_to_splunk.go +++ b/exporter/splunkhecexporter/tracedata_to_splunk.go @@ -73,7 +73,7 @@ func traceDataToSplunk(logger *zap.Logger, data pdata.Traces, config *Config) ([ sourceType := config.SourceType index := config.Index commonFields := map[string]interface{}{} - rs.Resource().Attributes().Range(func(k string, v pdata.AttributeValue) bool { + rs.Resource().Attributes().Range(func(k string, v pdata.Value) bool { switch k { case hostKey: host = v.StringVal() @@ -115,7 +115,7 @@ func traceDataToSplunk(logger *zap.Logger, data pdata.Traces, config *Config) ([ func toHecSpan(logger *zap.Logger, span pdata.Span) hecSpan { attributes := map[string]interface{}{} - span.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + span.Attributes().Range(func(k string, v pdata.Value) bool { attributes[k] = convertAttributeValue(v, logger) return true }) @@ -124,7 +124,7 @@ func toHecSpan(logger *zap.Logger, span pdata.Span) hecSpan { for i := 0; i < span.Links().Len(); i++ { link := span.Links().At(i) linkAttributes := map[string]interface{}{} - link.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + link.Attributes().Range(func(k string, v pdata.Value) bool { linkAttributes[k] = convertAttributeValue(v, logger) return true }) @@ -139,7 +139,7 @@ func toHecSpan(logger *zap.Logger, span pdata.Span) hecSpan { for i := 0; i < span.Events().Len(); i++ { event := span.Events().At(i) eventAttributes := map[string]interface{}{} - event.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + event.Attributes().Range(func(k string, v pdata.Value) bool { eventAttributes[k] = convertAttributeValue(v, logger) return true }) diff --git a/exporter/splunkhecexporter/tracedata_to_splunk_test.go b/exporter/splunkhecexporter/tracedata_to_splunk_test.go index 7504d282150a..2830017f953a 100644 --- a/exporter/splunkhecexporter/tracedata_to_splunk_test.go +++ b/exporter/splunkhecexporter/tracedata_to_splunk_test.go @@ -149,7 +149,7 @@ func initSpan(name string, ts *pdata.Timestamp, span pdata.Span) { spanLink.SetSpanID(pdata.NewSpanID(spanID)) spanLink.Attributes().InsertInt("foo", 1) spanLink.Attributes().InsertBool("bar", false) - foobarContents := pdata.NewAttributeValueArray() + foobarContents := pdata.NewValueArray() foobarContents.SliceVal().AppendEmpty().SetStringVal("a") foobarContents.SliceVal().AppendEmpty().SetStringVal("b") spanLink.Attributes().Insert("foobar", foobarContents) diff --git a/exporter/stackdriverexporter/go.mod b/exporter/stackdriverexporter/go.mod index d90e5ff36d54..c35dc76565b2 100644 --- a/exporter/stackdriverexporter/go.mod +++ b/exporter/stackdriverexporter/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -39,7 +39,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/sdk v1.4.1 // indirect diff --git a/exporter/stackdriverexporter/go.sum b/exporter/stackdriverexporter/go.sum index 0d37a8f8d711..9cec0bb2ea6f 100644 --- a/exporter/stackdriverexporter/go.sum +++ b/exporter/stackdriverexporter/go.sum @@ -437,11 +437,12 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.24.0/go.mod h1:7W3JSDYTtH3qKKHrS1fMiwLtK7iZFLPq1+7htfspX/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.26.0/go.mod h1:4vatbW3QwS11DK0H0SB7FR31/VbthXcYorswdkVXdyg= diff --git a/exporter/sumologicexporter/carbon_formatter.go b/exporter/sumologicexporter/carbon_formatter.go index 4fba5014c664..7ae86c33119a 100644 --- a/exporter/sumologicexporter/carbon_formatter.go +++ b/exporter/sumologicexporter/carbon_formatter.go @@ -37,7 +37,7 @@ func carbon2TagString(record metricPair) string { } returnValue := make([]string, 0, length) - record.attributes.Range(func(k string, v pdata.AttributeValue) bool { + record.attributes.Range(func(k string, v pdata.Value) bool { if k == "name" || k == "unit" { k = fmt.Sprintf("_%s", k) } diff --git a/exporter/sumologicexporter/exporter.go b/exporter/sumologicexporter/exporter.go index 11857a4210d3..1039156fa1b4 100644 --- a/exporter/sumologicexporter/exporter.go +++ b/exporter/sumologicexporter/exporter.go @@ -172,7 +172,7 @@ func (se *sumologicexporter) pushLogsData(ctx context.Context, ld pdata.Logs) er // copy resource attributes into logs attributes // log attributes have precedence over resource attributes - rl.Resource().Attributes().Range(func(k string, v pdata.AttributeValue) bool { + rl.Resource().Attributes().Range(func(k string, v pdata.Value) bool { log.Attributes().Insert(k, v) return true }) diff --git a/exporter/sumologicexporter/fields.go b/exporter/sumologicexporter/fields.go index e3b30fab2243..ba3edcf54715 100644 --- a/exporter/sumologicexporter/fields.go +++ b/exporter/sumologicexporter/fields.go @@ -38,7 +38,7 @@ func newFields(attrMap pdata.AttributeMap) fields { // string returns fields as ordered key=value string with `, ` as separator func (f fields) string() string { returnValue := make([]string, 0, f.orig.Len()) - f.orig.Range(func(k string, v pdata.AttributeValue) bool { + f.orig.Range(func(k string, v pdata.Value) bool { returnValue = append( returnValue, fmt.Sprintf( diff --git a/exporter/sumologicexporter/filter.go b/exporter/sumologicexporter/filter.go index e9c3e6f6b139..21d319d3ddb7 100644 --- a/exporter/sumologicexporter/filter.go +++ b/exporter/sumologicexporter/filter.go @@ -45,7 +45,7 @@ func newFilter(flds []string) (filter, error) { func (f *filter) filterIn(attributes pdata.AttributeMap) fields { returnValue := pdata.NewAttributeMap() - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { for _, regex := range f.regexes { if regex.MatchString(k) { returnValue.Insert(k, v) @@ -62,7 +62,7 @@ func (f *filter) filterIn(attributes pdata.AttributeMap) fields { func (f *filter) filterOut(attributes pdata.AttributeMap) fields { returnValue := pdata.NewAttributeMap() - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { for _, regex := range f.regexes { if regex.MatchString(k) { return true diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index 2bb203bd1534..ddc5fb6e9e2a 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index e8ffeb97d54f..a61f28cb41b3 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -186,10 +186,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/sumologicexporter/prometheus_formatter.go b/exporter/sumologicexporter/prometheus_formatter.go index 17ad9e39d1cb..f4ccfe8dafdb 100644 --- a/exporter/sumologicexporter/prometheus_formatter.go +++ b/exporter/sumologicexporter/prometheus_formatter.go @@ -57,7 +57,7 @@ func newPrometheusFormatter() (prometheusFormatter, error) { func (f *prometheusFormatter) tags2String(attr pdata.AttributeMap, labels pdata.AttributeMap) prometheusTags { mergedAttributes := pdata.NewAttributeMap() attr.CopyTo(mergedAttributes) - labels.Range(func(k string, v pdata.AttributeValue) bool { + labels.Range(func(k string, v pdata.Value) bool { mergedAttributes.UpsertString(k, v.StringVal()) return true }) @@ -68,7 +68,7 @@ func (f *prometheusFormatter) tags2String(attr pdata.AttributeMap, labels pdata. } returnValue := make([]string, 0, length) - mergedAttributes.Range(func(k string, v pdata.AttributeValue) bool { + mergedAttributes.Range(func(k string, v pdata.Value) bool { returnValue = append( returnValue, fmt.Sprintf( @@ -185,7 +185,7 @@ func (f *prometheusFormatter) countMetric(name string) string { func (f *prometheusFormatter) mergeAttributes(attributes pdata.AttributeMap, additionalAttributes pdata.AttributeMap) pdata.AttributeMap { mergedAttributes := pdata.NewAttributeMap() attributes.CopyTo(mergedAttributes) - additionalAttributes.Range(func(k string, v pdata.AttributeValue) bool { + additionalAttributes.Range(func(k string, v pdata.Value) bool { mergedAttributes.Upsert(k, v) return true }) diff --git a/exporter/sumologicexporter/sender_test.go b/exporter/sumologicexporter/sender_test.go index 757c61615ce5..2dee056968af 100644 --- a/exporter/sumologicexporter/sender_test.go +++ b/exporter/sumologicexporter/sender_test.go @@ -146,7 +146,7 @@ func exampleTwoDifferentLogs() []pdata.LogRecord { func exampleMultitypeLogs() []pdata.LogRecord { buffer := make([]pdata.LogRecord, 2) - attVal := pdata.NewAttributeValueMap() + attVal := pdata.NewValueMap() attMap := attVal.MapVal() attMap.InsertString("lk1", "lv1") attMap.InsertInt("lk2", 13) @@ -159,11 +159,11 @@ func exampleMultitypeLogs() []pdata.LogRecord { buffer[1] = pdata.NewLogRecord() - attVal = pdata.NewAttributeValueArray() + attVal = pdata.NewValueArray() attArr := attVal.SliceVal() - strVal := pdata.NewAttributeValueEmpty() + strVal := pdata.NewValueEmpty() strVal.SetStringVal("lv2") - intVal := pdata.NewAttributeValueEmpty() + intVal := pdata.NewValueEmpty() intVal.SetIntVal(13) strTgt := attArr.AppendEmpty() diff --git a/exporter/tanzuobservabilityexporter/go.mod b/exporter/tanzuobservabilityexporter/go.mod index deaed08fba59..e04a06c5489a 100644 --- a/exporter/tanzuobservabilityexporter/go.mod +++ b/exporter/tanzuobservabilityexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 github.com/wavefronthq/wavefront-sdk-go v0.9.10 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/tanzuobservabilityexporter/go.sum b/exporter/tanzuobservabilityexporter/go.sum index d33e31c9c7b8..c195bd66bb77 100644 --- a/exporter/tanzuobservabilityexporter/go.sum +++ b/exporter/tanzuobservabilityexporter/go.sum @@ -189,10 +189,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/exporter/tanzuobservabilityexporter/metrics_test.go b/exporter/tanzuobservabilityexporter/metrics_test.go index 946ff7342a2a..ee01e3ffcf44 100644 --- a/exporter/tanzuobservabilityexporter/metrics_test.go +++ b/exporter/tanzuobservabilityexporter/metrics_test.go @@ -1465,17 +1465,17 @@ func setDataPointValue(value interface{}, dataPoint pdata.NumberDataPoint) { } func setTags(tags map[string]interface{}, attributes pdata.AttributeMap) { - valueMap := make(map[string]pdata.AttributeValue, len(tags)) + valueMap := make(map[string]pdata.Value, len(tags)) for key, value := range tags { switch v := value.(type) { case int: - valueMap[key] = pdata.NewAttributeValueInt(int64(v)) + valueMap[key] = pdata.NewValueInt(int64(v)) case int64: - valueMap[key] = pdata.NewAttributeValueInt(v) + valueMap[key] = pdata.NewValueInt(v) case float64: - valueMap[key] = pdata.NewAttributeValueDouble(v) + valueMap[key] = pdata.NewValueDouble(v) case string: - valueMap[key] = pdata.NewAttributeValueString(v) + valueMap[key] = pdata.NewValueString(v) default: panic("Invalid value type") } diff --git a/exporter/tanzuobservabilityexporter/transformer.go b/exporter/tanzuobservabilityexporter/transformer.go index 65826b78ed22..52a20f966b0f 100644 --- a/exporter/tanzuobservabilityexporter/transformer.go +++ b/exporter/tanzuobservabilityexporter/transformer.go @@ -114,7 +114,7 @@ func getSourceAndResourceTags(attributes pdata.AttributeMap) (string, map[string attributesWithoutSource := map[string]string{} var source string - extractTag := func(k string, v pdata.AttributeValue) bool { + extractTag := func(k string, v pdata.Value) bool { attributesWithoutSource[k] = v.AsString() return true } @@ -200,7 +200,7 @@ func attributesToTags(attributesWithoutSource map[string]string, attributes pdat } // Since AttributeMaps are processed later, its values overwrite earlier ones - attributes.Range(func(key string, value pdata.AttributeValue) bool { + attributes.Range(func(key string, value pdata.Value) bool { tags[key] = value.AsString() return true }) diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index 34e385ffcce2..5be0b03f21b2 100644 --- a/exporter/tencentcloudlogserviceexporter/go.mod +++ b/exporter/tencentcloudlogserviceexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/pierrec/lz4 v2.6.1+incompatible github.com/stretchr/testify v1.7.0 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.365 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index 0cc28e678c7f..f4a68d9deae7 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -173,10 +173,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go index c5cef5a174fe..2cb2111b2fbd 100644 --- a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go +++ b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go @@ -82,7 +82,7 @@ func resourceToLogContents(resource pdata.Resource) []*cls.Log_Content { } fields := map[string]interface{}{} - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { if k == conventions.AttributeServiceName || k == conventions.AttributeHostName { return true } @@ -126,7 +126,7 @@ func instrumentationLibraryToLogContents(instrumentationLibrary pdata.Instrument func mapLogRecordToLogService(lr pdata.LogRecord, resourceContents, instrumentationLibraryContents []*cls.Log_Content) *cls.Log { - if lr.Body().Type() == pdata.AttributeValueTypeEmpty { + if lr.Body().Type() == pdata.ValueTypeEmpty { return nil } var clsLog cls.Log @@ -136,7 +136,7 @@ func mapLogRecordToLogService(lr pdata.LogRecord, clsLog.Contents = make([]*cls.Log_Content, 0, preAllocCount+len(resourceContents)+len(instrumentationLibraryContents)) fields := map[string]interface{}{} - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { fields[k] = v.AsString() return true }) diff --git a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice_test.go b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice_test.go index 540bf3e99565..bf00b189f8a4 100644 --- a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice_test.go +++ b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice_test.go @@ -38,19 +38,19 @@ func (kv logKeyValuePairs) Len() int { return len(kv) } func (kv logKeyValuePairs) Swap(i, j int) { kv[i], kv[j] = kv[j], kv[i] } func (kv logKeyValuePairs) Less(i, j int) bool { return kv[i].Key < kv[j].Key } -func getComplexAttributeValueMap() pdata.AttributeValue { - mapVal := pdata.NewAttributeValueMap() +func getComplexAttributeValueMap() pdata.Value { + mapVal := pdata.NewValueMap() mapValReal := mapVal.MapVal() mapValReal.InsertBool("result", true) mapValReal.InsertString("status", "ok") mapValReal.InsertDouble("value", 1.3) mapValReal.InsertInt("code", 200) mapValReal.InsertNull("null") - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") mapValReal.Insert("array", arrayVal) - subMapVal := pdata.NewAttributeValueMap() + subMapVal := pdata.NewValueMap() subMapVal.MapVal().InsertString("data", "hello world") mapValReal.Insert("map", subMapVal) @@ -88,7 +88,7 @@ func createLogData(numberOfLogs int) pdata.Logs { logRecord.Attributes().Insert("map-value", getComplexAttributeValueMap()) logRecord.Body().SetStringVal("log contents") case 6: - arrayVal := pdata.NewAttributeValueArray() + arrayVal := pdata.NewValueArray() arrayVal.SliceVal().AppendEmpty().SetStringVal("array") logRecord.Attributes().Insert("array-value", arrayVal) logRecord.Body().SetStringVal("log contents") diff --git a/exporter/zipkinexporter/go.mod b/exporter/zipkinexporter/go.mod index 97fa7b0c9540..92fe0df9aff4 100644 --- a/exporter/zipkinexporter/go.mod +++ b/exporter/zipkinexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.47.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/exporter/zipkinexporter/go.sum b/exporter/zipkinexporter/go.sum index b01d411d899b..86bc12eb7aac 100644 --- a/exporter/zipkinexporter/go.sum +++ b/exporter/zipkinexporter/go.sum @@ -244,10 +244,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/extension/asapauthextension/go.mod b/extension/asapauthextension/go.mod index 07ba527df940..ff95f6331f33 100644 --- a/extension/asapauthextension/go.mod +++ b/extension/asapauthextension/go.mod @@ -6,7 +6,7 @@ require ( bitbucket.org/atlassian/go-asap/v2 v2.6.0 github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 google.golang.org/grpc v1.45.0 ) @@ -29,7 +29,7 @@ require ( github.com/pquerna/cachecontrol v0.1.0 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/asapauthextension/go.sum b/extension/asapauthextension/go.sum index 26f80a91fa44..54ff2d7d7151 100644 --- a/extension/asapauthextension/go.sum +++ b/extension/asapauthextension/go.sum @@ -189,10 +189,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/awsproxy/go.mod b/extension/awsproxy/go.mod index 497c1559fc19..67a049438245 100644 --- a/extension/awsproxy/go.mod +++ b/extension/awsproxy/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -23,7 +23,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/awsproxy/go.sum b/extension/awsproxy/go.sum index c3f4567eb62f..70ce0a453abb 100644 --- a/extension/awsproxy/go.sum +++ b/extension/awsproxy/go.sum @@ -138,10 +138,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/basicauthextension/go.mod b/extension/basicauthextension/go.mod index beb38296d14d..d019dd047d6c 100644 --- a/extension/basicauthextension/go.mod +++ b/extension/basicauthextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 github.com/tg123/go-htpasswd v1.2.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( @@ -24,7 +24,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/basicauthextension/go.sum b/extension/basicauthextension/go.sum index c1c164870e2f..a7320dabe156 100644 --- a/extension/basicauthextension/go.sum +++ b/extension/basicauthextension/go.sum @@ -174,10 +174,10 @@ github.com/tg123/go-htpasswd v1.2.0/go.mod h1:h7IzlfpvIWnVJhNZ0nQ9HaFxHb7pn5uFJY github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/extension/bearertokenauthextension/go.mod b/extension/bearertokenauthextension/go.mod index 1df9ff388f3b..d51dbc748982 100644 --- a/extension/bearertokenauthextension/go.mod +++ b/extension/bearertokenauthextension/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) @@ -24,7 +24,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/bearertokenauthextension/go.sum b/extension/bearertokenauthextension/go.sum index 9dc53d962404..f545545d6ae9 100644 --- a/extension/bearertokenauthextension/go.sum +++ b/extension/bearertokenauthextension/go.sum @@ -178,10 +178,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/fluentbitextension/go.mod b/extension/fluentbitextension/go.mod index f523ca4d9784..79cdb3fdf85f 100644 --- a/extension/fluentbitextension/go.mod +++ b/extension/fluentbitextension/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -30,7 +30,7 @@ require ( github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/fluentbitextension/go.sum b/extension/fluentbitextension/go.sum index 853ee41bd999..ea7f1fd87dcc 100644 --- a/extension/fluentbitextension/go.sum +++ b/extension/fluentbitextension/go.sum @@ -153,10 +153,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/healthcheckextension/go.mod b/extension/healthcheckextension/go.mod index 1539106e1da9..eb0187b85d93 100644 --- a/extension/healthcheckextension/go.mod +++ b/extension/healthcheckextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -22,7 +22,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/healthcheckextension/go.sum b/extension/healthcheckextension/go.sum index a2dc2624e575..50b84eb51444 100644 --- a/extension/healthcheckextension/go.sum +++ b/extension/healthcheckextension/go.sum @@ -158,10 +158,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/httpforwarder/go.mod b/extension/httpforwarder/go.mod index 70cabb8558cd..689a8469c6c8 100644 --- a/extension/httpforwarder/go.mod +++ b/extension/httpforwarder/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -30,7 +30,7 @@ require ( github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/extension/httpforwarder/go.sum b/extension/httpforwarder/go.sum index 254267797a8a..d028284ef7c9 100644 --- a/extension/httpforwarder/go.sum +++ b/extension/httpforwarder/go.sum @@ -176,10 +176,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/jaegerremotesampling/go.mod b/extension/jaegerremotesampling/go.mod index c22601aa05f6..e46a9232e492 100644 --- a/extension/jaegerremotesampling/go.mod +++ b/extension/jaegerremotesampling/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/jaegertracing/jaeger v1.32.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( @@ -29,7 +29,7 @@ require ( github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect diff --git a/extension/jaegerremotesampling/go.sum b/extension/jaegerremotesampling/go.sum index c99cb13d9ade..fb6acfc32cf2 100644 --- a/extension/jaegerremotesampling/go.sum +++ b/extension/jaegerremotesampling/go.sum @@ -324,10 +324,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/extension/oauth2clientauthextension/go.mod b/extension/oauth2clientauthextension/go.mod index 51b31572d002..b561173306b1 100644 --- a/extension/oauth2clientauthextension/go.mod +++ b/extension/oauth2clientauthextension/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 google.golang.org/grpc v1.45.0 @@ -32,7 +32,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/extension/oauth2clientauthextension/go.sum b/extension/oauth2clientauthextension/go.sum index 136e3c1ea0f4..2506084b6eb1 100644 --- a/extension/oauth2clientauthextension/go.sum +++ b/extension/oauth2clientauthextension/go.sum @@ -306,10 +306,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/extension/observer/dockerobserver/go.mod b/extension/observer/dockerobserver/go.mod index 7f41d7823754..50fa85670ed8 100644 --- a/extension/observer/dockerobserver/go.mod +++ b/extension/observer/dockerobserver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -40,7 +40,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/observer/dockerobserver/go.sum b/extension/observer/dockerobserver/go.sum index 1a297d01d306..132c070b7cc7 100644 --- a/extension/observer/dockerobserver/go.sum +++ b/extension/observer/dockerobserver/go.sum @@ -705,10 +705,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/observer/ecsobserver/go.mod b/extension/observer/ecsobserver/go.mod index 7ec44d6651c1..9eb1ddbc63ba 100644 --- a/extension/observer/ecsobserver/go.mod +++ b/extension/observer/ecsobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.43.20 github.com/hashicorp/golang-lru v0.5.4 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 gopkg.in/yaml.v2 v2.4.0 @@ -26,7 +26,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/observer/ecsobserver/go.sum b/extension/observer/ecsobserver/go.sum index 2bc4c2f269c6..4fabc74eaeb6 100644 --- a/extension/observer/ecsobserver/go.sum +++ b/extension/observer/ecsobserver/go.sum @@ -145,10 +145,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/observer/ecstaskobserver/go.mod b/extension/observer/ecstaskobserver/go.mod index 66f4911aef35..2dd5311c6d5e 100644 --- a/extension/observer/ecstaskobserver/go.mod +++ b/extension/observer/ecstaskobserver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -28,7 +28,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/extension/observer/ecstaskobserver/go.sum b/extension/observer/ecstaskobserver/go.sum index ab831ecc5de1..4c6de7f7c423 100644 --- a/extension/observer/ecstaskobserver/go.sum +++ b/extension/observer/ecstaskobserver/go.sum @@ -174,10 +174,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index a3b610235987..7888a9801516 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.47.0 github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -31,7 +31,7 @@ require ( github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index 853ee41bd999..ea7f1fd87dcc 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -153,10 +153,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/observer/k8sobserver/go.mod b/extension/observer/k8sobserver/go.mod index cd836e0e8797..e4abac36e2bd 100644 --- a/extension/observer/k8sobserver/go.mod +++ b/extension/observer/k8sobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 @@ -38,7 +38,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/observer/k8sobserver/go.sum b/extension/observer/k8sobserver/go.sum index 5c54c0147587..91660394a4f4 100644 --- a/extension/observer/k8sobserver/go.sum +++ b/extension/observer/k8sobserver/go.sum @@ -365,10 +365,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/oidcauthextension/go.mod b/extension/oidcauthextension/go.mod index 6bac5abf841e..5c1e7a6e1f9f 100644 --- a/extension/oidcauthextension/go.mod +++ b/extension/oidcauthextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -25,7 +25,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/oidcauthextension/go.sum b/extension/oidcauthextension/go.sum index dce1f5eb5066..4edfcce6d6df 100644 --- a/extension/oidcauthextension/go.sum +++ b/extension/oidcauthextension/go.sum @@ -252,10 +252,10 @@ 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.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/extension/pprofextension/go.mod b/extension/pprofextension/go.mod index 24ff6e0c7ad9..9e13033f2da0 100644 --- a/extension/pprofextension/go.mod +++ b/extension/pprofextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -23,7 +23,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/pprofextension/go.sum b/extension/pprofextension/go.sum index c7bddb785f89..a866f3a66f9d 100644 --- a/extension/pprofextension/go.sum +++ b/extension/pprofextension/go.sum @@ -139,10 +139,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index 6ee1c19b4977..8019e1e3b22d 100644 --- a/extension/sigv4authextension/go.mod +++ b/extension/sigv4authextension/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.4.3 github.com/aws/aws-sdk-go-v2/service/sts v1.7.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) @@ -30,7 +30,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index a11df2c781e9..8a5894a1df3e 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -179,10 +179,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/extension/storage/go.mod b/extension/storage/go.mod index 3fa9274d4659..a6acc2231c00 100644 --- a/extension/storage/go.mod +++ b/extension/storage/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 go.etcd.io/bbolt v1.3.6 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -37,7 +37,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/extension/storage/go.sum b/extension/storage/go.sum index 0e173c8fbb0d..011e0738d70b 100644 --- a/extension/storage/go.sum +++ b/extension/storage/go.sum @@ -232,10 +232,10 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt 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.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/go.mod b/go.mod index dbd3a9003c43..78a10fb6cf82 100644 --- a/go.mod +++ b/go.mod @@ -123,7 +123,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.47.0 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 ) @@ -425,7 +425,7 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.mongodb.org/atlas v0.15.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/contrib/zpages v0.29.0 // indirect diff --git a/go.sum b/go.sum index d11a26e61b59..f550275afa1d 100644 --- a/go.sum +++ b/go.sum @@ -2268,13 +2268,14 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= diff --git a/internal/aws/containerinsight/go.mod b/internal/aws/containerinsight/go.mod index 2c882b32ede5..d2253348bc6d 100644 --- a/internal/aws/containerinsight/go.mod +++ b/internal/aws/containerinsight/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/internal/aws/containerinsight/go.sum b/internal/aws/containerinsight/go.sum index b426c014be4f..6eda35d3e1d2 100644 --- a/internal/aws/containerinsight/go.sum +++ b/internal/aws/containerinsight/go.sum @@ -25,8 +25,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/internal/aws/cwlogs/go.mod b/internal/aws/cwlogs/go.mod index 48bd7a4fa36a..8189ae49f95f 100644 --- a/internal/aws/cwlogs/go.mod +++ b/internal/aws/cwlogs/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/aws/aws-sdk-go v1.43.20 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -23,7 +23,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/stretchr/objx v0.1.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/internal/aws/cwlogs/go.sum b/internal/aws/cwlogs/go.sum index 53d29159327a..08a9c342faba 100644 --- a/internal/aws/cwlogs/go.sum +++ b/internal/aws/cwlogs/go.sum @@ -134,10 +134,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/internal/aws/ecsutil/go.mod b/internal/aws/ecsutil/go.mod index 6855c58e93c6..08e069492f03 100644 --- a/internal/aws/ecsutil/go.mod +++ b/internal/aws/ecsutil/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -29,7 +29,7 @@ require ( github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/internal/aws/ecsutil/go.sum b/internal/aws/ecsutil/go.sum index 254267797a8a..d028284ef7c9 100644 --- a/internal/aws/ecsutil/go.sum +++ b/internal/aws/ecsutil/go.sum @@ -176,10 +176,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/internal/aws/proxy/go.mod b/internal/aws/proxy/go.mod index b92ca8e0a88d..e5e08a47c24d 100644 --- a/internal/aws/proxy/go.mod +++ b/internal/aws/proxy/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.43.20 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/internal/aws/proxy/go.sum b/internal/aws/proxy/go.sum index fb7db99061cf..56c84a9e4592 100644 --- a/internal/aws/proxy/go.sum +++ b/internal/aws/proxy/go.sum @@ -29,8 +29,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.uber.org/atomic v1.7.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= diff --git a/internal/coreinternal/attraction/attraction.go b/internal/coreinternal/attraction/attraction.go index 9ec8e1d02566..00e5f5742d93 100644 --- a/internal/coreinternal/attraction/attraction.go +++ b/internal/coreinternal/attraction/attraction.go @@ -162,7 +162,7 @@ type attributeAction struct { // The reason is attributes processor will most likely be commonly used // and could impact performance. Action Action - AttributeValue *pdata.AttributeValue + AttributeValue *pdata.Value } // AttrProc is an attribute processor. @@ -310,18 +310,18 @@ func (ap *AttrProc) Process(ctx context.Context, logger *zap.Logger, attrs pdata } } -func getAttributeValueFromContext(ctx context.Context, key string) (pdata.AttributeValue, bool) { +func getAttributeValueFromContext(ctx context.Context, key string) (pdata.Value, bool) { ci := client.FromContext(ctx) vals := ci.Metadata.Get(key) if len(vals) == 0 { - return pdata.AttributeValue{}, false + return pdata.Value{}, false } - return pdata.NewAttributeValueString(strings.Join(vals, ";")), true + return pdata.NewValueString(strings.Join(vals, ";")), true } -func getSourceAttributeValue(ctx context.Context, action attributeAction, attrs pdata.AttributeMap) (pdata.AttributeValue, bool) { +func getSourceAttributeValue(ctx context.Context, action attributeAction, attrs pdata.AttributeMap) (pdata.Value, bool) { // Set the key with a value from the configuration. if action.AttributeValue != nil { return *action.AttributeValue, true @@ -350,7 +350,7 @@ func extractAttributes(action attributeAction, attrs pdata.AttributeMap) { value, found := attrs.Get(action.Key) // Extracting values only functions on strings. - if !found || value.Type() != pdata.AttributeValueTypeString { + if !found || value.Type() != pdata.ValueTypeString { return } diff --git a/internal/coreinternal/attraction/attraction_test.go b/internal/coreinternal/attraction/attraction_test.go index 35e8f2bb71b2..762bf7070695 100644 --- a/internal/coreinternal/attraction/attraction_test.go +++ b/internal/coreinternal/attraction/attraction_test.go @@ -33,8 +33,8 @@ import ( // Common structure for all the Tests type testCase struct { name string - inputAttributes map[string]pdata.AttributeValue - expectedAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value + expectedAttributes map[string]pdata.Value } // runIndividualTestCase is the common logic of passing trace data through a configured attributes processor. @@ -52,30 +52,30 @@ func TestAttributes_InsertValue(t *testing.T) { // Ensure `attribute1` is set for spans with no attributes. { name: "InsertEmptyAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, // Ensure `attribute1` is set. { name: "InsertKeyNoExists", - inputAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueString("bob"), + inputAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueString("bob"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueString("bob"), - "attribute1": pdata.NewAttributeValueInt(123), + expectedAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueString("bob"), + "attribute1": pdata.NewValueInt(123), }, }, // Ensures no insert is performed because the keys `attribute1` already exists. { name: "InsertKeyExists", - inputAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueString("bob"), + inputAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueString("bob"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueString("bob"), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueString("bob"), }, }, } @@ -101,40 +101,40 @@ func TestAttributes_InsertFromAttribute(t *testing.T) { // Ensure no attribute is inserted because because attributes do not exist. { name: "InsertEmptyAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure no attribute is inserted because because from_attribute `string_key` does not exist. { name: "InsertMissingFromAttribute", - inputAttributes: map[string]pdata.AttributeValue{ - "bob": pdata.NewAttributeValueInt(1), + inputAttributes: map[string]pdata.Value{ + "bob": pdata.NewValueInt(1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "bob": pdata.NewAttributeValueInt(1), + expectedAttributes: map[string]pdata.Value{ + "bob": pdata.NewValueInt(1), }, }, // Ensure `string key` is set. { name: "InsertAttributeExists", - inputAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueInt(8892342), + inputAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueInt(8892342), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueInt(8892342), - "string key": pdata.NewAttributeValueInt(8892342), + expectedAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueInt(8892342), + "string key": pdata.NewValueInt(8892342), }, }, // Ensures no insert is performed because the keys `string key` already exist. { name: "InsertKeysExists", - inputAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueInt(8892342), - "string key": pdata.NewAttributeValueString("here"), + inputAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueInt(8892342), + "string key": pdata.NewValueString("here"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "anotherkey": pdata.NewAttributeValueInt(8892342), - "string key": pdata.NewAttributeValueString("here"), + expectedAttributes: map[string]pdata.Value{ + "anotherkey": pdata.NewValueInt(8892342), + "string key": pdata.NewValueString("here"), }, }, } @@ -159,27 +159,27 @@ func TestAttributes_UpdateValue(t *testing.T) { // Ensure no changes to the span as there is no attributes map. { name: "UpdateNoAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure no changes to the span as the key does not exist. { name: "UpdateKeyNoExist", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("foo"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("foo"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("foo"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("foo"), }, }, // Ensure the attribute `db.secret` is updated. { name: "UpdateAttributes", - inputAttributes: map[string]pdata.AttributeValue{ - "db.secret": pdata.NewAttributeValueString("password1234"), + inputAttributes: map[string]pdata.Value{ + "db.secret": pdata.NewValueString("password1234"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "db.secret": pdata.NewAttributeValueString("redacted"), + expectedAttributes: map[string]pdata.Value{ + "db.secret": pdata.NewValueString("redacted"), }, }, } @@ -205,39 +205,39 @@ func TestAttributes_UpdateFromAttribute(t *testing.T) { // Ensure no changes to the span as there is no attributes map. { name: "UpdateNoAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure the attribute `boo` isn't updated because attribute `foo` isn't present in the span. { name: "UpdateKeyNoExistFromAttribute", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("bob"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("bob"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("bob"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("bob"), }, }, // Ensure no updates as the target key `boo` doesn't exists. { name: "UpdateKeyNoExistMainAttributed", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("over there"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("over there"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("over there"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("over there"), }, }, // Ensure no updates as the target key `boo` doesn't exists. { name: "UpdateKeyFromExistingAttribute", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("there is a party over here"), - "boo": pdata.NewAttributeValueString("not here"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("there is a party over here"), + "boo": pdata.NewValueString("not here"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("there is a party over here"), - "boo": pdata.NewAttributeValueString("there is a party over here"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("there is a party over here"), + "boo": pdata.NewValueString("there is a party over here"), }, }, } @@ -262,32 +262,32 @@ func TestAttributes_UpsertValue(t *testing.T) { // Ensure `region` is set for spans with no attributes. { name: "UpsertNoAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "region": pdata.NewAttributeValueString("planet-earth"), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "region": pdata.NewValueString("planet-earth"), }, }, // Ensure `region` is inserted for spans with some attributes(the key doesn't exist). { name: "UpsertAttributeNoExist", - inputAttributes: map[string]pdata.AttributeValue{ - "mission": pdata.NewAttributeValueString("to mars"), + inputAttributes: map[string]pdata.Value{ + "mission": pdata.NewValueString("to mars"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "mission": pdata.NewAttributeValueString("to mars"), - "region": pdata.NewAttributeValueString("planet-earth"), + expectedAttributes: map[string]pdata.Value{ + "mission": pdata.NewValueString("to mars"), + "region": pdata.NewValueString("planet-earth"), }, }, // Ensure `region` is updated for spans with the attribute key `region`. { name: "UpsertAttributeExists", - inputAttributes: map[string]pdata.AttributeValue{ - "mission": pdata.NewAttributeValueString("to mars"), - "region": pdata.NewAttributeValueString("solar system"), + inputAttributes: map[string]pdata.Value{ + "mission": pdata.NewValueString("to mars"), + "region": pdata.NewValueString("solar system"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "mission": pdata.NewAttributeValueString("to mars"), - "region": pdata.NewAttributeValueString("planet-earth"), + expectedAttributes: map[string]pdata.Value{ + "mission": pdata.NewValueString("to mars"), + "region": pdata.NewValueString("planet-earth"), }, }, } @@ -312,42 +312,42 @@ func TestAttributes_Extract(t *testing.T) { // Ensure `new_user_key` is not set for spans with no attributes. { name: "UpsertEmptyAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure `new_user_key` is not inserted for spans with missing attribute `user_key`. { name: "No extract with no target key", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, }, // Ensure `new_user_key` is not inserted for spans with missing attribute `user_key`. { name: "No extract with non string target key", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), - "user_key": pdata.NewAttributeValueInt(1234), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), + "user_key": pdata.NewValueInt(1234), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), - "user_key": pdata.NewAttributeValueInt(1234), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), + "user_key": pdata.NewValueInt(1234), }, }, // Ensure `new_user_key` is not updated for spans with attribute // `user_key` because `user_key` does not match the regular expression. { name: "No extract with no pattern matching", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("does not match"), - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("does not match"), + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("does not match"), - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("does not match"), + "boo": pdata.NewValueString("ghosts are scary"), }, }, // Ensure `new_user_key` is not updated for spans with attribute @@ -355,58 +355,58 @@ func TestAttributes_Extract(t *testing.T) { // expression. { name: "No extract with no pattern matching", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update"), - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update"), + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update"), - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update"), + "boo": pdata.NewValueString("ghosts are scary"), }, }, // Ensure `new_user_key` and `version` is inserted for spans with attribute `user_key`. { name: "Extract insert new values.", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "new_user_key": pdata.NewAttributeValueString("12345678"), - "version": pdata.NewAttributeValueString("v1"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "new_user_key": pdata.NewValueString("12345678"), + "version": pdata.NewValueString("v1"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, }, // Ensure `new_user_key` and `version` is updated for spans with attribute `user_key`. { name: "Extract updates existing values ", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "new_user_key": pdata.NewAttributeValueString("2321"), - "version": pdata.NewAttributeValueString("na"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "new_user_key": pdata.NewValueString("2321"), + "version": pdata.NewValueString("na"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "new_user_key": pdata.NewAttributeValueString("12345678"), - "version": pdata.NewAttributeValueString("v1"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "new_user_key": pdata.NewValueString("12345678"), + "version": pdata.NewValueString("v1"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, }, // Ensure `new_user_key` is updated and `version` is inserted for spans with attribute `user_key`. { name: "Extract upserts values", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "new_user_key": pdata.NewAttributeValueString("2321"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "new_user_key": pdata.NewValueString("2321"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueString("/api/v1/document/12345678/update/v1"), - "new_user_key": pdata.NewAttributeValueString("12345678"), - "version": pdata.NewAttributeValueString("v1"), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueString("/api/v1/document/12345678/update/v1"), + "new_user_key": pdata.NewValueString("12345678"), + "version": pdata.NewValueString("v1"), + "foo": pdata.NewValueString("casper the friendly ghost"), }, }, } @@ -433,44 +433,44 @@ func TestAttributes_UpsertFromAttribute(t *testing.T) { // Ensure `new_user_key` is not set for spans with no attributes. { name: "UpsertEmptyAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure `new_user_key` is not inserted for spans with missing attribute `user_key`. { name: "UpsertFromAttributeNoExist", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, }, // Ensure `new_user_key` is inserted for spans with attribute `user_key`. { name: "UpsertFromAttributeExistsInsert", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueInt(2245), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueInt(2245), + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueInt(2245), - "new_user_key": pdata.NewAttributeValueInt(2245), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueInt(2245), + "new_user_key": pdata.NewValueInt(2245), + "foo": pdata.NewValueString("casper the friendly ghost"), }, }, // Ensure `new_user_key` is updated for spans with attribute `user_key`. { name: "UpsertFromAttributeExistsUpdate", - inputAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueInt(2245), - "new_user_key": pdata.NewAttributeValueInt(5422), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueInt(2245), + "new_user_key": pdata.NewValueInt(5422), + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user_key": pdata.NewAttributeValueInt(2245), - "new_user_key": pdata.NewAttributeValueInt(2245), - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + expectedAttributes: map[string]pdata.Value{ + "user_key": pdata.NewValueInt(2245), + "new_user_key": pdata.NewValueInt(2245), + "foo": pdata.NewValueString("casper the friendly ghost"), }, }, } @@ -495,28 +495,28 @@ func TestAttributes_Delete(t *testing.T) { // Ensure the span contains no changes. { name: "DeleteEmptyAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure the span contains no changes because the key doesn't exist. { name: "DeleteAttributeNoExist", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, }, // Ensure `duplicate_key` is deleted for spans with the attribute set. { name: "DeleteAttributeExists", - inputAttributes: map[string]pdata.AttributeValue{ - "duplicate_key": pdata.NewAttributeValueDouble(3245.6), - "original_key": pdata.NewAttributeValueDouble(3245.6), + inputAttributes: map[string]pdata.Value{ + "duplicate_key": pdata.NewValueDouble(3245.6), + "original_key": pdata.NewValueDouble(3245.6), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "original_key": pdata.NewAttributeValueDouble(3245.6), + expectedAttributes: map[string]pdata.Value{ + "original_key": pdata.NewValueDouble(3245.6), }, }, } @@ -550,67 +550,67 @@ func TestAttributes_HashValue(t *testing.T) { // Ensure no changes to the span as there is no attributes map. { name: "HashNoAttributes", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, // Ensure no changes to the span as the key does not exist. { name: "HashKeyNoExist", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("foo"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("foo"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("foo"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("foo"), }, }, // Ensure string data types are hashed correctly { name: "HashString", - inputAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString("foo"), + inputAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString("foo"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString(sha1Hash([]byte("foo"))), + expectedAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString(sha1Hash([]byte("foo"))), }, }, // Ensure int data types are hashed correctly { name: "HashInt", - inputAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueInt(intVal), + inputAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueInt(intVal), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString(sha1Hash(intBytes)), + expectedAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString(sha1Hash(intBytes)), }, }, // Ensure double data types are hashed correctly { name: "HashDouble", - inputAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueDouble(doubleVal), + inputAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueDouble(doubleVal), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString(sha1Hash(doubleBytes)), + expectedAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString(sha1Hash(doubleBytes)), }, }, // Ensure bool data types are hashed correctly { name: "HashBoolTrue", - inputAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString(sha1Hash([]byte{1})), + expectedAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString(sha1Hash([]byte{1})), }, }, // Ensure bool data types are hashed correctly { name: "HashBoolFalse", - inputAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "updateme": pdata.NewAttributeValueString(sha1Hash([]byte{0})), + expectedAttributes: map[string]pdata.Value{ + "updateme": pdata.NewValueString(sha1Hash([]byte{0})), }, }, } @@ -633,11 +633,11 @@ func TestAttributes_HashValue(t *testing.T) { func TestAttributes_FromAttributeNoChange(t *testing.T) { tc := testCase{ name: "FromAttributeNoChange", - inputAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + inputAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "boo": pdata.NewAttributeValueString("ghosts are scary"), + expectedAttributes: map[string]pdata.Value{ + "boo": pdata.NewValueString("ghosts are scary"), }, } @@ -664,12 +664,12 @@ func TestAttributes_Ordering(t *testing.T) { // 3. delete `operation`. { name: "OrderingApplyAllSteps", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "svc.operation": pdata.NewAttributeValueString("default"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "svc.operation": pdata.NewValueString("default"), }, }, // For this example, the operations performed are @@ -678,13 +678,13 @@ func TestAttributes_Ordering(t *testing.T) { // 3. delete `operation`. { name: "OrderingOperationExists", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "operation": pdata.NewAttributeValueString("arithmetic"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "operation": pdata.NewValueString("arithmetic"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "svc.operation": pdata.NewAttributeValueString("arithmetic"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "svc.operation": pdata.NewValueString("arithmetic"), }, }, @@ -694,13 +694,13 @@ func TestAttributes_Ordering(t *testing.T) { // 3. delete `operation`. { name: "OrderingSvcOperationExists", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "svc.operation": pdata.NewAttributeValueString("some value"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "svc.operation": pdata.NewValueString("some value"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "svc.operation": pdata.NewAttributeValueString("default"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "svc.operation": pdata.NewValueString("default"), }, }, @@ -710,14 +710,14 @@ func TestAttributes_Ordering(t *testing.T) { // 3. delete `operation`. { name: "OrderingBothAttributesExist", - inputAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "operation": pdata.NewAttributeValueString("arithmetic"), - "svc.operation": pdata.NewAttributeValueString("add"), + inputAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "operation": pdata.NewValueString("arithmetic"), + "svc.operation": pdata.NewValueString("add"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueString("casper the friendly ghost"), - "svc.operation": pdata.NewAttributeValueString("arithmetic"), + expectedAttributes: map[string]pdata.Value{ + "foo": pdata.NewValueString("casper the friendly ghost"), + "svc.operation": pdata.NewValueString("arithmetic"), }, }, } @@ -860,7 +860,7 @@ func TestValidConfiguration(t *testing.T) { ap, err := NewAttrProc(cfg) require.NoError(t, err) - av := pdata.NewAttributeValueInt(123) + av := pdata.NewValueInt(123) compiledRegex := regexp.MustCompile(`^\/api\/v1\/document\/(?P.*)\/update$`) assert.Equal(t, []attributeAction{ {Key: "one", Action: DELETE}, @@ -893,31 +893,31 @@ func TestFromContext(t *testing.T) { testCases := []struct { name string ctx context.Context - expectedAttributes map[string]pdata.AttributeValue + expectedAttributes map[string]pdata.Value action *ActionKeyValue }{ { name: "no_metadata", ctx: context.TODO(), - expectedAttributes: map[string]pdata.AttributeValue{}, + expectedAttributes: map[string]pdata.Value{}, action: &ActionKeyValue{Key: "dest", FromContext: "source", Action: INSERT}, }, { name: "no_value", ctx: mdCtx, - expectedAttributes: map[string]pdata.AttributeValue{}, + expectedAttributes: map[string]pdata.Value{}, action: &ActionKeyValue{Key: "dest", FromContext: "source", Action: INSERT}, }, { name: "single_value", ctx: mdCtx, - expectedAttributes: map[string]pdata.AttributeValue{"dest": pdata.NewAttributeValueString("single_val")}, + expectedAttributes: map[string]pdata.Value{"dest": pdata.NewValueString("single_val")}, action: &ActionKeyValue{Key: "dest", FromContext: "source_single_val", Action: INSERT}, }, { name: "multiple_values", ctx: mdCtx, - expectedAttributes: map[string]pdata.AttributeValue{"dest": pdata.NewAttributeValueString("first_val;second_val")}, + expectedAttributes: map[string]pdata.Value{"dest": pdata.NewValueString("first_val;second_val")}, action: &ActionKeyValue{Key: "dest", FromContext: "source_multiple_val", Action: INSERT}, }, } diff --git a/internal/coreinternal/attraction/hasher.go b/internal/coreinternal/attraction/hasher.go index a1643cc88bb5..c0cfa6f07938 100644 --- a/internal/coreinternal/attraction/hasher.go +++ b/internal/coreinternal/attraction/hasher.go @@ -38,21 +38,21 @@ var ( // hashed version of the attribute. In practice, this would mostly be used // for string attributes but we support all types for completeness/correctness // and eliminate any surprises. -func sha1Hasher(attr pdata.AttributeValue) { +func sha1Hasher(attr pdata.Value) { var val []byte switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: val = []byte(attr.StringVal()) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: if attr.BoolVal() { val = byteTrue[:] } else { val = byteFalse[:] } - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: val = make([]byte, int64ByteSize) binary.LittleEndian.PutUint64(val, uint64(attr.IntVal())) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: val = make([]byte, float64ByteSize) binary.LittleEndian.PutUint64(val, math.Float64bits(attr.DoubleVal())) } diff --git a/internal/coreinternal/attraction/type_converter.go b/internal/coreinternal/attraction/type_converter.go index 284e40670c46..450ab93470ae 100644 --- a/internal/coreinternal/attraction/type_converter.go +++ b/internal/coreinternal/attraction/type_converter.go @@ -27,26 +27,26 @@ const ( doubleConversionTarget = "double" ) -func convertValue(logger *zap.Logger, key string, to string, v pdata.AttributeValue) { +func convertValue(logger *zap.Logger, key string, to string, v pdata.Value) { switch to { case stringConversionTarget: switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: default: v.SetStringVal(v.AsString()) } case intConversionTarget: switch v.Type() { - case pdata.AttributeValueTypeInt: - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeInt: + case pdata.ValueTypeDouble: v.SetIntVal(int64(v.DoubleVal())) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: if v.BoolVal() { v.SetIntVal(1) } else { v.SetIntVal(0) } - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: s := v.StringVal() n, err := strconv.ParseInt(s, 10, 64) if err == nil { @@ -59,16 +59,16 @@ func convertValue(logger *zap.Logger, key string, to string, v pdata.AttributeVa } case doubleConversionTarget: switch v.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: v.SetDoubleVal(float64(v.IntVal())) - case pdata.AttributeValueTypeDouble: - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeDouble: + case pdata.ValueTypeBool: if v.BoolVal() { v.SetDoubleVal(1) } else { v.SetDoubleVal(0) } - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: s := v.StringVal() n, err := strconv.ParseFloat(s, 64) if err == nil { diff --git a/internal/coreinternal/go.mod b/internal/coreinternal/go.mod index e804239f22d4..640eb7e19be3 100644 --- a/internal/coreinternal/go.mod +++ b/internal/coreinternal/go.mod @@ -8,8 +8,8 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/spf13/cast v1.4.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 ) diff --git a/internal/coreinternal/go.sum b/internal/coreinternal/go.sum index a0ef414b59f4..fcc368f2e482 100644 --- a/internal/coreinternal/go.sum +++ b/internal/coreinternal/go.sum @@ -150,10 +150,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.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= diff --git a/internal/coreinternal/goldendataset/metrics_gen.go b/internal/coreinternal/goldendataset/metrics_gen.go index e78db19b0c97..3e9532b53f01 100644 --- a/internal/coreinternal/goldendataset/metrics_gen.go +++ b/internal/coreinternal/goldendataset/metrics_gen.go @@ -96,7 +96,7 @@ func (g *metricGenerator) genMetricFromCfg(cfg MetricsCfg) pdata.Metrics { for j := 0; j < cfg.NumResourceAttrs; j++ { resource.Attributes().Insert( fmt.Sprintf("resource-attr-name-%d", j), - pdata.NewAttributeValueString(fmt.Sprintf("resource-attr-val-%d", j)), + pdata.NewValueString(fmt.Sprintf("resource-attr-val-%d", j)), ) } g.populateIlm(cfg, rm) diff --git a/internal/coreinternal/goldendataset/resource_generator.go b/internal/coreinternal/goldendataset/resource_generator.go index c93034a22aff..3578ee3b7d1c 100644 --- a/internal/coreinternal/goldendataset/resource_generator.go +++ b/internal/coreinternal/goldendataset/resource_generator.go @@ -46,7 +46,7 @@ func appendOnpremVMAttributes(attrMap pdata.AttributeMap) { attrMap.UpsertString(conventions.AttributeServiceName, "customers") attrMap.UpsertString(conventions.AttributeServiceNamespace, "production") attrMap.UpsertString(conventions.AttributeServiceVersion, "semver:0.7.3") - subMap := pdata.NewAttributeValueMap() + subMap := pdata.NewValueMap() subMap.MapVal().InsertString("public", "tc-prod9.internal.example.com") subMap.MapVal().InsertString("internal", "172.18.36.18") attrMap.Upsert(conventions.AttributeHostName, subMap) @@ -118,7 +118,7 @@ func appendFassAttributes(attrMap pdata.AttributeMap) { func appendExecAttributes(attrMap pdata.AttributeMap) { attrMap.UpsertString(conventions.AttributeProcessExecutableName, "otelcol") - parts := pdata.NewAttributeValueArray() + parts := pdata.NewValueArray() parts.SliceVal().AppendEmpty().SetStringVal("otelcol") parts.SliceVal().AppendEmpty().SetStringVal("--config=/etc/otel-collector-config.yaml") attrMap.Upsert(conventions.AttributeProcessCommandLine, parts) diff --git a/internal/coreinternal/goldendataset/span_generator.go b/internal/coreinternal/goldendataset/span_generator.go index 8bea0d451648..46d832fc3c71 100644 --- a/internal/coreinternal/goldendataset/span_generator.go +++ b/internal/coreinternal/goldendataset/span_generator.go @@ -361,12 +361,12 @@ func appendMaxCountAttributes(includeStatus bool, attrMap pdata.AttributeMap) { attrMap.UpsertBool("ai-sampler.absolute", false) attrMap.UpsertInt("ai-sampler.maxhops", 6) attrMap.UpsertString("application.create.location", "https://api.opentelemetry.io/blog/posts/806673B9-4F4D-4284-9635-3A3E3E3805BE") - stages := pdata.NewAttributeValueArray() + stages := pdata.NewValueArray() stages.SliceVal().AppendEmpty().SetStringVal("Launch") stages.SliceVal().AppendEmpty().SetStringVal("Injestion") stages.SliceVal().AppendEmpty().SetStringVal("Validation") attrMap.Upsert("application.stages", stages) - subMap := pdata.NewAttributeValueMap() + subMap := pdata.NewValueMap() subMap.MapVal().InsertBool("UIx", false) subMap.MapVal().InsertBool("UI4", true) subMap.MapVal().InsertBool("flow-alt3", false) diff --git a/internal/coreinternal/processor/filterexpr/matcher_test.go b/internal/coreinternal/processor/filterexpr/matcher_test.go index 55d6d79cdd22..1b205fd2e708 100644 --- a/internal/coreinternal/processor/filterexpr/matcher_test.go +++ b/internal/coreinternal/processor/filterexpr/matcher_test.go @@ -139,20 +139,20 @@ func TestNonMatchGaugeDataPointByMetricAndHasLabel(t *testing.T) { func TestMatchGaugeDataPointByMetricAndHasLabel(t *testing.T) { expression := `MetricName == 'my.metric' && HasLabel("foo")` - assert.True(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.AttributeValue{"foo": pdata.NewAttributeValueString("")})) + assert.True(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.Value{"foo": pdata.NewValueString("")})) } func TestMatchGaugeDataPointByMetricAndLabelValue(t *testing.T) { expression := `MetricName == 'my.metric' && Label("foo") == "bar"` - assert.False(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.AttributeValue{"foo": pdata.NewAttributeValueString("")})) + assert.False(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.Value{"foo": pdata.NewValueString("")})) } func TestNonMatchGaugeDataPointByMetricAndLabelValue(t *testing.T) { expression := `MetricName == 'my.metric' && Label("foo") == "bar"` - assert.False(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.AttributeValue{"foo": pdata.NewAttributeValueString("")})) + assert.False(t, testMatchGauge(t, "my.metric", expression, map[string]pdata.Value{"foo": pdata.NewValueString("")})) } -func testMatchGauge(t *testing.T, metricName, expression string, lbls map[string]pdata.AttributeValue) bool { +func testMatchGauge(t *testing.T, metricName, expression string, lbls map[string]pdata.Value) bool { matcher, err := NewMatcher(expression) require.NoError(t, err) m := pdata.NewMetric() diff --git a/internal/coreinternal/processor/filterhelper/filterhelper.go b/internal/coreinternal/processor/filterhelper/filterhelper.go index 4967cdc34ee0..f623e6cbe1d1 100644 --- a/internal/coreinternal/processor/filterhelper/filterhelper.go +++ b/internal/coreinternal/processor/filterhelper/filterhelper.go @@ -23,17 +23,17 @@ import ( // NewAttributeValueRaw is used to convert the raw `value` from ActionKeyValue to the supported trace attribute values. // If error different than nil the return value is invalid. Calling any functions on the invalid value will cause a panic. -func NewAttributeValueRaw(value interface{}) (pdata.AttributeValue, error) { +func NewAttributeValueRaw(value interface{}) (pdata.Value, error) { switch val := value.(type) { case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return pdata.NewAttributeValueInt(cast.ToInt64(val)), nil + return pdata.NewValueInt(cast.ToInt64(val)), nil case float32, float64: - return pdata.NewAttributeValueDouble(cast.ToFloat64(val)), nil + return pdata.NewValueDouble(cast.ToFloat64(val)), nil case string: - return pdata.NewAttributeValueString(val), nil + return pdata.NewValueString(val), nil case bool: - return pdata.NewAttributeValueBool(val), nil + return pdata.NewValueBool(val), nil default: - return pdata.AttributeValue{}, fmt.Errorf("error unsupported value type \"%T\"", value) + return pdata.Value{}, fmt.Errorf("error unsupported value type \"%T\"", value) } } diff --git a/internal/coreinternal/processor/filterhelper/filterhelper_test.go b/internal/coreinternal/processor/filterhelper/filterhelper_test.go index 6f04e84daee6..c37e4f5ccdf5 100644 --- a/internal/coreinternal/processor/filterhelper/filterhelper_test.go +++ b/internal/coreinternal/processor/filterhelper/filterhelper_test.go @@ -23,35 +23,35 @@ import ( func TestHelper_AttributeValue(t *testing.T) { val, err := NewAttributeValueRaw(uint8(123)) - assert.Equal(t, pdata.NewAttributeValueInt(123), val) + assert.Equal(t, pdata.NewValueInt(123), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(uint16(123)) - assert.Equal(t, pdata.NewAttributeValueInt(123), val) + assert.Equal(t, pdata.NewValueInt(123), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(int8(123)) - assert.Equal(t, pdata.NewAttributeValueInt(123), val) + assert.Equal(t, pdata.NewValueInt(123), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(int16(123)) - assert.Equal(t, pdata.NewAttributeValueInt(123), val) + assert.Equal(t, pdata.NewValueInt(123), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(float32(234.129312)) - assert.Equal(t, pdata.NewAttributeValueDouble(float64(float32(234.129312))), val) + assert.Equal(t, pdata.NewValueDouble(float64(float32(234.129312))), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(234.129312) - assert.Equal(t, pdata.NewAttributeValueDouble(234.129312), val) + assert.Equal(t, pdata.NewValueDouble(234.129312), val) assert.NoError(t, err) val, err = NewAttributeValueRaw(true) - assert.Equal(t, pdata.NewAttributeValueBool(true), val) + assert.Equal(t, pdata.NewValueBool(true), val) assert.NoError(t, err) val, err = NewAttributeValueRaw("bob the builder") - assert.Equal(t, pdata.NewAttributeValueString("bob the builder"), val) + assert.Equal(t, pdata.NewValueString("bob the builder"), val) assert.NoError(t, err) _, err = NewAttributeValueRaw(nil) diff --git a/internal/coreinternal/processor/filtermatcher/attributematcher.go b/internal/coreinternal/processor/filtermatcher/attributematcher.go index 76372f07f1f0..51f9c83514ea 100644 --- a/internal/coreinternal/processor/filtermatcher/attributematcher.go +++ b/internal/coreinternal/processor/filtermatcher/attributematcher.go @@ -32,7 +32,7 @@ type AttributesMatcher []AttributeMatcher type AttributeMatcher struct { Key string // If both AttributeValue and StringFilter are nil only check for key existence. - AttributeValue *pdata.AttributeValue + AttributeValue *pdata.Value // StringFilter is needed to match against a regular expression StringFilter filterset.FilterSet } @@ -58,7 +58,7 @@ func NewAttributesMatcher(config filterset.Config, attributes []filterconfig.Att } if config.MatchType == filterset.Regexp { - if val.Type() != pdata.AttributeValueTypeString { + if val.Type() != pdata.ValueTypeString { return nil, fmt.Errorf( "%s=%s for %q only supports STRING, but found %s", filterset.MatchTypeFieldName, filterset.Regexp, attribute.Key, val.Type(), @@ -116,15 +116,15 @@ func (ma AttributesMatcher) Match(attrs pdata.AttributeMap) bool { return true } -func attributeStringValue(attr pdata.AttributeValue) (string, error) { +func attributeStringValue(attr pdata.Value) (string, error) { switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return attr.StringVal(), nil - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return strconv.FormatBool(attr.BoolVal()), nil - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return strconv.FormatFloat(attr.DoubleVal(), 'f', -1, 64), nil - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return strconv.FormatInt(attr.IntVal(), 10), nil default: return "", errUnexpectedAttributeType diff --git a/internal/coreinternal/processor/filtermatcher/filtermatcher_test.go b/internal/coreinternal/processor/filtermatcher/filtermatcher_test.go index bab2733670cf..352957e9922b 100644 --- a/internal/coreinternal/processor/filtermatcher/filtermatcher_test.go +++ b/internal/coreinternal/processor/filtermatcher/filtermatcher_test.go @@ -204,9 +204,9 @@ func Test_Matching_False(t *testing.T) { }, } - atts := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "keyInt": pdata.NewAttributeValueInt(123), - "keyMap": pdata.NewAttributeValueMap(), + atts := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "keyInt": pdata.NewValueInt(123), + "keyMap": pdata.NewValueMap(), }) library := pdata.NewInstrumentationLibrary() @@ -358,12 +358,12 @@ func Test_Matching_True(t *testing.T) { }, } - atts := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "keyString": pdata.NewAttributeValueString("arithmetic"), - "keyInt": pdata.NewAttributeValueInt(123), - "keyDouble": pdata.NewAttributeValueDouble(3245.6), - "keyBool": pdata.NewAttributeValueBool(true), - "keyExists": pdata.NewAttributeValueString("present"), + atts := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "keyString": pdata.NewValueString("arithmetic"), + "keyInt": pdata.NewValueInt(123), + "keyDouble": pdata.NewValueDouble(3245.6), + "keyBool": pdata.NewValueBool(true), + "keyExists": pdata.NewValueString("present"), }) resource := pdata.NewResource() diff --git a/internal/coreinternal/testdata/common.go b/internal/coreinternal/testdata/common.go index 3cc8b74c545f..b1eadc77271f 100644 --- a/internal/coreinternal/testdata/common.go +++ b/internal/coreinternal/testdata/common.go @@ -19,11 +19,11 @@ import ( ) var ( - resourceAttributes1 = map[string]pdata.AttributeValue{"resource-attr": pdata.NewAttributeValueString("resource-attr-val-1")} - resourceAttributes2 = map[string]pdata.AttributeValue{"resource-attr": pdata.NewAttributeValueString("resource-attr-val-2")} - spanEventAttributes = map[string]pdata.AttributeValue{"span-event-attr": pdata.NewAttributeValueString("span-event-attr-val")} - spanLinkAttributes = map[string]pdata.AttributeValue{"span-link-attr": pdata.NewAttributeValueString("span-link-attr-val")} - spanAttributes = map[string]pdata.AttributeValue{"span-attr": pdata.NewAttributeValueString("span-attr-val")} + resourceAttributes1 = map[string]pdata.Value{"resource-attr": pdata.NewValueString("resource-attr-val-1")} + resourceAttributes2 = map[string]pdata.Value{"resource-attr": pdata.NewValueString("resource-attr-val-2")} + spanEventAttributes = map[string]pdata.Value{"span-event-attr": pdata.NewValueString("span-event-attr-val")} + spanLinkAttributes = map[string]pdata.Value{"span-link-attr": pdata.NewValueString("span-link-attr-val")} + spanAttributes = map[string]pdata.Value{"span-attr": pdata.NewValueString("span-attr-val")} ) const ( diff --git a/internal/kubelet/go.mod b/internal/kubelet/go.mod index da15a02fd7b0..c9b62301d3fe 100644 --- a/internal/kubelet/go.mod +++ b/internal/kubelet/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/internal/kubelet/go.sum b/internal/kubelet/go.sum index 2c9ace1ae3db..88442b209c18 100644 --- a/internal/kubelet/go.sum +++ b/internal/kubelet/go.sum @@ -276,8 +276,8 @@ 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/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.uber.org/atomic v1.7.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= diff --git a/internal/scrapertest/go.mod b/internal/scrapertest/go.mod index b3172bdb3d0a..0c05f7dba704 100644 --- a/internal/scrapertest/go.mod +++ b/internal/scrapertest/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/internal/scrapertest/go.sum b/internal/scrapertest/go.sum index 2ee0f496bab6..b39498cde29d 100644 --- a/internal/scrapertest/go.sum +++ b/internal/scrapertest/go.sum @@ -23,8 +23,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= diff --git a/internal/scrapertest/golden/golden_test.go b/internal/scrapertest/golden/golden_test.go index 6be43f908046..ce898609e483 100644 --- a/internal/scrapertest/golden/golden_test.go +++ b/internal/scrapertest/golden/golden_test.go @@ -77,14 +77,14 @@ func testMetrics() pdata.MetricSlice { dp := dps.AppendEmpty() attributes := pdata.NewAttributeMap() - attributes.Insert("testKey1", pdata.NewAttributeValueString("teststringvalue1")) - attributes.Insert("testKey2", pdata.NewAttributeValueString("testvalue1")) + attributes.Insert("testKey1", pdata.NewValueString("teststringvalue1")) + attributes.Insert("testKey2", pdata.NewValueString("testvalue1")) setDPDoubleVal(dp, 2, attributes, time.Time{}) dp = dps.AppendEmpty() attributes = pdata.NewAttributeMap() - attributes.Insert("testKey1", pdata.NewAttributeValueString("teststringvalue2")) - attributes.Insert("testKey2", pdata.NewAttributeValueString("testvalue2")) + attributes.Insert("testKey1", pdata.NewValueString("teststringvalue2")) + attributes.Insert("testKey2", pdata.NewValueString("testvalue2")) setDPDoubleVal(dp, 2, attributes, time.Time{}) // Gauge with one int dp @@ -94,7 +94,7 @@ func testMetrics() pdata.MetricSlice { dp = dps.AppendEmpty() attributes = pdata.NewAttributeMap() - attributes.Insert("testKey2", pdata.NewAttributeValueString("teststringvalue2")) + attributes.Insert("testKey2", pdata.NewValueString("teststringvalue2")) setDPIntVal(dp, 2, attributes, time.Time{}) // Delta Sum with two int dps @@ -104,12 +104,12 @@ func testMetrics() pdata.MetricSlice { dp = dps.AppendEmpty() attributes = pdata.NewAttributeMap() - attributes.Insert("testKey2", pdata.NewAttributeValueString("teststringvalue2")) + attributes.Insert("testKey2", pdata.NewValueString("teststringvalue2")) setDPIntVal(dp, 2, attributes, time.Time{}) dp = dps.AppendEmpty() attributes = pdata.NewAttributeMap() - attributes.Insert("testKey2", pdata.NewAttributeValueString("teststringvalue2")) + attributes.Insert("testKey2", pdata.NewValueString("teststringvalue2")) setDPIntVal(dp, 2, attributes, time.Time{}) // Cumulative Sum with one double dp diff --git a/internal/scrapertest/mask.go b/internal/scrapertest/mask.go index 5cf27af463e3..d438ac55452c 100644 --- a/internal/scrapertest/mask.go +++ b/internal/scrapertest/mask.go @@ -125,7 +125,7 @@ func maskDataPointSliceAttributeValues(dataPoints pdata.NumberDataPointSlice, at attribute, ok := attributes.Get(attributeName) if ok { switch attribute.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: attributes.UpdateString(attributeName, "") default: panic(fmt.Sprintf("data type not supported: %s", attribute.Type())) diff --git a/internal/sharedcomponent/go.mod b/internal/sharedcomponent/go.mod index afad81480131..3f7a2baabe83 100644 --- a/internal/sharedcomponent/go.mod +++ b/internal/sharedcomponent/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( @@ -20,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/internal/sharedcomponent/go.sum b/internal/sharedcomponent/go.sum index 08a546b6e3bb..a81a862162c9 100644 --- a/internal/sharedcomponent/go.sum +++ b/internal/sharedcomponent/go.sum @@ -128,10 +128,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/internal/splunk/go.mod b/internal/splunk/go.mod index d092d5328dd9..512325f4e30b 100644 --- a/internal/splunk/go.mod +++ b/internal/splunk/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/internal/splunk/go.sum b/internal/splunk/go.sum index dd03187e4181..c8801776b755 100644 --- a/internal/splunk/go.sum +++ b/internal/splunk/go.sum @@ -156,10 +156,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/internal/splunk/hostid_test.go b/internal/splunk/hostid_test.go index b87ccc3b0869..d90ba016aecb 100644 --- a/internal/splunk/hostid_test.go +++ b/internal/splunk/hostid_test.go @@ -259,9 +259,9 @@ func TestResourceToHostID(t *testing.T) { func TestAzureID(t *testing.T) { attrs := pdata.NewAttributeMap() - attrs.Insert("azure.resourcegroup.name", pdata.NewAttributeValueString("myResourceGroup")) - attrs.Insert("azure.vm.scaleset.name", pdata.NewAttributeValueString("myScalesetName")) - attrs.Insert(conventions.AttributeHostName, pdata.NewAttributeValueString("myScalesetName_1")) + attrs.Insert("azure.resourcegroup.name", pdata.NewValueString("myResourceGroup")) + attrs.Insert("azure.vm.scaleset.name", pdata.NewValueString("myScalesetName")) + attrs.Insert(conventions.AttributeHostName, pdata.NewValueString("myScalesetName_1")) id := azureID(attrs, "myCloudAccount") expected := "mycloudaccount/myresourcegroup/microsoft.compute/virtualmachinescalesets/myscalesetname/virtualmachines/1" assert.Equal(t, expected, id) diff --git a/internal/stanza/converter.go b/internal/stanza/converter.go index 2eb82c799cac..ed268c245b38 100644 --- a/internal/stanza/converter.go +++ b/internal/stanza/converter.go @@ -359,7 +359,7 @@ func convertInto(ent *entry.Entry, dest pdata.LogRecord) { } } -func insertToAttributeVal(value interface{}, dest pdata.AttributeValue) { +func insertToAttributeVal(value interface{}, dest pdata.Value) { switch t := value.(type) { case bool: dest.SetBoolVal(t) @@ -400,8 +400,8 @@ func insertToAttributeVal(value interface{}, dest pdata.AttributeValue) { } } -func toAttributeMap(obsMap map[string]interface{}) pdata.AttributeValue { - attVal := pdata.NewAttributeValueMap() +func toAttributeMap(obsMap map[string]interface{}) pdata.Value { + attVal := pdata.NewValueMap() attMap := attVal.MapVal() insertToAttributeMap(obsMap, attMap) return attVal @@ -453,8 +453,8 @@ func insertToAttributeMap(obsMap map[string]interface{}, dest pdata.AttributeMap } } -func toAttributeArray(obsArr []interface{}) pdata.AttributeValue { - arrVal := pdata.NewAttributeValueArray() +func toAttributeArray(obsArr []interface{}) pdata.Value { + arrVal := pdata.NewValueArray() arr := arrVal.SliceVal() arr.EnsureCapacity(len(obsArr)) for _, v := range obsArr { diff --git a/internal/stanza/converter_test.go b/internal/stanza/converter_test.go index ec6b8a616443..f1faf66db353 100644 --- a/internal/stanza/converter_test.go +++ b/internal/stanza/converter_test.go @@ -186,7 +186,7 @@ func TestConvert(t *testing.T) { m.InsertInt("int", 123) m.InsertDouble("double", 12.34) m.InsertString("string", "hello") - m.Insert("object", pdata.NewAttributeValueMap()) + m.Insert("object", pdata.NewValueMap()) assert.EqualValues(t, m.Sort(), resAtts.Sort()) } @@ -207,11 +207,11 @@ func TestConvert(t *testing.T) { m.InsertInt("int", 123) m.InsertDouble("double", 12.34) m.InsertString("string", "hello") - m.Insert("object", pdata.NewAttributeValueMap()) + m.Insert("object", pdata.NewValueMap()) assert.EqualValues(t, m.Sort(), atts.Sort()) } - if assert.Equal(t, pdata.AttributeValueTypeMap, lr.Body().Type()) { + if assert.Equal(t, pdata.ValueTypeMap, lr.Body().Type()) { m := pdata.NewAttributeMap() // Don't include a nested object because AttributeValueMap sorting // doesn't sort recursively. @@ -582,7 +582,7 @@ func TestConvertMetadata(t *testing.T) { require.Equal(t, "hello", attVal.StringVal()) bod := result.Body() - require.Equal(t, pdata.AttributeValueTypeBool, bod.Type()) + require.Equal(t, pdata.ValueTypeBool, bod.Type()) require.True(t, bod.BoolVal()) } @@ -736,7 +736,7 @@ func TestConvertNestedMapBody(t *testing.T) { require.Equal(t, fmt.Sprintf("%v", unknownType), unknownAttVal.StringVal()) } -func anyToBody(body interface{}) pdata.AttributeValue { +func anyToBody(body interface{}) pdata.Value { entry := entry.New() entry.Body = body return convertAndDrill(entry).Body() diff --git a/internal/stanza/go.mod b/internal/stanza/go.mod index a33fd05d2dfb..d29f544d9291 100644 --- a/internal/stanza/go.mod +++ b/internal/stanza/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.opentelemetry.io/otel/metric v0.27.0 go.opentelemetry.io/otel/trace v1.4.1 go.uber.org/multierr v1.8.0 diff --git a/internal/stanza/go.sum b/internal/stanza/go.sum index 530e6bcb55a9..547c99b51ca3 100644 --- a/internal/stanza/go.sum +++ b/internal/stanza/go.sum @@ -184,10 +184,10 @@ 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.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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/pkg/batchperresourceattr/batchperresourceattr_test.go b/pkg/batchperresourceattr/batchperresourceattr_test.go index 679caa03ae77..a0bc2a3ef0a7 100644 --- a/pkg/batchperresourceattr/batchperresourceattr_test.go +++ b/pkg/batchperresourceattr/batchperresourceattr_test.go @@ -30,7 +30,7 @@ import ( func TestSplitTracesOneResourceSpans(t *testing.T) { inBatch := pdata.NewTraces() - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("1")) sink := new(consumertest.TracesSink) bpr := NewBatchPerResourceTraces("attr_key", sink) @@ -42,8 +42,8 @@ func TestSplitTracesOneResourceSpans(t *testing.T) { func TestSplitTracesReturnError(t *testing.T) { inBatch := pdata.NewTraces() - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("1")) err := errors.New("test_error") bpr := NewBatchPerResourceTraces("attr_key", consumertest.NewErr(err)) @@ -52,10 +52,10 @@ func TestSplitTracesReturnError(t *testing.T) { func TestSplitTracesSameResource(t *testing.T) { inBatch := pdata.NewTraces() - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) sink := new(consumertest.TracesSink) bpr := NewBatchPerResourceTraces("same_attr_val", sink) @@ -67,15 +67,15 @@ func TestSplitTracesSameResource(t *testing.T) { func TestSplitTracesIntoDifferentBatches(t *testing.T) { inBatch := pdata.NewTraces() - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "diff_attr_key", pdata.NewAttributeValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceSpans(inBatch.ResourceSpans().AppendEmpty(), "diff_attr_key", pdata.NewValueString("1")) sink := new(consumertest.TracesSink) bpr := NewBatchPerResourceTraces("attr_key", sink) @@ -92,7 +92,7 @@ func TestSplitTracesIntoDifferentBatches(t *testing.T) { func TestSplitMetricsOneResourceMetrics(t *testing.T) { inBatch := pdata.NewMetrics() - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("1")) sink := new(consumertest.MetricsSink) bpr := NewBatchPerResourceMetrics("attr_key", sink) @@ -104,8 +104,8 @@ func TestSplitMetricsOneResourceMetrics(t *testing.T) { func TestSplitMetricsReturnError(t *testing.T) { inBatch := pdata.NewMetrics() - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("1")) err := errors.New("test_error") bpr := NewBatchPerResourceMetrics("attr_key", consumertest.NewErr(err)) @@ -114,10 +114,10 @@ func TestSplitMetricsReturnError(t *testing.T) { func TestSplitMetricsSameResource(t *testing.T) { inBatch := pdata.NewMetrics() - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) sink := new(consumertest.MetricsSink) bpr := NewBatchPerResourceMetrics("same_attr_val", sink) @@ -129,15 +129,15 @@ func TestSplitMetricsSameResource(t *testing.T) { func TestSplitMetricsIntoDifferentBatches(t *testing.T) { inBatch := pdata.NewMetrics() - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "diff_attr_key", pdata.NewAttributeValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "diff_attr_key", pdata.NewValueString("1")) sink := new(consumertest.MetricsSink) bpr := NewBatchPerResourceMetrics("attr_key", sink) @@ -154,7 +154,7 @@ func TestSplitMetricsIntoDifferentBatches(t *testing.T) { func TestSplitLogsOneResourceLogs(t *testing.T) { inBatch := pdata.NewLogs() - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("1")) sink := new(consumertest.LogsSink) bpr := NewBatchPerResourceLogs("attr_key", sink) @@ -166,8 +166,8 @@ func TestSplitLogsOneResourceLogs(t *testing.T) { func TestSplitLogsReturnError(t *testing.T) { inBatch := pdata.NewLogs() - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("1")) err := errors.New("test_error") bpr := NewBatchPerResourceLogs("attr_key", consumertest.NewErr(err)) @@ -176,10 +176,10 @@ func TestSplitLogsReturnError(t *testing.T) { func TestSplitLogsSameResource(t *testing.T) { inBatch := pdata.NewLogs() - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewAttributeValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "same_attr_val", pdata.NewValueString("1")) sink := new(consumertest.LogsSink) bpr := NewBatchPerResourceLogs("same_attr_val", sink) @@ -191,15 +191,15 @@ func TestSplitLogsSameResource(t *testing.T) { func TestSplitLogsIntoDifferentBatches(t *testing.T) { inBatch := pdata.NewLogs() - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("1")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("2")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("3")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString("4")) - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "diff_attr_key", pdata.NewAttributeValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("1")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("2")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("3")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString("4")) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "diff_attr_key", pdata.NewValueString("1")) sink := new(consumertest.LogsSink) bpr := NewBatchPerResourceLogs("attr_key", sink) @@ -236,9 +236,9 @@ func sortTraces(tds []pdata.Traces, attrKey string) { }) } -func fillResourceSpans(rs pdata.ResourceSpans, key string, val pdata.AttributeValue) { +func fillResourceSpans(rs pdata.ResourceSpans, key string, val pdata.Value) { rs.Resource().Attributes().Upsert(key, val) - rs.Resource().Attributes().Upsert("__other_key__", pdata.NewAttributeValueInt(123)) + rs.Resource().Attributes().Upsert("__other_key__", pdata.NewValueInt(123)) ils := rs.InstrumentationLibrarySpans().AppendEmpty() firstSpan := ils.Spans().AppendEmpty() firstSpan.SetName("first-span") @@ -270,9 +270,9 @@ func sortMetrics(tds []pdata.Metrics, attrKey string) { }) } -func fillResourceMetrics(rs pdata.ResourceMetrics, key string, val pdata.AttributeValue) { +func fillResourceMetrics(rs pdata.ResourceMetrics, key string, val pdata.Value) { rs.Resource().Attributes().Upsert(key, val) - rs.Resource().Attributes().Upsert("__other_key__", pdata.NewAttributeValueInt(123)) + rs.Resource().Attributes().Upsert("__other_key__", pdata.NewValueInt(123)) ils := rs.InstrumentationLibraryMetrics().AppendEmpty() firstMetric := ils.Metrics().AppendEmpty() firstMetric.SetName("first-metric") @@ -304,9 +304,9 @@ func sortLogs(tds []pdata.Logs, attrKey string) { }) } -func fillResourceLogs(rs pdata.ResourceLogs, key string, val pdata.AttributeValue) { +func fillResourceLogs(rs pdata.ResourceLogs, key string, val pdata.Value) { rs.Resource().Attributes().Upsert(key, val) - rs.Resource().Attributes().Upsert("__other_key__", pdata.NewAttributeValueInt(123)) + rs.Resource().Attributes().Upsert("__other_key__", pdata.NewValueInt(123)) ils := rs.InstrumentationLibraryLogs().AppendEmpty() firstLogRecord := ils.LogRecords().AppendEmpty() firstLogRecord.SetName("first-log-record") @@ -321,7 +321,7 @@ func BenchmarkBatchPerResourceTraces(b *testing.B) { rss := inBatch.ResourceSpans() rss.EnsureCapacity(64) for i := 0; i < 64; i++ { - fillResourceSpans(rss.AppendEmpty(), "attr_key", pdata.NewAttributeValueString(strconv.Itoa(i%8))) + fillResourceSpans(rss.AppendEmpty(), "attr_key", pdata.NewValueString(strconv.Itoa(i%8))) } bpr := NewBatchPerResourceTraces("attr_key", consumertest.NewNop()) b.ReportAllocs() @@ -337,7 +337,7 @@ func BenchmarkBatchPerResourceMetrics(b *testing.B) { inBatch := pdata.NewMetrics() inBatch.ResourceMetrics().EnsureCapacity(64) for i := 0; i < 64; i++ { - fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewAttributeValueString(strconv.Itoa(i%8))) + fillResourceMetrics(inBatch.ResourceMetrics().AppendEmpty(), "attr_key", pdata.NewValueString(strconv.Itoa(i%8))) } bpr := NewBatchPerResourceMetrics("attr_key", consumertest.NewNop()) b.ReportAllocs() @@ -353,7 +353,7 @@ func BenchmarkBatchPerResourceLogs(b *testing.B) { inBatch := pdata.NewLogs() inBatch.ResourceLogs().EnsureCapacity(64) for i := 0; i < 64; i++ { - fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewAttributeValueString(strconv.Itoa(i%8))) + fillResourceLogs(inBatch.ResourceLogs().AppendEmpty(), "attr_key", pdata.NewValueString(strconv.Itoa(i%8))) } bpr := NewBatchPerResourceLogs("attr_key", consumertest.NewNop()) b.ReportAllocs() diff --git a/pkg/batchperresourceattr/go.mod b/pkg/batchperresourceattr/go.mod index d8b64807447e..cae4f9df59ff 100644 --- a/pkg/batchperresourceattr/go.mod +++ b/pkg/batchperresourceattr/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/batchperresourceattr/go.sum b/pkg/batchperresourceattr/go.sum index da989cadb9c6..598de249fded 100644 --- a/pkg/batchperresourceattr/go.sum +++ b/pkg/batchperresourceattr/go.sum @@ -24,10 +24,10 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.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= diff --git a/pkg/batchpersignal/go.mod b/pkg/batchpersignal/go.mod index 20f7bd4dbc1d..f080b377d655 100644 --- a/pkg/batchpersignal/go.mod +++ b/pkg/batchpersignal/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/pkg/batchpersignal/go.sum b/pkg/batchpersignal/go.sum index 5bbc49b142b0..ac8ae0950ca1 100644 --- a/pkg/batchpersignal/go.sum +++ b/pkg/batchpersignal/go.sum @@ -12,8 +12,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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= diff --git a/pkg/resourcetotelemetry/go.mod b/pkg/resourcetotelemetry/go.mod index 757e94cebb76..43d8bd8ae6be 100644 --- a/pkg/resourcetotelemetry/go.mod +++ b/pkg/resourcetotelemetry/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/pkg/resourcetotelemetry/go.sum b/pkg/resourcetotelemetry/go.sum index 27d9f2c324b6..a6c24a11fea5 100644 --- a/pkg/resourcetotelemetry/go.sum +++ b/pkg/resourcetotelemetry/go.sum @@ -123,10 +123,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/pkg/resourcetotelemetry/resource_to_telemetry.go b/pkg/resourcetotelemetry/resource_to_telemetry.go index 68ae986c9622..2b08f96b0c86 100644 --- a/pkg/resourcetotelemetry/resource_to_telemetry.go +++ b/pkg/resourcetotelemetry/resource_to_telemetry.go @@ -115,7 +115,7 @@ func addAttributesToExponentialHistogramDataPoints(ps pdata.ExponentialHistogram } func joinAttributeMaps(from, to pdata.AttributeMap) { - from.Range(func(k string, v pdata.AttributeValue) bool { + from.Range(func(k string, v pdata.Value) bool { to.Upsert(k, v) return true }) diff --git a/pkg/translator/jaeger/go.mod b/pkg/translator/jaeger/go.mod index 884db7bcd7ac..a702eb501008 100644 --- a/pkg/translator/jaeger/go.mod +++ b/pkg/translator/jaeger/go.mod @@ -6,7 +6,7 @@ require ( github.com/jaegertracing/jaeger v1.32.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/pkg/translator/jaeger/go.sum b/pkg/translator/jaeger/go.sum index 19ab647783c2..ab70e44f3346 100644 --- a/pkg/translator/jaeger/go.sum +++ b/pkg/translator/jaeger/go.sum @@ -39,8 +39,8 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.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= diff --git a/pkg/translator/jaeger/jaegerproto_to_traces.go b/pkg/translator/jaeger/jaegerproto_to_traces.go index d93b985a549b..a95062f25882 100644 --- a/pkg/translator/jaeger/jaegerproto_to_traces.go +++ b/pkg/translator/jaeger/jaegerproto_to_traces.go @@ -273,12 +273,12 @@ func extractStatusDescFromAttr(attrs pdata.AttributeMap) (string, bool) { // codeFromAttr returns the integer code value from attrVal. An error is // returned if the code is not represented by an integer or string value in // the attrVal or the value is outside the bounds of an int representation. -func codeFromAttr(attrVal pdata.AttributeValue) (int64, error) { +func codeFromAttr(attrVal pdata.Value) (int64, error) { var val int64 switch attrVal.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: val = attrVal.IntVal() - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: var err error val, err = strconv.ParseInt(attrVal.StringVal(), 10, 0) if err != nil { @@ -290,7 +290,7 @@ func codeFromAttr(attrVal pdata.AttributeValue) (int64, error) { return val, nil } -func getStatusCodeFromHTTPStatusAttr(attrVal pdata.AttributeValue) (pdata.StatusCode, error) { +func getStatusCodeFromHTTPStatusAttr(attrVal pdata.Value) (pdata.StatusCode, error) { statusCode, err := codeFromAttr(attrVal) if err != nil { return pdata.StatusCodeUnset, err diff --git a/pkg/translator/jaeger/jaegerproto_to_traces_test.go b/pkg/translator/jaeger/jaegerproto_to_traces_test.go index 58164b7eedaa..686e932d4dd8 100644 --- a/pkg/translator/jaeger/jaegerproto_to_traces_test.go +++ b/pkg/translator/jaeger/jaegerproto_to_traces_test.go @@ -44,32 +44,32 @@ var ( func TestCodeFromAttr(t *testing.T) { tests := []struct { name string - attr pdata.AttributeValue + attr pdata.Value code int64 err error }{ { name: "ok-string", - attr: pdata.NewAttributeValueString("0"), + attr: pdata.NewValueString("0"), code: 0, }, { name: "ok-int", - attr: pdata.NewAttributeValueInt(1), + attr: pdata.NewValueInt(1), code: 1, }, { name: "wrong-type", - attr: pdata.NewAttributeValueBool(true), + attr: pdata.NewValueBool(true), code: 0, err: errType, }, { name: "invalid-string", - attr: pdata.NewAttributeValueString("inf"), + attr: pdata.NewValueString("inf"), code: 0, err: strconv.ErrSyntax, }, @@ -91,35 +91,35 @@ func TestCodeFromAttr(t *testing.T) { func TestGetStatusCodeFromHTTPStatusAttr(t *testing.T) { tests := []struct { name string - attr pdata.AttributeValue + attr pdata.Value code pdata.StatusCode }{ { name: "string-unknown", - attr: pdata.NewAttributeValueString("10"), + attr: pdata.NewValueString("10"), code: pdata.StatusCodeError, }, { name: "string-ok", - attr: pdata.NewAttributeValueString("101"), + attr: pdata.NewValueString("101"), code: pdata.StatusCodeUnset, }, { name: "int-not-found", - attr: pdata.NewAttributeValueInt(404), + attr: pdata.NewValueInt(404), code: pdata.StatusCodeError, }, { name: "int-invalid-arg", - attr: pdata.NewAttributeValueInt(408), + attr: pdata.NewValueInt(408), code: pdata.StatusCodeError, }, { name: "int-internal", - attr: pdata.NewAttributeValueInt(500), + attr: pdata.NewValueInt(500), code: pdata.StatusCodeError, }, } @@ -349,69 +349,69 @@ func TestSetInternalSpanStatus(t *testing.T) { }{ { name: "No tags set -> OK status", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{}), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{}), status: emptyStatus, attrsModifiedLen: 0, }, { name: "error tag set -> Error status", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - tracetranslator.TagError: pdata.NewAttributeValueBool(true), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + tracetranslator.TagError: pdata.NewValueBool(true), }), status: errorStatus, attrsModifiedLen: 0, }, { name: "status.code is set as string", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.OtelStatusCode: pdata.NewAttributeValueString(statusOk), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.OtelStatusCode: pdata.NewValueString(statusOk), }), status: okStatus, attrsModifiedLen: 0, }, { name: "status.code, status.message and error tags are set", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - tracetranslator.TagError: pdata.NewAttributeValueBool(true), - conventions.OtelStatusCode: pdata.NewAttributeValueString(statusError), - conventions.OtelStatusDescription: pdata.NewAttributeValueString("Error: Invalid argument"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + tracetranslator.TagError: pdata.NewValueBool(true), + conventions.OtelStatusCode: pdata.NewValueString(statusError), + conventions.OtelStatusDescription: pdata.NewValueString("Error: Invalid argument"), }), status: errorStatusWithMessage, attrsModifiedLen: 0, }, { name: "http.status_code tag is set as string", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueString("404"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.AttributeHTTPStatusCode: pdata.NewValueString("404"), }), status: errorStatus, attrsModifiedLen: 1, }, { name: "http.status_code, http.status_message and error tags are set", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - tracetranslator.TagError: pdata.NewAttributeValueBool(true), - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(404), - tracetranslator.TagHTTPStatusMsg: pdata.NewAttributeValueString("HTTP 404: Not Found"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + tracetranslator.TagError: pdata.NewValueBool(true), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(404), + tracetranslator.TagHTTPStatusMsg: pdata.NewValueString("HTTP 404: Not Found"), }), status: errorStatusWith404Message, attrsModifiedLen: 2, }, { name: "status.code has precedence over http.status_code.", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - conventions.OtelStatusCode: pdata.NewAttributeValueString(statusOk), - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(500), - tracetranslator.TagHTTPStatusMsg: pdata.NewAttributeValueString("Server Error"), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + conventions.OtelStatusCode: pdata.NewValueString(statusOk), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(500), + tracetranslator.TagHTTPStatusMsg: pdata.NewValueString("Server Error"), }), status: okStatus, attrsModifiedLen: 2, }, { name: "Ignore http.status_code == 200 if error set to true.", - attrs: pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - tracetranslator.TagError: pdata.NewAttributeValueBool(true), - conventions.AttributeHTTPStatusCode: pdata.NewAttributeValueInt(200), + attrs: pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + tracetranslator.TagError: pdata.NewValueBool(true), + conventions.AttributeHTTPStatusCode: pdata.NewValueInt(200), }), status: errorStatus, attrsModifiedLen: 1, diff --git a/pkg/translator/jaeger/traces_to_jaegerproto.go b/pkg/translator/jaeger/traces_to_jaegerproto.go index 82e15f26a3b1..41935fdc1677 100644 --- a/pkg/translator/jaeger/traces_to_jaegerproto.go +++ b/pkg/translator/jaeger/traces_to_jaegerproto.go @@ -108,7 +108,7 @@ func appendTagsFromResourceAttributes(dest []model.KeyValue, attrs pdata.Attribu return dest } - attrs.Range(func(key string, attr pdata.AttributeValue) bool { + attrs.Range(func(key string, attr pdata.Value) bool { if key == conventions.AttributeServiceName { return true } @@ -122,31 +122,31 @@ func appendTagsFromAttributes(dest []model.KeyValue, attrs pdata.AttributeMap) [ if attrs.Len() == 0 { return dest } - attrs.Range(func(key string, attr pdata.AttributeValue) bool { + attrs.Range(func(key string, attr pdata.Value) bool { dest = append(dest, attributeToJaegerProtoTag(key, attr)) return true }) return dest } -func attributeToJaegerProtoTag(key string, attr pdata.AttributeValue) model.KeyValue { +func attributeToJaegerProtoTag(key string, attr pdata.Value) model.KeyValue { tag := model.KeyValue{Key: key} switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: // Jaeger-to-Internal maps binary tags to string attributes and encodes them as // base64 strings. Blindingly attempting to decode base64 seems too much. tag.VType = model.ValueType_STRING tag.VStr = attr.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: tag.VType = model.ValueType_INT64 tag.VInt64 = attr.IntVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: tag.VType = model.ValueType_BOOL tag.VBool = attr.BoolVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: tag.VType = model.ValueType_FLOAT64 tag.VFloat64 = attr.DoubleVal() - case pdata.AttributeValueTypeMap, pdata.AttributeValueTypeArray: + case pdata.ValueTypeMap, pdata.ValueTypeArray: tag.VType = model.ValueType_STRING tag.VStr = attr.AsString() } diff --git a/pkg/translator/opencensus/go.mod b/pkg/translator/opencensus/go.mod index 86155a71378e..cac875fb4fe6 100644 --- a/pkg/translator/opencensus/go.mod +++ b/pkg/translator/opencensus/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/protobuf v1.27.1 ) diff --git a/pkg/translator/opencensus/go.sum b/pkg/translator/opencensus/go.sum index 726a731bec39..4f5876e83401 100644 --- a/pkg/translator/opencensus/go.sum +++ b/pkg/translator/opencensus/go.sum @@ -85,8 +85,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/pkg/translator/opencensus/metrics_to_oc.go b/pkg/translator/opencensus/metrics_to_oc.go index c886b310cc19..c79793a77edb 100644 --- a/pkg/translator/opencensus/metrics_to_oc.go +++ b/pkg/translator/opencensus/metrics_to_oc.go @@ -160,7 +160,7 @@ func collectLabelKeysSummaryDataPoints(dhdp pdata.SummaryDataPointSlice, keySet } func addLabelKeys(keySet map[string]struct{}, attributes pdata.AttributeMap) { - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { keySet[k] = struct{}{} return true }) @@ -385,7 +385,7 @@ func exemplarToOC(filteredLabels pdata.AttributeMap, value float64, timestamp pd var labels map[string]string if filteredLabels.Len() != 0 { labels = make(map[string]string, filteredLabels.Len()) - filteredLabels.Range(func(k string, v pdata.AttributeValue) bool { + filteredLabels.Range(func(k string, v pdata.Value) bool { labels[k] = v.AsString() return true }) @@ -412,7 +412,7 @@ func attributeValuesToOC(labels pdata.AttributeMap, labelKeys *labelKeysAndType) } // Visit all defined labels in the point and override defaults with actual values - labels.Range(func(k string, v pdata.AttributeValue) bool { + labels.Range(func(k string, v pdata.Value) bool { // Find the appropriate label value that we need to update keyIndex := labelKeys.keyIndices[k] labelValue := labelValues[keyIndex] diff --git a/pkg/translator/opencensus/metrics_to_oc_test.go b/pkg/translator/opencensus/metrics_to_oc_test.go index 0b6886afb88c..07d143ab0f42 100644 --- a/pkg/translator/opencensus/metrics_to_oc_test.go +++ b/pkg/translator/opencensus/metrics_to_oc_test.go @@ -34,12 +34,12 @@ import ( func TestMetricsToOC(t *testing.T) { sampleMetricData := testdata.GeneratMetricsAllTypesWithSampleDatapoints() attrs := sampleMetricData.ResourceMetrics().At(0).Resource().Attributes() - attrs.Upsert(conventions.AttributeHostName, pdata.NewAttributeValueString("host1")) - attrs.Upsert(conventions.AttributeProcessPID, pdata.NewAttributeValueInt(123)) - attrs.Upsert(occonventions.AttributeProcessStartTime, pdata.NewAttributeValueString("2020-02-11T20:26:00Z")) - attrs.Upsert(conventions.AttributeTelemetrySDKLanguage, pdata.NewAttributeValueString("cpp")) - attrs.Upsert(conventions.AttributeTelemetrySDKVersion, pdata.NewAttributeValueString("v2.0.1")) - attrs.Upsert(occonventions.AttributeExporterVersion, pdata.NewAttributeValueString("v1.2.0")) + attrs.Upsert(conventions.AttributeHostName, pdata.NewValueString("host1")) + attrs.Upsert(conventions.AttributeProcessPID, pdata.NewValueInt(123)) + attrs.Upsert(occonventions.AttributeProcessStartTime, pdata.NewValueString("2020-02-11T20:26:00Z")) + attrs.Upsert(conventions.AttributeTelemetrySDKLanguage, pdata.NewValueString("cpp")) + attrs.Upsert(conventions.AttributeTelemetrySDKVersion, pdata.NewValueString("v2.0.1")) + attrs.Upsert(occonventions.AttributeExporterVersion, pdata.NewValueString("v1.2.0")) tests := []struct { name string diff --git a/pkg/translator/opencensus/oc_to_resource_test.go b/pkg/translator/opencensus/oc_to_resource_test.go index 037ca5858893..cd5497f4f791 100644 --- a/pkg/translator/opencensus/oc_to_resource_test.go +++ b/pkg/translator/opencensus/oc_to_resource_test.go @@ -42,13 +42,13 @@ func TestOcNodeResourceToInternal(t *testing.T) { ocResource = generateOcResource() expectedAttrs := generateResourceWithOcNodeAndResource().Attributes() // We don't have type information in ocResource, so need to make int attr string - expectedAttrs.Upsert("resource-int-attr", pdata.NewAttributeValueString("123")) + expectedAttrs.Upsert("resource-int-attr", pdata.NewValueString("123")) ocNodeResourceToInternal(ocNode, ocResource, resource) assert.EqualValues(t, expectedAttrs.Sort(), resource.Attributes().Sort()) // Make sure hard-coded fields override same-name values in Attributes. // To do that add Attributes with same-name. - expectedAttrs.Range(func(k string, v pdata.AttributeValue) bool { + expectedAttrs.Range(func(k string, v pdata.Value) bool { // Set all except "attr1" which is not a hard-coded field to some bogus values. if !strings.Contains(k, "-attr") { ocNode.Attributes[k] = "this will be overridden 1" diff --git a/pkg/translator/opencensus/oc_to_traces_test.go b/pkg/translator/opencensus/oc_to_traces_test.go index a6ff4c27928e..018859af244d 100644 --- a/pkg/translator/opencensus/oc_to_traces_test.go +++ b/pkg/translator/opencensus/oc_to_traces_test.go @@ -93,8 +93,8 @@ func TestInitAttributeMapFromOC(t *testing.T) { initAttributeMapFromOC(ocAttrs, attrs) assert.EqualValues(t, pdata.NewAttributeMapFromMap( - map[string]pdata.AttributeValue{ - "abc": pdata.NewAttributeValueString("def"), + map[string]pdata.Value{ + "abc": pdata.NewValueString("def"), }), attrs) assert.EqualValues(t, 234, ocAttrsToDroppedAttributes(ocAttrs)) @@ -111,11 +111,11 @@ func TestInitAttributeMapFromOC(t *testing.T) { attrs = pdata.NewAttributeMap() initAttributeMapFromOC(ocAttrs, attrs) - expectedAttr := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "abc": pdata.NewAttributeValueString("def"), - "intval": pdata.NewAttributeValueInt(345), - "boolval": pdata.NewAttributeValueBool(true), - "doubleval": pdata.NewAttributeValueDouble(4.5), + expectedAttr := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "abc": pdata.NewValueString("def"), + "intval": pdata.NewValueInt(345), + "boolval": pdata.NewValueBool(true), + "doubleval": pdata.NewValueDouble(4.5), }) assert.EqualValues(t, expectedAttr.Sort(), attrs.Sort()) assert.EqualValues(t, 234, ocAttrsToDroppedAttributes(ocAttrs)) @@ -398,14 +398,14 @@ func TestOcSameProcessAsParentSpanToInternal(t *testing.T) { assert.Equal(t, 1, span.Attributes().Len()) v, ok := span.Attributes().Get(occonventions.AttributeSameProcessAsParentSpan) assert.True(t, ok) - assert.EqualValues(t, pdata.AttributeValueTypeBool, v.Type()) + assert.EqualValues(t, pdata.ValueTypeBool, v.Type()) assert.False(t, v.BoolVal()) ocSameProcessAsParentSpanToInternal(wrapperspb.Bool(true), span) assert.Equal(t, 1, span.Attributes().Len()) v, ok = span.Attributes().Get(occonventions.AttributeSameProcessAsParentSpan) assert.True(t, ok) - assert.EqualValues(t, pdata.AttributeValueTypeBool, v.Type()) + assert.EqualValues(t, pdata.ValueTypeBool, v.Type()) assert.True(t, v.BoolVal()) } diff --git a/pkg/translator/opencensus/resource_to_oc.go b/pkg/translator/opencensus/resource_to_oc.go index a25400ba1ab0..0d2636cde108 100644 --- a/pkg/translator/opencensus/resource_to_oc.go +++ b/pkg/translator/opencensus/resource_to_oc.go @@ -87,7 +87,7 @@ func internalResourceToOC(resource pdata.Resource) (*occommon.Node, *ocresource. ocNode := &occommon.Node{} ocResource := &ocresource.Resource{} labels := make(map[string]string, attrs.Len()) - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { val := v.AsString() switch k { diff --git a/pkg/translator/opencensus/resource_to_oc_test.go b/pkg/translator/opencensus/resource_to_oc_test.go index 198e20a6752a..2c6100abe154 100644 --- a/pkg/translator/opencensus/resource_to_oc_test.go +++ b/pkg/translator/opencensus/resource_to_oc_test.go @@ -209,18 +209,18 @@ func TestResourceToOCAndBack(t *testing.T) { // Remove opencensus resource type from actual. This will be added during translation. actual.Attributes().Delete(occonventions.AttributeResourceType) assert.Equal(t, expected.Attributes().Len(), actual.Attributes().Len()) - expected.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + expected.Attributes().Range(func(k string, v pdata.Value) bool { a, ok := actual.Attributes().Get(k) assert.True(t, ok) switch v.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: // conventions.AttributeProcessID is special because we preserve the type for this. if k == conventions.AttributeProcessPID { assert.Equal(t, v.IntVal(), a.IntVal()) } else { assert.Equal(t, strconv.FormatInt(v.IntVal(), 10), a.StringVal()) } - case pdata.AttributeValueTypeMap, pdata.AttributeValueTypeArray: + case pdata.ValueTypeMap, pdata.ValueTypeArray: assert.Equal(t, a, a) default: assert.Equal(t, v, a) diff --git a/pkg/translator/opencensus/traces_to_oc.go b/pkg/translator/opencensus/traces_to_oc.go index 32239bc5cc54..39fde71f9fd4 100644 --- a/pkg/translator/opencensus/traces_to_oc.go +++ b/pkg/translator/opencensus/traces_to_oc.go @@ -112,38 +112,38 @@ func attributesMapToOCAttributeMap(attributes pdata.AttributeMap) map[string]*oc } ocAttributes := make(map[string]*octrace.AttributeValue, attributes.Len()) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { ocAttributes[k] = attributeValueToOC(v) return true }) return ocAttributes } -func attributeValueToOC(attr pdata.AttributeValue) *octrace.AttributeValue { +func attributeValueToOC(attr pdata.Value) *octrace.AttributeValue { a := &octrace.AttributeValue{} switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: a.Value = &octrace.AttributeValue_StringValue{ StringValue: stringToTruncatableString(attr.StringVal()), } - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: a.Value = &octrace.AttributeValue_BoolValue{ BoolValue: attr.BoolVal(), } - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: a.Value = &octrace.AttributeValue_DoubleValue{ DoubleValue: attr.DoubleVal(), } - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: a.Value = &octrace.AttributeValue_IntValue{ IntValue: attr.IntVal(), } - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: a.Value = &octrace.AttributeValue_StringValue{ StringValue: stringToTruncatableString(attr.AsString()), } - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: a.Value = &octrace.AttributeValue_StringValue{ StringValue: stringToTruncatableString(attr.AsString()), } @@ -190,7 +190,7 @@ func stringAttributeValue(val string) *octrace.AttributeValue { func attributesMapToOCSameProcessAsParentSpan(attr pdata.AttributeMap) *wrapperspb.BoolValue { val, ok := attr.Get(occonventions.AttributeSameProcessAsParentSpan) - if !ok || val.Type() != pdata.AttributeValueTypeBool { + if !ok || val.Type() != pdata.ValueTypeBool { return nil } return wrapperspb.Bool(val.BoolVal()) @@ -280,7 +280,7 @@ func eventToOC(event pdata.SpanEvent) *octrace.Span_TimeEvent { } // TODO: Find a better way to check for message_event. Maybe use the event.Name. if attrs.Len() == len(ocMessageEventAttrs) { - ocMessageEventAttrValues := map[string]pdata.AttributeValue{} + ocMessageEventAttrValues := map[string]pdata.Value{} var ocMessageEventAttrFound bool for _, attr := range ocMessageEventAttrs { akv, found := attrs.Get(attr) diff --git a/pkg/translator/opencensus/traces_to_oc_test.go b/pkg/translator/opencensus/traces_to_oc_test.go index f6e44bb38fc7..7aec670b1495 100644 --- a/pkg/translator/opencensus/traces_to_oc_test.go +++ b/pkg/translator/opencensus/traces_to_oc_test.go @@ -71,8 +71,8 @@ func TestAttributesMapToOC(t *testing.T) { } assert.EqualValues(t, ocAttrs, attributesMapToOCSpanAttributes( - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "abc": pdata.NewAttributeValueString("def"), + pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "abc": pdata.NewValueString("def"), }), 234)) @@ -87,11 +87,11 @@ func TestAttributesMapToOC(t *testing.T) { } assert.EqualValues(t, ocAttrs, attributesMapToOCSpanAttributes(pdata.NewAttributeMapFromMap( - map[string]pdata.AttributeValue{ - "abc": pdata.NewAttributeValueString("def"), - "intval": pdata.NewAttributeValueInt(345), - "boolval": pdata.NewAttributeValueBool(true), - "doubleval": pdata.NewAttributeValueDouble(4.5), + map[string]pdata.Value{ + "abc": pdata.NewValueString("def"), + "intval": pdata.NewValueInt(345), + "boolval": pdata.NewValueBool(true), + "doubleval": pdata.NewValueDouble(4.5), }), 234)) } diff --git a/pkg/translator/prometheusremotewrite/go.mod b/pkg/translator/prometheusremotewrite/go.mod index 9835c4c346bf..4bfdda7f5878 100644 --- a/pkg/translator/prometheusremotewrite/go.mod +++ b/pkg/translator/prometheusremotewrite/go.mod @@ -6,8 +6,8 @@ require ( github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/translator/prometheusremotewrite/go.sum b/pkg/translator/prometheusremotewrite/go.sum index 2581e6cee71d..a760ba4b27b9 100644 --- a/pkg/translator/prometheusremotewrite/go.sum +++ b/pkg/translator/prometheusremotewrite/go.sum @@ -1231,10 +1231,10 @@ 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/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 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= diff --git a/pkg/translator/prometheusremotewrite/helper.go b/pkg/translator/prometheusremotewrite/helper.go index 346567737350..874d6cb7aef8 100644 --- a/pkg/translator/prometheusremotewrite/helper.go +++ b/pkg/translator/prometheusremotewrite/helper.go @@ -182,7 +182,7 @@ func createAttributes(resource pdata.Resource, attributes pdata.AttributeMap, ex // Ensure attributes are sorted by key for consistent merging of keys which // collide when sanitized. attributes.Sort() - attributes.Range(func(key string, value pdata.AttributeValue) bool { + attributes.Range(func(key string, value pdata.Value) bool { if existingLabel, alreadyExists := l[sanitize(key)]; alreadyExists { existingLabel.Value = existingLabel.Value + ";" + value.AsString() l[sanitize(key)] = existingLabel @@ -387,7 +387,7 @@ func getPromExemplars(pt pdata.HistogramDataPoint) []prompb.Exemplar { } var labelsFromAttributes []prompb.Label - exemplar.FilteredAttributes().Range(func(key string, value pdata.AttributeValue) bool { + exemplar.FilteredAttributes().Range(func(key string, value pdata.Value) bool { val := value.AsString() exemplarRunes += utf8.RuneCountInString(key) + utf8.RuneCountInString(val) promLabel := prompb.Label{ diff --git a/pkg/translator/prometheusremotewrite/helper_test.go b/pkg/translator/prometheusremotewrite/helper_test.go index 523091d142c3..6359c4cf8c51 100644 --- a/pkg/translator/prometheusremotewrite/helper_test.go +++ b/pkg/translator/prometheusremotewrite/helper_test.go @@ -189,7 +189,7 @@ func Test_createLabelSet(t *testing.T) { }{ { "labels_clean", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, map[string]string{}, []string{label31, value31, label32, value32}, @@ -197,9 +197,9 @@ func Test_createLabelSet(t *testing.T) { }, { "labels_with_resource", - getResource(map[string]pdata.AttributeValue{ - "service.name": pdata.NewAttributeValueString("prometheus"), - "service.instance.id": pdata.NewAttributeValueString("127.0.0.1:8080"), + getResource(map[string]pdata.Value{ + "service.name": pdata.NewValueString("prometheus"), + "service.instance.id": pdata.NewValueString("127.0.0.1:8080"), }), lbs1, map[string]string{}, @@ -208,9 +208,9 @@ func Test_createLabelSet(t *testing.T) { }, { "labels_with_nonstring_resource", - getResource(map[string]pdata.AttributeValue{ - "service.name": pdata.NewAttributeValueInt(12345), - "service.instance.id": pdata.NewAttributeValueBool(true), + getResource(map[string]pdata.Value{ + "service.name": pdata.NewValueInt(12345), + "service.instance.id": pdata.NewValueBool(true), }), lbs1, map[string]string{}, @@ -219,7 +219,7 @@ func Test_createLabelSet(t *testing.T) { }, { "labels_duplicate_in_extras", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, map[string]string{}, []string{label11, value31}, @@ -227,7 +227,7 @@ func Test_createLabelSet(t *testing.T) { }, { "labels_dirty", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1Dirty, map[string]string{}, []string{label31 + dirty1, value31, label32, value32}, @@ -235,7 +235,7 @@ func Test_createLabelSet(t *testing.T) { }, { "no_original_case", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), pdata.NewAttributeMap(), nil, []string{label31, value31, label32, value32}, @@ -243,7 +243,7 @@ func Test_createLabelSet(t *testing.T) { }, { "empty_extra_case", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, map[string]string{}, []string{"", ""}, @@ -251,7 +251,7 @@ func Test_createLabelSet(t *testing.T) { }, { "single_left_over_case", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, map[string]string{}, []string{label31, value31, label32}, @@ -259,7 +259,7 @@ func Test_createLabelSet(t *testing.T) { }, { "valid_external_labels", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, exlbs1, []string{label31, value31, label32, value32}, @@ -267,7 +267,7 @@ func Test_createLabelSet(t *testing.T) { }, { "overwritten_external_labels", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbs1, exlbs2, []string{label31, value31, label32, value32}, @@ -275,7 +275,7 @@ func Test_createLabelSet(t *testing.T) { }, { "colliding attributes", - getResource(map[string]pdata.AttributeValue{}), + getResource(map[string]pdata.Value{}), lbsColliding, nil, []string{label31, value31, label32, value32}, diff --git a/pkg/translator/prometheusremotewrite/testutils_test.go b/pkg/translator/prometheusremotewrite/testutils_test.go index f254a522573c..54ac7c48adb3 100644 --- a/pkg/translator/prometheusremotewrite/testutils_test.go +++ b/pkg/translator/prometheusremotewrite/testutils_test.go @@ -232,7 +232,7 @@ func getHistogramDataPointWithExemplars(t *testing.T, time time.Time, value floa e := h.Exemplars().AppendEmpty() e.SetDoubleVal(value) e.SetTimestamp(pdata.NewTimestampFromTime(time)) - e.FilteredAttributes().Insert(attributeKey, pdata.NewAttributeValueString(attributeValue)) + e.FilteredAttributes().Insert(attributeKey, pdata.NewValueString(attributeValue)) if traceID != "" { var traceIDBytes [16]byte @@ -410,7 +410,7 @@ func getSummaryMetric(name string, attributes pdata.AttributeMap, ts uint64, sum } dp.SetCount(count) dp.SetSum(sum) - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { dp.Attributes().Upsert(k, v) return true }) @@ -423,7 +423,7 @@ func getSummaryMetric(name string, attributes pdata.AttributeMap, ts uint64, sum return metric } -func getResource(resources map[string]pdata.AttributeValue) pdata.Resource { +func getResource(resources map[string]pdata.Value) pdata.Resource { resource := pdata.NewResource() for k, v := range resources { diff --git a/pkg/translator/signalfx/from_metrics.go b/pkg/translator/signalfx/from_metrics.go index 397695b8688a..269dda9a7144 100644 --- a/pkg/translator/signalfx/from_metrics.go +++ b/pkg/translator/signalfx/from_metrics.go @@ -249,7 +249,7 @@ func attributesToDimensions(attributes pdata.AttributeMap, extraDims []*sfxpb.Di } dimensionsValue := make([]sfxpb.Dimension, attributes.Len()) pos := 0 - attributes.Range(func(k string, v pdata.AttributeValue) bool { + attributes.Range(func(k string, v pdata.Value) bool { dimensionsValue[pos].Key = k dimensionsValue[pos].Value = v.AsString() dimensions = append(dimensions, &dimensionsValue[pos]) diff --git a/pkg/translator/signalfx/from_metrics_test.go b/pkg/translator/signalfx/from_metrics_test.go index de4ea3aef366..dbcce4e9ba12 100644 --- a/pkg/translator/signalfx/from_metrics_test.go +++ b/pkg/translator/signalfx/from_metrics_test.go @@ -490,10 +490,10 @@ func mergeDPs(dps ...[]*sfxpb.DataPoint) []*sfxpb.DataPoint { return out } -func stringMapToAttributeMap(m map[string]string) map[string]pdata.AttributeValue { - ret := map[string]pdata.AttributeValue{} +func stringMapToAttributeMap(m map[string]string) map[string]pdata.Value { + ret := map[string]pdata.Value{} for k, v := range m { - ret[k] = pdata.NewAttributeValueString(v) + ret[k] = pdata.NewValueString(v) } return ret } diff --git a/pkg/translator/signalfx/go.mod b/pkg/translator/signalfx/go.mod index ff8fe58d82f6..0313b02650fb 100644 --- a/pkg/translator/signalfx/go.mod +++ b/pkg/translator/signalfx/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/translator/signalfx/go.sum b/pkg/translator/signalfx/go.sum index a53f6230582f..a1511d79ef10 100644 --- a/pkg/translator/signalfx/go.sum +++ b/pkg/translator/signalfx/go.sum @@ -34,8 +34,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= diff --git a/pkg/translator/zipkin/go.mod b/pkg/translator/zipkin/go.mod index 3fb854830b73..f0c37a98c1d0 100644 --- a/pkg/translator/zipkin/go.mod +++ b/pkg/translator/zipkin/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/protobuf v1.27.1 ) diff --git a/pkg/translator/zipkin/go.sum b/pkg/translator/zipkin/go.sum index 0639d5b7973a..703780751581 100644 --- a/pkg/translator/zipkin/go.sum +++ b/pkg/translator/zipkin/go.sum @@ -145,8 +145,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= 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= diff --git a/pkg/translator/zipkin/internal/zipkin/attributes.go b/pkg/translator/zipkin/internal/zipkin/attributes.go index 840d377ed25c..36b17e9f18e6 100644 --- a/pkg/translator/zipkin/internal/zipkin/attributes.go +++ b/pkg/translator/zipkin/internal/zipkin/attributes.go @@ -28,20 +28,20 @@ const ( ) var attrValDescriptions = []*attrValDescript{ - constructAttrValDescript("^$", pdata.AttributeValueTypeEmpty), - constructAttrValDescript(`^-?\d+$`, pdata.AttributeValueTypeInt), - constructAttrValDescript(`^-?\d+\.\d+$`, pdata.AttributeValueTypeDouble), - constructAttrValDescript(`^(true|false)$`, pdata.AttributeValueTypeBool), - constructAttrValDescript(`^\{"\w+":.+\}$`, pdata.AttributeValueTypeMap), - constructAttrValDescript(`^\[.*\]$`, pdata.AttributeValueTypeArray), + constructAttrValDescript("^$", pdata.ValueTypeEmpty), + constructAttrValDescript(`^-?\d+$`, pdata.ValueTypeInt), + constructAttrValDescript(`^-?\d+\.\d+$`, pdata.ValueTypeDouble), + constructAttrValDescript(`^(true|false)$`, pdata.ValueTypeBool), + constructAttrValDescript(`^\{"\w+":.+\}$`, pdata.ValueTypeMap), + constructAttrValDescript(`^\[.*\]$`, pdata.ValueTypeArray), } type attrValDescript struct { regex *regexp.Regexp - attrType pdata.AttributeValueType + attrType pdata.ValueType } -func constructAttrValDescript(regex string, attrType pdata.AttributeValueType) *attrValDescript { +func constructAttrValDescript(regex string, attrType pdata.ValueType) *attrValDescript { regexc := regexp.MustCompile(regex) return &attrValDescript{ regex: regexc, @@ -50,11 +50,11 @@ func constructAttrValDescript(regex string, attrType pdata.AttributeValueType) * } // DetermineValueType returns the native OTLP attribute type the string translates to. -func DetermineValueType(value string) pdata.AttributeValueType { +func DetermineValueType(value string) pdata.ValueType { for _, desc := range attrValDescriptions { if desc.regex.MatchString(value) { return desc.attrType } } - return pdata.AttributeValueTypeString + return pdata.ValueTypeString } diff --git a/pkg/translator/zipkin/zipkinv1/json.go b/pkg/translator/zipkin/zipkinv1/json.go index 0c6ea6832182..a6f516941d23 100644 --- a/pkg/translator/zipkin/zipkinv1/json.go +++ b/pkg/translator/zipkin/zipkinv1/json.go @@ -275,13 +275,13 @@ func parseAnnotationValue(value string, parseStringTags bool) *tracepb.Attribute if parseStringTags { switch zipkin.DetermineValueType(value) { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: iValue, _ := strconv.ParseInt(value, 10, 64) pbAttrib.Value = &tracepb.AttributeValue_IntValue{IntValue: iValue} - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: fValue, _ := strconv.ParseFloat(value, 64) pbAttrib.Value = &tracepb.AttributeValue_DoubleValue{DoubleValue: fValue} - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: bValue, _ := strconv.ParseBool(value) pbAttrib.Value = &tracepb.AttributeValue_BoolValue{BoolValue: bValue} default: diff --git a/pkg/translator/zipkin/zipkinv2/from_translator.go b/pkg/translator/zipkin/zipkinv2/from_translator.go index 3b38ec95f8d9..8d51c3042e89 100644 --- a/pkg/translator/zipkin/zipkinv2/from_translator.go +++ b/pkg/translator/zipkin/zipkinv2/from_translator.go @@ -249,7 +249,7 @@ func spanLinksToZipkinTags(links pdata.SpanLinkSlice, zTags map[string]string) e func attributeMapToStringMap(attrMap pdata.AttributeMap) map[string]string { rawMap := make(map[string]string) - attrMap.Range(func(k string, v pdata.AttributeValue) bool { + attrMap.Range(func(k string, v pdata.Value) bool { rawMap[k] = v.AsString() return true }) @@ -273,7 +273,7 @@ func resourceToZipkinEndpointServiceNameAndAttributeMap( return tracetranslator.ResourceNoServiceName, zTags } - attrs.Range(func(k string, v pdata.AttributeValue) bool { + attrs.Range(func(k string, v pdata.Value) bool { zTags[k] = v.AsString() return true }) diff --git a/pkg/translator/zipkin/zipkinv2/to_translator.go b/pkg/translator/zipkin/zipkinv2/to_translator.go index fc70aee1f6c3..38ae2136ae3c 100644 --- a/pkg/translator/zipkin/zipkinv2/to_translator.go +++ b/pkg/translator/zipkin/zipkinv2/to_translator.go @@ -345,13 +345,13 @@ func tagsToAttributeMap(tags map[string]string, dest pdata.AttributeMap, parseSt if parseStringTags { switch zipkin.DetermineValueType(val) { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: iValue, _ := strconv.ParseInt(val, 10, 64) dest.UpsertInt(key, iValue) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: fValue, _ := strconv.ParseFloat(val, 64) dest.UpsertDouble(key, fValue) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: bValue, _ := strconv.ParseBool(val) dest.UpsertBool(key, bValue) default: diff --git a/processor/attributesprocessor/attributes_log_test.go b/processor/attributesprocessor/attributes_log_test.go index 1e592a7e704f..24de4b0a9b83 100644 --- a/processor/attributesprocessor/attributes_log_test.go +++ b/processor/attributesprocessor/attributes_log_test.go @@ -34,8 +34,8 @@ import ( // Common structure for all the Tests type logTestCase struct { name string - inputAttributes map[string]pdata.AttributeValue - expectedAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value + expectedAttributes map[string]pdata.Value } // runIndividualLogTestCase is the common logic of passing trace data through a configured attributes processor. @@ -49,7 +49,7 @@ func runIndividualLogTestCase(t *testing.T, tt logTestCase, tp component.LogsPro }) } -func generateLogData(resourceName string, attrs map[string]pdata.AttributeValue) pdata.Logs { +func generateLogData(resourceName string, attrs map[string]pdata.Value) pdata.Logs { td := pdata.NewLogs() res := td.ResourceLogs().AppendEmpty() res.Resource().Attributes().InsertString("name", resourceName) @@ -125,33 +125,33 @@ func TestAttributes_FilterLogs(t *testing.T) { testCases := []logTestCase{ { name: "apply processor", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply processor with different value for exclude property", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect name for include property", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "attribute match for exclude property", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -186,38 +186,38 @@ func TestAttributes_FilterLogsByNameStrict(t *testing.T) { testCases := []logTestCase{ { name: "apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_log_name", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_log_name_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -249,38 +249,38 @@ func TestAttributes_FilterLogsByNameRegexp(t *testing.T) { testCases := []logTestCase{ { name: "apply_to_log_with_no_attrs", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_log_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_log_name", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "apply_dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_log_name_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -312,38 +312,38 @@ func TestLogAttributes_Hash(t *testing.T) { testCases := []logTestCase{ { name: "String", - inputAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("john.doe@example.com"), + inputAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("john.doe@example.com"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), + expectedAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), }, }, { name: "Int", - inputAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueInt(10), + inputAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueInt(10), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueString("71aa908aff1548c8c6cdecf63545261584738a25"), + expectedAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueString("71aa908aff1548c8c6cdecf63545261584738a25"), }, }, { name: "Double", - inputAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueString("76429edab4855b03073f9429fd5d10313c28655e"), + expectedAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueString("76429edab4855b03073f9429fd5d10313c28655e"), }, }, { name: "Bool", - inputAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), + expectedAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), }, }, } @@ -371,56 +371,56 @@ func TestLogAttributes_Convert(t *testing.T) { testCases := []logTestCase{ { name: "int to int", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(1), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(1), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(1), }, }, { name: "false to int", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(0), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(0), }, }, { name: "String to int (good)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("123"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("123"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(123), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(123), }, }, { name: "String to int (bad)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, }, { name: "String to double", - inputAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("123.6"), + inputAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("123.6"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueDouble(123.6), + expectedAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueDouble(123.6), }, }, { name: "Double to string", - inputAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueString("99.1"), + expectedAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueString("99.1"), }, }, } @@ -447,25 +447,25 @@ func BenchmarkAttributes_FilterLogsByName(b *testing.B) { testCases := []logTestCase{ { name: "apply_to_log_with_no_attrs", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_log_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, } diff --git a/processor/attributesprocessor/attributes_metric_test.go b/processor/attributesprocessor/attributes_metric_test.go index 2eb2598f3928..d982afa6cf31 100644 --- a/processor/attributesprocessor/attributes_metric_test.go +++ b/processor/attributesprocessor/attributes_metric_test.go @@ -34,8 +34,8 @@ import ( // Common structure for all the Tests type metricTestCase struct { name string - inputAttributes map[string]pdata.AttributeValue - expectedAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value + expectedAttributes map[string]pdata.Value } // runIndividualMetricTestCase is the common logic of passing metric data through a configured attributes processor. @@ -49,7 +49,7 @@ func runIndividualMetricTestCase(t *testing.T, mt metricTestCase, mp component.M }) } -func generateMetricData(resourceName string, attrs map[string]pdata.AttributeValue) pdata.Metrics { +func generateMetricData(resourceName string, attrs map[string]pdata.Value) pdata.Metrics { md := pdata.NewMetrics() res := md.ResourceMetrics().AppendEmpty() res.Resource().Attributes().InsertString("name", resourceName) @@ -189,33 +189,33 @@ func TestAttributes_FilterMetrics(t *testing.T) { testCases := []metricTestCase{ { name: "apply processor", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply processor with different value for exclude property", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect name for include property", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "attribute match for exclude property", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -249,38 +249,38 @@ func TestAttributes_FilterMetricsByNameStrict(t *testing.T) { testCases := []metricTestCase{ { name: "apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_metric_name", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_metric_name_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -312,38 +312,38 @@ func TestAttributes_FilterMetricsByNameRegexp(t *testing.T) { testCases := []metricTestCase{ { name: "apply_to_metric_with_no_attrs", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_metric_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_metric_name", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "apply_dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_metric_name_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -375,38 +375,38 @@ func TestMetricAttributes_Hash(t *testing.T) { testCases := []metricTestCase{ { name: "String", - inputAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("john.doe@example.com"), + inputAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("john.doe@example.com"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), + expectedAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), }, }, { name: "Int", - inputAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueInt(10), + inputAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueInt(10), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueString("71aa908aff1548c8c6cdecf63545261584738a25"), + expectedAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueString("71aa908aff1548c8c6cdecf63545261584738a25"), }, }, { name: "Double", - inputAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueString("76429edab4855b03073f9429fd5d10313c28655e"), + expectedAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueString("76429edab4855b03073f9429fd5d10313c28655e"), }, }, { name: "Bool", - inputAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), + expectedAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), }, }, } @@ -433,38 +433,38 @@ func TestMetricAttributes_Convert(t *testing.T) { testCases := []metricTestCase{ { name: "String to int (good)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("123"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("123"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(123), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(123), }, }, { name: "String to int (bad)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, }, { name: "String to double", - inputAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("3.141e2"), + inputAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("3.141e2"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueDouble(314.1), + expectedAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueDouble(314.1), }, }, { name: "Double to string", - inputAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueString("99.1"), + expectedAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueString("99.1"), }, }, } @@ -491,25 +491,25 @@ func BenchmarkAttributes_FilterMetricsByName(b *testing.B) { testCases := []metricTestCase{ { name: "apply_to_metric_with_no_attrs", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_metric_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, } diff --git a/processor/attributesprocessor/attributes_trace_test.go b/processor/attributesprocessor/attributes_trace_test.go index f28c8083625f..b08a1a469d4a 100644 --- a/processor/attributesprocessor/attributes_trace_test.go +++ b/processor/attributesprocessor/attributes_trace_test.go @@ -36,8 +36,8 @@ import ( type testCase struct { name string serviceName string - inputAttributes map[string]pdata.AttributeValue - expectedAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value + expectedAttributes map[string]pdata.Value } // runIndividualTestCase is the common logic of passing trace data through a configured attributes processor. @@ -51,7 +51,7 @@ func runIndividualTestCase(t *testing.T, tt testCase, tp component.TracesProcess }) } -func generateTraceData(serviceName, spanName string, attrs map[string]pdata.AttributeValue) pdata.Traces { +func generateTraceData(serviceName, spanName string, attrs map[string]pdata.Value) pdata.Traces { td := pdata.NewTraces() rs := td.ResourceSpans().AppendEmpty() if serviceName != "" { @@ -134,36 +134,36 @@ func TestAttributes_FilterSpans(t *testing.T) { { name: "apply processor", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply processor with different value for exclude property", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect name for include property", serviceName: "noname", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "attribute match for exclude property", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -198,42 +198,42 @@ func TestAttributes_FilterSpansByNameStrict(t *testing.T) { { name: "apply", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_span_name", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "dont_apply", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_span_name_with_attr", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -266,42 +266,42 @@ func TestAttributes_FilterSpansByNameRegexp(t *testing.T) { { name: "apply_to_span_with_no_attrs", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_span_with_attr", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "incorrect_span_name", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "apply_dont_apply", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, { name: "incorrect_span_name_with_attr", serviceName: "svcB", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(true), + expectedAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(true), }, }, } @@ -333,38 +333,38 @@ func TestAttributes_Hash(t *testing.T) { testCases := []testCase{ { name: "String", - inputAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("john.doe@example.com"), + inputAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("john.doe@example.com"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.email": pdata.NewAttributeValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), + expectedAttributes: map[string]pdata.Value{ + "user.email": pdata.NewValueString("73ec53c4ba1747d485ae2a0d7bfafa6cda80a5a9"), }, }, { name: "Int", - inputAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueInt(10), + inputAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueInt(10), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.id": pdata.NewAttributeValueString("71aa908aff1548c8c6cdecf63545261584738a25"), + expectedAttributes: map[string]pdata.Value{ + "user.id": pdata.NewValueString("71aa908aff1548c8c6cdecf63545261584738a25"), }, }, { name: "Double", - inputAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.balance": pdata.NewAttributeValueString("76429edab4855b03073f9429fd5d10313c28655e"), + expectedAttributes: map[string]pdata.Value{ + "user.balance": pdata.NewValueString("76429edab4855b03073f9429fd5d10313c28655e"), }, }, { name: "Bool", - inputAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "user.authenticated": pdata.NewAttributeValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), + expectedAttributes: map[string]pdata.Value{ + "user.authenticated": pdata.NewValueString("bf8b4530d8d246dd74ac53a13471bba17941dff7"), }, }, } @@ -392,83 +392,83 @@ func TestAttributes_Convert(t *testing.T) { testCases := []testCase{ { name: "int to int", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(1), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(1), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(1), }, }, { name: "true to int", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueBool(true), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(1), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(1), }, }, { name: "false to int", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(0), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(0), }, }, { name: "String to int (good)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("123"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("123"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueInt(123), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueInt(123), }, }, { name: "String to int (bad)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + inputAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.int": pdata.NewAttributeValueString("int-10"), + expectedAttributes: map[string]pdata.Value{ + "to.int": pdata.NewValueString("int-10"), }, }, { name: "String to double (int-ish)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("123"), + inputAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("123"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueDouble(123), + expectedAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueDouble(123), }, }, { name: "String to double (double-ish)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("123.6"), + inputAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("123.6"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueDouble(123.6), + expectedAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueDouble(123.6), }, }, { name: "String to double (bad)", - inputAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("int-10"), + inputAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("int-10"), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.double": pdata.NewAttributeValueString("int-10"), + expectedAttributes: map[string]pdata.Value{ + "to.double": pdata.NewValueString("int-10"), }, }, { name: "Double to string", - inputAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueDouble(99.1), + inputAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueDouble(99.1), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "to.string": pdata.NewAttributeValueString("99.1"), + expectedAttributes: map[string]pdata.Value{ + "to.string": pdata.NewValueString("99.1"), }, }, } @@ -495,25 +495,25 @@ func BenchmarkAttributes_FilterSpansByName(b *testing.B) { testCases := []testCase{ { name: "apply_to_span_with_no_attrs", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), }, }, { name: "apply_to_span_with_attr", - inputAttributes: map[string]pdata.AttributeValue{ - "NoModification": pdata.NewAttributeValueBool(false), + inputAttributes: map[string]pdata.Value{ + "NoModification": pdata.NewValueBool(false), }, - expectedAttributes: map[string]pdata.AttributeValue{ - "attribute1": pdata.NewAttributeValueInt(123), - "NoModification": pdata.NewAttributeValueBool(false), + expectedAttributes: map[string]pdata.Value{ + "attribute1": pdata.NewValueInt(123), + "NoModification": pdata.NewValueBool(false), }, }, { name: "dont_apply", - inputAttributes: map[string]pdata.AttributeValue{}, - expectedAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, + expectedAttributes: map[string]pdata.Value{}, }, } diff --git a/processor/attributesprocessor/go.mod b/processor/attributesprocessor/go.mod index 542ac82a3ab1..a983520e7af9 100644 --- a/processor/attributesprocessor/go.mod +++ b/processor/attributesprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/attributesprocessor/go.sum b/processor/attributesprocessor/go.sum index fe51425fe97e..ab6fde167e35 100644 --- a/processor/attributesprocessor/go.sum +++ b/processor/attributesprocessor/go.sum @@ -176,10 +176,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/cumulativetodeltaprocessor/go.mod b/processor/cumulativetodeltaprocessor/go.mod index beba87a4038b..5ff758042a23 100644 --- a/processor/cumulativetodeltaprocessor/go.mod +++ b/processor/cumulativetodeltaprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/cumulativetodeltaprocessor/go.sum b/processor/cumulativetodeltaprocessor/go.sum index b202df0e13a1..7e5f23e27729 100644 --- a/processor/cumulativetodeltaprocessor/go.sum +++ b/processor/cumulativetodeltaprocessor/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/cumulativetodeltaprocessor/internal/tracking/identity.go b/processor/cumulativetodeltaprocessor/internal/tracking/identity.go index 1fb038ad9009..50a00e156220 100644 --- a/processor/cumulativetodeltaprocessor/internal/tracking/identity.go +++ b/processor/cumulativetodeltaprocessor/internal/tracking/identity.go @@ -41,7 +41,7 @@ func (mi *MetricIdentity) Write(b *bytes.Buffer) { b.WriteRune(A + int32(mi.MetricDataType)) b.WriteByte(SEP) b.WriteRune(A + int32(mi.MetricValueType)) - mi.Resource.Attributes().Sort().Range(func(k string, v pdata.AttributeValue) bool { + mi.Resource.Attributes().Sort().Range(func(k string, v pdata.Value) bool { b.WriteByte(SEP) b.WriteString(k) b.WriteByte(':') @@ -65,7 +65,7 @@ func (mi *MetricIdentity) Write(b *bytes.Buffer) { b.WriteByte(SEP) b.WriteString(mi.MetricUnit) - mi.Attributes.Sort().Range(func(k string, v pdata.AttributeValue) bool { + mi.Attributes.Sort().Range(func(k string, v pdata.Value) bool { b.WriteByte(SEP) b.WriteString(k) b.WriteByte(':') diff --git a/processor/cumulativetodeltaprocessor/processor_test.go b/processor/cumulativetodeltaprocessor/processor_test.go index ebe51cf69e33..5ffe6551b12f 100644 --- a/processor/cumulativetodeltaprocessor/processor_test.go +++ b/processor/cumulativetodeltaprocessor/processor_test.go @@ -213,7 +213,7 @@ func BenchmarkConsumeMetrics(b *testing.B) { metrics := pdata.NewMetrics() rms := metrics.ResourceMetrics().AppendEmpty() r := rms.Resource() - r.Attributes().Insert("resource", pdata.NewAttributeValueBool(true)) + r.Attributes().Insert("resource", pdata.NewValueBool(true)) ilms := rms.InstrumentationLibraryMetrics().AppendEmpty() ilms.InstrumentationLibrary().SetName("test") ilms.InstrumentationLibrary().SetVersion("0.1") @@ -221,7 +221,7 @@ func BenchmarkConsumeMetrics(b *testing.B) { m.SetDataType(pdata.MetricDataTypeSum) m.Sum().SetIsMonotonic(true) dp := m.Sum().DataPoints().AppendEmpty() - dp.Attributes().Insert("tag", pdata.NewAttributeValueString("value")) + dp.Attributes().Insert("tag", pdata.NewValueString("value")) reset := func() { m.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) diff --git a/processor/deltatorateprocessor/go.mod b/processor/deltatorateprocessor/go.mod index ec40aaac5b38..8920b1fca99c 100644 --- a/processor/deltatorateprocessor/go.mod +++ b/processor/deltatorateprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/deltatorateprocessor/go.sum b/processor/deltatorateprocessor/go.sum index b202df0e13a1..7e5f23e27729 100644 --- a/processor/deltatorateprocessor/go.sum +++ b/processor/deltatorateprocessor/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/filterprocessor/expr_test.go b/processor/filterprocessor/expr_test.go index 3b0280b368bd..cea2ffc8982b 100644 --- a/processor/filterprocessor/expr_test.go +++ b/processor/filterprocessor/expr_test.go @@ -36,7 +36,7 @@ import ( const filteredMetric = "p0_metric_1" const filteredAttrKey = "pt-label-key-1" -var filteredAttrVal = pdata.NewAttributeValueString("pt-label-val-1") +var filteredAttrVal = pdata.NewValueString("pt-label-val-1") func TestExprError(t *testing.T) { testMatchError(t, pdata.MetricDataTypeGauge, pdata.MetricValueTypeInt) @@ -117,7 +117,7 @@ func testFilter(t *testing.T, mdType pdata.MetricDataType, mvType pdata.MetricVa } func assertFiltered(t *testing.T, lm pdata.AttributeMap) { - lm.Range(func(k string, v pdata.AttributeValue) bool { + lm.Range(func(k string, v pdata.Value) bool { if k == filteredAttrKey && v.Equal(filteredAttrVal) { assert.Fail(t, "found metric that should have been filtered out") return false diff --git a/processor/filterprocessor/filter_processor_logs_test.go b/processor/filterprocessor/filter_processor_logs_test.go index 685b3b0a1633..693bc489d895 100644 --- a/processor/filterprocessor/filter_processor_logs_test.go +++ b/processor/filterprocessor/filter_processor_logs_test.go @@ -38,8 +38,8 @@ type logNameTest struct { type logWithResource struct { logNames []string - resourceAttributes map[string]pdata.AttributeValue - recordAttributes map[string]pdata.AttributeValue + resourceAttributes map[string]pdata.Value + recordAttributes map[string]pdata.Value } var ( @@ -51,10 +51,10 @@ var ( inLogForResourceTest = []logWithResource{ { logNames: []string{"log1", "log2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), - "attr2": pdata.NewAttributeValueString("attr2/val2"), - "attr3": pdata.NewAttributeValueString("attr3/val3"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), + "attr2": pdata.NewValueString("attr2/val2"), + "attr3": pdata.NewValueString("attr3/val3"), }, }, } @@ -62,14 +62,14 @@ var ( inLogForTwoResource = []logWithResource{ { logNames: []string{"log1", "log2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), }, }, { logNames: []string{"log3", "log4"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val2"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val2"), }, }, } @@ -77,49 +77,49 @@ var ( inLogForTwoResourceWithRecordAttributes = []logWithResource{ { logNames: []string{"log1", "log2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), }, - recordAttributes: map[string]pdata.AttributeValue{ - "rec": pdata.NewAttributeValueString("rec/val1"), + recordAttributes: map[string]pdata.Value{ + "rec": pdata.NewValueString("rec/val1"), }, }, { logNames: []string{"log3", "log4"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val2"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val2"), }, - recordAttributes: map[string]pdata.AttributeValue{ - "rec": pdata.NewAttributeValueString("rec/val2"), + recordAttributes: map[string]pdata.Value{ + "rec": pdata.NewValueString("rec/val2"), }, }, } inLogForThreeResourceWithRecordAttributes = []logWithResource{ { logNames: []string{"log1", "log2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), }, - recordAttributes: map[string]pdata.AttributeValue{ - "rec": pdata.NewAttributeValueString("rec/val1"), + recordAttributes: map[string]pdata.Value{ + "rec": pdata.NewValueString("rec/val1"), }, }, { logNames: []string{"log3", "log4"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val2"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val2"), }, - recordAttributes: map[string]pdata.AttributeValue{ - "rec": pdata.NewAttributeValueString("rec/val2"), + recordAttributes: map[string]pdata.Value{ + "rec": pdata.NewValueString("rec/val2"), }, }, { logNames: []string{"log5"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val5"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val5"), }, - recordAttributes: map[string]pdata.AttributeValue{ - "rec": pdata.NewAttributeValueString("rec/val5"), + recordAttributes: map[string]pdata.Value{ + "rec": pdata.NewValueString("rec/val5"), }, }, } @@ -127,26 +127,26 @@ var ( inLogForFourResource = []logWithResource{ { logNames: []string{"log1"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr": pdata.NewAttributeValueString("attr/val1"), + resourceAttributes: map[string]pdata.Value{ + "attr": pdata.NewValueString("attr/val1"), }, }, { logNames: []string{"log2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr": pdata.NewAttributeValueString("attr/val2"), + resourceAttributes: map[string]pdata.Value{ + "attr": pdata.NewValueString("attr/val2"), }, }, { logNames: []string{"log3"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr": pdata.NewAttributeValueString("attr/val3"), + resourceAttributes: map[string]pdata.Value{ + "attr": pdata.NewValueString("attr/val3"), }, }, { logNames: []string{"log4"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr": pdata.NewAttributeValueString("attr/val4"), + resourceAttributes: map[string]pdata.Value{ + "attr": pdata.NewValueString("attr/val4"), }, }, } diff --git a/processor/filterprocessor/filter_processor_test.go b/processor/filterprocessor/filter_processor_test.go index babecf32646f..f3521905c000 100644 --- a/processor/filterprocessor/filter_processor_test.go +++ b/processor/filterprocessor/filter_processor_test.go @@ -43,7 +43,7 @@ type metricNameTest struct { type metricWithResource struct { metricNames []string - resourceAttributes map[string]pdata.AttributeValue + resourceAttributes map[string]pdata.Value } var ( @@ -78,10 +78,10 @@ var ( inMetricForResourceTest = []metricWithResource{ { metricNames: []string{"metric1", "metric2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), - "attr2": pdata.NewAttributeValueString("attr2/val2"), - "attr3": pdata.NewAttributeValueString("attr3/val3"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), + "attr2": pdata.NewValueString("attr2/val2"), + "attr3": pdata.NewValueString("attr3/val3"), }, }, } @@ -89,14 +89,14 @@ var ( inMetricForTwoResource = []metricWithResource{ { metricNames: []string{"metric1", "metric2"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val1"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val1"), }, }, { metricNames: []string{"metric3", "metric4"}, - resourceAttributes: map[string]pdata.AttributeValue{ - "attr1": pdata.NewAttributeValueString("attr1/val2"), + resourceAttributes: map[string]pdata.Value{ + "attr1": pdata.NewValueString("attr1/val2"), }, }, } diff --git a/processor/filterprocessor/go.mod b/processor/filterprocessor/go.mod index 126ee91f35da..bee96031e3dc 100644 --- a/processor/filterprocessor/go.mod +++ b/processor/filterprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/filterprocessor/go.sum b/processor/filterprocessor/go.sum index fe51425fe97e..ab6fde167e35 100644 --- a/processor/filterprocessor/go.sum +++ b/processor/filterprocessor/go.sum @@ -176,10 +176,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/groupbyattrsprocessor/attribute_groups.go b/processor/groupbyattrsprocessor/attribute_groups.go index f349e0f651be..11056f7e71fe 100644 --- a/processor/groupbyattrsprocessor/attribute_groups.go +++ b/processor/groupbyattrsprocessor/attribute_groups.go @@ -108,7 +108,7 @@ func newMetricsGroupedByAttrs() *metricsGroupedByAttrs { func buildReferenceAttributes(originResource pdata.Resource, requiredAttributes pdata.AttributeMap) pdata.AttributeMap { referenceAttributes := pdata.NewAttributeMap() originResource.Attributes().CopyTo(referenceAttributes) - requiredAttributes.Range(func(k string, v pdata.AttributeValue) bool { + requiredAttributes.Range(func(k string, v pdata.Value) bool { referenceAttributes.Upsert(k, v) return true }) @@ -126,7 +126,7 @@ func resourceMatches(resource pdata.Resource, referenceAttributes pdata.Attribut // Go through each attribute and check the corresponding attribute value in the tested Resource matching := true - referenceAttributes.Range(func(referenceKey string, referenceValue pdata.AttributeValue) bool { + referenceAttributes.Range(func(referenceKey string, referenceValue pdata.Value) bool { testedValue, foundKey := resource.Attributes().Get(referenceKey) if !foundKey || !referenceValue.Equal(testedValue) { // One difference is enough to consider it doesn't match, so fail early @@ -181,7 +181,7 @@ func updateResourceToMatch(newResource pdata.Resource, originResource pdata.Reso // This prioritizes required attributes over the original resource attributes, if they overlap attrs := newResource.Attributes() - requiredAttributes.Range(func(k string, v pdata.AttributeValue) bool { + requiredAttributes.Range(func(k string, v pdata.Value) bool { attrs.Upsert(k, v) return true }) diff --git a/processor/groupbyattrsprocessor/attribute_groups_test.go b/processor/groupbyattrsprocessor/attribute_groups_test.go index f482d6b2e47f..9d256b6a3e30 100644 --- a/processor/groupbyattrsprocessor/attribute_groups_test.go +++ b/processor/groupbyattrsprocessor/attribute_groups_test.go @@ -25,12 +25,12 @@ import ( func simpleResource() pdata.Resource { rs := pdata.NewResource() - rs.Attributes().Insert("somekey1", pdata.NewAttributeValueString("some-string-value")) - rs.Attributes().Insert("somekey2", pdata.NewAttributeValueInt(123)) + rs.Attributes().Insert("somekey1", pdata.NewValueString("some-string-value")) + rs.Attributes().Insert("somekey2", pdata.NewValueInt(123)) for i := 0; i < 10; i++ { k := fmt.Sprint("random-", i) v := fmt.Sprint("value-", rand.Intn(100)) - rs.Attributes().Insert(k, pdata.NewAttributeValueString(v)) + rs.Attributes().Insert(k, pdata.NewValueString(v)) } return rs } diff --git a/processor/groupbyattrsprocessor/go.mod b/processor/groupbyattrsprocessor/go.mod index 3750b8938aab..32763121d5fe 100644 --- a/processor/groupbyattrsprocessor/go.mod +++ b/processor/groupbyattrsprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/groupbyattrsprocessor/go.sum b/processor/groupbyattrsprocessor/go.sum index c3a374a6a086..b097d1c2586d 100644 --- a/processor/groupbyattrsprocessor/go.sum +++ b/processor/groupbyattrsprocessor/go.sum @@ -159,10 +159,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/groupbyattrsprocessor/processor.go b/processor/groupbyattrsprocessor/processor.go index 8df473dedf6a..409883e88763 100644 --- a/processor/groupbyattrsprocessor/processor.go +++ b/processor/groupbyattrsprocessor/processor.go @@ -173,7 +173,7 @@ func (gap *groupByAttrsProcessor) processMetrics(ctx context.Context, md pdata.M } func deleteAttributes(attrsForRemoval, targetAttrs pdata.AttributeMap) { - attrsForRemoval.Range(func(key string, _ pdata.AttributeValue) bool { + attrsForRemoval.Range(func(key string, _ pdata.Value) bool { targetAttrs.Delete(key) return true }) diff --git a/processor/groupbyattrsprocessor/processor_test.go b/processor/groupbyattrsprocessor/processor_test.go index 181e98432c98..52bde815b139 100644 --- a/processor/groupbyattrsprocessor/processor_test.go +++ b/processor/groupbyattrsprocessor/processor_test.go @@ -30,9 +30,9 @@ var ( ) func prepareAttributeMap() pdata.AttributeMap { - attributeValues := map[string]pdata.AttributeValue{ - "xx": pdata.NewAttributeValueString("aa"), - "yy": pdata.NewAttributeValueInt(11), + attributeValues := map[string]pdata.Value{ + "xx": pdata.NewValueString("aa"), + "yy": pdata.NewValueInt(11), } am := pdata.NewAttributeMap() @@ -137,7 +137,7 @@ func someComplexMetrics(withResourceAttrIndex bool, rmCount int, ilmCount int, d } func assertResourceContainsAttributes(t *testing.T, resource pdata.Resource, attributeMap pdata.AttributeMap) { - attributeMap.Range(func(k string, v pdata.AttributeValue) bool { + attributeMap.Range(func(k string, v pdata.Value) bool { rv, found := resource.Attributes().Get(k) assert.True(t, found) assert.Equal(t, v, rv) diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index 9bcb4a1d65eb..68e29db45804 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/processor/groupbytraceprocessor/go.sum b/processor/groupbytraceprocessor/go.sum index 3c8b26d86c17..fc6540d28018 100644 --- a/processor/groupbytraceprocessor/go.sum +++ b/processor/groupbytraceprocessor/go.sum @@ -154,10 +154,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index 54f78ad2863d..7e9fea554662 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 diff --git a/processor/k8sattributesprocessor/go.sum b/processor/k8sattributesprocessor/go.sum index 90588a3c5043..f9ecbd2f4311 100644 --- a/processor/k8sattributesprocessor/go.sum +++ b/processor/k8sattributesprocessor/go.sum @@ -369,10 +369,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/k8sattributesprocessor/pod_association.go b/processor/k8sattributesprocessor/pod_association.go index 8b29a7cc7f1d..0157da73457d 100644 --- a/processor/k8sattributesprocessor/pod_association.go +++ b/processor/k8sattributesprocessor/pod_association.go @@ -119,7 +119,7 @@ func getConnectionIP(ctx context.Context) kube.PodIdentifier { func stringAttributeFromMap(attrs pdata.AttributeMap, key string) string { if val, ok := attrs.Get(key); ok { - if val.Type() == pdata.AttributeValueTypeString { + if val.Type() == pdata.ValueTypeString { return val.StringVal() } } diff --git a/processor/k8sattributesprocessor/processor.go b/processor/k8sattributesprocessor/processor.go index 25f85831b2b8..25ecb047c6cf 100644 --- a/processor/k8sattributesprocessor/processor.go +++ b/processor/k8sattributesprocessor/processor.go @@ -171,11 +171,11 @@ func (kp *kubernetesprocessor) getAttributesForPodsNamespace(namespace string) m } // intFromAttribute extracts int value from an attribute stored as string or int -func intFromAttribute(val pdata.AttributeValue) (int, error) { +func intFromAttribute(val pdata.Value) (int, error) { switch val.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return int(val.IntVal()), nil - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: i, err := strconv.Atoi(val.StringVal()) if err != nil { return 0, err diff --git a/processor/k8sattributesprocessor/processor_test.go b/processor/k8sattributesprocessor/processor_test.go index baa5c459da59..14634601d3ff 100644 --- a/processor/k8sattributesprocessor/processor_test.go +++ b/processor/k8sattributesprocessor/processor_test.go @@ -1093,38 +1093,38 @@ func TestStartStop(t *testing.T) { func assertResourceHasStringAttribute(t *testing.T, r pdata.Resource, k, v string) { got, ok := r.Attributes().Get(k) require.True(t, ok, fmt.Sprintf("resource does not contain attribute %s", k)) - assert.EqualValues(t, pdata.AttributeValueTypeString, got.Type(), "attribute %s is not of type string", k) + assert.EqualValues(t, pdata.ValueTypeString, got.Type(), "attribute %s is not of type string", k) assert.EqualValues(t, v, got.StringVal(), "attribute %s is not equal to %s", k, v) } func Test_intFromAttribute(t *testing.T) { tests := []struct { name string - attrVal pdata.AttributeValue + attrVal pdata.Value wantInt int wantErr bool }{ { name: "wrong-type", - attrVal: pdata.NewAttributeValueBool(true), + attrVal: pdata.NewValueBool(true), wantInt: 0, wantErr: true, }, { name: "wrong-string-number", - attrVal: pdata.NewAttributeValueString("NaN"), + attrVal: pdata.NewValueString("NaN"), wantInt: 0, wantErr: true, }, { name: "valid-string-number", - attrVal: pdata.NewAttributeValueString("3"), + attrVal: pdata.NewValueString("3"), wantInt: 3, wantErr: false, }, { name: "valid-int-number", - attrVal: pdata.NewAttributeValueInt(1), + attrVal: pdata.NewValueInt(1), wantInt: 1, wantErr: false, }, diff --git a/processor/metricsgenerationprocessor/go.mod b/processor/metricsgenerationprocessor/go.mod index aa43690f3261..86ed518c1047 100644 --- a/processor/metricsgenerationprocessor/go.mod +++ b/processor/metricsgenerationprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/metricsgenerationprocessor/go.sum b/processor/metricsgenerationprocessor/go.sum index b202df0e13a1..7e5f23e27729 100644 --- a/processor/metricsgenerationprocessor/go.sum +++ b/processor/metricsgenerationprocessor/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/metricstransformprocessor/go.mod b/processor/metricstransformprocessor/go.mod index 3738bedabd11..1b628c2414b9 100644 --- a/processor/metricstransformprocessor/go.mod +++ b/processor/metricstransformprocessor/go.mod @@ -7,8 +7,8 @@ require ( github.com/google/go-cmp v0.5.7 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 diff --git a/processor/metricstransformprocessor/go.sum b/processor/metricstransformprocessor/go.sum index 926a2c040435..116b9836b0c9 100644 --- a/processor/metricstransformprocessor/go.sum +++ b/processor/metricstransformprocessor/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/probabilisticsamplerprocessor/go.mod b/processor/probabilisticsamplerprocessor/go.mod index a5602f35edb2..806799c0fa5b 100644 --- a/processor/probabilisticsamplerprocessor/go.mod +++ b/processor/probabilisticsamplerprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/processor/probabilisticsamplerprocessor/go.sum b/processor/probabilisticsamplerprocessor/go.sum index b0a34f6c2d3e..20be694e005d 100644 --- a/processor/probabilisticsamplerprocessor/go.sum +++ b/processor/probabilisticsamplerprocessor/go.sum @@ -159,10 +159,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/probabilisticsamplerprocessor/probabilisticsampler.go b/processor/probabilisticsamplerprocessor/probabilisticsampler.go index 40b87decf0e2..b5de78bd143d 100644 --- a/processor/probabilisticsamplerprocessor/probabilisticsampler.go +++ b/processor/probabilisticsamplerprocessor/probabilisticsampler.go @@ -124,21 +124,21 @@ func parseSpanSamplingPriority(span pdata.Span) samplingPriority { // client libraries it is also possible that the type was lost in translation // between different formats. switch samplingPriorityAttrib.Type() { - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: value := samplingPriorityAttrib.IntVal() if value == 0 { decision = doNotSampleSpan } else if value > 0 { decision = mustSampleSpan } - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: value := samplingPriorityAttrib.DoubleVal() if value == 0.0 { decision = doNotSampleSpan } else if value > 0.0 { decision = mustSampleSpan } - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: attribVal := samplingPriorityAttrib.StringVal() if value, err := strconv.ParseFloat(attribVal, 64); err == nil { if value == 0.0 { diff --git a/processor/probabilisticsamplerprocessor/probabilisticsampler_test.go b/processor/probabilisticsamplerprocessor/probabilisticsampler_test.go index b323e4f07405..57ab12bb133d 100644 --- a/processor/probabilisticsamplerprocessor/probabilisticsampler_test.go +++ b/processor/probabilisticsamplerprocessor/probabilisticsampler_test.go @@ -221,7 +221,7 @@ func Test_tracesamplerprocessor_SamplingPercentageRange_MultipleResourceSpans(t // Test_tracesamplerprocessor_SpanSamplingPriority checks if handling of "sampling.priority" is correct. func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { - singleSpanWithAttrib := func(key string, attribValue pdata.AttributeValue) pdata.Traces { + singleSpanWithAttrib := func(key string, attribValue pdata.Value) pdata.Traces { traces := pdata.NewTraces() initSpanWithAttributes(key, attribValue, traces.ResourceSpans().AppendEmpty().InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty()) return traces @@ -240,7 +240,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueInt(2)), + pdata.NewValueInt(2)), sampled: true, }, { @@ -251,7 +251,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueDouble(1)), + pdata.NewValueDouble(1)), sampled: true, }, { @@ -262,7 +262,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueString("1")), + pdata.NewValueString("1")), sampled: true, }, { @@ -273,7 +273,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueInt(0)), + pdata.NewValueInt(0)), }, { name: "must_not_sample_double", @@ -283,7 +283,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueDouble(0)), + pdata.NewValueDouble(0)), }, { name: "must_not_sample_string", @@ -293,7 +293,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "sampling.priority", - pdata.NewAttributeValueString("0")), + pdata.NewValueString("0")), }, { name: "defer_sample_expect_not_sampled", @@ -303,7 +303,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "no.sampling.priority", - pdata.NewAttributeValueInt(2)), + pdata.NewValueInt(2)), }, { name: "defer_sample_expect_sampled", @@ -313,7 +313,7 @@ func Test_tracesamplerprocessor_SpanSamplingPriority(t *testing.T) { }, td: singleSpanWithAttrib( "no.sampling.priority", - pdata.NewAttributeValueInt(2)), + pdata.NewValueInt(2)), sampled: true, }, } @@ -358,57 +358,57 @@ func Test_parseSpanSamplingPriority(t *testing.T) { }, { name: "no_sampling_priority", - span: getSpanWithAttributes("key", pdata.NewAttributeValueBool(true)), + span: getSpanWithAttributes("key", pdata.NewValueBool(true)), want: deferDecision, }, { name: "sampling_priority_int_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueInt(0)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueInt(0)), want: doNotSampleSpan, }, { name: "sampling_priority_int_gt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueInt(1)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueInt(1)), want: mustSampleSpan, }, { name: "sampling_priority_int_lt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueInt(-1)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueInt(-1)), want: deferDecision, }, { name: "sampling_priority_double_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueDouble(0)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueDouble(0)), want: doNotSampleSpan, }, { name: "sampling_priority_double_gt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueDouble(1)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueDouble(1)), want: mustSampleSpan, }, { name: "sampling_priority_double_lt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueDouble(-1)), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueDouble(-1)), want: deferDecision, }, { name: "sampling_priority_string_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueString("0.0")), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueString("0.0")), want: doNotSampleSpan, }, { name: "sampling_priority_string_gt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueString("0.5")), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueString("0.5")), want: mustSampleSpan, }, { name: "sampling_priority_string_lt_zero", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueString("-0.5")), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueString("-0.5")), want: deferDecision, }, { name: "sampling_priority_string_NaN", - span: getSpanWithAttributes("sampling.priority", pdata.NewAttributeValueString("NaN")), + span: getSpanWithAttributes("sampling.priority", pdata.NewValueString("NaN")), want: deferDecision, }, } @@ -419,15 +419,15 @@ func Test_parseSpanSamplingPriority(t *testing.T) { } } -func getSpanWithAttributes(key string, value pdata.AttributeValue) pdata.Span { +func getSpanWithAttributes(key string, value pdata.Value) pdata.Span { span := pdata.NewSpan() initSpanWithAttributes(key, value, span) return span } -func initSpanWithAttributes(key string, value pdata.AttributeValue, dest pdata.Span) { +func initSpanWithAttributes(key string, value pdata.Value, dest pdata.Span) { dest.SetName("spanName") - pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{key: value}).CopyTo(dest.Attributes()) + pdata.NewAttributeMapFromMap(map[string]pdata.Value{key: value}).CopyTo(dest.Attributes()) } // Test_hash ensures that the hash function supports different key lengths even if in @@ -469,9 +469,9 @@ func genRandomTestData(numBatches, numTracesPerBatch int, serviceName string, re span := ils.Spans().AppendEmpty() span.SetTraceID(idutils.UInt64ToTraceID(r.Uint64(), r.Uint64())) span.SetSpanID(idutils.UInt64ToSpanID(r.Uint64())) - attributes := make(map[string]pdata.AttributeValue) - attributes[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt(404) - attributes["http.status_text"] = pdata.NewAttributeValueString("Not Found") + attributes := make(map[string]pdata.Value) + attributes[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt(404) + attributes["http.status_text"] = pdata.NewValueString("Not Found") pdata.NewAttributeMapFromMap(attributes).CopyTo(span.Attributes()) } } diff --git a/processor/redactionprocessor/go.mod b/processor/redactionprocessor/go.mod index 4c2300f1b1d2..f52bb71e8f96 100644 --- a/processor/redactionprocessor/go.mod +++ b/processor/redactionprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/redactionprocessor/go.sum b/processor/redactionprocessor/go.sum index 8ad809904c03..9d24fe9479dd 100644 --- a/processor/redactionprocessor/go.sum +++ b/processor/redactionprocessor/go.sum @@ -165,10 +165,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index cd45f5093e44..ef544d566fcf 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -12,8 +12,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 k8s.io/apimachinery v0.23.4 diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index ee853ce976b7..47eec625f50d 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -871,10 +871,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go index f4471cc73afa..82209d972d02 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go @@ -147,11 +147,11 @@ func parseRegionAndAccount(taskARN string) (region string, account string) { // "init" containers which only run at startup then shutdown (as indicated by the "KnownStatus" attribute), // containers not using AWS Logs, and those without log group metadata to get the final lists of valid log data // See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html#task-metadata-endpoint-v4-response -func getValidLogData(containers []ecsutil.ContainerMetadata, self *ecsutil.ContainerMetadata, account string) [4]pdata.AttributeValue { - logGroupNames := pdata.NewAttributeValueArray() - logGroupArns := pdata.NewAttributeValueArray() - logStreamNames := pdata.NewAttributeValueArray() - logStreamArns := pdata.NewAttributeValueArray() +func getValidLogData(containers []ecsutil.ContainerMetadata, self *ecsutil.ContainerMetadata, account string) [4]pdata.Value { + logGroupNames := pdata.NewValueArray() + logGroupArns := pdata.NewValueArray() + logStreamNames := pdata.NewValueArray() + logStreamArns := pdata.NewValueArray() for _, container := range containers { logData := container.LogOptions @@ -168,7 +168,7 @@ func getValidLogData(containers []ecsutil.ContainerMetadata, self *ecsutil.Conta } } - return [4]pdata.AttributeValue{logGroupNames, logGroupArns, logStreamNames, logStreamArns} + return [4]pdata.Value{logGroupNames, logGroupArns, logStreamNames, logStreamArns} } func constructLogGroupArn(region, account, group string) string { diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go index 3dbf73d0a08f..16f9a2574adb 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go @@ -122,10 +122,10 @@ func Test_ecsDetectV4(t *testing.T) { attribVals := []string{"group", "arn:aws:logs:us-east-1:123456789123:log-group:group", "stream", "arn:aws:logs:us-east-1:123456789123:log-group:group:log-stream:stream"} for i, field := range attribFields { - ava := pdata.NewAttributeValueArray() + ava := pdata.NewValueArray() av := ava.SliceVal() avs := av.AppendEmpty() - pdata.NewAttributeValueString(attribVals[i]).CopyTo(avs) + pdata.NewValueString(attribVals[i]).CopyTo(avs) attr.Insert(field, ava) } diff --git a/processor/resourcedetectionprocessor/internal/resourcedetection.go b/processor/resourcedetectionprocessor/internal/resourcedetection.go index 3c7be02c7b4c..f6016acac67a 100644 --- a/processor/resourcedetectionprocessor/internal/resourcedetection.go +++ b/processor/resourcedetectionprocessor/internal/resourcedetection.go @@ -144,26 +144,26 @@ func (p *ResourceProvider) detectResource(ctx context.Context) { func AttributesToMap(am pdata.AttributeMap) map[string]interface{} { mp := make(map[string]interface{}, am.Len()) - am.Range(func(k string, v pdata.AttributeValue) bool { + am.Range(func(k string, v pdata.Value) bool { mp[k] = UnwrapAttribute(v) return true }) return mp } -func UnwrapAttribute(v pdata.AttributeValue) interface{} { +func UnwrapAttribute(v pdata.Value) interface{} { switch v.Type() { - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return v.BoolVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return v.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return v.DoubleVal() - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return v.StringVal() - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: return getSerializableArray(v.SliceVal()) - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: return AttributesToMap(v.MapVal()) default: return nil @@ -200,7 +200,7 @@ func MergeResource(to, from pdata.Resource, overrideTo bool) { } toAttr := to.Attributes() - from.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + from.Attributes().Range(func(k string, v pdata.Value) bool { if overrideTo { toAttr.Upsert(k, v) } else { diff --git a/processor/resourcedetectionprocessor/internal/resourcedetection_test.go b/processor/resourcedetectionprocessor/internal/resourcedetection_test.go index a0dd71084234..30b07dafe3b1 100644 --- a/processor/resourcedetectionprocessor/internal/resourcedetection_test.go +++ b/processor/resourcedetectionprocessor/internal/resourcedetection_test.go @@ -254,12 +254,12 @@ func TestAttributesToMap(t *testing.T) { attr.InsertInt("int", 5) attr.InsertDouble("double", 5.0) attr.InsertBool("bool", true) - avm := pdata.NewAttributeValueMap() + avm := pdata.NewValueMap() innerAttr := avm.MapVal() innerAttr.InsertString("inner", "val") attr.Insert("map", avm) - ava := pdata.NewAttributeValueArray() + ava := pdata.NewValueArray() arrayAttr := ava.SliceVal() arrayAttr.EnsureCapacity(2) arrayAttr.AppendEmpty().SetStringVal("inner") diff --git a/processor/resourcedetectionprocessor/internal/testutils.go b/processor/resourcedetectionprocessor/internal/testutils.go index a61ea23d93df..405849414e87 100644 --- a/processor/resourcedetectionprocessor/internal/testutils.go +++ b/processor/resourcedetectionprocessor/internal/testutils.go @@ -35,13 +35,13 @@ func fillAttributeMap(mp map[string]interface{}, attr pdata.AttributeMap) { for k, v := range mp { switch t := v.(type) { case bool: - attr.Insert(k, pdata.NewAttributeValueBool(t)) + attr.Insert(k, pdata.NewValueBool(t)) case int64: - attr.Insert(k, pdata.NewAttributeValueInt(t)) + attr.Insert(k, pdata.NewValueInt(t)) case float64: - attr.Insert(k, pdata.NewAttributeValueDouble(t)) + attr.Insert(k, pdata.NewValueDouble(t)) case string: - attr.Insert(k, pdata.NewAttributeValueString(t)) + attr.Insert(k, pdata.NewValueString(t)) } } } diff --git a/processor/resourcedetectionprocessor/resourcedetection_processor_test.go b/processor/resourcedetectionprocessor/resourcedetection_processor_test.go index 013930c308e3..850b5793638f 100644 --- a/processor/resourcedetectionprocessor/resourcedetection_processor_test.go +++ b/processor/resourcedetectionprocessor/resourcedetection_processor_test.go @@ -281,7 +281,7 @@ func oCensusResource(res pdata.Resource) *resourcepb.Resource { } mp := make(map[string]string, res.Attributes().Len()) - res.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + res.Attributes().Range(func(k string, v pdata.Value) bool { mp[k] = v.StringVal() return true }) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index f2958b351601..ae7f904a0ea7 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index b0a34f6c2d3e..20be694e005d 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -159,10 +159,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 20ffbd02a9f7..739d26e8b008 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) diff --git a/processor/routingprocessor/go.sum b/processor/routingprocessor/go.sum index a784d4f32ac0..eae2e1473d9c 100644 --- a/processor/routingprocessor/go.sum +++ b/processor/routingprocessor/go.sum @@ -330,10 +330,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/processor/spanmetricsprocessor/go.mod b/processor/spanmetricsprocessor/go.mod index c011621d1068..0999c493a3cf 100644 --- a/processor/spanmetricsprocessor/go.mod +++ b/processor/spanmetricsprocessor/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 ) diff --git a/processor/spanmetricsprocessor/go.sum b/processor/spanmetricsprocessor/go.sum index 367cc2d4ebbe..6a0b8c7e827a 100644 --- a/processor/spanmetricsprocessor/go.sum +++ b/processor/spanmetricsprocessor/go.sum @@ -386,10 +386,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/processor/spanmetricsprocessor/processor.go b/processor/spanmetricsprocessor/processor.go index 3500986d92d3..420de2b8e1ad 100644 --- a/processor/spanmetricsprocessor/processor.go +++ b/processor/spanmetricsprocessor/processor.go @@ -491,7 +491,7 @@ func buildKey(serviceName string, span pdata.Span, optionalDims []Dimension, res // // The ok flag indicates if a dimension value was fetched in order to differentiate // an empty string value from a state where no value was found. -func getDimensionValue(d Dimension, spanAttr pdata.AttributeMap, resourceAttr pdata.AttributeMap) (v pdata.AttributeValue, ok bool) { +func getDimensionValue(d Dimension, spanAttr pdata.AttributeMap, resourceAttr pdata.AttributeMap) (v pdata.Value, ok bool) { // The more specific span attribute should take precedence. if attr, exists := spanAttr.Get(d.Name); exists { return attr, true @@ -501,7 +501,7 @@ func getDimensionValue(d Dimension, spanAttr pdata.AttributeMap, resourceAttr pd } // Set the default if configured, otherwise this metric will have no value set for the dimension. if d.Default != nil { - return pdata.NewAttributeValueString(*d.Default), true + return pdata.NewValueString(*d.Default), true } return v, ok } @@ -565,7 +565,7 @@ func setLatencyExemplars(exemplarsData []exemplarData, timestamp pdata.Timestamp exemplar.SetDoubleVal(value) exemplar.SetTimestamp(timestamp) - exemplar.FilteredAttributes().Insert(traceIDKey, pdata.NewAttributeValueString(traceID.HexString())) + exemplar.FilteredAttributes().Insert(traceIDKey, pdata.NewValueString(traceID.HexString())) } es.CopyTo(exemplars) diff --git a/processor/spanmetricsprocessor/processor_test.go b/processor/spanmetricsprocessor/processor_test.go index 56898772bc28..e45a03c0de4d 100644 --- a/processor/spanmetricsprocessor/processor_test.go +++ b/processor/spanmetricsprocessor/processor_test.go @@ -472,18 +472,18 @@ func verifyConsumeMetricsInput(t testing.TB, input pdata.Metrics, expectedTempor func verifyMetricLabels(dp metricDataPoint, t testing.TB, seenMetricIDs map[metricID]bool) { mID := metricID{} - wantDimensions := map[string]pdata.AttributeValue{ - stringAttrName: pdata.NewAttributeValueString("stringAttrValue"), - intAttrName: pdata.NewAttributeValueInt(99), - doubleAttrName: pdata.NewAttributeValueDouble(99.99), - boolAttrName: pdata.NewAttributeValueBool(true), - nullAttrName: pdata.NewAttributeValueEmpty(), - arrayAttrName: pdata.NewAttributeValueArray(), - mapAttrName: pdata.NewAttributeValueMap(), - notInSpanAttrName0: pdata.NewAttributeValueString("defaultNotInSpanAttrVal"), - regionResourceAttrName: pdata.NewAttributeValueString(sampleRegion), + wantDimensions := map[string]pdata.Value{ + stringAttrName: pdata.NewValueString("stringAttrValue"), + intAttrName: pdata.NewValueInt(99), + doubleAttrName: pdata.NewValueDouble(99.99), + boolAttrName: pdata.NewValueBool(true), + nullAttrName: pdata.NewValueEmpty(), + arrayAttrName: pdata.NewValueArray(), + mapAttrName: pdata.NewValueMap(), + notInSpanAttrName0: pdata.NewValueString("defaultNotInSpanAttrVal"), + regionResourceAttrName: pdata.NewValueString(sampleRegion), } - dp.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + dp.Attributes().Range(func(k string, v pdata.Value) bool { switch k { case serviceNameKey: mID.service = v.StringVal() @@ -572,8 +572,8 @@ func initSpan(span span, s pdata.Span) { s.Attributes().InsertDouble(doubleAttrName, 99.99) s.Attributes().InsertBool(boolAttrName, true) s.Attributes().InsertNull(nullAttrName) - s.Attributes().Insert(mapAttrName, pdata.NewAttributeValueMap()) - s.Attributes().Insert(arrayAttrName, pdata.NewAttributeValueArray()) + s.Attributes().Insert(mapAttrName, pdata.NewValueMap()) + s.Attributes().Insert(arrayAttrName, pdata.NewValueArray()) s.SetTraceID(pdata.NewTraceID([16]byte{byte(42)})) } @@ -612,8 +612,8 @@ func TestBuildKeyWithDimensions(t *testing.T) { for _, tc := range []struct { name string optionalDims []Dimension - resourceAttrMap map[string]pdata.AttributeValue - spanAttrMap map[string]pdata.AttributeValue + resourceAttrMap map[string]pdata.Value + spanAttrMap map[string]pdata.Value wantKey string }{ { @@ -639,8 +639,8 @@ func TestBuildKeyWithDimensions(t *testing.T) { optionalDims: []Dimension{ {Name: "foo"}, }, - spanAttrMap: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueInt(99), + spanAttrMap: map[string]pdata.Value{ + "foo": pdata.NewValueInt(99), }, wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099", }, @@ -649,8 +649,8 @@ func TestBuildKeyWithDimensions(t *testing.T) { optionalDims: []Dimension{ {Name: "foo"}, }, - resourceAttrMap: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueInt(99), + resourceAttrMap: map[string]pdata.Value{ + "foo": pdata.NewValueInt(99), }, wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099", }, @@ -659,11 +659,11 @@ func TestBuildKeyWithDimensions(t *testing.T) { optionalDims: []Dimension{ {Name: "foo"}, }, - spanAttrMap: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueInt(100), + spanAttrMap: map[string]pdata.Value{ + "foo": pdata.NewValueInt(100), }, - resourceAttrMap: map[string]pdata.AttributeValue{ - "foo": pdata.NewAttributeValueInt(99), + resourceAttrMap: map[string]pdata.Value{ + "foo": pdata.NewValueInt(99), }, wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u0000100", }, diff --git a/processor/spanprocessor/go.mod b/processor/spanprocessor/go.mod index 008a248f6ec5..0aabdf273437 100644 --- a/processor/spanprocessor/go.mod +++ b/processor/spanprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/processor/spanprocessor/go.sum b/processor/spanprocessor/go.sum index fd255badbee2..62404f2afd56 100644 --- a/processor/spanprocessor/go.sum +++ b/processor/spanprocessor/go.sum @@ -160,10 +160,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/spanprocessor/span.go b/processor/spanprocessor/span.go index 6ffc9648d092..60a91e5c7d8a 100644 --- a/processor/spanprocessor/span.go +++ b/processor/spanprocessor/span.go @@ -142,13 +142,13 @@ func (sp *spanProcessor) processFromAttributes(span pdata.Span) { } switch attr.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: sb.WriteString(attr.StringVal()) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: sb.WriteString(strconv.FormatBool(attr.BoolVal())) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: sb.WriteString(strconv.FormatFloat(attr.DoubleVal(), 'f', -1, 64)) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: sb.WriteString(strconv.FormatInt(attr.IntVal(), 10)) default: sb.WriteString("") diff --git a/processor/spanprocessor/span_test.go b/processor/spanprocessor/span_test.go index bdfaedaa0f30..e62a8dca9414 100644 --- a/processor/spanprocessor/span_test.go +++ b/processor/spanprocessor/span_test.go @@ -50,9 +50,9 @@ func TestNewTracesProcessor(t *testing.T) { type testCase struct { serviceName string inputName string - inputAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value outputName string - outputAttributes map[string]pdata.AttributeValue + outputAttributes map[string]pdata.Value } // runIndividualTestCase is the common logic of passing trace data through a configured attributes processor. @@ -78,7 +78,7 @@ func runIndividualTestCase(t *testing.T, tt testCase, tp component.TracesProcess }) } -func generateTraceData(serviceName, inputName string, attrs map[string]pdata.AttributeValue) pdata.Traces { +func generateTraceData(serviceName, inputName string, attrs map[string]pdata.Value) pdata.Traces { td := pdata.NewTraces() rs := td.ResourceSpans().AppendEmpty() if serviceName != "" { @@ -160,48 +160,48 @@ func TestSpanProcessor_Values(t *testing.T) { }, { inputName: "empty-attributes", - inputAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, outputName: "empty-attributes", - outputAttributes: map[string]pdata.AttributeValue{}, + outputAttributes: map[string]pdata.Value{}, }, { inputName: "string-type", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }, outputName: "bob", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }, }, { inputName: "int-type", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueInt(123), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueInt(123), }, outputName: "123", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueInt(123), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueInt(123), }, }, { inputName: "double-type", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueDouble(234.129312), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueDouble(234.129312), }, outputName: "234.129312", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueDouble(234.129312), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueDouble(234.129312), }, }, { inputName: "bool-type", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueBool(true), }, outputName: "true", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueBool(true), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueBool(true), }, }, // TODO: What do we do when AttributeMap contains a nil entry? Is that possible? @@ -247,60 +247,60 @@ func TestSpanProcessor_MissingKeys(t *testing.T) { testCases := []testCase{ { inputName: "first-keys-missing", - inputAttributes: map[string]pdata.AttributeValue{ - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }, outputName: "first-keys-missing", - outputAttributes: map[string]pdata.AttributeValue{ - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + outputAttributes: map[string]pdata.Value{ + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }, }, { inputName: "middle-key-missing", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key4": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key4": pdata.NewValueBool(true), }, outputName: "middle-key-missing", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key4": pdata.NewAttributeValueBool(true), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key4": pdata.NewValueBool(true), }, }, { inputName: "last-key-missing", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), }, outputName: "last-key-missing", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), }, }, { inputName: "all-keys-exists", - inputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + inputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }, outputName: "bob::123::234.129312::true", - outputAttributes: map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + outputAttributes: map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }, }, } @@ -335,16 +335,16 @@ func TestSpanProcessor_Separator(t *testing.T) { traceData := generateTraceData( "", "ensure no separator in the rename with one key", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }) assert.NoError(t, tp.ConsumeTraces(context.Background(), traceData)) assert.Equal(t, generateTraceData( "", "bob", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }), traceData) } @@ -363,18 +363,18 @@ func TestSpanProcessor_NoSeparatorMultipleKeys(t *testing.T) { traceData := generateTraceData( "", - "ensure no separator in the rename with two keys", map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), + "ensure no separator in the rename with two keys", map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), }) assert.NoError(t, tp.ConsumeTraces(context.Background(), traceData)) assert.Equal(t, generateTraceData( "", "bob123", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), }), traceData) } @@ -394,22 +394,22 @@ func TestSpanProcessor_SeparatorMultipleKeys(t *testing.T) { traceData := generateTraceData( "", "rename with separators and multiple keys", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }) assert.NoError(t, tp.ConsumeTraces(context.Background(), traceData)) assert.Equal(t, generateTraceData( "", "bob::123::234.129312::true", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), - "key2": pdata.NewAttributeValueInt(123), - "key3": pdata.NewAttributeValueDouble(234.129312), - "key4": pdata.NewAttributeValueBool(true), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), + "key2": pdata.NewValueInt(123), + "key3": pdata.NewValueDouble(234.129312), + "key4": pdata.NewValueBool(true), }), traceData) } @@ -429,16 +429,16 @@ func TestSpanProcessor_NilName(t *testing.T) { traceData := generateTraceData( "", "", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }) assert.NoError(t, tp.ConsumeTraces(context.Background(), traceData)) assert.Equal(t, generateTraceData( "", "bob", - map[string]pdata.AttributeValue{ - "key1": pdata.NewAttributeValueString("bob"), + map[string]pdata.Value{ + "key1": pdata.NewValueString("bob"), }), traceData) } @@ -454,10 +454,10 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { rules: []string{`^\/api\/v1\/document\/(?P.*)\/update\/1$`}, testCase: testCase{ inputName: "/api/v1/document/321083210/update/1", - inputAttributes: map[string]pdata.AttributeValue{}, + inputAttributes: map[string]pdata.Value{}, outputName: "/api/v1/document/{documentId}/update/1", - outputAttributes: map[string]pdata.AttributeValue{ - "documentId": pdata.NewAttributeValueString("321083210"), + outputAttributes: map[string]pdata.Value{ + "documentId": pdata.NewValueString("321083210"), }, }, }, @@ -467,9 +467,9 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { testCase: testCase{ inputName: "/api/v1/document/321083210/update/2", outputName: "/api/{version}/document/{documentId}/update/2", - outputAttributes: map[string]pdata.AttributeValue{ - "documentId": pdata.NewAttributeValueString("321083210"), - "version": pdata.NewAttributeValueString("v1"), + outputAttributes: map[string]pdata.Value{ + "documentId": pdata.NewValueString("321083210"), + "version": pdata.NewValueString("v1"), }, }, }, @@ -480,9 +480,9 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { testCase: testCase{ inputName: "/api/v1/document/321083210/update/3", outputName: "/api/{version}/document/{documentId}/update/3", - outputAttributes: map[string]pdata.AttributeValue{ - "documentId": pdata.NewAttributeValueString("321083210"), - "version": pdata.NewAttributeValueString("v1"), + outputAttributes: map[string]pdata.Value{ + "documentId": pdata.NewValueString("321083210"), + "version": pdata.NewValueString("v1"), }, }, breakAfterMatch: false, @@ -494,8 +494,8 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { testCase: testCase{ inputName: "/api/v1/document/321083210/update/4", outputName: "/api/v1/document/{documentId}/update/4", - outputAttributes: map[string]pdata.AttributeValue{ - "documentId": pdata.NewAttributeValueString("321083210"), + outputAttributes: map[string]pdata.Value{ + "documentId": pdata.NewValueString("321083210"), }, }, breakAfterMatch: true, @@ -543,30 +543,30 @@ func TestSpanProcessor_skipSpan(t *testing.T) { serviceName: "banks", inputName: "www.test.com/code", outputName: "{operation_website}", - outputAttributes: map[string]pdata.AttributeValue{ - "operation_website": pdata.NewAttributeValueString("www.test.com/code"), + outputAttributes: map[string]pdata.Value{ + "operation_website": pdata.NewValueString("www.test.com/code"), }, }, { serviceName: "banks", inputName: "donot/", - inputAttributes: map[string]pdata.AttributeValue{ - "operation_website": pdata.NewAttributeValueString("www.test.com/code"), + inputAttributes: map[string]pdata.Value{ + "operation_website": pdata.NewValueString("www.test.com/code"), }, outputName: "{operation_website}", - outputAttributes: map[string]pdata.AttributeValue{ - "operation_website": pdata.NewAttributeValueString("donot/"), + outputAttributes: map[string]pdata.Value{ + "operation_website": pdata.NewValueString("donot/"), }, }, { serviceName: "banks", inputName: "donot/change", - inputAttributes: map[string]pdata.AttributeValue{ - "operation_website": pdata.NewAttributeValueString("www.test.com/code"), + inputAttributes: map[string]pdata.Value{ + "operation_website": pdata.NewValueString("www.test.com/code"), }, outputName: "donot/change", - outputAttributes: map[string]pdata.AttributeValue{ - "operation_website": pdata.NewAttributeValueString("www.test.com/code"), + outputAttributes: map[string]pdata.Value{ + "operation_website": pdata.NewValueString("www.test.com/code"), }, }, } @@ -595,7 +595,7 @@ func TestSpanProcessor_skipSpan(t *testing.T) { } } -func generateTraceDataSetStatus(code pdata.StatusCode, description string, attrs map[string]pdata.AttributeValue) pdata.Traces { +func generateTraceDataSetStatus(code pdata.StatusCode, description string, attrs map[string]pdata.Value) pdata.Traces { td := pdata.NewTraces() rs := td.ResourceSpans().AppendEmpty() span := rs.InstrumentationLibrarySpans().AppendEmpty().Spans().AppendEmpty() @@ -647,7 +647,7 @@ func TestSpanProcessor_setStatusCodeConditionally(t *testing.T) { require.NotNil(t, tp) testCases := []struct { - inputAttributes map[string]pdata.AttributeValue + inputAttributes map[string]pdata.Value inputStatusCode pdata.StatusCode outputStatusCode pdata.StatusCode outputStatusDescription string @@ -658,8 +658,8 @@ func TestSpanProcessor_setStatusCodeConditionally(t *testing.T) { outputStatusCode: pdata.StatusCodeOk, }, { - inputAttributes: map[string]pdata.AttributeValue{ - "http.status_code": pdata.NewAttributeValueInt(400), + inputAttributes: map[string]pdata.Value{ + "http.status_code": pdata.NewValueInt(400), }, inputStatusCode: pdata.StatusCodeOk, outputStatusCode: pdata.StatusCodeError, diff --git a/processor/tailsamplingprocessor/go.mod b/processor/tailsamplingprocessor/go.mod index 3ec373091fb8..c6c4606ca272 100644 --- a/processor/tailsamplingprocessor/go.mod +++ b/processor/tailsamplingprocessor/go.mod @@ -7,8 +7,8 @@ require ( github.com/google/uuid v1.3.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/processor/tailsamplingprocessor/go.sum b/processor/tailsamplingprocessor/go.sum index c165bc7e9652..64d3c890d31c 100644 --- a/processor/tailsamplingprocessor/go.sum +++ b/processor/tailsamplingprocessor/go.sum @@ -167,10 +167,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/tailsamplingprocessor/internal/sampling/always_sample_test.go b/processor/tailsamplingprocessor/internal/sampling/always_sample_test.go index 296ea6d1d378..b14ffdc320e1 100644 --- a/processor/tailsamplingprocessor/internal/sampling/always_sample_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/always_sample_test.go @@ -24,7 +24,7 @@ import ( func TestEvaluate_AlwaysSample(t *testing.T) { filter := NewAlwaysSample(zap.NewNop()) - decision, err := filter.Evaluate(pdata.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}), newTraceStringAttrs(map[string]pdata.AttributeValue{}, "example", "value")) + decision, err := filter.Evaluate(pdata.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}), newTraceStringAttrs(map[string]pdata.Value{}, "example", "value")) assert.Nil(t, err) assert.Equal(t, decision, Sampled) } diff --git a/processor/tailsamplingprocessor/internal/sampling/numeric_tag_filter_test.go b/processor/tailsamplingprocessor/internal/sampling/numeric_tag_filter_test.go index 1060f7d10ef2..9bb05dce0013 100644 --- a/processor/tailsamplingprocessor/internal/sampling/numeric_tag_filter_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/numeric_tag_filter_test.go @@ -26,11 +26,11 @@ import ( func TestNumericTagFilter(t *testing.T) { - var empty = map[string]pdata.AttributeValue{} + var empty = map[string]pdata.Value{} filter := NewNumericAttributeFilter(zap.NewNop(), "example", math.MinInt32, math.MaxInt32) - resAttr := map[string]pdata.AttributeValue{} - resAttr["example"] = pdata.NewAttributeValueInt(8) + resAttr := map[string]pdata.Value{} + resAttr["example"] = pdata.NewValueInt(8) cases := []struct { Desc string @@ -74,7 +74,7 @@ func TestNumericTagFilter(t *testing.T) { } } -func newTraceIntAttrs(nodeAttrs map[string]pdata.AttributeValue, spanAttrKey string, spanAttrValue int64) *TraceData { +func newTraceIntAttrs(nodeAttrs map[string]pdata.Value, spanAttrKey string, spanAttrValue int64) *TraceData { var traceBatches []pdata.Traces traces := pdata.NewTraces() rs := traces.ResourceSpans().AppendEmpty() @@ -83,8 +83,8 @@ func newTraceIntAttrs(nodeAttrs map[string]pdata.AttributeValue, spanAttrKey str span := ils.Spans().AppendEmpty() span.SetTraceID(pdata.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})) span.SetSpanID(pdata.NewSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8})) - attributes := make(map[string]pdata.AttributeValue) - attributes[spanAttrKey] = pdata.NewAttributeValueInt(spanAttrValue) + attributes := make(map[string]pdata.Value) + attributes[spanAttrKey] = pdata.NewValueInt(spanAttrValue) pdata.NewAttributeMapFromMap(attributes).CopyTo(span.Attributes()) traceBatches = append(traceBatches, traces) return &TraceData{ diff --git a/processor/tailsamplingprocessor/internal/sampling/probabilistic_test.go b/processor/tailsamplingprocessor/internal/sampling/probabilistic_test.go index 3e7c9d5d86de..217492e7441c 100644 --- a/processor/tailsamplingprocessor/internal/sampling/probabilistic_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/probabilistic_test.go @@ -78,7 +78,7 @@ func TestProbabilisticSampling(t *testing.T) { t.Run(tt.name, func(t *testing.T) { traceCount := 100_000 - var emptyAttrs = map[string]pdata.AttributeValue{} + var emptyAttrs = map[string]pdata.Value{} probabilisticSampler := NewProbabilisticSampler(zap.NewNop(), tt.hashSalt, tt.samplingPercentage) diff --git a/processor/tailsamplingprocessor/internal/sampling/rate_limiting_test.go b/processor/tailsamplingprocessor/internal/sampling/rate_limiting_test.go index 1f9b86c62ce5..ed7c9842da10 100644 --- a/processor/tailsamplingprocessor/internal/sampling/rate_limiting_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/rate_limiting_test.go @@ -23,7 +23,7 @@ import ( ) func TestRateLimiter(t *testing.T) { - var empty = map[string]pdata.AttributeValue{} + var empty = map[string]pdata.Value{} trace := newTraceStringAttrs(empty, "example", "value") traceID := pdata.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) diff --git a/processor/tailsamplingprocessor/internal/sampling/string_tag_filter_test.go b/processor/tailsamplingprocessor/internal/sampling/string_tag_filter_test.go index 84b45e2b49ad..ab1c93634123 100644 --- a/processor/tailsamplingprocessor/internal/sampling/string_tag_filter_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/string_tag_filter_test.go @@ -33,7 +33,7 @@ type TestStringAttributeCfg struct { func TestStringTagFilter(t *testing.T) { - var empty = map[string]pdata.AttributeValue{} + var empty = map[string]pdata.Value{} cases := []struct { Desc string @@ -43,19 +43,19 @@ func TestStringTagFilter(t *testing.T) { }{ { Desc: "nonmatching node attribute key", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"non_matching": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"non_matching": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize}, Decision: NotSampled, }, { Desc: "nonmatching node attribute value", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("non_matching")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("non_matching")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize}, Decision: NotSampled, }, { Desc: "matching node attribute", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize}, Decision: Sampled, }, @@ -97,7 +97,7 @@ func TestStringTagFilter(t *testing.T) { }, { Desc: "matching plain text node attribute in regex", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: true, CacheMaxSize: defaultCacheSize}, Decision: Sampled, }, @@ -109,31 +109,31 @@ func TestStringTagFilter(t *testing.T) { }, { Desc: "invert nonmatching node attribute key", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"non_matching": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"non_matching": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertSampled, }, { Desc: "invert nonmatching node attribute value", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("non_matching")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("non_matching")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertSampled, }, { Desc: "invert nonmatching node attribute list", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("non_matching")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("non_matching")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"first_value", "value", "last_value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertSampled, }, { Desc: "invert matching node attribute", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertNotSampled, }, { Desc: "invert matching node attribute list", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"first_value", "value", "last_value"}, EnabledRegexMatching: false, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertNotSampled, }, @@ -193,13 +193,13 @@ func TestStringTagFilter(t *testing.T) { }, { Desc: "invert matching plain text node attribute in regex", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"value"}, EnabledRegexMatching: true, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertNotSampled, }, { Desc: "invert matching plain text node attribute in regex list", - Trace: newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", ""), + Trace: newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", ""), filterCfg: &TestStringAttributeCfg{Key: "example", Values: []string{"first_value", "value", "last_value"}, EnabledRegexMatching: true, CacheMaxSize: defaultCacheSize, InvertMatch: true}, Decision: InvertNotSampled, }, @@ -222,7 +222,7 @@ func TestStringTagFilter(t *testing.T) { } func BenchmarkStringTagFilterEvaluatePlainText(b *testing.B) { - trace := newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("value")}, "", "") + trace := newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("value")}, "", "") filter := NewStringAttributeFilter(zap.NewNop(), "example", []string{"value"}, false, 0, false) b.ResetTimer() for i := 0; i < b.N; i++ { @@ -231,7 +231,7 @@ func BenchmarkStringTagFilterEvaluatePlainText(b *testing.B) { } func BenchmarkStringTagFilterEvaluateRegex(b *testing.B) { - trace := newTraceStringAttrs(map[string]pdata.AttributeValue{"example": pdata.NewAttributeValueString("grpc.health.v1.HealthCheck")}, "", "") + trace := newTraceStringAttrs(map[string]pdata.Value{"example": pdata.NewValueString("grpc.health.v1.HealthCheck")}, "", "") filter := NewStringAttributeFilter(zap.NewNop(), "example", []string{"v[0-9]+.HealthCheck$"}, true, 0, false) b.ResetTimer() for i := 0; i < b.N; i++ { @@ -239,7 +239,7 @@ func BenchmarkStringTagFilterEvaluateRegex(b *testing.B) { } } -func newTraceStringAttrs(nodeAttrs map[string]pdata.AttributeValue, spanAttrKey string, spanAttrValue string) *TraceData { +func newTraceStringAttrs(nodeAttrs map[string]pdata.Value, spanAttrKey string, spanAttrValue string) *TraceData { var traceBatches []pdata.Traces traces := pdata.NewTraces() rs := traces.ResourceSpans().AppendEmpty() @@ -248,8 +248,8 @@ func newTraceStringAttrs(nodeAttrs map[string]pdata.AttributeValue, spanAttrKey span := ils.Spans().AppendEmpty() span.SetTraceID(pdata.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})) span.SetSpanID(pdata.NewSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8})) - attributes := make(map[string]pdata.AttributeValue) - attributes[spanAttrKey] = pdata.NewAttributeValueString(spanAttrValue) + attributes := make(map[string]pdata.Value) + attributes[spanAttrKey] = pdata.NewValueString(spanAttrValue) pdata.NewAttributeMapFromMap(attributes).CopyTo(span.Attributes()) traceBatches = append(traceBatches, traces) return &TraceData{ diff --git a/processor/transformprocessor/go.mod b/processor/transformprocessor/go.mod index aec87449a798..f2a5a0323e98 100644 --- a/processor/transformprocessor/go.mod +++ b/processor/transformprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/alecthomas/participle/v2 v2.0.0-alpha7 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/processor/transformprocessor/go.sum b/processor/transformprocessor/go.sum index c827c943b0b8..9149d0a1f5fb 100644 --- a/processor/transformprocessor/go.sum +++ b/processor/transformprocessor/go.sum @@ -169,10 +169,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/processor/transformprocessor/internal/traces/functions.go b/processor/transformprocessor/internal/traces/functions.go index 0db13c277014..d2011ab15461 100644 --- a/processor/transformprocessor/internal/traces/functions.go +++ b/processor/transformprocessor/internal/traces/functions.go @@ -58,7 +58,7 @@ func keepKeys(target getSetter, keys []string) exprFunc { // TODO(anuraaga): Avoid copying when filtering keys https://github.com/open-telemetry/opentelemetry-collector/issues/4756 filtered := pdata.NewAttributeMap() filtered.EnsureCapacity(attrs.Len()) - attrs.Range(func(key string, val pdata.AttributeValue) bool { + attrs.Range(func(key string, val pdata.Value) bool { if _, ok := keySet[key]; ok { filtered.Insert(key, val) } diff --git a/processor/transformprocessor/internal/traces/traces.go b/processor/transformprocessor/internal/traces/traces.go index ddec019abf05..8639f7ca6323 100644 --- a/processor/transformprocessor/internal/traces/traces.go +++ b/processor/transformprocessor/internal/traces/traces.go @@ -451,19 +451,19 @@ func getAttr(attrs pdata.AttributeMap, mapKey string) interface{} { return nil } switch val.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: return val.StringVal() - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: return val.BoolVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: return val.IntVal() - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: return val.DoubleVal() - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: return val.MapVal() - case pdata.AttributeValueTypeArray: + case pdata.ValueTypeArray: return val.SliceVal() - case pdata.AttributeValueTypeBytes: + case pdata.ValueTypeBytes: return val.BytesVal() } return nil @@ -482,31 +482,31 @@ func setAttr(attrs pdata.AttributeMap, mapKey string, val interface{}) { case []byte: attrs.UpsertBytes(mapKey, v) case []string: - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() for _, str := range v { arr.SliceVal().AppendEmpty().SetStringVal(str) } attrs.Upsert(mapKey, arr) case []bool: - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() for _, b := range v { arr.SliceVal().AppendEmpty().SetBoolVal(b) } attrs.Upsert(mapKey, arr) case []int64: - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() for _, i := range v { arr.SliceVal().AppendEmpty().SetIntVal(i) } attrs.Upsert(mapKey, arr) case []float64: - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() for _, f := range v { arr.SliceVal().AppendEmpty().SetDoubleVal(f) } attrs.Upsert(mapKey, arr) case [][]byte: - arr := pdata.NewAttributeValueArray() + arr := pdata.NewValueArray() for _, b := range v { arr.SliceVal().AppendEmpty().SetBytesVal(b) } diff --git a/processor/transformprocessor/internal/traces/traces_test.go b/processor/transformprocessor/internal/traces/traces_test.go index 4db922fda269..faa36740c0d7 100644 --- a/processor/transformprocessor/internal/traces/traces_test.go +++ b/processor/transformprocessor/internal/traces/traces_test.go @@ -47,19 +47,19 @@ func Test_newPathGetSetter(t *testing.T) { newStatus := pdata.NewSpanStatus() newStatus.SetMessage("new status") - newArrStr := pdata.NewAttributeValueArray() + newArrStr := pdata.NewValueArray() newArrStr.SliceVal().AppendEmpty().SetStringVal("new") - newArrBool := pdata.NewAttributeValueArray() + newArrBool := pdata.NewValueArray() newArrBool.SliceVal().AppendEmpty().SetBoolVal(false) - newArrInt := pdata.NewAttributeValueArray() + newArrInt := pdata.NewValueArray() newArrInt.SliceVal().AppendEmpty().SetIntVal(20) - newArrFloat := pdata.NewAttributeValueArray() + newArrFloat := pdata.NewValueArray() newArrFloat.SliceVal().AppendEmpty().SetDoubleVal(2.0) - newArrBytes := pdata.NewAttributeValueArray() + newArrBytes := pdata.NewValueArray() newArrBytes.SliceVal().AppendEmpty().SetBytesVal([]byte{9, 6, 4}) tests := []struct { @@ -699,27 +699,27 @@ func createTelemetry() (pdata.Span, pdata.InstrumentationLibrary, pdata.Resource span.Attributes().UpsertDouble("double", 1.2) span.Attributes().UpsertBytes("bytes", []byte{1, 3, 2}) - arrStr := pdata.NewAttributeValueArray() + arrStr := pdata.NewValueArray() arrStr.SliceVal().AppendEmpty().SetStringVal("one") arrStr.SliceVal().AppendEmpty().SetStringVal("two") span.Attributes().Upsert("arr_str", arrStr) - arrBool := pdata.NewAttributeValueArray() + arrBool := pdata.NewValueArray() arrBool.SliceVal().AppendEmpty().SetBoolVal(true) arrBool.SliceVal().AppendEmpty().SetBoolVal(false) span.Attributes().Upsert("arr_bool", arrBool) - arrInt := pdata.NewAttributeValueArray() + arrInt := pdata.NewValueArray() arrInt.SliceVal().AppendEmpty().SetIntVal(2) arrInt.SliceVal().AppendEmpty().SetIntVal(3) span.Attributes().Upsert("arr_int", arrInt) - arrFloat := pdata.NewAttributeValueArray() + arrFloat := pdata.NewValueArray() arrFloat.SliceVal().AppendEmpty().SetDoubleVal(1.0) arrFloat.SliceVal().AppendEmpty().SetDoubleVal(2.0) span.Attributes().Upsert("arr_float", arrFloat) - arrBytes := pdata.NewAttributeValueArray() + arrBytes := pdata.NewValueArray() arrBytes.SliceVal().AppendEmpty().SetBytesVal([]byte{1, 2, 3}) arrBytes.SliceVal().AppendEmpty().SetBytesVal([]byte{2, 3, 4}) span.Attributes().Upsert("arr_bytes", arrBytes) diff --git a/receiver/apachereceiver/go.mod b/receiver/apachereceiver/go.mod index 5153e295e9f1..1a5e0fb8fb54 100644 --- a/receiver/apachereceiver/go.mod +++ b/receiver/apachereceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/apachereceiver/go.sum b/receiver/apachereceiver/go.sum index 7fa966faf394..3129d823038f 100644 --- a/receiver/apachereceiver/go.sum +++ b/receiver/apachereceiver/go.sum @@ -674,10 +674,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/apachereceiver/internal/metadata/generated_metrics_v2.go b/receiver/apachereceiver/internal/metadata/generated_metrics_v2.go index 4dacfa4066d6..6d0d2a8acb9d 100644 --- a/receiver/apachereceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/apachereceiver/internal/metadata/generated_metrics_v2.go @@ -71,7 +71,7 @@ func (m *metricApacheCurrentConnections) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -124,7 +124,7 @@ func (m *metricApacheRequests) recordDataPoint(start pdata.Timestamp, ts pdata.T dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -177,8 +177,8 @@ func (m *metricApacheScoreboard) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) - dp.Attributes().Insert(A.ScoreboardState, pdata.NewAttributeValueString(scoreboardStateAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.ScoreboardState, pdata.NewValueString(scoreboardStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -231,7 +231,7 @@ func (m *metricApacheTraffic) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -284,7 +284,7 @@ func (m *metricApacheUptime) recordDataPoint(start pdata.Timestamp, ts pdata.Tim dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -337,8 +337,8 @@ func (m *metricApacheWorkers) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ServerName, pdata.NewAttributeValueString(serverNameAttributeValue)) - dp.Attributes().Insert(A.WorkersState, pdata.NewAttributeValueString(workersStateAttributeValue)) + dp.Attributes().Insert(A.ServerName, pdata.NewValueString(serverNameAttributeValue)) + dp.Attributes().Insert(A.WorkersState, pdata.NewValueString(workersStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index 70ffcf7ea774..16d9578d1e0a 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -13,8 +13,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.47.0 github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index 08df4b7b73b4..7b815f562706 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -861,10 +861,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/awsecscontainermetricsreceiver/go.mod b/receiver/awsecscontainermetricsreceiver/go.mod index 268cf137a49a..d40dd0426cdd 100644 --- a/receiver/awsecscontainermetricsreceiver/go.mod +++ b/receiver/awsecscontainermetricsreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/awsecscontainermetricsreceiver/go.sum b/receiver/awsecscontainermetricsreceiver/go.sum index ab831ecc5de1..4c6de7f7c423 100644 --- a/receiver/awsecscontainermetricsreceiver/go.sum +++ b/receiver/awsecscontainermetricsreceiver/go.sum @@ -174,10 +174,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/accumulator.go b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/accumulator.go index c94af7519ea0..6ef91eadd65b 100644 --- a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/accumulator.go +++ b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/accumulator.go @@ -38,7 +38,7 @@ func (acc *metricDataAccumulator) getMetricsData(containerStatsMap map[string]*C for _, containerMetadata := range metadata.Containers { containerResource := containerResource(containerMetadata, logger) - taskResource.Attributes().Range(func(k string, av pdata.AttributeValue) bool { + taskResource.Attributes().Range(func(k string, av pdata.Value) bool { containerResource.Attributes().Upsert(k, av) return true }) diff --git a/receiver/awsfirehosereceiver/go.mod b/receiver/awsfirehosereceiver/go.mod index 2a5cd1733465..14325db4059b 100644 --- a/receiver/awsfirehosereceiver/go.mod +++ b/receiver/awsfirehosereceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/awsfirehosereceiver/go.sum b/receiver/awsfirehosereceiver/go.sum index f53c3ad31e39..15c6c7a62960 100644 --- a/receiver/awsfirehosereceiver/go.sum +++ b/receiver/awsfirehosereceiver/go.sum @@ -181,10 +181,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/awsxrayreceiver/go.mod b/receiver/awsxrayreceiver/go.mod index 7c67a42d2f2b..50f6e84127cb 100644 --- a/receiver/awsxrayreceiver/go.mod +++ b/receiver/awsxrayreceiver/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/awsxrayreceiver/go.sum b/receiver/awsxrayreceiver/go.sum index 096682a4b6dc..aafbc830f0c0 100644 --- a/receiver/awsxrayreceiver/go.sum +++ b/receiver/awsxrayreceiver/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/awsxrayreceiver/internal/translator/annotations_test.go b/receiver/awsxrayreceiver/internal/translator/annotations_test.go index ef0d26c3c211..aa3bb65a262d 100644 --- a/receiver/awsxrayreceiver/internal/translator/annotations_test.go +++ b/receiver/awsxrayreceiver/internal/translator/annotations_test.go @@ -35,13 +35,13 @@ func TestAddAnnotations(t *testing.T) { addAnnotations(input, &attrMap) expectedAttrMap := pdata.NewAttributeMapFromMap( - map[string]pdata.AttributeValue{ - "int": pdata.NewAttributeValueInt(int64(0)), - "int32": pdata.NewAttributeValueInt(int64(1)), - "int64": pdata.NewAttributeValueInt(int64(2)), - "bool": pdata.NewAttributeValueBool(false), - "float32": pdata.NewAttributeValueDouble(4.5), - "float64": pdata.NewAttributeValueDouble(5.5), + map[string]pdata.Value{ + "int": pdata.NewValueInt(int64(0)), + "int32": pdata.NewValueInt(int64(1)), + "int64": pdata.NewValueInt(int64(2)), + "bool": pdata.NewValueBool(false), + "float32": pdata.NewValueDouble(4.5), + "float64": pdata.NewValueDouble(5.5), }, ) assert.Equal(t, expectedAttrMap.Sort(), attrMap.Sort(), "attribute maps differ") diff --git a/receiver/awsxrayreceiver/internal/translator/translator_test.go b/receiver/awsxrayreceiver/internal/translator/translator_test.go index 5b62a802c22a..c627ea69e4dc 100644 --- a/receiver/awsxrayreceiver/internal/translator/translator_test.go +++ b/receiver/awsxrayreceiver/internal/translator/translator_test.go @@ -39,7 +39,7 @@ type perSpanProperties struct { spanKind pdata.SpanKind spanStatus spanSt eventsProps []eventProps - attrs map[string]pdata.AttributeValue + attrs map[string]pdata.Value } type spanSt struct { @@ -49,23 +49,23 @@ type spanSt struct { type eventProps struct { name string - attrs map[string]pdata.AttributeValue + attrs map[string]pdata.Value } func TestTranslation(t *testing.T) { - var defaultServerSpanAttrs = func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeHTTPMethod] = pdata.NewAttributeValueString( + var defaultServerSpanAttrs = func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeHTTPMethod] = pdata.NewValueString( *seg.HTTP.Request.Method) - attrs[conventions.AttributeHTTPClientIP] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHTTPClientIP] = pdata.NewValueString( *seg.HTTP.Request.ClientIP) - attrs[conventions.AttributeHTTPUserAgent] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHTTPUserAgent] = pdata.NewValueString( *seg.HTTP.Request.UserAgent) - attrs[awsxray.AWSXRayXForwardedForAttribute] = pdata.NewAttributeValueBool( + attrs[awsxray.AWSXRayXForwardedForAttribute] = pdata.NewValueBool( *seg.HTTP.Request.XForwardedFor) - attrs[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt( + attrs[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt( *seg.HTTP.Response.Status) - attrs[conventions.AttributeHTTPURL] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHTTPURL] = pdata.NewValueString( *seg.HTTP.Request.URL) return attrs @@ -75,7 +75,7 @@ func TestTranslation(t *testing.T) { testCase string expectedUnmarshallFailure bool samplePath string - expectedResourceAttrs func(seg *awsxray.Segment) map[string]pdata.AttributeValue + expectedResourceAttrs func(seg *awsxray.Segment) map[string]pdata.Value propsPerSpan func(testCase string, t *testing.T, seg *awsxray.Segment) []perSpanProperties verification func(testCase string, actualSeg *awsxray.Segment, @@ -86,19 +86,19 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateInstrumentedServerSegment", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "serverSample.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString(conventions.AttributeCloudProviderAWS) - attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewAttributeValueString( + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString(conventions.AttributeCloudProviderAWS) + attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewValueString( *seg.AWS.XRay.SDKVersion) - attrs[conventions.AttributeTelemetrySDKName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeTelemetrySDKName] = pdata.NewValueString( *seg.AWS.XRay.SDK) - attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewAttributeValueString("Go") - attrs[conventions.AttributeK8SClusterName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewValueString("Go") + attrs[conventions.AttributeK8SClusterName] = pdata.NewValueString( *seg.AWS.EKS.ClusterName) - attrs[conventions.AttributeK8SPodName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeK8SPodName] = pdata.NewValueString( *seg.AWS.EKS.Pod) - attrs[conventions.AttributeContainerID] = pdata.NewAttributeValueString( + attrs[conventions.AttributeContainerID] = pdata.NewValueString( *seg.AWS.EKS.ContainerID) return attrs }, @@ -132,20 +132,20 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateInstrumentedClientSegment", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "ddbSample.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString(conventions.AttributeCloudProviderAWS) - attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewAttributeValueString( + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString(conventions.AttributeCloudProviderAWS) + attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewValueString( *seg.AWS.XRay.SDKVersion) - attrs[conventions.AttributeTelemetrySDKName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeTelemetrySDKName] = pdata.NewValueString( *seg.AWS.XRay.SDK) - attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewAttributeValueString("java") + attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewValueString("java") return attrs }, propsPerSpan: func(testCase string, t *testing.T, seg *awsxray.Segment) []perSpanProperties { - rootSpanAttrs := make(map[string]pdata.AttributeValue) - rootSpanAttrs[conventions.AttributeEnduserID] = pdata.NewAttributeValueString(*seg.User) + rootSpanAttrs := make(map[string]pdata.Value) + rootSpanAttrs[conventions.AttributeEnduserID] = pdata.NewValueString(*seg.User) rootSpanEvts := initExceptionEvents(seg) assert.Len(t, rootSpanEvts, 1, testCase+": rootSpanEvts has incorrect size") rootSpan := perSpanProperties{ @@ -164,15 +164,15 @@ func TestTranslation(t *testing.T) { // this is the subsegment with ID that starts with 7df6 subseg7df6 := seg.Subsegments[0] - childSpan7df6Attrs := make(map[string]pdata.AttributeValue) + childSpan7df6Attrs := make(map[string]pdata.Value) for k, v := range subseg7df6.Annotations { - childSpan7df6Attrs[k] = pdata.NewAttributeValueString( + childSpan7df6Attrs[k] = pdata.NewValueString( v.(string)) } for k, v := range subseg7df6.Metadata { m, err := json.Marshal(v) assert.NoError(t, err, "metadata marshaling failed") - childSpan7df6Attrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewAttributeValueString( + childSpan7df6Attrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewValueString( string(m)) } assert.Len(t, childSpan7df6Attrs, 2, testCase+": childSpan7df6Attrs has incorrect size") @@ -194,23 +194,23 @@ func TestTranslation(t *testing.T) { } subseg7318 := seg.Subsegments[0].Subsegments[0] - childSpan7318Attrs := make(map[string]pdata.AttributeValue) - childSpan7318Attrs[awsxray.AWSServiceAttribute] = pdata.NewAttributeValueString( + childSpan7318Attrs := make(map[string]pdata.Value) + childSpan7318Attrs[awsxray.AWSServiceAttribute] = pdata.NewValueString( *subseg7318.Name) - childSpan7318Attrs[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt( + childSpan7318Attrs[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt( *subseg7318.HTTP.Response.Status) contentLength := subseg7318.HTTP.Response.ContentLength.(float64) - childSpan7318Attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewAttributeValueInt(int64(contentLength)) - childSpan7318Attrs[awsxray.AWSOperationAttribute] = pdata.NewAttributeValueString( + childSpan7318Attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewValueInt(int64(contentLength)) + childSpan7318Attrs[awsxray.AWSOperationAttribute] = pdata.NewValueString( *subseg7318.AWS.Operation) - childSpan7318Attrs[awsxray.AWSRegionAttribute] = pdata.NewAttributeValueString( + childSpan7318Attrs[awsxray.AWSRegionAttribute] = pdata.NewValueString( *subseg7318.AWS.RemoteRegion) - childSpan7318Attrs[awsxray.AWSRequestIDAttribute] = pdata.NewAttributeValueString( + childSpan7318Attrs[awsxray.AWSRequestIDAttribute] = pdata.NewValueString( *subseg7318.AWS.RequestID) - childSpan7318Attrs[awsxray.AWSTableNameAttribute] = pdata.NewAttributeValueString( + childSpan7318Attrs[awsxray.AWSTableNameAttribute] = pdata.NewValueString( *subseg7318.AWS.TableName) - childSpan7318Attrs[awsxray.AWSXrayRetriesAttribute] = pdata.NewAttributeValueInt( + childSpan7318Attrs[awsxray.AWSXrayRetriesAttribute] = pdata.NewValueInt( *subseg7318.AWS.Retries) childSpan7318 := perSpanProperties{ @@ -261,11 +261,11 @@ func TestTranslation(t *testing.T) { } subseg417b := seg.Subsegments[0].Subsegments[0].Subsegments[1].Subsegments[0] - childSpan417bAttrs := make(map[string]pdata.AttributeValue) + childSpan417bAttrs := make(map[string]pdata.Value) for k, v := range subseg417b.Metadata { m, err := json.Marshal(v) assert.NoError(t, err, "metadata marshaling failed") - childSpan417bAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewAttributeValueString( + childSpan417bAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewValueString( string(m)) } childSpan417b := perSpanProperties{ @@ -284,11 +284,11 @@ func TestTranslation(t *testing.T) { } subseg0cab := seg.Subsegments[0].Subsegments[0].Subsegments[1].Subsegments[0].Subsegments[0] - childSpan0cabAttrs := make(map[string]pdata.AttributeValue) + childSpan0cabAttrs := make(map[string]pdata.Value) for k, v := range subseg0cab.Metadata { m, err := json.Marshal(v) assert.NoError(t, err, "metadata marshaling failed") - childSpan0cabAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewAttributeValueString( + childSpan0cabAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewValueString( string(m)) } childSpan0cab := perSpanProperties{ @@ -307,11 +307,11 @@ func TestTranslation(t *testing.T) { } subsegF8db := seg.Subsegments[0].Subsegments[0].Subsegments[1].Subsegments[0].Subsegments[1] - childSpanF8dbAttrs := make(map[string]pdata.AttributeValue) + childSpanF8dbAttrs := make(map[string]pdata.Value) for k, v := range subsegF8db.Metadata { m, err := json.Marshal(v) assert.NoError(t, err, "metadata marshaling failed") - childSpanF8dbAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewAttributeValueString( + childSpanF8dbAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewValueString( string(m)) } childSpanF8db := perSpanProperties{ @@ -330,11 +330,11 @@ func TestTranslation(t *testing.T) { } subsegE2de := seg.Subsegments[0].Subsegments[0].Subsegments[1].Subsegments[0].Subsegments[2] - childSpanE2deAttrs := make(map[string]pdata.AttributeValue) + childSpanE2deAttrs := make(map[string]pdata.Value) for k, v := range subsegE2de.Metadata { m, err := json.Marshal(v) assert.NoError(t, err, "metadata marshaling failed") - childSpanE2deAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewAttributeValueString( + childSpanE2deAttrs[awsxray.AWSXraySegmentMetadataAttributePrefix+k] = pdata.NewValueString( string(m)) } childSpanE2de := perSpanProperties{ @@ -401,22 +401,22 @@ func TestTranslation(t *testing.T) { } subseg7163 := seg.Subsegments[0].Subsegments[1] - childSpan7163Attrs := make(map[string]pdata.AttributeValue) - childSpan7163Attrs[awsxray.AWSServiceAttribute] = pdata.NewAttributeValueString( + childSpan7163Attrs := make(map[string]pdata.Value) + childSpan7163Attrs[awsxray.AWSServiceAttribute] = pdata.NewValueString( *subseg7163.Name) - childSpan7163Attrs[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt( + childSpan7163Attrs[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt( *subseg7163.HTTP.Response.Status) contentLength = subseg7163.HTTP.Response.ContentLength.(float64) - childSpan7163Attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewAttributeValueInt(int64(contentLength)) - childSpan7163Attrs[awsxray.AWSOperationAttribute] = pdata.NewAttributeValueString( + childSpan7163Attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewValueInt(int64(contentLength)) + childSpan7163Attrs[awsxray.AWSOperationAttribute] = pdata.NewValueString( *subseg7163.AWS.Operation) - childSpan7163Attrs[awsxray.AWSRegionAttribute] = pdata.NewAttributeValueString( + childSpan7163Attrs[awsxray.AWSRegionAttribute] = pdata.NewValueString( *subseg7163.AWS.RemoteRegion) - childSpan7163Attrs[awsxray.AWSRequestIDAttribute] = pdata.NewAttributeValueString( + childSpan7163Attrs[awsxray.AWSRequestIDAttribute] = pdata.NewValueString( *subseg7163.AWS.RequestID) - childSpan7163Attrs[awsxray.AWSTableNameAttribute] = pdata.NewAttributeValueString( + childSpan7163Attrs[awsxray.AWSTableNameAttribute] = pdata.NewValueString( *subseg7163.AWS.TableName) - childSpan7163Attrs[awsxray.AWSXrayRetriesAttribute] = pdata.NewAttributeValueInt( + childSpan7163Attrs[awsxray.AWSXrayRetriesAttribute] = pdata.NewValueInt( *subseg7163.AWS.Retries) childSpan7163Evts := initExceptionEvents(&subseg7163) @@ -554,9 +554,9 @@ func TestTranslation(t *testing.T) { { testCase: "[aws] TranslateMissingAWSFieldSegment", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "awsMissingAwsField.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString("unknown") + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString("unknown") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -589,41 +589,41 @@ func TestTranslation(t *testing.T) { { testCase: "[aws] TranslateEC2AWSFieldsSegment", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "awsValidAwsFields.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString(conventions.AttributeCloudProviderAWS) - attrs[conventions.AttributeCloudAccountID] = pdata.NewAttributeValueString( + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString(conventions.AttributeCloudProviderAWS) + attrs[conventions.AttributeCloudAccountID] = pdata.NewValueString( *seg.AWS.AccountID) - attrs[conventions.AttributeCloudAvailabilityZone] = pdata.NewAttributeValueString( + attrs[conventions.AttributeCloudAvailabilityZone] = pdata.NewValueString( *seg.AWS.EC2.AvailabilityZone) - attrs[conventions.AttributeHostID] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHostID] = pdata.NewValueString( *seg.AWS.EC2.InstanceID) - attrs[conventions.AttributeHostType] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHostType] = pdata.NewValueString( *seg.AWS.EC2.InstanceSize) - attrs[conventions.AttributeHostImageID] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHostImageID] = pdata.NewValueString( *seg.AWS.EC2.AmiID) - attrs[conventions.AttributeContainerName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeContainerName] = pdata.NewValueString( *seg.AWS.ECS.ContainerName) - attrs[conventions.AttributeContainerID] = pdata.NewAttributeValueString( + attrs[conventions.AttributeContainerID] = pdata.NewValueString( *seg.AWS.ECS.ContainerID) - attrs[conventions.AttributeCloudAvailabilityZone] = pdata.NewAttributeValueString( + attrs[conventions.AttributeCloudAvailabilityZone] = pdata.NewValueString( *seg.AWS.ECS.AvailabilityZone) - attrs[conventions.AttributeServiceNamespace] = pdata.NewAttributeValueString( + attrs[conventions.AttributeServiceNamespace] = pdata.NewValueString( *seg.AWS.Beanstalk.Environment) - attrs[conventions.AttributeServiceInstanceID] = pdata.NewAttributeValueString( + attrs[conventions.AttributeServiceInstanceID] = pdata.NewValueString( "32") - attrs[conventions.AttributeServiceVersion] = pdata.NewAttributeValueString( + attrs[conventions.AttributeServiceVersion] = pdata.NewValueString( *seg.AWS.Beanstalk.VersionLabel) - attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewAttributeValueString( + attrs[conventions.AttributeTelemetrySDKVersion] = pdata.NewValueString( *seg.AWS.XRay.SDKVersion) - attrs[conventions.AttributeTelemetrySDKName] = pdata.NewAttributeValueString( + attrs[conventions.AttributeTelemetrySDKName] = pdata.NewValueString( *seg.AWS.XRay.SDK) - attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewAttributeValueString("Go") + attrs[conventions.AttributeTelemetrySDKLanguage] = pdata.NewValueString("Go") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { attrs := defaultServerSpanAttrs(seg) - attrs[awsxray.AWSAccountAttribute] = pdata.NewAttributeValueString( + attrs[awsxray.AWSAccountAttribute] = pdata.NewValueString( *seg.AWS.AccountID) res := perSpanProperties{ traceID: *seg.TraceID, @@ -653,9 +653,9 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateCauseIsExceptionId", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "minCauseIsExceptionId.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString("unknown") + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString("unknown") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -688,7 +688,7 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateInvalidNamespace", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "invalidNamespace.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { return nil }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -706,22 +706,22 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateIndepSubsegment", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "indepSubsegment.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString("unknown") + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString("unknown") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeHTTPMethod] = pdata.NewAttributeValueString( + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeHTTPMethod] = pdata.NewValueString( *seg.HTTP.Request.Method) - attrs[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt( + attrs[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt( *seg.HTTP.Response.Status) - attrs[conventions.AttributeHTTPURL] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHTTPURL] = pdata.NewValueString( *seg.HTTP.Request.URL) contentLength := seg.HTTP.Response.ContentLength.(float64) - attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewAttributeValueInt(int64(contentLength)) - attrs[awsxray.AWSXRayTracedAttribute] = pdata.NewAttributeValueBool(true) + attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewValueInt(int64(contentLength)) + attrs[awsxray.AWSXRayTracedAttribute] = pdata.NewValueBool(true) res := perSpanProperties{ traceID: *seg.TraceID, spanID: *seg.ID, @@ -751,24 +751,24 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateIndepSubsegmentForContentLengthString", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "indepSubsegmentWithContentLengthString.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString("unknown") + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString("unknown") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeHTTPMethod] = pdata.NewAttributeValueString( + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeHTTPMethod] = pdata.NewValueString( *seg.HTTP.Request.Method) - attrs[conventions.AttributeHTTPStatusCode] = pdata.NewAttributeValueInt( + attrs[conventions.AttributeHTTPStatusCode] = pdata.NewValueInt( *seg.HTTP.Response.Status) - attrs[conventions.AttributeHTTPURL] = pdata.NewAttributeValueString( + attrs[conventions.AttributeHTTPURL] = pdata.NewValueString( *seg.HTTP.Request.URL) contentLength := seg.HTTP.Response.ContentLength.(string) - attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewAttributeValueString(contentLength) + attrs[conventions.AttributeHTTPResponseContentLength] = pdata.NewValueString(contentLength) - attrs[awsxray.AWSXRayTracedAttribute] = pdata.NewAttributeValueBool(true) + attrs[awsxray.AWSXRayTracedAttribute] = pdata.NewValueBool(true) res := perSpanProperties{ traceID: *seg.TraceID, spanID: *seg.ID, @@ -798,21 +798,21 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateSql", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "indepSubsegmentWithSql.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeCloudProvider] = pdata.NewAttributeValueString("unknown") + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeCloudProvider] = pdata.NewValueString("unknown") return attrs }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { - attrs := make(map[string]pdata.AttributeValue) - attrs[conventions.AttributeDBConnectionString] = pdata.NewAttributeValueString( + attrs := make(map[string]pdata.Value) + attrs[conventions.AttributeDBConnectionString] = pdata.NewValueString( "jdbc:postgresql://aawijb5u25wdoy.cpamxznpdoq8.us-west-2.rds.amazonaws.com:5432") - attrs[conventions.AttributeDBName] = pdata.NewAttributeValueString("ebdb") - attrs[conventions.AttributeDBSystem] = pdata.NewAttributeValueString( + attrs[conventions.AttributeDBName] = pdata.NewValueString("ebdb") + attrs[conventions.AttributeDBSystem] = pdata.NewValueString( *seg.SQL.DatabaseType) - attrs[conventions.AttributeDBStatement] = pdata.NewAttributeValueString( + attrs[conventions.AttributeDBStatement] = pdata.NewValueString( *seg.SQL.SanitizedQuery) - attrs[conventions.AttributeDBUser] = pdata.NewAttributeValueString( + attrs[conventions.AttributeDBUser] = pdata.NewValueString( *seg.SQL.User) res := perSpanProperties{ traceID: *seg.TraceID, @@ -843,7 +843,7 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateInvalidSqlUrl", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "indepSubsegmentWithInvalidSqlUrl.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { return nil }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -864,7 +864,7 @@ func TestTranslation(t *testing.T) { testCase: "TranslateJsonUnmarshallFailed", expectedUnmarshallFailure: true, samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "minCauseIsInvalid.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { return nil }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -884,7 +884,7 @@ func TestTranslation(t *testing.T) { { testCase: "TranslateRootSegValidationFailed", samplePath: filepath.Join("../../../../internal/aws/xray", "testdata", "segmentValidationFailed.txt"), - expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.AttributeValue { + expectedResourceAttrs: func(seg *awsxray.Segment) map[string]pdata.Value { return nil }, propsPerSpan: func(_ string, _ *testing.T, seg *awsxray.Segment) []perSpanProperties { @@ -935,41 +935,41 @@ func TestTranslation(t *testing.T) { func initExceptionEvents(expectedSeg *awsxray.Segment) []eventProps { res := make([]eventProps, 0, len(expectedSeg.Cause.Exceptions)) for _, excp := range expectedSeg.Cause.Exceptions { - attrs := make(map[string]pdata.AttributeValue) - attrs[awsxray.AWSXrayExceptionIDAttribute] = pdata.NewAttributeValueString( + attrs := make(map[string]pdata.Value) + attrs[awsxray.AWSXrayExceptionIDAttribute] = pdata.NewValueString( *excp.ID) if excp.Message != nil { - attrs[conventions.AttributeExceptionMessage] = pdata.NewAttributeValueString( + attrs[conventions.AttributeExceptionMessage] = pdata.NewValueString( *excp.Message) } if excp.Type != nil { - attrs[conventions.AttributeExceptionType] = pdata.NewAttributeValueString( + attrs[conventions.AttributeExceptionType] = pdata.NewValueString( *excp.Type) } if excp.Remote != nil { - attrs[awsxray.AWSXrayExceptionRemoteAttribute] = pdata.NewAttributeValueBool( + attrs[awsxray.AWSXrayExceptionRemoteAttribute] = pdata.NewValueBool( *excp.Remote) } if excp.Truncated != nil { - attrs[awsxray.AWSXrayExceptionTruncatedAttribute] = pdata.NewAttributeValueInt( + attrs[awsxray.AWSXrayExceptionTruncatedAttribute] = pdata.NewValueInt( *excp.Truncated) } if excp.Skipped != nil { - attrs[awsxray.AWSXrayExceptionSkippedAttribute] = pdata.NewAttributeValueInt( + attrs[awsxray.AWSXrayExceptionSkippedAttribute] = pdata.NewValueInt( *excp.Skipped) } if excp.Cause != nil { - attrs[awsxray.AWSXrayExceptionCauseAttribute] = pdata.NewAttributeValueString( + attrs[awsxray.AWSXrayExceptionCauseAttribute] = pdata.NewValueString( *excp.Cause) } if len(excp.Stack) > 0 { - attrs[conventions.AttributeExceptionStacktrace] = pdata.NewAttributeValueString( + attrs[conventions.AttributeExceptionStacktrace] = pdata.NewValueString( convertStackFramesToStackTraceStr(excp)) } res = append(res, eventProps{ @@ -981,7 +981,7 @@ func initExceptionEvents(expectedSeg *awsxray.Segment) []eventProps { } func initResourceSpans(expectedSeg *awsxray.Segment, - resourceAttrs map[string]pdata.AttributeValue, + resourceAttrs map[string]pdata.Value, propsPerSpan []perSpanProperties, ) *pdata.ResourceSpans { if expectedSeg == nil { diff --git a/receiver/carbonreceiver/go.mod b/receiver/carbonreceiver/go.mod index 4545da5a15c9..3e09c14244dd 100644 --- a/receiver/carbonreceiver/go.mod +++ b/receiver/carbonreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 @@ -29,7 +29,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/sdk v1.4.1 // indirect diff --git a/receiver/carbonreceiver/go.sum b/receiver/carbonreceiver/go.sum index e5893c3938a9..95cbd3b8d786 100644 --- a/receiver/carbonreceiver/go.sum +++ b/receiver/carbonreceiver/go.sum @@ -163,10 +163,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/cloudfoundryreceiver/go.mod b/receiver/cloudfoundryreceiver/go.mod index c217431ffb2c..e29af0ad43f5 100644 --- a/receiver/cloudfoundryreceiver/go.mod +++ b/receiver/cloudfoundryreceiver/go.mod @@ -6,8 +6,8 @@ require ( code.cloudfoundry.org/go-loggregator v7.4.0+incompatible github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/cloudfoundryreceiver/go.sum b/receiver/cloudfoundryreceiver/go.sum index cd34ee003714..161aac750a5a 100644 --- a/receiver/cloudfoundryreceiver/go.sum +++ b/receiver/cloudfoundryreceiver/go.sum @@ -217,10 +217,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/collectdreceiver/go.mod b/receiver/collectdreceiver/go.mod index 4860b3c753c8..20d6c0ac15e3 100644 --- a/receiver/collectdreceiver/go.mod +++ b/receiver/collectdreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 ) @@ -27,7 +27,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/collectdreceiver/go.sum b/receiver/collectdreceiver/go.sum index 926a2c040435..116b9836b0c9 100644 --- a/receiver/collectdreceiver/go.sum +++ b/receiver/collectdreceiver/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/couchbasereceiver/go.mod b/receiver/couchbasereceiver/go.mod index e0fb8074f742..5e2fc7774e88 100644 --- a/receiver/couchbasereceiver/go.mod +++ b/receiver/couchbasereceiver/go.mod @@ -4,11 +4,11 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) -require go.opentelemetry.io/collector/model v0.47.0 +require go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 require go.uber.org/zap v1.21.0 diff --git a/receiver/couchbasereceiver/go.sum b/receiver/couchbasereceiver/go.sum index c34728439375..214e1fce0c9d 100644 --- a/receiver/couchbasereceiver/go.sum +++ b/receiver/couchbasereceiver/go.sum @@ -182,10 +182,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/couchdbreceiver/go.mod b/receiver/couchdbreceiver/go.mod index a13946c3f5d5..85733726ef9c 100644 --- a/receiver/couchdbreceiver/go.mod +++ b/receiver/couchdbreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchd go 1.17 require ( - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) @@ -11,7 +11,7 @@ require github.com/stretchr/testify v1.7.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/couchdbreceiver/go.sum b/receiver/couchdbreceiver/go.sum index cf0d5dc39b55..1068c5e80deb 100644 --- a/receiver/couchdbreceiver/go.sum +++ b/receiver/couchdbreceiver/go.sum @@ -183,10 +183,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/couchdbreceiver/internal/metadata/generated_metrics_v2.go b/receiver/couchdbreceiver/internal/metadata/generated_metrics_v2.go index 5e0492d2d287..1e88a0a865c7 100644 --- a/receiver/couchdbreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/couchdbreceiver/internal/metadata/generated_metrics_v2.go @@ -179,7 +179,7 @@ func (m *metricCouchdbDatabaseOperations) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Operation, pdata.NewAttributeValueString(operationAttributeValue)) + dp.Attributes().Insert(A.Operation, pdata.NewValueString(operationAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -334,7 +334,7 @@ func (m *metricCouchdbHttpdRequests) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.HTTPMethod, pdata.NewAttributeValueString(httpMethodAttributeValue)) + dp.Attributes().Insert(A.HTTPMethod, pdata.NewValueString(httpMethodAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -387,7 +387,7 @@ func (m *metricCouchdbHttpdResponses) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.HTTPStatusCode, pdata.NewAttributeValueString(httpStatusCodeAttributeValue)) + dp.Attributes().Insert(A.HTTPStatusCode, pdata.NewValueString(httpStatusCodeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -440,7 +440,7 @@ func (m *metricCouchdbHttpdViews) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.View, pdata.NewAttributeValueString(viewAttributeValue)) + dp.Attributes().Insert(A.View, pdata.NewValueString(viewAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/dockerstatsreceiver/go.mod b/receiver/dockerstatsreceiver/go.mod index 3e32526cb12c..b1ad08525d0b 100644 --- a/receiver/dockerstatsreceiver/go.mod +++ b/receiver/dockerstatsreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/dockerstatsreceiver/go.sum b/receiver/dockerstatsreceiver/go.sum index f4250bdeff73..f4a83ef9d8ac 100644 --- a/receiver/dockerstatsreceiver/go.sum +++ b/receiver/dockerstatsreceiver/go.sum @@ -709,10 +709,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/dotnetdiagnosticsreceiver/go.mod b/receiver/dotnetdiagnosticsreceiver/go.mod index af29e16accaa..d6dc0b821783 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.mod +++ b/receiver/dotnetdiagnosticsreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/dotnetdiagnosticsreceiver/go.sum b/receiver/dotnetdiagnosticsreceiver/go.sum index 89e80825f3d7..24356bac0921 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.sum +++ b/receiver/dotnetdiagnosticsreceiver/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/elasticsearchreceiver/go.mod b/receiver/elasticsearchreceiver/go.mod index 974c120069ba..8d4ea030eca5 100644 --- a/receiver/elasticsearchreceiver/go.mod +++ b/receiver/elasticsearchreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/elasticsearchreceiver/go.sum b/receiver/elasticsearchreceiver/go.sum index c566ac088091..541e1491ae3b 100644 --- a/receiver/elasticsearchreceiver/go.sum +++ b/receiver/elasticsearchreceiver/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/elasticsearchreceiver/internal/metadata/generated_metrics_v2.go b/receiver/elasticsearchreceiver/internal/metadata/generated_metrics_v2.go index 9f18a9c3c988..6a68ea1aac12 100644 --- a/receiver/elasticsearchreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/elasticsearchreceiver/internal/metadata/generated_metrics_v2.go @@ -214,7 +214,7 @@ func (m *metricElasticsearchClusterHealth) recordDataPoint(start pdata.Timestamp dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.HealthStatus, pdata.NewAttributeValueString(healthStatusAttributeValue)) + dp.Attributes().Insert(A.HealthStatus, pdata.NewValueString(healthStatusAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -318,7 +318,7 @@ func (m *metricElasticsearchClusterShards) recordDataPoint(start pdata.Timestamp dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ShardState, pdata.NewAttributeValueString(shardStateAttributeValue)) + dp.Attributes().Insert(A.ShardState, pdata.NewValueString(shardStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -371,7 +371,7 @@ func (m *metricElasticsearchNodeCacheEvictions) recordDataPoint(start pdata.Time dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.CacheName, pdata.NewAttributeValueString(cacheNameAttributeValue)) + dp.Attributes().Insert(A.CacheName, pdata.NewValueString(cacheNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -424,7 +424,7 @@ func (m *metricElasticsearchNodeCacheMemoryUsage) recordDataPoint(start pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.CacheName, pdata.NewAttributeValueString(cacheNameAttributeValue)) + dp.Attributes().Insert(A.CacheName, pdata.NewValueString(cacheNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -528,7 +528,7 @@ func (m *metricElasticsearchNodeClusterIo) recordDataPoint(start pdata.Timestamp dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -581,7 +581,7 @@ func (m *metricElasticsearchNodeDocuments) recordDataPoint(start pdata.Timestamp dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.DocumentState, pdata.NewAttributeValueString(documentStateAttributeValue)) + dp.Attributes().Insert(A.DocumentState, pdata.NewValueString(documentStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -787,7 +787,7 @@ func (m *metricElasticsearchNodeOperationsCompleted) recordDataPoint(start pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Operation, pdata.NewAttributeValueString(operationAttributeValue)) + dp.Attributes().Insert(A.Operation, pdata.NewValueString(operationAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -840,7 +840,7 @@ func (m *metricElasticsearchNodeOperationsTime) recordDataPoint(start pdata.Time dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Operation, pdata.NewAttributeValueString(operationAttributeValue)) + dp.Attributes().Insert(A.Operation, pdata.NewValueString(operationAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -944,8 +944,8 @@ func (m *metricElasticsearchNodeThreadPoolTasksFinished) recordDataPoint(start p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ThreadPoolName, pdata.NewAttributeValueString(threadPoolNameAttributeValue)) - dp.Attributes().Insert(A.TaskState, pdata.NewAttributeValueString(taskStateAttributeValue)) + dp.Attributes().Insert(A.ThreadPoolName, pdata.NewValueString(threadPoolNameAttributeValue)) + dp.Attributes().Insert(A.TaskState, pdata.NewValueString(taskStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -998,7 +998,7 @@ func (m *metricElasticsearchNodeThreadPoolTasksQueued) recordDataPoint(start pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ThreadPoolName, pdata.NewAttributeValueString(threadPoolNameAttributeValue)) + dp.Attributes().Insert(A.ThreadPoolName, pdata.NewValueString(threadPoolNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -1051,8 +1051,8 @@ func (m *metricElasticsearchNodeThreadPoolThreads) recordDataPoint(start pdata.T dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.ThreadPoolName, pdata.NewAttributeValueString(threadPoolNameAttributeValue)) - dp.Attributes().Insert(A.ThreadState, pdata.NewAttributeValueString(threadStateAttributeValue)) + dp.Attributes().Insert(A.ThreadPoolName, pdata.NewValueString(threadPoolNameAttributeValue)) + dp.Attributes().Insert(A.ThreadState, pdata.NewValueString(threadStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -1154,7 +1154,7 @@ func (m *metricJvmGcCollectionsCount) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.CollectorName, pdata.NewAttributeValueString(collectorNameAttributeValue)) + dp.Attributes().Insert(A.CollectorName, pdata.NewValueString(collectorNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -1207,7 +1207,7 @@ func (m *metricJvmGcCollectionsElapsed) recordDataPoint(start pdata.Timestamp, t dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.CollectorName, pdata.NewAttributeValueString(collectorNameAttributeValue)) + dp.Attributes().Insert(A.CollectorName, pdata.NewValueString(collectorNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -1503,7 +1503,7 @@ func (m *metricJvmMemoryPoolMax) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.MemoryPoolName, pdata.NewAttributeValueString(memoryPoolNameAttributeValue)) + dp.Attributes().Insert(A.MemoryPoolName, pdata.NewValueString(memoryPoolNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -1554,7 +1554,7 @@ func (m *metricJvmMemoryPoolUsed) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.MemoryPoolName, pdata.NewAttributeValueString(memoryPoolNameAttributeValue)) + dp.Attributes().Insert(A.MemoryPoolName, pdata.NewValueString(memoryPoolNameAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/filelogreceiver/go.mod b/receiver/filelogreceiver/go.mod index 4014606d73eb..dfb2dab4f01d 100644 --- a/receiver/filelogreceiver/go.mod +++ b/receiver/filelogreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/filelogreceiver/go.sum b/receiver/filelogreceiver/go.sum index 6aff5bc8719d..f13084c1da2a 100644 --- a/receiver/filelogreceiver/go.sum +++ b/receiver/filelogreceiver/go.sum @@ -193,10 +193,10 @@ 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.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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/fluentforwardreceiver/conversion.go b/receiver/fluentforwardreceiver/conversion.go index 4d02a4467f95..043311bfa12e 100644 --- a/receiver/fluentforwardreceiver/conversion.go +++ b/receiver/fluentforwardreceiver/conversion.go @@ -82,8 +82,8 @@ func (em EventMode) String() string { // parseInterfaceToMap takes map of interface objects and returns // AttributeValueMap -func parseInterfaceToMap(msi map[string]interface{}) pdata.AttributeValue { - rv := pdata.NewAttributeValueMap() +func parseInterfaceToMap(msi map[string]interface{}) pdata.Value { + rv := pdata.NewValueMap() am := rv.MapVal() am.EnsureCapacity(len(msi)) for k, value := range msi { @@ -94,8 +94,8 @@ func parseInterfaceToMap(msi map[string]interface{}) pdata.AttributeValue { // parseInterfaceToArray takes array of interface objects and returns // AttributeValueArray -func parseInterfaceToArray(ai []interface{}) pdata.AttributeValue { - iv := pdata.NewAttributeValueArray() +func parseInterfaceToArray(ai []interface{}) pdata.Value { + iv := pdata.NewValueArray() av := iv.SliceVal() av.EnsureCapacity(len(ai)) for _, value := range ai { @@ -105,32 +105,32 @@ func parseInterfaceToArray(ai []interface{}) pdata.AttributeValue { } // parseToAttributeValue converts interface object to AttributeValue -func parseToAttributeValue(val interface{}) pdata.AttributeValue { +func parseToAttributeValue(val interface{}) pdata.Value { // See https://github.com/tinylib/msgp/wiki/Type-Mapping-Rules switch r := val.(type) { case bool: - return pdata.NewAttributeValueBool(r) + return pdata.NewValueBool(r) case string: - return pdata.NewAttributeValueString(r) + return pdata.NewValueString(r) case uint64: - return pdata.NewAttributeValueInt(int64(r)) + return pdata.NewValueInt(int64(r)) case int64: - return pdata.NewAttributeValueInt(r) + return pdata.NewValueInt(r) // Sometimes strings come in as bytes array case []byte: - return pdata.NewAttributeValueString(string(r)) + return pdata.NewValueString(string(r)) case map[string]interface{}: return parseInterfaceToMap(r) case []interface{}: return parseInterfaceToArray(r) case float32: - return pdata.NewAttributeValueDouble(float64(r)) + return pdata.NewValueDouble(float64(r)) case float64: - return pdata.NewAttributeValueDouble(r) + return pdata.NewValueDouble(r) case nil: - return pdata.NewAttributeValueEmpty() + return pdata.NewValueEmpty() default: - return pdata.NewAttributeValueString(fmt.Sprintf("%v", val)) + return pdata.NewValueString(fmt.Sprintf("%v", val)) } } diff --git a/receiver/fluentforwardreceiver/conversion_test.go b/receiver/fluentforwardreceiver/conversion_test.go index c52a0b34c196..9263aeb73041 100644 --- a/receiver/fluentforwardreceiver/conversion_test.go +++ b/receiver/fluentforwardreceiver/conversion_test.go @@ -39,12 +39,12 @@ func TestMessageEventConversion(t *testing.T) { expected := Logs( Log{ Timestamp: 1593031012000000000, - Body: pdata.NewAttributeValueString("..."), - Attributes: map[string]pdata.AttributeValue{ - "container_id": pdata.NewAttributeValueString("b00a67eb645849d6ab38ff8beb4aad035cc7e917bf123c3e9057c7e89fc73d2d"), - "container_name": pdata.NewAttributeValueString("/unruffled_cannon"), - "fluent.tag": pdata.NewAttributeValueString("b00a67eb6458"), - "source": pdata.NewAttributeValueString("stdout"), + Body: pdata.NewValueString("..."), + Attributes: map[string]pdata.Value{ + "container_id": pdata.NewValueString("b00a67eb645849d6ab38ff8beb4aad035cc7e917bf123c3e9057c7e89fc73d2d"), + "container_name": pdata.NewValueString("/unruffled_cannon"), + "fluent.tag": pdata.NewValueString("b00a67eb6458"), + "source": pdata.NewValueString("stdout"), }, }, ) @@ -104,7 +104,7 @@ func TestAttributeTypeConversion(t *testing.T) { le := event.LogRecords().At(0) le.Attributes().Sort() - nv := pdata.NewAttributeValueArray() + nv := pdata.NewValueArray() nv.SliceVal().EnsureCapacity(2) nv.SliceVal().AppendEmpty().SetStringVal("first") nv.SliceVal().AppendEmpty().SetStringVal("second") @@ -112,25 +112,25 @@ func TestAttributeTypeConversion(t *testing.T) { require.EqualValues(t, Logs( Log{ Timestamp: 5000000000000, - Body: pdata.NewAttributeValueEmpty(), - Attributes: map[string]pdata.AttributeValue{ - "a": pdata.NewAttributeValueDouble(5.0), - "b": pdata.NewAttributeValueDouble(6.0), - "c": pdata.NewAttributeValueBool(true), - "d": pdata.NewAttributeValueInt(1), - "e": pdata.NewAttributeValueInt(2), - "f": pdata.NewAttributeValueInt(3), - "fluent.tag": pdata.NewAttributeValueString("my-tag"), - "g": pdata.NewAttributeValueInt(4), - "h": pdata.NewAttributeValueInt(255), - "i": pdata.NewAttributeValueInt(65535), - "j": pdata.NewAttributeValueInt(4294967295), - "k": pdata.NewAttributeValueInt(-1), - "l": pdata.NewAttributeValueString("(0+0i)"), - "m": pdata.NewAttributeValueString("\001e\002"), + Body: pdata.NewValueEmpty(), + Attributes: map[string]pdata.Value{ + "a": pdata.NewValueDouble(5.0), + "b": pdata.NewValueDouble(6.0), + "c": pdata.NewValueBool(true), + "d": pdata.NewValueInt(1), + "e": pdata.NewValueInt(2), + "f": pdata.NewValueInt(3), + "fluent.tag": pdata.NewValueString("my-tag"), + "g": pdata.NewValueInt(4), + "h": pdata.NewValueInt(255), + "i": pdata.NewValueInt(65535), + "j": pdata.NewValueInt(4294967295), + "k": pdata.NewValueInt(-1), + "l": pdata.NewValueString("(0+0i)"), + "m": pdata.NewValueString("\001e\002"), "n": nv, - "o": pdata.NewAttributeValueString("cde"), - "p": pdata.NewAttributeValueEmpty(), + "o": pdata.NewValueString("cde"), + "p": pdata.NewValueEmpty(), }, }, ).ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords().At(0), le) @@ -257,28 +257,28 @@ func TestBodyConversion(t *testing.T) { le := event.LogRecords().At(0) le.Attributes().Sort() - body := pdata.NewAttributeValueMap() + body := pdata.NewValueMap() body.MapVal().InsertString("a", "value") - bv := pdata.NewAttributeValueArray() + bv := pdata.NewValueArray() bv.SliceVal().EnsureCapacity(2) bv.SliceVal().AppendEmpty().SetStringVal("first") bv.SliceVal().AppendEmpty().SetStringVal("second") body.MapVal().Insert("b", bv) - cv := pdata.NewAttributeValueMap() + cv := pdata.NewValueMap() cv.MapVal().InsertInt("d", 24) body.MapVal().Insert("c", cv) // Sort the map, sometimes may get in a different order. - require.Equal(t, pdata.AttributeValueTypeMap, le.Body().Type()) + require.Equal(t, pdata.ValueTypeMap, le.Body().Type()) le.Body().MapVal().Sort() assert.EqualValues(t, Logs( Log{ Timestamp: 5000000000000, Body: body, - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("my-tag"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("my-tag"), }, }, ).ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords().At(0), le) diff --git a/receiver/fluentforwardreceiver/go.mod b/receiver/fluentforwardreceiver/go.mod index 80416336b5a1..17132f866d6c 100644 --- a/receiver/fluentforwardreceiver/go.mod +++ b/receiver/fluentforwardreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/stretchr/testify v1.7.0 github.com/tinylib/msgp v1.1.6 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/fluentforwardreceiver/go.sum b/receiver/fluentforwardreceiver/go.sum index 46eea54d9ccc..df6fe375f186 100644 --- a/receiver/fluentforwardreceiver/go.sum +++ b/receiver/fluentforwardreceiver/go.sum @@ -168,10 +168,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/fluentforwardreceiver/receiver_test.go b/receiver/fluentforwardreceiver/receiver_test.go index a0c040b304ad..e785b31cf7bd 100644 --- a/receiver/fluentforwardreceiver/receiver_test.go +++ b/receiver/fluentforwardreceiver/receiver_test.go @@ -117,12 +117,12 @@ func TestMessageEvent(t *testing.T) { converted[0].ResourceLogs().At(0).InstrumentationLibraryLogs().At(0).LogRecords().At(0).Attributes().Sort() require.EqualValues(t, Logs(Log{ Timestamp: 1593031012000000000, - Body: pdata.NewAttributeValueString("..."), - Attributes: map[string]pdata.AttributeValue{ - "container_id": pdata.NewAttributeValueString("b00a67eb645849d6ab38ff8beb4aad035cc7e917bf123c3e9057c7e89fc73d2d"), - "container_name": pdata.NewAttributeValueString("/unruffled_cannon"), - "fluent.tag": pdata.NewAttributeValueString("b00a67eb6458"), - "source": pdata.NewAttributeValueString("stdout"), + Body: pdata.NewValueString("..."), + Attributes: map[string]pdata.Value{ + "container_id": pdata.NewValueString("b00a67eb645849d6ab38ff8beb4aad035cc7e917bf123c3e9057c7e89fc73d2d"), + "container_name": pdata.NewValueString("/unruffled_cannon"), + "fluent.tag": pdata.NewValueString("b00a67eb6458"), + "source": pdata.NewValueString("stdout"), }, }, ), converted[0]) @@ -152,28 +152,28 @@ func TestForwardEvent(t *testing.T) { require.EqualValues(t, Logs( Log{ Timestamp: 1593032377776693638, - Body: pdata.NewAttributeValueEmpty(), - Attributes: map[string]pdata.AttributeValue{ - "Mem.free": pdata.NewAttributeValueInt(848908), - "Mem.total": pdata.NewAttributeValueInt(7155496), - "Mem.used": pdata.NewAttributeValueInt(6306588), - "Swap.free": pdata.NewAttributeValueInt(0), - "Swap.total": pdata.NewAttributeValueInt(0), - "Swap.used": pdata.NewAttributeValueInt(0), - "fluent.tag": pdata.NewAttributeValueString("mem.0"), + Body: pdata.NewValueEmpty(), + Attributes: map[string]pdata.Value{ + "Mem.free": pdata.NewValueInt(848908), + "Mem.total": pdata.NewValueInt(7155496), + "Mem.used": pdata.NewValueInt(6306588), + "Swap.free": pdata.NewValueInt(0), + "Swap.total": pdata.NewValueInt(0), + "Swap.used": pdata.NewValueInt(0), + "fluent.tag": pdata.NewValueString("mem.0"), }, }, Log{ Timestamp: 1593032378756829346, - Body: pdata.NewAttributeValueEmpty(), - Attributes: map[string]pdata.AttributeValue{ - "Mem.free": pdata.NewAttributeValueInt(848908), - "Mem.total": pdata.NewAttributeValueInt(7155496), - "Mem.used": pdata.NewAttributeValueInt(6306588), - "Swap.free": pdata.NewAttributeValueInt(0), - "Swap.total": pdata.NewAttributeValueInt(0), - "Swap.used": pdata.NewAttributeValueInt(0), - "fluent.tag": pdata.NewAttributeValueString("mem.0"), + Body: pdata.NewValueEmpty(), + Attributes: map[string]pdata.Value{ + "Mem.free": pdata.NewValueInt(848908), + "Mem.total": pdata.NewValueInt(7155496), + "Mem.used": pdata.NewValueInt(6306588), + "Swap.free": pdata.NewValueInt(0), + "Swap.total": pdata.NewValueInt(0), + "Swap.used": pdata.NewValueInt(0), + "fluent.tag": pdata.NewValueString("mem.0"), }, }, ), converted[0]) @@ -235,42 +235,42 @@ func TestForwardPackedEvent(t *testing.T) { require.EqualValues(t, Logs( Log{ Timestamp: 1593032517024597622, - Body: pdata.NewAttributeValueString("starting fluentd worker pid=17 ppid=7 worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "pid": pdata.NewAttributeValueInt(17), - "ppid": pdata.NewAttributeValueInt(7), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("starting fluentd worker pid=17 ppid=7 worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "pid": pdata.NewValueInt(17), + "ppid": pdata.NewValueInt(7), + "worker": pdata.NewValueInt(0), }, }, Log{ Timestamp: 1593032517028573686, - Body: pdata.NewAttributeValueString("delayed_commit_timeout is overwritten by ack_response_timeout"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), + Body: pdata.NewValueString("delayed_commit_timeout is overwritten by ack_response_timeout"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), }, }, Log{ Timestamp: 1593032517028815948, - Body: pdata.NewAttributeValueString("following tail of /var/log/kern.log"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), + Body: pdata.NewValueString("following tail of /var/log/kern.log"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), }, }, Log{ Timestamp: 1593032517031174229, - Body: pdata.NewAttributeValueString("fluentd worker is now running worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("fluentd worker is now running worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "worker": pdata.NewValueInt(0), }, }, Log{ Timestamp: 1593032522187382822, - Body: pdata.NewAttributeValueString("fluentd worker is now stopping worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("fluentd worker is now stopping worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "worker": pdata.NewValueInt(0), }, }, ), converted[0]) @@ -301,42 +301,42 @@ func TestForwardPackedCompressedEvent(t *testing.T) { require.EqualValues(t, Logs( Log{ Timestamp: 1593032426012197420, - Body: pdata.NewAttributeValueString("starting fluentd worker pid=17 ppid=7 worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "pid": pdata.NewAttributeValueInt(17), - "ppid": pdata.NewAttributeValueInt(7), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("starting fluentd worker pid=17 ppid=7 worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "pid": pdata.NewValueInt(17), + "ppid": pdata.NewValueInt(7), + "worker": pdata.NewValueInt(0), }, }, Log{ Timestamp: 1593032426013724933, - Body: pdata.NewAttributeValueString("delayed_commit_timeout is overwritten by ack_response_timeout"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), + Body: pdata.NewValueString("delayed_commit_timeout is overwritten by ack_response_timeout"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), }, }, Log{ Timestamp: 1593032426020510455, - Body: pdata.NewAttributeValueString("following tail of /var/log/kern.log"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), + Body: pdata.NewValueString("following tail of /var/log/kern.log"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), }, }, Log{ Timestamp: 1593032426024346580, - Body: pdata.NewAttributeValueString("fluentd worker is now running worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("fluentd worker is now running worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "worker": pdata.NewValueInt(0), }, }, Log{ Timestamp: 1593032434346935532, - Body: pdata.NewAttributeValueString("fluentd worker is now stopping worker=0"), - Attributes: map[string]pdata.AttributeValue{ - "fluent.tag": pdata.NewAttributeValueString("fluent.info"), - "worker": pdata.NewAttributeValueInt(0), + Body: pdata.NewValueString("fluentd worker is now stopping worker=0"), + Attributes: map[string]pdata.Value{ + "fluent.tag": pdata.NewValueString("fluent.info"), + "worker": pdata.NewValueInt(0), }, }, ), converted[0]) diff --git a/receiver/fluentforwardreceiver/util_test.go b/receiver/fluentforwardreceiver/util_test.go index 7460edab05b7..156a7c97e9a3 100644 --- a/receiver/fluentforwardreceiver/util_test.go +++ b/receiver/fluentforwardreceiver/util_test.go @@ -22,8 +22,8 @@ import ( // See Logs for rationale. type Log struct { Timestamp int64 - Body pdata.AttributeValue - Attributes map[string]pdata.AttributeValue + Body pdata.Value + Attributes map[string]pdata.Value } // Logs is a convenience function for constructing logs for tests in a way that is diff --git a/receiver/googlecloudpubsubreceiver/go.mod b/receiver/googlecloudpubsubreceiver/go.mod index e26458e7f927..2644a26fbc4b 100644 --- a/receiver/googlecloudpubsubreceiver/go.mod +++ b/receiver/googlecloudpubsubreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( cloud.google.com/go/pubsub v1.17.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 google.golang.org/api v0.72.0 diff --git a/receiver/googlecloudpubsubreceiver/go.sum b/receiver/googlecloudpubsubreceiver/go.sum index 9f4209276943..958e15d78110 100644 --- a/receiver/googlecloudpubsubreceiver/go.sum +++ b/receiver/googlecloudpubsubreceiver/go.sum @@ -312,10 +312,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/googlecloudspannerreceiver/go.mod b/receiver/googlecloudspannerreceiver/go.mod index 50106c913626..26ed69e18827 100644 --- a/receiver/googlecloudspannerreceiver/go.mod +++ b/receiver/googlecloudspannerreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( cloud.google.com/go/spanner v1.30.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/api v0.72.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b diff --git a/receiver/googlecloudspannerreceiver/go.sum b/receiver/googlecloudspannerreceiver/go.sum index e0af884044dc..05a094b0281a 100644 --- a/receiver/googlecloudspannerreceiver/go.sum +++ b/receiver/googlecloudspannerreceiver/go.sum @@ -334,10 +334,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/hostmetricsreceiver/go.mod b/receiver/hostmetricsreceiver/go.mod index 4548e7a048c5..60f42a9a0822 100644 --- a/receiver/hostmetricsreceiver/go.mod +++ b/receiver/hostmetricsreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.47.0 github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 diff --git a/receiver/hostmetricsreceiver/go.sum b/receiver/hostmetricsreceiver/go.sum index 38de3ef4196b..d030a4d76af1 100644 --- a/receiver/hostmetricsreceiver/go.sum +++ b/receiver/hostmetricsreceiver/go.sum @@ -199,10 +199,10 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go index d6fedf081127..775beb4d593c 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go @@ -351,17 +351,17 @@ func assertCPUMetricValid(t *testing.T, metric pdata.Metric, startTime pdata.Tim } assert.GreaterOrEqual(t, metric.Sum().DataPoints().Len(), 4*runtime.NumCPU()) internal.AssertSumMetricHasAttribute(t, metric, 0, metadata.Attributes.Cpu) - internal.AssertSumMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.User)) - internal.AssertSumMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.System)) - internal.AssertSumMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Idle)) - internal.AssertSumMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Interrupt)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.User)) + internal.AssertSumMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.System)) + internal.AssertSumMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Idle)) + internal.AssertSumMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Interrupt)) } func assertCPUMetricHasLinuxSpecificStateLabels(t *testing.T, metric pdata.Metric) { - internal.AssertSumMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Nice)) - internal.AssertSumMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Softirq)) - internal.AssertSumMetricHasAttributeValue(t, metric, 6, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Steal)) - internal.AssertSumMetricHasAttributeValue(t, metric, 7, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Wait)) + internal.AssertSumMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Nice)) + internal.AssertSumMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Softirq)) + internal.AssertSumMetricHasAttributeValue(t, metric, 6, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Steal)) + internal.AssertSumMetricHasAttributeValue(t, metric, 7, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Wait)) } func assertCPUUtilizationMetricValid(t *testing.T, metric pdata.Metric, startTime pdata.Timestamp) { @@ -375,15 +375,15 @@ func assertCPUUtilizationMetricValid(t *testing.T, metric pdata.Metric, startTim internal.AssertGaugeMetricStartTimeEquals(t, metric, startTime) } internal.AssertGaugeMetricHasAttribute(t, metric, 0, metadata.Attributes.Cpu) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.User)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.System)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Idle)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Interrupt)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.User)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.System)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Idle)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Interrupt)) } func assertCPUUtilizationMetricHasLinuxSpecificStateLabels(t *testing.T, metric pdata.Metric) { - internal.AssertGaugeMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Nice)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Softirq)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 6, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Steal)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 7, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Wait)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Nice)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Softirq)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 6, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Steal)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 7, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Wait)) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/generated_metrics_v2.go index dde11620c8b5..378a02ba77da 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/generated_metrics_v2.go @@ -55,8 +55,8 @@ func (m *metricSystemCPUTime) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Cpu, pdata.NewAttributeValueString(cpuAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Cpu, pdata.NewValueString(cpuAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -107,8 +107,8 @@ func (m *metricSystemCPUUtilization) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Cpu, pdata.NewAttributeValueString(cpuAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Cpu, pdata.NewValueString(cpuAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_test.go index 242006b2e350..7f18995a8479 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_test.go @@ -165,8 +165,8 @@ func assertInt64DiskMetricValid(t *testing.T, metric pdata.Metric, startTime pda assert.GreaterOrEqual(t, metric.Sum().DataPoints().Len(), 2) internal.AssertSumMetricHasAttribute(t, metric, 0, "device") - internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Read)) - internal.AssertSumMetricHasAttributeValue(t, metric, 1, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Write)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewValueString(metadata.AttributeDirection.Read)) + internal.AssertSumMetricHasAttributeValue(t, metric, 1, "direction", pdata.NewValueString(metadata.AttributeDirection.Write)) } func assertDoubleDiskMetricValid(t *testing.T, metric pdata.Metric, expectDirectionLabels bool, startTime pdata.Timestamp) { @@ -182,8 +182,8 @@ func assertDoubleDiskMetricValid(t *testing.T, metric pdata.Metric, expectDirect internal.AssertSumMetricHasAttribute(t, metric, 0, "device") if expectDirectionLabels { - internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Read)) - internal.AssertSumMetricHasAttributeValue(t, metric, metric.Sum().DataPoints().Len()-1, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Write)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewValueString(metadata.AttributeDirection.Read)) + internal.AssertSumMetricHasAttributeValue(t, metric, metric.Sum().DataPoints().Len()-1, "direction", pdata.NewValueString(metadata.AttributeDirection.Write)) } } diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/generated_metrics_v2.go index 2b69bb18e274..d7dfb1366712 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/generated_metrics_v2.go @@ -75,8 +75,8 @@ func (m *metricSystemDiskIo) recordDataPoint(start pdata.Timestamp, ts pdata.Tim dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -129,7 +129,7 @@ func (m *metricSystemDiskIoTime) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -182,8 +182,8 @@ func (m *metricSystemDiskMerged) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -236,8 +236,8 @@ func (m *metricSystemDiskOperationTime) recordDataPoint(start pdata.Timestamp, t dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -290,8 +290,8 @@ func (m *metricSystemDiskOperations) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -344,7 +344,7 @@ func (m *metricSystemDiskPendingOperations) recordDataPoint(start pdata.Timestam dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -397,7 +397,7 @@ func (m *metricSystemDiskWeightedIoTime) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go index 61374a9d8b68..2ec046d08a9e 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go @@ -42,7 +42,7 @@ func TestScrape(t *testing.T) { usageFunc func(string) (*disk.UsageStat, error) expectMetrics bool expectedDeviceDataPoints int - expectedDeviceAttributes []map[string]pdata.AttributeValue + expectedDeviceAttributes []map[string]pdata.Value newErrRegex string initializationErr string expectedErr string @@ -131,18 +131,18 @@ func TestScrape(t *testing.T) { }, expectMetrics: true, expectedDeviceDataPoints: 2, - expectedDeviceAttributes: []map[string]pdata.AttributeValue{ + expectedDeviceAttributes: []map[string]pdata.Value{ { - "device": pdata.NewAttributeValueString("device_a"), - "mountpoint": pdata.NewAttributeValueString("mount_point_a"), - "type": pdata.NewAttributeValueString("fs_type_a"), - "mode": pdata.NewAttributeValueString("unknown"), + "device": pdata.NewValueString("device_a"), + "mountpoint": pdata.NewValueString("mount_point_a"), + "type": pdata.NewValueString("fs_type_a"), + "mode": pdata.NewValueString("unknown"), }, { - "device": pdata.NewAttributeValueString("device_b"), - "mountpoint": pdata.NewAttributeValueString("mount_point_d"), - "type": pdata.NewAttributeValueString("fs_type_c"), - "mode": pdata.NewAttributeValueString("unknown"), + "device": pdata.NewValueString("device_b"), + "mountpoint": pdata.NewValueString("mount_point_d"), + "type": pdata.NewValueString("fs_type_c"), + "mode": pdata.NewValueString("unknown"), }, }, }, @@ -294,7 +294,7 @@ func assertFileSystemUsageMetricValid( t *testing.T, metric pdata.Metric, expectedDeviceDataPoints int, - expectedDeviceAttributes []map[string]pdata.AttributeValue) { + expectedDeviceAttributes []map[string]pdata.Value) { for i := 0; i < metric.Sum().DataPoints().Len(); i++ { for _, label := range []string{"device", "type", "mode", "mountpoint"} { internal.AssertSumMetricHasAttribute(t, metric, i, label) @@ -320,12 +320,12 @@ func assertFileSystemUsageMetricValid( } else { assert.GreaterOrEqual(t, metric.Sum().DataPoints().Len(), fileSystemStatesLen) } - internal.AssertSumMetricHasAttributeValue(t, metric, 0, "state", pdata.NewAttributeValueString(metadata.AttributeState.Used)) - internal.AssertSumMetricHasAttributeValue(t, metric, 1, "state", pdata.NewAttributeValueString(metadata.AttributeState.Free)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, "state", pdata.NewValueString(metadata.AttributeState.Used)) + internal.AssertSumMetricHasAttributeValue(t, metric, 1, "state", pdata.NewValueString(metadata.AttributeState.Free)) } func assertFileSystemUsageMetricHasUnixSpecificStateLabels(t *testing.T, metric pdata.Metric) { - internal.AssertSumMetricHasAttributeValue(t, metric, 2, "state", pdata.NewAttributeValueString(metadata.AttributeState.Reserved)) + internal.AssertSumMetricHasAttributeValue(t, metric, 2, "state", pdata.NewValueString(metadata.AttributeState.Reserved)) } func isUnix() bool { diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/generated_metrics_v2.go index fc68943082e5..e71f9dc8eb1f 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/generated_metrics_v2.go @@ -59,11 +59,11 @@ func (m *metricSystemFilesystemInodesUsage) recordDataPoint(start pdata.Timestam dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Mode, pdata.NewAttributeValueString(modeAttributeValue)) - dp.Attributes().Insert(A.Mountpoint, pdata.NewAttributeValueString(mountpointAttributeValue)) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Mode, pdata.NewValueString(modeAttributeValue)) + dp.Attributes().Insert(A.Mountpoint, pdata.NewValueString(mountpointAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -116,11 +116,11 @@ func (m *metricSystemFilesystemUsage) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Mode, pdata.NewAttributeValueString(modeAttributeValue)) - dp.Attributes().Insert(A.Mountpoint, pdata.NewAttributeValueString(mountpointAttributeValue)) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Mode, pdata.NewValueString(modeAttributeValue)) + dp.Attributes().Insert(A.Mountpoint, pdata.NewValueString(mountpointAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -171,10 +171,10 @@ func (m *metricSystemFilesystemUtilization) recordDataPoint(start pdata.Timestam dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Mode, pdata.NewAttributeValueString(modeAttributeValue)) - dp.Attributes().Insert(A.Mountpoint, pdata.NewAttributeValueString(mountpointAttributeValue)) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Mode, pdata.NewValueString(modeAttributeValue)) + dp.Attributes().Insert(A.Mountpoint, pdata.NewValueString(mountpointAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/generated_metrics_v2.go index 3cfe4dd956b4..420880a3b819 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/generated_metrics_v2.go @@ -55,7 +55,7 @@ func (m *metricSystemMemoryUsage) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -106,7 +106,7 @@ func (m *metricSystemMemoryUtilization) recordDataPoint(start pdata.Timestamp, t dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go index b1d81cbe4668..051dd631d85b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go @@ -122,7 +122,7 @@ func TestScrape(t *testing.T) { if runtime.GOOS == "linux" { assertMemoryUsageMetricHasLinuxSpecificStateLabels(t, metrics.At(0)) } else if runtime.GOOS != "windows" { - internal.AssertSumMetricHasAttributeValue(t, metrics.At(0), 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Inactive)) + internal.AssertSumMetricHasAttributeValue(t, metrics.At(0), 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Inactive)) } internal.AssertSameTimeStampForAllMetrics(t, metrics) @@ -177,7 +177,7 @@ func TestScrape_MemoryUtilization(t *testing.T) { if runtime.GOOS == "linux" { assertMemoryUtilizationMetricHasLinuxSpecificStateLabels(t, metrics.At(0)) } else if runtime.GOOS != "windows" { - internal.AssertGaugeMetricHasAttributeValue(t, metrics.At(0), 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Inactive)) + internal.AssertGaugeMetricHasAttributeValue(t, metrics.At(0), 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Inactive)) } internal.AssertSameTimeStampForAllMetrics(t, metrics) @@ -188,27 +188,27 @@ func TestScrape_MemoryUtilization(t *testing.T) { func assertMemoryUsageMetricValid(t *testing.T, metric pdata.Metric, expectedName string) { assert.Equal(t, expectedName, metric.Name()) assert.GreaterOrEqual(t, metric.Sum().DataPoints().Len(), 2) - internal.AssertSumMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Used)) - internal.AssertSumMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Free)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Used)) + internal.AssertSumMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Free)) } func assertMemoryUtilizationMetricValid(t *testing.T, metric pdata.Metric, expectedName string) { assert.Equal(t, expectedName, metric.Name()) assert.GreaterOrEqual(t, metric.Gauge().DataPoints().Len(), 2) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Used)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Free)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 0, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Used)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 1, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Free)) } func assertMemoryUsageMetricHasLinuxSpecificStateLabels(t *testing.T, metric pdata.Metric) { - internal.AssertSumMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Buffered)) - internal.AssertSumMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Cached)) - internal.AssertSumMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.SlabReclaimable)) - internal.AssertSumMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.SlabUnreclaimable)) + internal.AssertSumMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Buffered)) + internal.AssertSumMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Cached)) + internal.AssertSumMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.SlabReclaimable)) + internal.AssertSumMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.SlabUnreclaimable)) } func assertMemoryUtilizationMetricHasLinuxSpecificStateLabels(t *testing.T, metric pdata.Metric) { - internal.AssertGaugeMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Buffered)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.Cached)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.SlabReclaimable)) - internal.AssertGaugeMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewAttributeValueString(metadata.AttributeState.SlabUnreclaimable)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 2, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Buffered)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 3, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.Cached)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 4, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.SlabReclaimable)) + internal.AssertGaugeMetricHasAttributeValue(t, metric, 5, metadata.Attributes.State, pdata.NewValueString(metadata.AttributeState.SlabUnreclaimable)) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics_v2.go index 98da99129a10..ed5102dc42bf 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics_v2.go @@ -67,8 +67,8 @@ func (m *metricSystemNetworkConnections) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Protocol, pdata.NewAttributeValueString(protocolAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Protocol, pdata.NewValueString(protocolAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -121,8 +121,8 @@ func (m *metricSystemNetworkDropped) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -175,8 +175,8 @@ func (m *metricSystemNetworkErrors) recordDataPoint(start pdata.Timestamp, ts pd dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -229,8 +229,8 @@ func (m *metricSystemNetworkIo) recordDataPoint(start pdata.Timestamp, ts pdata. dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -283,8 +283,8 @@ func (m *metricSystemNetworkPackets) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go index fb535c92d9cc..3a9cbaca100e 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go @@ -177,13 +177,13 @@ func assertNetworkIOMetricValid(t *testing.T, metric pdata.Metric, expectedName } assert.GreaterOrEqual(t, metric.Sum().DataPoints().Len(), 2) internal.AssertSumMetricHasAttribute(t, metric, 0, "device") - internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Transmit)) - internal.AssertSumMetricHasAttributeValue(t, metric, 1, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Receive)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, "direction", pdata.NewValueString(metadata.AttributeDirection.Transmit)) + internal.AssertSumMetricHasAttributeValue(t, metric, 1, "direction", pdata.NewValueString(metadata.AttributeDirection.Receive)) } func assertNetworkConnectionsMetricValid(t *testing.T, metric pdata.Metric) { assert.Equal(t, metric.Name(), "system.network.connections") - internal.AssertSumMetricHasAttributeValue(t, metric, 0, "protocol", pdata.NewAttributeValueString(metadata.AttributeProtocol.Tcp)) + internal.AssertSumMetricHasAttributeValue(t, metric, 0, "protocol", pdata.NewValueString(metadata.AttributeProtocol.Tcp)) internal.AssertSumMetricHasAttribute(t, metric, 0, "state") assert.Equal(t, 12, metric.Sum().DataPoints().Len()) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/generated_metrics_v2.go index 049c683e7f58..3f4679291d4d 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/generated_metrics_v2.go @@ -63,7 +63,7 @@ func (m *metricSystemPagingFaults) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -116,8 +116,8 @@ func (m *metricSystemPagingOperations) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -170,8 +170,8 @@ func (m *metricSystemPagingUsage) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -222,8 +222,8 @@ func (m *metricSystemPagingUtilization) recordDataPoint(start pdata.Timestamp, t dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.Device, pdata.NewAttributeValueString(deviceAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Device, pdata.NewValueString(deviceAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_test.go index 72f1819eeed3..2f86029e47c7 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_test.go @@ -124,11 +124,11 @@ func assertPagingUsageMetricValid(t *testing.T, hostPagingUsageMetric pdata.Metr } assert.GreaterOrEqual(t, hostPagingUsageMetric.Sum().DataPoints().Len(), expectedDataPoints) - internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 0, "state", pdata.NewAttributeValueString(metadata.AttributeState.Used)) - internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 1, "state", pdata.NewAttributeValueString(metadata.AttributeState.Free)) + internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 0, "state", pdata.NewValueString(metadata.AttributeState.Used)) + internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 1, "state", pdata.NewValueString(metadata.AttributeState.Free)) // Windows and Linux do not support cached state label if runtime.GOOS != "windows" && runtime.GOOS != "linux" { - internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 2, "state", pdata.NewAttributeValueString(metadata.AttributeState.Cached)) + internal.AssertSumMetricHasAttributeValue(t, hostPagingUsageMetric, 2, "state", pdata.NewValueString(metadata.AttributeState.Cached)) } // on Windows and Linux, also expect the page file device name label @@ -159,11 +159,11 @@ func assertPagingUtilizationMetricValid(t *testing.T, hostPagingUtilizationMetri } assert.GreaterOrEqual(t, hostPagingUtilizationMetric.Gauge().DataPoints().Len(), expectedDataPoints) - internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 0, "state", pdata.NewAttributeValueString(metadata.AttributeState.Used)) - internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 1, "state", pdata.NewAttributeValueString(metadata.AttributeState.Free)) + internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 0, "state", pdata.NewValueString(metadata.AttributeState.Used)) + internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 1, "state", pdata.NewValueString(metadata.AttributeState.Free)) // Windows and Linux do not support cached state label if runtime.GOOS != "windows" && runtime.GOOS != "linux" { - internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 2, "state", pdata.NewAttributeValueString(metadata.AttributeState.Cached)) + internal.AssertGaugeMetricHasAttributeValue(t, hostPagingUtilizationMetric, 2, "state", pdata.NewValueString(metadata.AttributeState.Cached)) } // on Windows and Linux, also expect the page file device name label @@ -192,15 +192,15 @@ func assertPagingOperationsMetricValid(t *testing.T, pagingMetric pdata.Metric, } assert.Equal(t, expectedDataPoints, pagingMetric.Sum().DataPoints().Len()) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 0, "type", pdata.NewAttributeValueString(metadata.AttributeType.Major)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 0, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.PageIn)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 1, "type", pdata.NewAttributeValueString(metadata.AttributeType.Major)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 1, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.PageOut)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 0, "type", pdata.NewValueString(metadata.AttributeType.Major)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 0, "direction", pdata.NewValueString(metadata.AttributeDirection.PageIn)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 1, "type", pdata.NewValueString(metadata.AttributeType.Major)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 1, "direction", pdata.NewValueString(metadata.AttributeDirection.PageOut)) if runtime.GOOS != "windows" { - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 2, "type", pdata.NewAttributeValueString(metadata.AttributeType.Minor)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 2, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.PageIn)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 3, "type", pdata.NewAttributeValueString(metadata.AttributeType.Minor)) - internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 3, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.PageOut)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 2, "type", pdata.NewValueString(metadata.AttributeType.Minor)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 2, "direction", pdata.NewValueString(metadata.AttributeDirection.PageIn)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 3, "type", pdata.NewValueString(metadata.AttributeType.Minor)) + internal.AssertSumMetricHasAttributeValue(t, pagingMetric, 3, "direction", pdata.NewValueString(metadata.AttributeDirection.PageOut)) } } @@ -217,6 +217,6 @@ func assertPageFaultsMetricValid(t *testing.T, pageFaultsMetric pdata.Metric, st } assert.Equal(t, 2, pageFaultsMetric.Sum().DataPoints().Len()) - internal.AssertSumMetricHasAttributeValue(t, pageFaultsMetric, 0, "type", pdata.NewAttributeValueString(metadata.AttributeType.Major)) - internal.AssertSumMetricHasAttributeValue(t, pageFaultsMetric, 1, "type", pdata.NewAttributeValueString(metadata.AttributeType.Minor)) + internal.AssertSumMetricHasAttributeValue(t, pageFaultsMetric, 0, "type", pdata.NewValueString(metadata.AttributeType.Major)) + internal.AssertSumMetricHasAttributeValue(t, pageFaultsMetric, 1, "type", pdata.NewValueString(metadata.AttributeType.Minor)) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/generated_metrics_v2.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/generated_metrics_v2.go index fc1f2a5db582..aaa0b87111d1 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/generated_metrics_v2.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/generated_metrics_v2.go @@ -63,7 +63,7 @@ func (m *metricProcessCPUTime) recordDataPoint(start pdata.Timestamp, ts pdata.T dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -116,7 +116,7 @@ func (m *metricProcessDiskIo) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go index 14c22186a1ad..8195ecaf7a84 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go @@ -103,10 +103,10 @@ func assertCPUTimeMetricValid(t *testing.T, resourceMetrics pdata.ResourceMetric if startTime != 0 { internal.AssertSumMetricStartTimeEquals(t, cpuTimeMetric, startTime) } - internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 0, "state", pdata.NewAttributeValueString(metadata.AttributeState.User)) - internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 1, "state", pdata.NewAttributeValueString(metadata.AttributeState.System)) + internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 0, "state", pdata.NewValueString(metadata.AttributeState.User)) + internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 1, "state", pdata.NewValueString(metadata.AttributeState.System)) if runtime.GOOS == "linux" { - internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 2, "state", pdata.NewAttributeValueString(metadata.AttributeState.Wait)) + internal.AssertSumMetricHasAttributeValue(t, cpuTimeMetric, 2, "state", pdata.NewValueString(metadata.AttributeState.Wait)) } } @@ -128,8 +128,8 @@ func assertDiskIOMetricValid(t *testing.T, resourceMetrics pdata.ResourceMetrics if startTime != 0 { internal.AssertSumMetricStartTimeEquals(t, diskIOMetric, startTime) } - internal.AssertSumMetricHasAttributeValue(t, diskIOMetric, 0, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Read)) - internal.AssertSumMetricHasAttributeValue(t, diskIOMetric, 1, "direction", pdata.NewAttributeValueString(metadata.AttributeDirection.Write)) + internal.AssertSumMetricHasAttributeValue(t, diskIOMetric, 0, "direction", pdata.NewValueString(metadata.AttributeDirection.Read)) + internal.AssertSumMetricHasAttributeValue(t, diskIOMetric, 1, "direction", pdata.NewValueString(metadata.AttributeDirection.Write)) } func assertSameTimeStampForAllMetricsWithinResource(t *testing.T, resourceMetrics pdata.ResourceMetricsSlice) { diff --git a/receiver/hostmetricsreceiver/internal/testutils.go b/receiver/hostmetricsreceiver/internal/testutils.go index 8fa251c052e7..66b024e5d93b 100644 --- a/receiver/hostmetricsreceiver/internal/testutils.go +++ b/receiver/hostmetricsreceiver/internal/testutils.go @@ -34,7 +34,7 @@ func AssertDescriptorEqual(t *testing.T, expected pdata.Metric, actual pdata.Met assert.Equal(t, expected.DataType(), actual.DataType()) } -func AssertSumMetricHasAttributeValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal pdata.AttributeValue) { +func AssertSumMetricHasAttributeValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal pdata.Value) { val, ok := metric.Sum().DataPoints().At(index).Attributes().Get(labelName) assert.Truef(t, ok, "Missing attribute %q in metric %q", labelName, metric.Name()) assert.Equal(t, expectedVal, val) @@ -52,7 +52,7 @@ func AssertSumMetricStartTimeEquals(t *testing.T, metric pdata.Metric, startTime } } -func AssertGaugeMetricHasAttributeValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal pdata.AttributeValue) { +func AssertGaugeMetricHasAttributeValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal pdata.Value) { val, ok := metric.Gauge().DataPoints().At(index).Attributes().Get(labelName) assert.Truef(t, ok, "Missing attribute %q in metric %q", labelName, metric.Name()) assert.Equal(t, expectedVal, val) diff --git a/receiver/influxdbreceiver/go.mod b/receiver/influxdbreceiver/go.mod index ab9c418146ba..74d1283c164f 100644 --- a/receiver/influxdbreceiver/go.mod +++ b/receiver/influxdbreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/influxdata/influxdb-observability/influx2otel v0.2.16 github.com/influxdata/line-protocol/v2 v2.2.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) @@ -29,7 +29,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect diff --git a/receiver/influxdbreceiver/go.sum b/receiver/influxdbreceiver/go.sum index 5444a30d11a3..46169d8ca6f2 100644 --- a/receiver/influxdbreceiver/go.sum +++ b/receiver/influxdbreceiver/go.sum @@ -194,12 +194,12 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/jaegerreceiver/go.mod b/receiver/jaegerreceiver/go.mod index 97061077387c..c809d8b47296 100644 --- a/receiver/jaegerreceiver/go.mod +++ b/receiver/jaegerreceiver/go.mod @@ -10,8 +10,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/stretchr/testify v1.7.0 github.com/uber/jaeger-lib v2.4.1+incompatible - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.45.0 diff --git a/receiver/jaegerreceiver/go.sum b/receiver/jaegerreceiver/go.sum index 70ac2bee2da6..8d4797d41855 100644 --- a/receiver/jaegerreceiver/go.sum +++ b/receiver/jaegerreceiver/go.sum @@ -246,10 +246,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index e73a5f784907..6d2ea8bdce02 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 github.com/testcontainers/testcontainers-go v0.12.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 diff --git a/receiver/jmxreceiver/go.sum b/receiver/jmxreceiver/go.sum index 1b2da64dc1e4..69e83bb56469 100644 --- a/receiver/jmxreceiver/go.sum +++ b/receiver/jmxreceiver/go.sum @@ -822,10 +822,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/receiver/journaldreceiver/go.mod b/receiver/journaldreceiver/go.mod index 99ea8aafa845..04c0256d31c2 100644 --- a/receiver/journaldreceiver/go.mod +++ b/receiver/journaldreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 gopkg.in/yaml.v2 v2.4.0 ) @@ -27,7 +27,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/journaldreceiver/go.sum b/receiver/journaldreceiver/go.sum index 183a2f139495..45f2617208a6 100644 --- a/receiver/journaldreceiver/go.sum +++ b/receiver/journaldreceiver/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/k8sclusterreceiver/go.mod b/receiver/k8sclusterreceiver/go.mod index bb61835ddbc3..fa711b3afc17 100644 --- a/receiver/k8sclusterreceiver/go.mod +++ b/receiver/k8sclusterreceiver/go.mod @@ -12,8 +12,8 @@ require ( github.com/openshift/api v0.0.0-20210521075222-e273a339932a github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 diff --git a/receiver/k8sclusterreceiver/go.sum b/receiver/k8sclusterreceiver/go.sum index 10978237aeec..c28b5b8b8b4b 100644 --- a/receiver/k8sclusterreceiver/go.sum +++ b/receiver/k8sclusterreceiver/go.sum @@ -383,10 +383,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/k8seventsreceiver/go.mod b/receiver/k8seventsreceiver/go.mod index 56e60934d4d6..b424ac31f9d8 100644 --- a/receiver/k8seventsreceiver/go.mod +++ b/receiver/k8seventsreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 diff --git a/receiver/k8seventsreceiver/go.sum b/receiver/k8seventsreceiver/go.sum index e731438898ca..1c83729ad8ea 100644 --- a/receiver/k8seventsreceiver/go.sum +++ b/receiver/k8seventsreceiver/go.sum @@ -367,10 +367,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index c477fb594c08..061837b554f7 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/kafkametricsreceiver/go.sum b/receiver/kafkametricsreceiver/go.sum index 8c93d66c35cb..96dcb89b9127 100644 --- a/receiver/kafkametricsreceiver/go.sum +++ b/receiver/kafkametricsreceiver/go.sum @@ -768,10 +768,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/kafkareceiver/go.mod b/receiver/kafkareceiver/go.mod index df0394b75c7f..aa4c1a736251 100644 --- a/receiver/kafkareceiver/go.mod +++ b/receiver/kafkareceiver/go.mod @@ -14,8 +14,8 @@ require ( github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/kafkareceiver/go.sum b/receiver/kafkareceiver/go.sum index 767c89cb79c5..563d9655b73c 100644 --- a/receiver/kafkareceiver/go.sum +++ b/receiver/kafkareceiver/go.sum @@ -272,10 +272,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index 7a5450caa9ff..c68ec4f35920 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 diff --git a/receiver/kubeletstatsreceiver/go.sum b/receiver/kubeletstatsreceiver/go.sum index b92cbe210f3d..5671a83e489a 100644 --- a/receiver/kubeletstatsreceiver/go.sum +++ b/receiver/kubeletstatsreceiver/go.sum @@ -478,10 +478,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= 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.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= diff --git a/receiver/kubeletstatsreceiver/internal/kubelet/volume_test.go b/receiver/kubeletstatsreceiver/internal/kubelet/volume_test.go index 065eae4a84b6..b516e28b1e46 100644 --- a/receiver/kubeletstatsreceiver/internal/kubelet/volume_test.go +++ b/receiver/kubeletstatsreceiver/internal/kubelet/volume_test.go @@ -39,7 +39,7 @@ func TestDetailedPVCLabels(t *testing.T) { volumeSource v1.VolumeSource pod pod detailedPVCLabelsSetterOverride func(volCacheID, volumeClaim, namespace string, labels map[string]string) error - want map[string]pdata.AttributeValue + want map[string]pdata.Value }{ { name: "persistentVolumeClaim - with detailed PVC labels (AWS)", @@ -60,16 +60,16 @@ func TestDetailedPVCLabels(t *testing.T) { }, labels) return nil }, - want: map[string]pdata.AttributeValue{ - "k8s.volume.name": pdata.NewAttributeValueString("volume0"), - "k8s.volume.type": pdata.NewAttributeValueString("awsElasticBlockStore"), - "aws.volume.id": pdata.NewAttributeValueString("volume_id"), - "fs.type": pdata.NewAttributeValueString("fs_type"), - "partition": pdata.NewAttributeValueString("10"), - "k8s.persistentvolumeclaim.name": pdata.NewAttributeValueString("claim-name"), - "k8s.pod.uid": pdata.NewAttributeValueString("uid-1234"), - "k8s.pod.name": pdata.NewAttributeValueString("pod-name"), - "k8s.namespace.name": pdata.NewAttributeValueString("pod-namespace"), + want: map[string]pdata.Value{ + "k8s.volume.name": pdata.NewValueString("volume0"), + "k8s.volume.type": pdata.NewValueString("awsElasticBlockStore"), + "aws.volume.id": pdata.NewValueString("volume_id"), + "fs.type": pdata.NewValueString("fs_type"), + "partition": pdata.NewValueString("10"), + "k8s.persistentvolumeclaim.name": pdata.NewValueString("claim-name"), + "k8s.pod.uid": pdata.NewValueString("uid-1234"), + "k8s.pod.name": pdata.NewValueString("pod-name"), + "k8s.namespace.name": pdata.NewValueString("pod-namespace"), }, }, { @@ -91,16 +91,16 @@ func TestDetailedPVCLabels(t *testing.T) { }, labels) return nil }, - want: map[string]pdata.AttributeValue{ - "k8s.volume.name": pdata.NewAttributeValueString("volume0"), - "k8s.volume.type": pdata.NewAttributeValueString("gcePersistentDisk"), - "gce.pd.name": pdata.NewAttributeValueString("pd_name"), - "fs.type": pdata.NewAttributeValueString("fs_type"), - "partition": pdata.NewAttributeValueString("10"), - "k8s.persistentvolumeclaim.name": pdata.NewAttributeValueString("claim-name"), - "k8s.pod.uid": pdata.NewAttributeValueString("uid-1234"), - "k8s.pod.name": pdata.NewAttributeValueString("pod-name"), - "k8s.namespace.name": pdata.NewAttributeValueString("pod-namespace"), + want: map[string]pdata.Value{ + "k8s.volume.name": pdata.NewValueString("volume0"), + "k8s.volume.type": pdata.NewValueString("gcePersistentDisk"), + "gce.pd.name": pdata.NewValueString("pd_name"), + "fs.type": pdata.NewValueString("fs_type"), + "partition": pdata.NewValueString("10"), + "k8s.persistentvolumeclaim.name": pdata.NewValueString("claim-name"), + "k8s.pod.uid": pdata.NewValueString("uid-1234"), + "k8s.pod.name": pdata.NewValueString("pod-name"), + "k8s.namespace.name": pdata.NewValueString("pod-namespace"), }, }, { @@ -121,15 +121,15 @@ func TestDetailedPVCLabels(t *testing.T) { }, labels) return nil }, - want: map[string]pdata.AttributeValue{ - "k8s.volume.name": pdata.NewAttributeValueString("volume0"), - "k8s.volume.type": pdata.NewAttributeValueString("glusterfs"), - "glusterfs.endpoints.name": pdata.NewAttributeValueString("endpoints_name"), - "glusterfs.path": pdata.NewAttributeValueString("path"), - "k8s.persistentvolumeclaim.name": pdata.NewAttributeValueString("claim-name"), - "k8s.pod.uid": pdata.NewAttributeValueString("uid-1234"), - "k8s.pod.name": pdata.NewAttributeValueString("pod-name"), - "k8s.namespace.name": pdata.NewAttributeValueString("pod-namespace"), + want: map[string]pdata.Value{ + "k8s.volume.name": pdata.NewValueString("volume0"), + "k8s.volume.type": pdata.NewValueString("glusterfs"), + "glusterfs.endpoints.name": pdata.NewValueString("endpoints_name"), + "glusterfs.path": pdata.NewValueString("path"), + "k8s.persistentvolumeclaim.name": pdata.NewValueString("claim-name"), + "k8s.pod.uid": pdata.NewValueString("uid-1234"), + "k8s.pod.name": pdata.NewValueString("pod-name"), + "k8s.namespace.name": pdata.NewValueString("pod-namespace"), }, }, { @@ -149,13 +149,13 @@ func TestDetailedPVCLabels(t *testing.T) { }, labels) return nil }, - want: map[string]pdata.AttributeValue{ - "k8s.volume.name": pdata.NewAttributeValueString("volume0"), - "k8s.volume.type": pdata.NewAttributeValueString("local"), - "k8s.persistentvolumeclaim.name": pdata.NewAttributeValueString("claim-name"), - "k8s.pod.uid": pdata.NewAttributeValueString("uid-1234"), - "k8s.pod.name": pdata.NewAttributeValueString("pod-name"), - "k8s.namespace.name": pdata.NewAttributeValueString("pod-namespace"), + want: map[string]pdata.Value{ + "k8s.volume.name": pdata.NewValueString("volume0"), + "k8s.volume.type": pdata.NewValueString("local"), + "k8s.persistentvolumeclaim.name": pdata.NewValueString("claim-name"), + "k8s.pod.uid": pdata.NewValueString("uid-1234"), + "k8s.pod.name": pdata.NewValueString("pod-name"), + "k8s.namespace.name": pdata.NewValueString("pod-namespace"), }, }, } diff --git a/receiver/memcachedreceiver/go.mod b/receiver/memcachedreceiver/go.mod index e0c20e36ab62..d800bdf26b18 100644 --- a/receiver/memcachedreceiver/go.mod +++ b/receiver/memcachedreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/memcachedreceiver/go.sum b/receiver/memcachedreceiver/go.sum index 815684e98661..833e01d56dee 100644 --- a/receiver/memcachedreceiver/go.sum +++ b/receiver/memcachedreceiver/go.sum @@ -702,10 +702,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/memcachedreceiver/scraper.go b/receiver/memcachedreceiver/scraper.go index 40c4e4c3dda2..83f5f9624541 100644 --- a/receiver/memcachedreceiver/scraper.go +++ b/receiver/memcachedreceiver/scraper.go @@ -91,22 +91,22 @@ func (r *memcachedScraper) scrape(_ context.Context) (pdata.Metrics, error) { r.addToIntMetric(totalConn, attributes, parsedV, now) } case "cmd_get": - attributes.Insert(metadata.A.Command, pdata.NewAttributeValueString("get")) + attributes.Insert(metadata.A.Command, pdata.NewValueString("get")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(commandCount, attributes, parsedV, now) } case "cmd_set": - attributes.Insert(metadata.A.Command, pdata.NewAttributeValueString("set")) + attributes.Insert(metadata.A.Command, pdata.NewValueString("set")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(commandCount, attributes, parsedV, now) } case "cmd_flush": - attributes.Insert(metadata.A.Command, pdata.NewAttributeValueString("flush")) + attributes.Insert(metadata.A.Command, pdata.NewValueString("flush")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(commandCount, attributes, parsedV, now) } case "cmd_touch": - attributes.Insert(metadata.A.Command, pdata.NewAttributeValueString("touch")) + attributes.Insert(metadata.A.Command, pdata.NewValueString("touch")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(commandCount, attributes, parsedV, now) } @@ -125,59 +125,59 @@ func (r *memcachedScraper) scrape(_ context.Context) (pdata.Metrics, error) { r.addToIntMetric(evictions, attributes, parsedV, now) } case "bytes_read": - attributes.Insert(metadata.A.Direction, pdata.NewAttributeValueString("received")) + attributes.Insert(metadata.A.Direction, pdata.NewValueString("received")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(network, attributes, parsedV, now) } case "bytes_written": - attributes.Insert(metadata.A.Direction, pdata.NewAttributeValueString("sent")) + attributes.Insert(metadata.A.Direction, pdata.NewValueString("sent")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(network, attributes, parsedV, now) } case "get_hits": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("get")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("hit")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("get")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("hit")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "get_misses": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("get")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("miss")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("get")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("miss")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "incr_hits": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("increment")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("hit")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("increment")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("hit")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "incr_misses": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("increment")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("miss")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("increment")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("miss")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "decr_hits": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("decrement")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("hit")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("decrement")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("hit")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "decr_misses": - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("decrement")) - attributes.Insert(metadata.A.Type, pdata.NewAttributeValueString("miss")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("decrement")) + attributes.Insert(metadata.A.Type, pdata.NewValueString("miss")) if parsedV, ok := r.parseInt(k, v); ok { r.addToIntMetric(operationCount, attributes, parsedV, now) } case "rusage_system": - attributes.Insert(metadata.A.State, pdata.NewAttributeValueString("system")) + attributes.Insert(metadata.A.State, pdata.NewValueString("system")) if parsedV, ok := r.parseFloat(k, v); ok { r.addToDoubleMetric(rUsage, attributes, parsedV, now) } case "rusage_user": - attributes.Insert(metadata.A.State, pdata.NewAttributeValueString("user")) + attributes.Insert(metadata.A.State, pdata.NewValueString("user")) if parsedV, ok := r.parseFloat(k, v); ok { r.addToDoubleMetric(rUsage, attributes, parsedV, now) } @@ -186,7 +186,7 @@ func (r *memcachedScraper) scrape(_ context.Context) (pdata.Metrics, error) { // Calculated Metrics attributes := pdata.NewAttributeMap() - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("increment")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("increment")) parsedHit, okHit := r.parseInt("incr_hits", stats.Stats["incr_hits"]) parsedMiss, okMiss := r.parseInt("incr_misses", stats.Stats["incr_misses"]) if okHit && okMiss { @@ -194,7 +194,7 @@ func (r *memcachedScraper) scrape(_ context.Context) (pdata.Metrics, error) { } attributes = pdata.NewAttributeMap() - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("decrement")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("decrement")) parsedHit, okHit = r.parseInt("decr_hits", stats.Stats["decr_hits"]) parsedMiss, okMiss = r.parseInt("decr_misses", stats.Stats["decr_misses"]) if okHit && okMiss { @@ -202,7 +202,7 @@ func (r *memcachedScraper) scrape(_ context.Context) (pdata.Metrics, error) { } attributes = pdata.NewAttributeMap() - attributes.Insert(metadata.A.Operation, pdata.NewAttributeValueString("get")) + attributes.Insert(metadata.A.Operation, pdata.NewValueString("get")) parsedHit, okHit = r.parseInt("get_hits", stats.Stats["get_hits"]) parsedMiss, okMiss = r.parseInt("get_misses", stats.Stats["get_misses"]) if okHit && okMiss { diff --git a/receiver/mongodbatlasreceiver/go.mod b/receiver/mongodbatlasreceiver/go.mod index 9e4beb0e1b0d..e5ae296632d2 100644 --- a/receiver/mongodbatlasreceiver/go.mod +++ b/receiver/mongodbatlasreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/mongodb-forks/digest v1.0.3 github.com/pkg/errors v0.9.1 go.mongodb.org/atlas v0.15.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/mongodbatlasreceiver/go.sum b/receiver/mongodbatlasreceiver/go.sum index bb93ae142a5d..fe3d4b33e74f 100644 --- a/receiver/mongodbatlasreceiver/go.sum +++ b/receiver/mongodbatlasreceiver/go.sum @@ -169,10 +169,10 @@ go.mongodb.org/atlas v0.15.0 h1:YyOBdBIuI//krRITf4r7PSirJ3YDNNUfNmapxwSyDow= go.mongodb.org/atlas v0.15.0/go.mod h1:lQhRHIxc6jQHEK3/q9WLu/SdBkPj2fQYhjLGUF6Z3U8= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 04fde42a85ac..8a623c729566 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -24,649 +24,649 @@ import ( type metricMappingData struct { metricName string - attributes map[string]pdata.AttributeValue + attributes map[string]pdata.Value } var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. - "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. - "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, // Context: Process - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. - "ASSERT_REGULAR": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "assert_type": pdata.NewAttributeValueString("regular"), + "ASSERT_REGULAR": {"mongodbatlas.process.asserts", map[string]pdata.Value{ + "assert_type": pdata.NewValueString("regular"), }}, - "ASSERT_WARNING": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "assert_type": pdata.NewAttributeValueString("warning"), + "ASSERT_WARNING": {"mongodbatlas.process.asserts", map[string]pdata.Value{ + "assert_type": pdata.NewValueString("warning"), }}, - "ASSERT_MSG": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "assert_type": pdata.NewAttributeValueString("msg"), + "ASSERT_MSG": {"mongodbatlas.process.asserts", map[string]pdata.Value{ + "assert_type": pdata.NewValueString("msg"), }}, - "ASSERT_USER": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "assert_type": pdata.NewAttributeValueString("user"), + "ASSERT_USER": {"mongodbatlas.process.asserts", map[string]pdata.Value{ + "assert_type": pdata.NewValueString("user"), }}, // Amount of data flushed in the background. - "BACKGROUND_FLUSH_AVG": {"mongodbatlas.process.background_flush", map[string]pdata.AttributeValue{}}, + "BACKGROUND_FLUSH_AVG": {"mongodbatlas.process.background_flush", map[string]pdata.Value{}}, // Amount of bytes in the WiredTiger storage engine cache and tickets found in the wiredTiger.cache and wiredTiger.concurrentTransactions documents that the serverStatus command generates. - "CACHE_BYTES_READ_INTO": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ - "cache_direction": pdata.NewAttributeValueString("read_into"), + "CACHE_BYTES_READ_INTO": {"mongodbatlas.process.cache.io", map[string]pdata.Value{ + "cache_direction": pdata.NewValueString("read_into"), }}, - "CACHE_BYTES_WRITTEN_FROM": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ - "cache_direction": pdata.NewAttributeValueString("written_from"), + "CACHE_BYTES_WRITTEN_FROM": {"mongodbatlas.process.cache.io", map[string]pdata.Value{ + "cache_direction": pdata.NewValueString("written_from"), }}, - "CACHE_DIRTY_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ - "cache_status": pdata.NewAttributeValueString("dirty"), + "CACHE_DIRTY_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.Value{ + "cache_status": pdata.NewValueString("dirty"), }}, - "CACHE_USED_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ - "cache_status": pdata.NewAttributeValueString("used"), + "CACHE_USED_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.Value{ + "cache_status": pdata.NewValueString("used"), }}, - "TICKETS_AVAILABLE_READS": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ - "ticket_type": pdata.NewAttributeValueString("available_reads"), + "TICKETS_AVAILABLE_READS": {"mongodbatlas.process.tickets", map[string]pdata.Value{ + "ticket_type": pdata.NewValueString("available_reads"), }}, - "TICKETS_AVAILABLE_WRITE": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ - "ticket_type": pdata.NewAttributeValueString("available_writes"), + "TICKETS_AVAILABLE_WRITE": {"mongodbatlas.process.tickets", map[string]pdata.Value{ + "ticket_type": pdata.NewValueString("available_writes"), }}, // Number of connections to a MongoDB process found in the connections document that the serverStatus command generates. - "CONNECTIONS": {"mongodbatlas.process.connections", map[string]pdata.AttributeValue{}}, + "CONNECTIONS": {"mongodbatlas.process.connections", map[string]pdata.Value{}}, // Number of cursors for a MongoDB process found in the metrics.cursor document that the serverStatus command generates. - "CURSORS_TOTAL_OPEN": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ - "cursor_state": pdata.NewAttributeValueString("open"), + "CURSORS_TOTAL_OPEN": {"mongodbatlas.process.cursors", map[string]pdata.Value{ + "cursor_state": pdata.NewValueString("open"), }}, - "CURSORS_TOTAL_TIMED_OUT": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ - "cursor_state": pdata.NewAttributeValueString("timed_out"), + "CURSORS_TOTAL_TIMED_OUT": {"mongodbatlas.process.cursors", map[string]pdata.Value{ + "cursor_state": pdata.NewValueString("timed_out"), }}, // Numbers of Memory Issues and Page Faults for a MongoDB process. - "EXTRA_INFO_PAGE_FAULTS": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "memory_issue_type": pdata.NewAttributeValueString("extra_info"), + "EXTRA_INFO_PAGE_FAULTS": {"mongodbatlas.process.page_faults", map[string]pdata.Value{ + "memory_issue_type": pdata.NewValueString("extra_info"), }}, - "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "memory_issue_type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), + "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"mongodbatlas.process.page_faults", map[string]pdata.Value{ + "memory_issue_type": pdata.NewValueString("global_accesses_not_in_memory"), }}, - "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "memory_issue_type": pdata.NewAttributeValueString("exceptions_thrown"), + "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"mongodbatlas.process.page_faults", map[string]pdata.Value{ + "memory_issue_type": pdata.NewValueString("exceptions_thrown"), }}, // Number of operations waiting on locks for the MongoDB process that the serverStatus command generates. Cloud Manager computes these values based on the type of storage engine. - "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "global_lock_state": pdata.NewAttributeValueString("current_queue_total"), + "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"mongodbatlas.process.global_lock", map[string]pdata.Value{ + "global_lock_state": pdata.NewValueString("current_queue_total"), }}, - "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "global_lock_state": pdata.NewAttributeValueString("current_queue_readers"), + "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"mongodbatlas.process.global_lock", map[string]pdata.Value{ + "global_lock_state": pdata.NewValueString("current_queue_readers"), }}, - "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "global_lock_state": pdata.NewAttributeValueString("current_queue_writers"), + "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"mongodbatlas.process.global_lock", map[string]pdata.Value{ + "global_lock_state": pdata.NewValueString("current_queue_writers"), }}, // Number of index btree operations. - "INDEX_COUNTERS_BTREE_ACCESSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "btree_counter_type": pdata.NewAttributeValueString("accesses"), + "INDEX_COUNTERS_BTREE_ACCESSES": {"mongodbatlas.process.index.counters", map[string]pdata.Value{ + "btree_counter_type": pdata.NewValueString("accesses"), }}, - "INDEX_COUNTERS_BTREE_HITS": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "btree_counter_type": pdata.NewAttributeValueString("hits"), + "INDEX_COUNTERS_BTREE_HITS": {"mongodbatlas.process.index.counters", map[string]pdata.Value{ + "btree_counter_type": pdata.NewValueString("hits"), }}, - "INDEX_COUNTERS_BTREE_MISSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "btree_counter_type": pdata.NewAttributeValueString("misses"), + "INDEX_COUNTERS_BTREE_MISSES": {"mongodbatlas.process.index.counters", map[string]pdata.Value{ + "btree_counter_type": pdata.NewValueString("misses"), }}, - "INDEX_COUNTERS_BTREE_MISS_RATIO": {"mongodbatlas.process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, + "INDEX_COUNTERS_BTREE_MISS_RATIO": {"mongodbatlas.process.index.btree_miss_ratio", map[string]pdata.Value{}}, // Number of journaling operations. - "JOURNALING_COMMITS_IN_WRITE_LOCK": {"mongodbatlas.process.journaling.commits", map[string]pdata.AttributeValue{}}, - "JOURNALING_MB": {"mongodbatlas.process.journaling.written", map[string]pdata.AttributeValue{}}, - "JOURNALING_WRITE_DATA_FILES_MB": {"mongodbatlas.process.journaling.data_files", map[string]pdata.AttributeValue{}}, + "JOURNALING_COMMITS_IN_WRITE_LOCK": {"mongodbatlas.process.journaling.commits", map[string]pdata.Value{}}, + "JOURNALING_MB": {"mongodbatlas.process.journaling.written", map[string]pdata.Value{}}, + "JOURNALING_WRITE_DATA_FILES_MB": {"mongodbatlas.process.journaling.data_files", map[string]pdata.Value{}}, // Amount of memory for a MongoDB process found in the mem document that the serverStatus command collects. - "MEMORY_RESIDENT": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("resident"), + "MEMORY_RESIDENT": {"mongodbatlas.process.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("resident"), }}, - "MEMORY_VIRTUAL": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("virtual"), + "MEMORY_VIRTUAL": {"mongodbatlas.process.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("virtual"), }}, - "MEMORY_MAPPED": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("mapped"), + "MEMORY_MAPPED": {"mongodbatlas.process.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("mapped"), }}, - "COMPUTED_MEMORY": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("computed"), + "COMPUTED_MEMORY": {"mongodbatlas.process.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("computed"), }}, // Amount of throughput for MongoDB process found in the network document that the serverStatus command collects. - "NETWORK_BYTES_IN": {"mongodbatlas.process.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("receive"), + "NETWORK_BYTES_IN": {"mongodbatlas.process.network.io", map[string]pdata.Value{ + "direction": pdata.NewValueString("receive"), }}, - "NETWORK_BYTES_OUT": {"mongodbatlas.process.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("transmit"), + "NETWORK_BYTES_OUT": {"mongodbatlas.process.network.io", map[string]pdata.Value{ + "direction": pdata.NewValueString("transmit"), }}, - "NETWORK_NUM_REQUESTS": {"mongodbatlas.process.network.requests", map[string]pdata.AttributeValue{}}, + "NETWORK_NUM_REQUESTS": {"mongodbatlas.process.network.requests", map[string]pdata.Value{}}, // Durations and throughput of the MongoDB process' oplog. - "OPLOG_SLAVE_LAG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "oplog_type": pdata.NewAttributeValueString("slave_lag_master_time"), + "OPLOG_SLAVE_LAG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.Value{ + "oplog_type": pdata.NewValueString("slave_lag_master_time"), }}, - "OPLOG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "oplog_type": pdata.NewAttributeValueString("master_time"), + "OPLOG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.Value{ + "oplog_type": pdata.NewValueString("master_time"), }}, - "OPLOG_MASTER_LAG_TIME_DIFF": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "oplog_type": pdata.NewAttributeValueString("master_lag_time_diff"), + "OPLOG_MASTER_LAG_TIME_DIFF": {"mongodbatlas.process.oplog.time", map[string]pdata.Value{ + "oplog_type": pdata.NewValueString("master_lag_time_diff"), }}, - "OPLOG_RATE_GB_PER_HOUR": {"mongodbatlas.process.oplog.rate", map[string]pdata.AttributeValue{}}, + "OPLOG_RATE_GB_PER_HOUR": {"mongodbatlas.process.oplog.rate", map[string]pdata.Value{}}, // Number of database operations on a MongoDB process since the process last started. - "DB_STORAGE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "storage_status": pdata.NewAttributeValueString("total"), + "DB_STORAGE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.Value{ + "storage_status": pdata.NewValueString("total"), }}, - "DB_DATA_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "storage_status": pdata.NewAttributeValueString("data_size"), + "DB_DATA_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.Value{ + "storage_status": pdata.NewValueString("data_size"), }}, - "DB_INDEX_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "storage_status": pdata.NewAttributeValueString("index_size"), + "DB_INDEX_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.Value{ + "storage_status": pdata.NewValueString("index_size"), }}, - "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "storage_status": pdata.NewAttributeValueString("data_size_wo_system"), + "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"mongodbatlas.process.db.storage", map[string]pdata.Value{ + "storage_status": pdata.NewValueString("data_size_wo_system"), }}, // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. - "OPCOUNTER_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("cmd"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("cmd"), + "role": pdata.NewValueString("primary"), }}, - "OPCOUNTER_QUERY": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("query"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_QUERY": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("query"), + "role": pdata.NewValueString("primary"), }}, - "OPCOUNTER_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("update"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("update"), + "role": pdata.NewValueString("primary"), }}, - "OPCOUNTER_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("delete"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("delete"), + "role": pdata.NewValueString("primary"), }}, - "OPCOUNTER_GETMORE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("getmore"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_GETMORE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("getmore"), + "role": pdata.NewValueString("primary"), }}, - "OPCOUNTER_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("insert"), - "role": pdata.NewAttributeValueString("primary"), + "OPCOUNTER_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("insert"), + "role": pdata.NewValueString("primary"), }}, // Rate of database operations on MongoDB secondaries found in the opcountersRepl document that the serverStatus command collects. - "OPCOUNTER_REPL_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("cmd"), - "role": pdata.NewAttributeValueString("replica"), + "OPCOUNTER_REPL_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("cmd"), + "role": pdata.NewValueString("replica"), }}, - "OPCOUNTER_REPL_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("update"), - "role": pdata.NewAttributeValueString("replica"), + "OPCOUNTER_REPL_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("update"), + "role": pdata.NewValueString("replica"), }}, - "OPCOUNTER_REPL_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("delete"), - "role": pdata.NewAttributeValueString("replica"), + "OPCOUNTER_REPL_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("delete"), + "role": pdata.NewValueString("replica"), }}, - "OPCOUNTER_REPL_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("insert"), - "role": pdata.NewAttributeValueString("replica"), + "OPCOUNTER_REPL_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("insert"), + "role": pdata.NewValueString("replica"), }}, // Average rate of documents returned, inserted, updated, or deleted per second during a selected time period. - "DOCUMENT_METRICS_RETURNED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "document_status": pdata.NewAttributeValueString("returned"), + "DOCUMENT_METRICS_RETURNED": {"mongodbatlas.process.db.document.rate", map[string]pdata.Value{ + "document_status": pdata.NewValueString("returned"), }}, - "DOCUMENT_METRICS_INSERTED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "document_status": pdata.NewAttributeValueString("inserted"), + "DOCUMENT_METRICS_INSERTED": {"mongodbatlas.process.db.document.rate", map[string]pdata.Value{ + "document_status": pdata.NewValueString("inserted"), }}, - "DOCUMENT_METRICS_UPDATED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "document_status": pdata.NewAttributeValueString("updated"), + "DOCUMENT_METRICS_UPDATED": {"mongodbatlas.process.db.document.rate", map[string]pdata.Value{ + "document_status": pdata.NewValueString("updated"), }}, - "DOCUMENT_METRICS_DELETED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "document_status": pdata.NewAttributeValueString("deleted"), + "DOCUMENT_METRICS_DELETED": {"mongodbatlas.process.db.document.rate", map[string]pdata.Value{ + "document_status": pdata.NewValueString("deleted"), }}, // Average rate for operations per second during a selected time period that perform a sort but cannot perform the sort using an index. - "OPERATIONS_SCAN_AND_ORDER": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ - "operation": pdata.NewAttributeValueString("scan_and_order"), + "OPERATIONS_SCAN_AND_ORDER": {"mongodbatlas.process.db.operations.rate", map[string]pdata.Value{ + "operation": pdata.NewValueString("scan_and_order"), }}, // Average execution time in milliseconds per read, write, or command operation during a selected time period. - "OP_EXECUTION_TIME_READS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "execution_type": pdata.NewAttributeValueString("reads"), + "OP_EXECUTION_TIME_READS": {"mongodbatlas.process.db.operations.time", map[string]pdata.Value{ + "execution_type": pdata.NewValueString("reads"), }}, - "OP_EXECUTION_TIME_WRITES": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "execution_type": pdata.NewAttributeValueString("writes"), + "OP_EXECUTION_TIME_WRITES": {"mongodbatlas.process.db.operations.time", map[string]pdata.Value{ + "execution_type": pdata.NewValueString("writes"), }}, - "OP_EXECUTION_TIME_COMMANDS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "execution_type": pdata.NewAttributeValueString("commands"), + "OP_EXECUTION_TIME_COMMANDS": {"mongodbatlas.process.db.operations.time", map[string]pdata.Value{ + "execution_type": pdata.NewValueString("commands"), }}, // Number of times the host restarted within the previous hour. - "RESTARTS_IN_LAST_HOUR": {"mongodbatlas.process.restarts", map[string]pdata.AttributeValue{}}, + "RESTARTS_IN_LAST_HOUR": {"mongodbatlas.process.restarts", map[string]pdata.Value{}}, // Average rate per second to scan index items during queries and query-plan evaluations found in the value of totalKeysExamined from the explain command. - "QUERY_EXECUTOR_SCANNED": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ - "scanned_type": pdata.NewAttributeValueString("index_items"), + "QUERY_EXECUTOR_SCANNED": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.Value{ + "scanned_type": pdata.NewValueString("index_items"), }}, // Average rate of documents scanned per second during queries and query-plan evaluations found in the value of totalDocsExamined from the explain command. - "QUERY_EXECUTOR_SCANNED_OBJECTS": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ - "scanned_type": pdata.NewAttributeValueString("objects"), + "QUERY_EXECUTOR_SCANNED_OBJECTS": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.Value{ + "scanned_type": pdata.NewValueString("objects"), }}, // Ratio of the number of index items scanned to the number of documents returned. - "QUERY_TARGETING_SCANNED_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ - "scanned_type": pdata.NewAttributeValueString("index_items"), + "QUERY_TARGETING_SCANNED_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.Value{ + "scanned_type": pdata.NewValueString("index_items"), }}, // Ratio of the number of documents scanned to the number of documents returned. - "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ - "scanned_type": pdata.NewAttributeValueString("objects"), + "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.Value{ + "scanned_type": pdata.NewValueString("objects"), }}, // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. - "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), + "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("nice"), }}, - "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), + "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("nice"), }}, - "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), + "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("iowait"), }}, - "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), + "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("iowait"), }}, - "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), + "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("irq"), }}, - "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), + "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("irq"), }}, - "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), + "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("softirq"), }}, - "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), + "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("softirq"), }}, - "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), + "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("guest"), }}, - "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), + "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("guest"), }}, - "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), + "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("steal"), }}, - "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), + "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("steal"), }}, // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. - "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), + "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("nice"), }}, - "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), + "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("nice"), }}, - "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), + "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("iowait"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), + "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("iowait"), }}, - "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), + "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("irq"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), + "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("irq"), }}, - "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), + "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("softirq"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), + "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("softirq"), }}, - "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), + "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("guest"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), + "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("guest"), }}, - "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), + "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("steal"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), + "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("steal"), }}, // Physical memory usage, in bytes, that the host uses. - "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("available"), + "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("available"), }}, - "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("available"), + "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.max", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("available"), }}, - "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("buffers"), + "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("buffers"), }}, - "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("buffers"), + "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.max", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("buffers"), }}, - "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("cached"), + "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("cached"), }}, - "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("cached"), + "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("cached"), }}, - "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("free"), + "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("free"), }}, - "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("free"), + "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("free"), }}, - "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("shared"), + "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("shared"), }}, - "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("shared"), + "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("shared"), }}, - "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("used"), + "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("used"), }}, - "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ - "memory_status": pdata.NewAttributeValueString("used"), + "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.Value{ + "memory_status": pdata.NewValueString("used"), }}, // Average rate of physical bytes per second that the eth0 network interface received and transmitted. - "SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.average", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("receive"), + "SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.average", map[string]pdata.Value{ + "direction": pdata.NewValueString("receive"), }}, - "MAX_SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.max", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("receive"), + "MAX_SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.max", map[string]pdata.Value{ + "direction": pdata.NewValueString("receive"), }}, - "SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.average", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("transmit"), + "SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.average", map[string]pdata.Value{ + "direction": pdata.NewValueString("transmit"), }}, - "MAX_SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.max", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("transmit"), + "MAX_SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.max", map[string]pdata.Value{ + "direction": pdata.NewValueString("transmit"), }}, // Total amount of memory that swap uses. - "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.average", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("used"), + "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.average", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("used"), }}, - "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.max", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("used"), + "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.max", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("used"), }}, - "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.average", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("free"), + "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.average", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("free"), }}, - "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.max", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("free"), + "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.max", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("free"), }}, // Total amount of memory written and read from swap. - "SWAP_IO_IN": {"mongodbatlas.system.paging.io.average", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("in"), + "SWAP_IO_IN": {"mongodbatlas.system.paging.io.average", map[string]pdata.Value{ + "direction": pdata.NewValueString("in"), }}, - "MAX_SWAP_IO_IN": {"mongodbatlas.system.paging.io.max", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("in"), + "MAX_SWAP_IO_IN": {"mongodbatlas.system.paging.io.max", map[string]pdata.Value{ + "direction": pdata.NewValueString("in"), }}, - "SWAP_IO_OUT": {"mongodbatlas.system.paging.io.average", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("out"), + "SWAP_IO_OUT": {"mongodbatlas.system.paging.io.average", map[string]pdata.Value{ + "direction": pdata.NewValueString("out"), }}, - "MAX_SWAP_IO_OUT": {"mongodbatlas.system.paging.io.max", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("out"), + "MAX_SWAP_IO_OUT": {"mongodbatlas.system.paging.io.max", map[string]pdata.Value{ + "direction": pdata.NewValueString("out"), }}, // Memory usage, in bytes, that Atlas Search processes use. - "FTS_PROCESS_RESIDENT_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("resident"), + "FTS_PROCESS_RESIDENT_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("resident"), }}, - "FTS_PROCESS_VIRTUAL_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("virtual"), + "FTS_PROCESS_VIRTUAL_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("virtual"), }}, - "FTS_PROCESS_SHARED_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("shared"), + "FTS_PROCESS_SHARED_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("shared"), }}, - "FTS_MEMORY_MAPPED": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("mapped"), + "FTS_MEMORY_MAPPED": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.Value{ + "memory_state": pdata.NewValueString("mapped"), }}, // Disk space, in bytes, that Atlas Search indexes use. - "FTS_DISK_USAGE": {"mongodbatlas.system.fts.disk.used", map[string]pdata.AttributeValue{}}, + "FTS_DISK_USAGE": {"mongodbatlas.system.fts.disk.used", map[string]pdata.Value{}}, // Percentage of CPU that Atlas Search processes use. - "FTS_PROCESS_CPU_USER": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "FTS_PROCESS_CPU_USER": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "FTS_PROCESS_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "FTS_PROCESS_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, - "FTS_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), + "FTS_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("user"), }}, - "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), + "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.Value{ + "cpu_state": pdata.NewValueString("kernel"), }}, // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) // Measures throughput of I/O operations for the disk partition used for MongoDB. - "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("read"), + "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("read"), }}, - "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("read"), + "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("read"), }}, - "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("write"), + "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("write"), }}, - "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("write"), + "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("write"), }}, - "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("total"), + "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("total"), }}, - "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("total"), + "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("total"), }}, - "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{}}, + "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.Value{}}, - "MAX_DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{}}, + "MAX_DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.Value{}}, // The percentage of time during which requests are being issued to and serviced by the partition. // This includes requests from any process, not just MongoDB processes. - "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("read"), + "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("read"), }}, - "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("read"), + "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("read"), }}, - "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("write"), + "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("write"), }}, - "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.AttributeValue{ - "disk_direction": pdata.NewAttributeValueString("write"), + "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.Value{ + "disk_direction": pdata.NewValueString("write"), }}, // Measures latency per operation type of the disk partition used by MongoDB. - "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.average", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("free"), + "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.average", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("free"), }}, - "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.max", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("free"), + "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.max", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("free"), }}, - "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.average", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("used"), + "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.average", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("used"), }}, - "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.max", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("used"), + "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.max", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("used"), }}, - "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("free"), + "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("free"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("free"), + "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("free"), }}, - "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("used"), + "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("used"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{ - "disk_status": pdata.NewAttributeValueString("used"), + "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.Value{ + "disk_status": pdata.NewValueString("used"), }}, // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) - "DATABASE_COLLECTION_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("collection"), + "DATABASE_COLLECTION_COUNT": {"mongodbatlas.db.counts", map[string]pdata.Value{ + "object_type": pdata.NewValueString("collection"), }}, - "DATABASE_INDEX_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("index"), + "DATABASE_INDEX_COUNT": {"mongodbatlas.db.counts", map[string]pdata.Value{ + "object_type": pdata.NewValueString("index"), }}, - "DATABASE_EXTENT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("extent"), + "DATABASE_EXTENT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.Value{ + "object_type": pdata.NewValueString("extent"), }}, - "DATABASE_OBJECT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("object"), + "DATABASE_OBJECT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.Value{ + "object_type": pdata.NewValueString("object"), }}, - "DATABASE_VIEW_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("view"), + "DATABASE_VIEW_COUNT": {"mongodbatlas.db.counts", map[string]pdata.Value{ + "object_type": pdata.NewValueString("view"), }}, - "DATABASE_AVERAGE_OBJECT_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("object"), + "DATABASE_AVERAGE_OBJECT_SIZE": {"mongodbatlas.db.size", map[string]pdata.Value{ + "object_type": pdata.NewValueString("object"), }}, - "DATABASE_STORAGE_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("storage"), + "DATABASE_STORAGE_SIZE": {"mongodbatlas.db.size", map[string]pdata.Value{ + "object_type": pdata.NewValueString("storage"), }}, - "DATABASE_INDEX_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("index"), + "DATABASE_INDEX_SIZE": {"mongodbatlas.db.size", map[string]pdata.Value{ + "object_type": pdata.NewValueString("index"), }}, - "DATABASE_DATA_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "object_type": pdata.NewAttributeValueString("data"), + "DATABASE_DATA_SIZE": {"mongodbatlas.db.size", map[string]pdata.Value{ + "object_type": pdata.NewValueString("data"), }}, } -func mappedMetricByName(name string) (MetricIntf, map[string]pdata.AttributeValue) { +func mappedMetricByName(name string) (MetricIntf, map[string]pdata.Value) { info, found := metricNameMapping[name] if !found { return nil, nil @@ -703,7 +703,7 @@ func MeasurementsToMetric(meas *mongodbatlas.Measurements, buildUnrecognized boo return &m, nil } -func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Measurements, attrs map[string]pdata.AttributeValue) error { +func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Measurements, attrs map[string]pdata.Value) error { for _, point := range meas.DataPoints { if point.Value != nil { dp := datapoints.AppendEmpty() diff --git a/receiver/mongodbreceiver/go.mod b/receiver/mongodbreceiver/go.mod index e3f4da140aa3..ae57e200e28a 100644 --- a/receiver/mongodbreceiver/go.mod +++ b/receiver/mongodbreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 ) diff --git a/receiver/mongodbreceiver/go.sum b/receiver/mongodbreceiver/go.sum index d812ae265dd8..4a5c4565eb74 100644 --- a/receiver/mongodbreceiver/go.sum +++ b/receiver/mongodbreceiver/go.sum @@ -180,10 +180,10 @@ go.mongodb.org/mongo-driver v1.8.4 h1:NruvZPPL0PBcRJKmbswoWSrmHeUvzdxA3GCPfD/NEO go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/mongodbreceiver/internal/metadata/generated_metrics_v2.go b/receiver/mongodbreceiver/internal/metadata/generated_metrics_v2.go index 829e0d8945ea..ee8d75c2a085 100644 --- a/receiver/mongodbreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/mongodbreceiver/internal/metadata/generated_metrics_v2.go @@ -95,7 +95,7 @@ func (m *metricMongodbCacheOperations) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Type, pdata.NewAttributeValueString(typeAttributeValue)) + dp.Attributes().Insert(A.Type, pdata.NewValueString(typeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -148,7 +148,7 @@ func (m *metricMongodbCollectionCount) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -201,8 +201,8 @@ func (m *metricMongodbConnectionCount) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) - dp.Attributes().Insert(A.ConnectionType, pdata.NewAttributeValueString(connectionTypeAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.ConnectionType, pdata.NewValueString(connectionTypeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -255,7 +255,7 @@ func (m *metricMongodbDataSize) recordDataPoint(start pdata.Timestamp, ts pdata. dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -308,7 +308,7 @@ func (m *metricMongodbExtentCount) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -412,7 +412,7 @@ func (m *metricMongodbIndexCount) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -465,7 +465,7 @@ func (m *metricMongodbIndexSize) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -518,8 +518,8 @@ func (m *metricMongodbMemoryUsage) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) - dp.Attributes().Insert(A.MemoryType, pdata.NewAttributeValueString(memoryTypeAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.MemoryType, pdata.NewValueString(memoryTypeAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -572,7 +572,7 @@ func (m *metricMongodbObjectCount) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -625,7 +625,7 @@ func (m *metricMongodbOperationCount) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Operation, pdata.NewAttributeValueString(operationAttributeValue)) + dp.Attributes().Insert(A.Operation, pdata.NewValueString(operationAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -678,7 +678,7 @@ func (m *metricMongodbStorageSize) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/mysqlreceiver/go.mod b/receiver/mysqlreceiver/go.mod index 60f0046bae64..6dd65589c46d 100644 --- a/receiver/mysqlreceiver/go.mod +++ b/receiver/mysqlreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/go-sql-driver/mysql v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/mysqlreceiver/go.sum b/receiver/mysqlreceiver/go.sum index c6fc227913ae..639d937d6248 100644 --- a/receiver/mysqlreceiver/go.sum +++ b/receiver/mysqlreceiver/go.sum @@ -726,10 +726,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/mysqlreceiver/internal/metadata/generated_metrics_v2.go b/receiver/mysqlreceiver/internal/metadata/generated_metrics_v2.go index 67cafe8c7a11..6758e2f8c523 100644 --- a/receiver/mysqlreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/mysqlreceiver/internal/metadata/generated_metrics_v2.go @@ -115,7 +115,7 @@ func (m *metricMysqlBufferPoolDataPages) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.BufferPoolData, pdata.NewAttributeValueString(bufferPoolDataAttributeValue)) + dp.Attributes().Insert(A.BufferPoolData, pdata.NewValueString(bufferPoolDataAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -219,7 +219,7 @@ func (m *metricMysqlBufferPoolOperations) recordDataPoint(start pdata.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.BufferPoolOperations, pdata.NewAttributeValueString(bufferPoolOperationsAttributeValue)) + dp.Attributes().Insert(A.BufferPoolOperations, pdata.NewValueString(bufferPoolOperationsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -323,7 +323,7 @@ func (m *metricMysqlBufferPoolPages) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.BufferPoolPages, pdata.NewAttributeValueString(bufferPoolPagesAttributeValue)) + dp.Attributes().Insert(A.BufferPoolPages, pdata.NewValueString(bufferPoolPagesAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -376,7 +376,7 @@ func (m *metricMysqlBufferPoolUsage) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.BufferPoolData, pdata.NewAttributeValueString(bufferPoolDataAttributeValue)) + dp.Attributes().Insert(A.BufferPoolData, pdata.NewValueString(bufferPoolDataAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -429,7 +429,7 @@ func (m *metricMysqlCommands) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Command, pdata.NewAttributeValueString(commandAttributeValue)) + dp.Attributes().Insert(A.Command, pdata.NewValueString(commandAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -482,7 +482,7 @@ func (m *metricMysqlDoubleWrites) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.DoubleWrites, pdata.NewAttributeValueString(doubleWritesAttributeValue)) + dp.Attributes().Insert(A.DoubleWrites, pdata.NewValueString(doubleWritesAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -535,7 +535,7 @@ func (m *metricMysqlHandlers) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Handler, pdata.NewAttributeValueString(handlerAttributeValue)) + dp.Attributes().Insert(A.Handler, pdata.NewValueString(handlerAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -588,7 +588,7 @@ func (m *metricMysqlLocks) recordDataPoint(start pdata.Timestamp, ts pdata.Times dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Locks, pdata.NewAttributeValueString(locksAttributeValue)) + dp.Attributes().Insert(A.Locks, pdata.NewValueString(locksAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -641,7 +641,7 @@ func (m *metricMysqlLogOperations) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.LogOperations, pdata.NewAttributeValueString(logOperationsAttributeValue)) + dp.Attributes().Insert(A.LogOperations, pdata.NewValueString(logOperationsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -694,7 +694,7 @@ func (m *metricMysqlOperations) recordDataPoint(start pdata.Timestamp, ts pdata. dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Operations, pdata.NewAttributeValueString(operationsAttributeValue)) + dp.Attributes().Insert(A.Operations, pdata.NewValueString(operationsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -747,7 +747,7 @@ func (m *metricMysqlPageOperations) recordDataPoint(start pdata.Timestamp, ts pd dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.PageOperations, pdata.NewAttributeValueString(pageOperationsAttributeValue)) + dp.Attributes().Insert(A.PageOperations, pdata.NewValueString(pageOperationsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -800,7 +800,7 @@ func (m *metricMysqlRowLocks) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.RowLocks, pdata.NewAttributeValueString(rowLocksAttributeValue)) + dp.Attributes().Insert(A.RowLocks, pdata.NewValueString(rowLocksAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -853,7 +853,7 @@ func (m *metricMysqlRowOperations) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.RowOperations, pdata.NewAttributeValueString(rowOperationsAttributeValue)) + dp.Attributes().Insert(A.RowOperations, pdata.NewValueString(rowOperationsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -906,7 +906,7 @@ func (m *metricMysqlSorts) recordDataPoint(start pdata.Timestamp, ts pdata.Times dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Sorts, pdata.NewAttributeValueString(sortsAttributeValue)) + dp.Attributes().Insert(A.Sorts, pdata.NewValueString(sortsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -959,7 +959,7 @@ func (m *metricMysqlThreads) recordDataPoint(start pdata.Timestamp, ts pdata.Tim dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Threads, pdata.NewAttributeValueString(threadsAttributeValue)) + dp.Attributes().Insert(A.Threads, pdata.NewValueString(threadsAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/nginxreceiver/go.mod b/receiver/nginxreceiver/go.mod index 238de9ccf15e..ac7da2a0a5f4 100644 --- a/receiver/nginxreceiver/go.mod +++ b/receiver/nginxreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 github.com/testcontainers/testcontainers-go v0.12.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect diff --git a/receiver/nginxreceiver/go.sum b/receiver/nginxreceiver/go.sum index f5e3d4ddff8d..f0beca56002c 100644 --- a/receiver/nginxreceiver/go.sum +++ b/receiver/nginxreceiver/go.sum @@ -743,10 +743,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/nginxreceiver/internal/metadata/generated_metrics_v2.go b/receiver/nginxreceiver/internal/metadata/generated_metrics_v2.go index a826decf4e1e..bb58d048d767 100644 --- a/receiver/nginxreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/nginxreceiver/internal/metadata/generated_metrics_v2.go @@ -112,7 +112,7 @@ func (m *metricNginxConnectionsCurrent) recordDataPoint(start pdata.Timestamp, t dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/opencensusreceiver/go.mod b/receiver/opencensusreceiver/go.mod index 492fa24fee23..2277426f1a10 100644 --- a/receiver/opencensusreceiver/go.mod +++ b/receiver/opencensusreceiver/go.mod @@ -12,8 +12,8 @@ require ( github.com/rs/cors v1.8.2 github.com/soheilhy/cmux v0.1.5 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 go.opentelemetry.io/otel v1.4.1 go.opentelemetry.io/otel/trace v1.4.1 diff --git a/receiver/opencensusreceiver/go.sum b/receiver/opencensusreceiver/go.sum index d7d81455965d..11e85ff64dbc 100644 --- a/receiver/opencensusreceiver/go.sum +++ b/receiver/opencensusreceiver/go.sum @@ -322,10 +322,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/receiver/podmanreceiver/go.mod b/receiver/podmanreceiver/go.mod index ba8031efb88a..de4ddd00b85a 100644 --- a/receiver/podmanreceiver/go.mod +++ b/receiver/podmanreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 ) diff --git a/receiver/podmanreceiver/go.sum b/receiver/podmanreceiver/go.sum index ffa614f6ca8d..193ee9a52e15 100644 --- a/receiver/podmanreceiver/go.sum +++ b/receiver/podmanreceiver/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/postgresqlreceiver/go.mod b/receiver/postgresqlreceiver/go.mod index c3d5c77a2a74..9f22a998642b 100644 --- a/receiver/postgresqlreceiver/go.mod +++ b/receiver/postgresqlreceiver/go.mod @@ -6,12 +6,12 @@ require ( github.com/lib/pq v1.10.4 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) -require go.opentelemetry.io/collector/model v0.47.0 +require go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 require github.com/testcontainers/testcontainers-go v0.12.0 diff --git a/receiver/postgresqlreceiver/go.sum b/receiver/postgresqlreceiver/go.sum index 0433973a10e4..c10bd89420f9 100644 --- a/receiver/postgresqlreceiver/go.sum +++ b/receiver/postgresqlreceiver/go.sum @@ -669,10 +669,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_v2.go b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_v2.go index 30ec9a48fbeb..a6cb0f2a8273 100644 --- a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_v2.go @@ -75,7 +75,7 @@ func (m *metricPostgresqlBackends) recordDataPoint(start pdata.Timestamp, ts pda dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -128,9 +128,9 @@ func (m *metricPostgresqlBlocksRead) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) - dp.Attributes().Insert(A.Table, pdata.NewAttributeValueString(tableAttributeValue)) - dp.Attributes().Insert(A.Source, pdata.NewAttributeValueString(sourceAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Table, pdata.NewValueString(tableAttributeValue)) + dp.Attributes().Insert(A.Source, pdata.NewValueString(sourceAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -183,7 +183,7 @@ func (m *metricPostgresqlCommits) recordDataPoint(start pdata.Timestamp, ts pdat dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -236,7 +236,7 @@ func (m *metricPostgresqlDbSize) recordDataPoint(start pdata.Timestamp, ts pdata dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -289,9 +289,9 @@ func (m *metricPostgresqlOperations) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) - dp.Attributes().Insert(A.Table, pdata.NewAttributeValueString(tableAttributeValue)) - dp.Attributes().Insert(A.Operation, pdata.NewAttributeValueString(operationAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Table, pdata.NewValueString(tableAttributeValue)) + dp.Attributes().Insert(A.Operation, pdata.NewValueString(operationAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -344,7 +344,7 @@ func (m *metricPostgresqlRollbacks) recordDataPoint(start pdata.Timestamp, ts pd dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -397,9 +397,9 @@ func (m *metricPostgresqlRows) recordDataPoint(start pdata.Timestamp, ts pdata.T dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Database, pdata.NewAttributeValueString(databaseAttributeValue)) - dp.Attributes().Insert(A.Table, pdata.NewAttributeValueString(tableAttributeValue)) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.Database, pdata.NewValueString(databaseAttributeValue)) + dp.Attributes().Insert(A.Table, pdata.NewValueString(tableAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/prometheusexecreceiver/go.mod b/receiver/prometheusexecreceiver/go.mod index cbdff78b3a26..404a472231f4 100644 --- a/receiver/prometheusexecreceiver/go.mod +++ b/receiver/prometheusexecreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/prometheusexecreceiver/go.sum b/receiver/prometheusexecreceiver/go.sum index 89676f699b6f..e6e4b676538b 100644 --- a/receiver/prometheusexecreceiver/go.sum +++ b/receiver/prometheusexecreceiver/go.sum @@ -1433,10 +1433,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/zpages v0.29.0 h1:rUnBzAxPP58lP7BApL21Ac2Fx8/5OflQa3sirlX0nQQ= diff --git a/receiver/prometheusreceiver/go.mod b/receiver/prometheusreceiver/go.mod index 54512acabff3..e0dbc8612b7d 100644 --- a/receiver/prometheusreceiver/go.mod +++ b/receiver/prometheusreceiver/go.mod @@ -10,8 +10,8 @@ require ( github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 diff --git a/receiver/prometheusreceiver/go.sum b/receiver/prometheusreceiver/go.sum index 32e1e78bdbc7..20f0b1527477 100644 --- a/receiver/prometheusreceiver/go.sum +++ b/receiver/prometheusreceiver/go.sum @@ -1451,10 +1451,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/prometheusreceiver/internal/otlp_metrics_adjuster.go b/receiver/prometheusreceiver/internal/otlp_metrics_adjuster.go index 10c8533ecae1..41da9def8947 100644 --- a/receiver/prometheusreceiver/internal/otlp_metrics_adjuster.go +++ b/receiver/prometheusreceiver/internal/otlp_metrics_adjuster.go @@ -103,7 +103,7 @@ func (tsm *timeseriesMapPdata) get(metric *pdata.Metric, kv pdata.AttributeMap) // Create a unique timeseries signature consisting of the metric name and label values. func getTimeseriesSignaturePdata(name string, kv pdata.AttributeMap) string { labelValues := make([]string, 0, kv.Len()) - kv.Sort().Range(func(_ string, attrValue pdata.AttributeValue) bool { + kv.Sort().Range(func(_ string, attrValue pdata.Value) bool { value := attrValue.StringVal() if value != "" { labelValues = append(labelValues, value) diff --git a/receiver/prometheusreceiver/metrics_receiver_labels_test.go b/receiver/prometheusreceiver/metrics_receiver_labels_test.go index 5e90a19b0d48..edc599e89119 100644 --- a/receiver/prometheusreceiver/metrics_receiver_labels_test.go +++ b/receiver/prometheusreceiver/metrics_receiver_labels_test.go @@ -578,10 +578,10 @@ func verifyHonorLabelsTrue(t *testing.T, td *testData, rms []*pdata.ResourceMetr //job and instance label values should be honored from honorLabelsTarget expectedAttributes := td.attributes - expectedAttributes.Update("job", pdata.NewAttributeValueString("honor_labels_test")) - expectedAttributes.Update("instance", pdata.NewAttributeValueString("hostname:8080")) - expectedAttributes.Update("host.name", pdata.NewAttributeValueString("hostname")) - expectedAttributes.Update("port", pdata.NewAttributeValueString("8080")) + expectedAttributes.Update("job", pdata.NewValueString("honor_labels_test")) + expectedAttributes.Update("instance", pdata.NewValueString("hostname:8080")) + expectedAttributes.Update("host.name", pdata.NewValueString("hostname")) + expectedAttributes.Update("port", pdata.NewValueString("8080")) metrics1 := rms[0].InstrumentationLibraryMetrics().At(0).Metrics() ts1 := metrics1.At(0).Gauge().DataPoints().At(0).Timestamp() diff --git a/receiver/rabbitmqreceiver/go.mod b/receiver/rabbitmqreceiver/go.mod index 4810dbed04f0..b145b16a1626 100644 --- a/receiver/rabbitmqreceiver/go.mod +++ b/receiver/rabbitmqreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/rabbitmqreceiver/go.sum b/receiver/rabbitmqreceiver/go.sum index cf0d5dc39b55..1068c5e80deb 100644 --- a/receiver/rabbitmqreceiver/go.sum +++ b/receiver/rabbitmqreceiver/go.sum @@ -183,10 +183,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/rabbitmqreceiver/internal/metadata/generated_metrics_v2.go b/receiver/rabbitmqreceiver/internal/metadata/generated_metrics_v2.go index 82f5dce9fbce..e5c6b33355c6 100644 --- a/receiver/rabbitmqreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/rabbitmqreceiver/internal/metadata/generated_metrics_v2.go @@ -173,7 +173,7 @@ func (m *metricRabbitmqMessageCurrent) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.MessageState, pdata.NewAttributeValueString(messageStateAttributeValue)) + dp.Attributes().Insert(A.MessageState, pdata.NewValueString(messageStateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/receivercreator/go.mod b/receiver/receivercreator/go.mod index 2c36e6aea1f9..39bfbc4416b5 100644 --- a/receiver/receivercreator/go.mod +++ b/receiver/receivercreator/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0 github.com/spf13/cast v1.4.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/receivercreator/go.sum b/receiver/receivercreator/go.sum index c3d00dcd243c..152300e968e9 100644 --- a/receiver/receivercreator/go.sum +++ b/receiver/receivercreator/go.sum @@ -181,10 +181,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/redisreceiver/go.mod b/receiver/redisreceiver/go.mod index 40e087db26dc..b5281955fdd7 100644 --- a/receiver/redisreceiver/go.mod +++ b/receiver/redisreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/go-redis/redis/v7 v7.4.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/redisreceiver/go.sum b/receiver/redisreceiver/go.sum index f6dc7254763c..f9893f4fa33c 100644 --- a/receiver/redisreceiver/go.sum +++ b/receiver/redisreceiver/go.sum @@ -706,10 +706,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics_v2.go b/receiver/redisreceiver/internal/metadata/generated_metrics_v2.go index d7da4384b791..0e98e9d36e77 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics_v2.go @@ -565,7 +565,7 @@ func (m *metricRedisCPUTime) recordDataPoint(start pdata.Timestamp, ts pdata.Tim dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -616,7 +616,7 @@ func (m *metricRedisDbAvgTTL) recordDataPoint(start pdata.Timestamp, ts pdata.Ti dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Db, pdata.NewAttributeValueString(dbAttributeValue)) + dp.Attributes().Insert(A.Db, pdata.NewValueString(dbAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -667,7 +667,7 @@ func (m *metricRedisDbExpires) recordDataPoint(start pdata.Timestamp, ts pdata.T dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Db, pdata.NewAttributeValueString(dbAttributeValue)) + dp.Attributes().Insert(A.Db, pdata.NewValueString(dbAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -718,7 +718,7 @@ func (m *metricRedisDbKeys) recordDataPoint(start pdata.Timestamp, ts pdata.Time dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Db, pdata.NewAttributeValueString(dbAttributeValue)) + dp.Attributes().Insert(A.Db, pdata.NewValueString(dbAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/receiver/sapmreceiver/go.mod b/receiver/sapmreceiver/go.mod index b0d8ae4098cb..d42336a12cea 100644 --- a/receiver/sapmreceiver/go.mod +++ b/receiver/sapmreceiver/go.mod @@ -10,8 +10,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.47.0 github.com/signalfx/sapm-proto v0.9.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 ) require ( diff --git a/receiver/sapmreceiver/go.sum b/receiver/sapmreceiver/go.sum index 61e66b2d9b8d..283d388f13b3 100644 --- a/receiver/sapmreceiver/go.sum +++ b/receiver/sapmreceiver/go.sum @@ -835,13 +835,14 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/receiver/signalfxreceiver/go.mod b/receiver/signalfxreceiver/go.mod index b07ff0578303..59bfd9ac3bb9 100644 --- a/receiver/signalfxreceiver/go.mod +++ b/receiver/signalfxreceiver/go.mod @@ -11,8 +11,8 @@ require ( github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/signalfxreceiver/go.sum b/receiver/signalfxreceiver/go.sum index 7c86fa048258..5d1df9028b2f 100644 --- a/receiver/signalfxreceiver/go.sum +++ b/receiver/signalfxreceiver/go.sum @@ -274,10 +274,10 @@ go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.opencensus.io v0.22.2/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 v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/signalfxreceiver/receiver.go b/receiver/signalfxreceiver/receiver.go index abb3e383ff56..42e1c0916079 100644 --- a/receiver/signalfxreceiver/receiver.go +++ b/receiver/signalfxreceiver/receiver.go @@ -246,7 +246,7 @@ func (r *sfxReceiver) handleDatapointReq(resp http.ResponseWriter, req *http.Req for i := 0; i < md.ResourceMetrics().Len(); i++ { rm := md.ResourceMetrics().At(i) res := rm.Resource() - res.Attributes().Insert(splunk.SFxAccessTokenLabel, pdata.NewAttributeValueString(accessToken)) + res.Attributes().Insert(splunk.SFxAccessTokenLabel, pdata.NewValueString(accessToken)) } } } diff --git a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go index 135adf345e88..92c56ca7263c 100644 --- a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go +++ b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go @@ -57,7 +57,7 @@ func signalFxV2EventsToLogRecords(events []*sfxpb.Event, lrs pdata.LogRecordSlic } if len(event.Properties) > 0 { - propMapVal := pdata.NewAttributeValueMap() + propMapVal := pdata.NewValueMap() propMap := propMapVal.MapVal() propMap.EnsureCapacity(len(event.Properties)) diff --git a/receiver/signalfxreceiver/signalfxv2_event_to_logdata_test.go b/receiver/signalfxreceiver/signalfxv2_event_to_logdata_test.go index a8048203b8e5..ce91bd9540b8 100644 --- a/receiver/signalfxreceiver/signalfxv2_event_to_logdata_test.go +++ b/receiver/signalfxreceiver/signalfxv2_event_to_logdata_test.go @@ -58,7 +58,7 @@ func TestSignalFxV2EventsToLogData(t *testing.T) { attrs.InsertString("k1", "v1") attrs.InsertString("k2", "v2") - propMapVal := pdata.NewAttributeValueMap() + propMapVal := pdata.NewValueMap() propMap := propMapVal.MapVal() propMap.InsertString("env", "prod") propMap.InsertBool("isActive", true) @@ -67,7 +67,7 @@ func TestSignalFxV2EventsToLogData(t *testing.T) { propMap.InsertNull("nullProp") propMap.Sort() attrs.Insert("com.splunk.signalfx.event_properties", propMapVal) - attrs.Insert("com.splunk.signalfx.event_category", pdata.NewAttributeValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) + attrs.Insert("com.splunk.signalfx.event_category", pdata.NewValueInt(int64(sfxpb.EventCategory_USER_DEFINED))) l.Attributes().Sort() return logSlice @@ -92,7 +92,7 @@ func TestSignalFxV2EventsToLogData(t *testing.T) { }(), expected: func() pdata.LogRecordSlice { lrs := buildDefaultLogs() - lrs.At(0).Attributes().Upsert("com.splunk.signalfx.event_category", pdata.NewAttributeValueEmpty()) + lrs.At(0).Attributes().Upsert("com.splunk.signalfx.event_category", pdata.NewValueEmpty()) return lrs }(), }, diff --git a/receiver/simpleprometheusreceiver/go.mod b/receiver/simpleprometheusreceiver/go.mod index 43508f00aae5..9ce07a3d8eb0 100644 --- a/receiver/simpleprometheusreceiver/go.mod +++ b/receiver/simpleprometheusreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 k8s.io/client-go v0.23.4 ) @@ -99,7 +99,7 @@ require ( github.com/spf13/cast v1.4.1 // indirect github.com/spf13/pflag v1.0.5 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/simpleprometheusreceiver/go.sum b/receiver/simpleprometheusreceiver/go.sum index 5f58a5b883db..4377e1b49628 100644 --- a/receiver/simpleprometheusreceiver/go.sum +++ b/receiver/simpleprometheusreceiver/go.sum @@ -1435,10 +1435,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/zpages v0.29.0 h1:rUnBzAxPP58lP7BApL21Ac2Fx8/5OflQa3sirlX0nQQ= diff --git a/receiver/skywalkingreceiver/go.mod b/receiver/skywalkingreceiver/go.mod index 745d05735c73..a63da84a1311 100644 --- a/receiver/skywalkingreceiver/go.mod +++ b/receiver/skywalkingreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/gorilla/mux v1.8.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.27.1 @@ -35,7 +35,7 @@ require ( github.com/rs/cors v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect go.opentelemetry.io/otel v1.4.1 // indirect diff --git a/receiver/skywalkingreceiver/go.sum b/receiver/skywalkingreceiver/go.sum index 300d09aa6807..112cdbef0e9d 100644 --- a/receiver/skywalkingreceiver/go.sum +++ b/receiver/skywalkingreceiver/go.sum @@ -317,10 +317,10 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/receiver/splunkhecreceiver/go.mod b/receiver/splunkhecreceiver/go.mod index 072920f547e1..24a832cba556 100644 --- a/receiver/splunkhecreceiver/go.mod +++ b/receiver/splunkhecreceiver/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/splunkhecreceiver/go.sum b/receiver/splunkhecreceiver/go.sum index cb3e10b5904b..5a4bf2c3ae05 100644 --- a/receiver/splunkhecreceiver/go.sum +++ b/receiver/splunkhecreceiver/go.sum @@ -192,10 +192,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/splunkhecreceiver/splunk_to_logdata.go b/receiver/splunkhecreceiver/splunk_to_logdata.go index c7f3f9d03f53..97c09bc2244d 100644 --- a/receiver/splunkhecreceiver/splunk_to_logdata.go +++ b/receiver/splunkhecreceiver/splunk_to_logdata.go @@ -82,37 +82,37 @@ func splunkHecToLogData(logger *zap.Logger, events []*splunk.Event, resourceCust return ld, nil } -func convertInterfaceToAttributeValue(logger *zap.Logger, originalValue interface{}) (pdata.AttributeValue, error) { +func convertInterfaceToAttributeValue(logger *zap.Logger, originalValue interface{}) (pdata.Value, error) { if originalValue == nil { - return pdata.NewAttributeValueEmpty(), nil + return pdata.NewValueEmpty(), nil } else if value, ok := originalValue.(string); ok { - return pdata.NewAttributeValueString(value), nil + return pdata.NewValueString(value), nil } else if value, ok := originalValue.(int64); ok { - return pdata.NewAttributeValueInt(value), nil + return pdata.NewValueInt(value), nil } else if value, ok := originalValue.(float64); ok { - return pdata.NewAttributeValueDouble(value), nil + return pdata.NewValueDouble(value), nil } else if value, ok := originalValue.(bool); ok { - return pdata.NewAttributeValueBool(value), nil + return pdata.NewValueBool(value), nil } else if value, ok := originalValue.(map[string]interface{}); ok { mapValue, err := convertToAttributeMap(logger, value) if err != nil { - return pdata.NewAttributeValueEmpty(), err + return pdata.NewValueEmpty(), err } return mapValue, nil } else if value, ok := originalValue.([]interface{}); ok { arrValue, err := convertToSliceVal(logger, value) if err != nil { - return pdata.NewAttributeValueEmpty(), err + return pdata.NewValueEmpty(), err } return arrValue, nil } else { logger.Debug("Unsupported value conversion", zap.Any("value", originalValue)) - return pdata.NewAttributeValueEmpty(), errors.New(cannotConvertValue) + return pdata.NewValueEmpty(), errors.New(cannotConvertValue) } } -func convertToSliceVal(logger *zap.Logger, value []interface{}) (pdata.AttributeValue, error) { - attrVal := pdata.NewAttributeValueArray() +func convertToSliceVal(logger *zap.Logger, value []interface{}) (pdata.Value, error) { + attrVal := pdata.NewValueArray() arr := attrVal.SliceVal() for _, elt := range value { translatedElt, err := convertInterfaceToAttributeValue(logger, elt) @@ -125,8 +125,8 @@ func convertToSliceVal(logger *zap.Logger, value []interface{}) (pdata.Attribute return attrVal, nil } -func convertToAttributeMap(logger *zap.Logger, value map[string]interface{}) (pdata.AttributeValue, error) { - attrVal := pdata.NewAttributeValueMap() +func convertToAttributeMap(logger *zap.Logger, value map[string]interface{}) (pdata.Value, error) { + attrVal := pdata.NewValueMap() attrMap := attrVal.MapVal() keys := make([]string, 0, len(value)) for k := range value { diff --git a/receiver/splunkhecreceiver/splunk_to_logdata_test.go b/receiver/splunkhecreceiver/splunk_to_logdata_test.go index 716db12d1f2f..2d63ae6414cb 100644 --- a/receiver/splunkhecreceiver/splunk_to_logdata_test.go +++ b/receiver/splunkhecreceiver/splunk_to_logdata_test.go @@ -102,7 +102,7 @@ func Test_SplunkHecToLogData(t *testing.T) { hecConfig: defaultTestingHecConfig, output: func() pdata.ResourceLogsSlice { logsSlice := createLogsSlice(nanoseconds) - arrVal := pdata.NewAttributeValueArray() + arrVal := pdata.NewValueArray() arr := arrVal.SliceVal() arr.AppendEmpty().SetStringVal("foo") arr.AppendEmpty().SetStringVal("bar") @@ -127,14 +127,14 @@ func Test_SplunkHecToLogData(t *testing.T) { hecConfig: defaultTestingHecConfig, output: func() pdata.ResourceLogsSlice { logsSlice := createLogsSlice(nanoseconds) - foosArr := pdata.NewAttributeValueArray() + foosArr := pdata.NewValueArray() foos := foosArr.SliceVal() foos.EnsureCapacity(3) foos.AppendEmpty().SetStringVal("foo") foos.AppendEmpty().SetStringVal("bar") foos.AppendEmpty().SetStringVal("foobar") - attVal := pdata.NewAttributeValueMap() + attVal := pdata.NewValueMap() attMap := attVal.MapVal() attMap.InsertBool("bool", false) attMap.Insert("foos", foosArr) @@ -230,31 +230,31 @@ func createLogsSlice(nanoseconds int) pdata.ResourceLogsSlice { func Test_ConvertAttributeValueEmpty(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), nil) assert.NoError(t, err) - assert.Equal(t, pdata.NewAttributeValueEmpty(), value) + assert.Equal(t, pdata.NewValueEmpty(), value) } func Test_ConvertAttributeValueString(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), "foo") assert.NoError(t, err) - assert.Equal(t, pdata.NewAttributeValueString("foo"), value) + assert.Equal(t, pdata.NewValueString("foo"), value) } func Test_ConvertAttributeValueBool(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), false) assert.NoError(t, err) - assert.Equal(t, pdata.NewAttributeValueBool(false), value) + assert.Equal(t, pdata.NewValueBool(false), value) } func Test_ConvertAttributeValueFloat(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), 12.3) assert.NoError(t, err) - assert.Equal(t, pdata.NewAttributeValueDouble(12.3), value) + assert.Equal(t, pdata.NewValueDouble(12.3), value) } func Test_ConvertAttributeValueMap(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), map[string]interface{}{"foo": "bar"}) assert.NoError(t, err) - atts := pdata.NewAttributeValueMap() + atts := pdata.NewValueMap() attMap := atts.MapVal() attMap.InsertString("foo", "bar") assert.Equal(t, atts, value) @@ -263,7 +263,7 @@ func Test_ConvertAttributeValueMap(t *testing.T) { func Test_ConvertAttributeValueArray(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), []interface{}{"foo"}) assert.NoError(t, err) - arrValue := pdata.NewAttributeValueArray() + arrValue := pdata.NewValueArray() arr := arrValue.SliceVal() arr.AppendEmpty().SetStringVal("foo") assert.Equal(t, arrValue, value) @@ -272,17 +272,17 @@ func Test_ConvertAttributeValueArray(t *testing.T) { func Test_ConvertAttributeValueInvalid(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), splunk.Event{}) assert.Error(t, err) - assert.Equal(t, pdata.NewAttributeValueEmpty(), value) + assert.Equal(t, pdata.NewValueEmpty(), value) } func Test_ConvertAttributeValueInvalidInMap(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), map[string]interface{}{"foo": splunk.Event{}}) assert.Error(t, err) - assert.Equal(t, pdata.NewAttributeValueEmpty(), value) + assert.Equal(t, pdata.NewValueEmpty(), value) } func Test_ConvertAttributeValueInvalidInArray(t *testing.T) { value, err := convertInterfaceToAttributeValue(zap.NewNop(), []interface{}{splunk.Event{}}) assert.Error(t, err) - assert.Equal(t, pdata.NewAttributeValueEmpty(), value) + assert.Equal(t, pdata.NewValueEmpty(), value) } diff --git a/receiver/statsdreceiver/go.mod b/receiver/statsdreceiver/go.mod index b311ff332072..1af601e27e07 100644 --- a/receiver/statsdreceiver/go.mod +++ b/receiver/statsdreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.47.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.opentelemetry.io/otel v1.4.1 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/receiver/statsdreceiver/go.sum b/receiver/statsdreceiver/go.sum index 59b91d156275..bd0c3064c304 100644 --- a/receiver/statsdreceiver/go.sum +++ b/receiver/statsdreceiver/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/syslogreceiver/go.mod b/receiver/syslogreceiver/go.mod index cc9183e4cf3d..111b54e44b87 100644 --- a/receiver/syslogreceiver/go.mod +++ b/receiver/syslogreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/syslogreceiver/go.sum b/receiver/syslogreceiver/go.sum index 213edf253940..c0c539e40a63 100644 --- a/receiver/syslogreceiver/go.sum +++ b/receiver/syslogreceiver/go.sum @@ -193,10 +193,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/tcplogreceiver/go.mod b/receiver/tcplogreceiver/go.mod index 0ddddcde389f..c1cae0aa0b55 100644 --- a/receiver/tcplogreceiver/go.mod +++ b/receiver/tcplogreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 gopkg.in/yaml.v2 v2.4.0 ) @@ -28,7 +28,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/tcplogreceiver/go.sum b/receiver/tcplogreceiver/go.sum index 4665fc243e80..7e2029f3c073 100644 --- a/receiver/tcplogreceiver/go.sum +++ b/receiver/tcplogreceiver/go.sum @@ -190,10 +190,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/udplogreceiver/go.mod b/receiver/udplogreceiver/go.mod index 5766bd80bbc0..821ee3729cdc 100644 --- a/receiver/udplogreceiver/go.mod +++ b/receiver/udplogreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.47.0 github.com/open-telemetry/opentelemetry-log-collection v0.27.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 gopkg.in/yaml.v2 v2.4.0 ) @@ -27,7 +27,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/udplogreceiver/go.sum b/receiver/udplogreceiver/go.sum index 183a2f139495..45f2617208a6 100644 --- a/receiver/udplogreceiver/go.sum +++ b/receiver/udplogreceiver/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/wavefrontreceiver/go.mod b/receiver/wavefrontreceiver/go.mod index 6b7ca8675844..e11f09d42a6d 100644 --- a/receiver/wavefrontreceiver/go.mod +++ b/receiver/wavefrontreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/protobuf v1.27.1 ) @@ -27,7 +27,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.4.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/model v0.47.0 // indirect + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 // indirect go.opentelemetry.io/otel v1.4.1 // indirect go.opentelemetry.io/otel/metric v0.27.0 // indirect go.opentelemetry.io/otel/trace v1.4.1 // indirect diff --git a/receiver/wavefrontreceiver/go.sum b/receiver/wavefrontreceiver/go.sum index 1ced3b466aca..3720a9e5de2f 100644 --- a/receiver/wavefrontreceiver/go.sum +++ b/receiver/wavefrontreceiver/go.sum @@ -163,10 +163,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/windowsperfcountersreceiver/go.mod b/receiver/windowsperfcountersreceiver/go.mod index c1cb8d27c73b..5ff7241734fa 100644 --- a/receiver/windowsperfcountersreceiver/go.mod +++ b/receiver/windowsperfcountersreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 diff --git a/receiver/windowsperfcountersreceiver/go.sum b/receiver/windowsperfcountersreceiver/go.sum index e0471a0bbe8c..ca928ae35252 100644 --- a/receiver/windowsperfcountersreceiver/go.sum +++ b/receiver/windowsperfcountersreceiver/go.sum @@ -164,10 +164,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= diff --git a/receiver/zipkinreceiver/go.mod b/receiver/zipkinreceiver/go.mod index a6debc3d5c8c..cd55a4978964 100644 --- a/receiver/zipkinreceiver/go.mod +++ b/receiver/zipkinreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.47.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 google.golang.org/protobuf v1.27.1 ) diff --git a/receiver/zipkinreceiver/go.sum b/receiver/zipkinreceiver/go.sum index 296958c9fee5..2c170f181dec 100644 --- a/receiver/zipkinreceiver/go.sum +++ b/receiver/zipkinreceiver/go.sum @@ -243,10 +243,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= diff --git a/receiver/zipkinreceiver/trace_receiver_test.go b/receiver/zipkinreceiver/trace_receiver_test.go index 87d774fda9d1..37d348fdca8b 100644 --- a/receiver/zipkinreceiver/trace_receiver_test.go +++ b/receiver/zipkinreceiver/trace_receiver_test.go @@ -403,17 +403,17 @@ func TestReceiverConvertsStringsToTypes(t *testing.T) { td := next.AllTraces()[0] span := td.ResourceSpans().At(0).InstrumentationLibrarySpans().At(0).Spans().At(0) - expected := pdata.NewAttributeMapFromMap(map[string]pdata.AttributeValue{ - "cache_hit": pdata.NewAttributeValueBool(true), - "ping_count": pdata.NewAttributeValueInt(25), - "timeout": pdata.NewAttributeValueDouble(12.3), - "clnt/finagle.version": pdata.NewAttributeValueString("6.45.0"), - "http.path": pdata.NewAttributeValueString("/api"), - "http.status_code": pdata.NewAttributeValueInt(500), - "net.host.ip": pdata.NewAttributeValueString("7::80:807f"), - "peer.service": pdata.NewAttributeValueString("backend"), - "net.peer.ip": pdata.NewAttributeValueString("192.168.99.101"), - "net.peer.port": pdata.NewAttributeValueInt(9000), + expected := pdata.NewAttributeMapFromMap(map[string]pdata.Value{ + "cache_hit": pdata.NewValueBool(true), + "ping_count": pdata.NewValueInt(25), + "timeout": pdata.NewValueDouble(12.3), + "clnt/finagle.version": pdata.NewValueString("6.45.0"), + "http.path": pdata.NewValueString("/api"), + "http.status_code": pdata.NewValueInt(500), + "net.host.ip": pdata.NewValueString("7::80:807f"), + "peer.service": pdata.NewValueString("backend"), + "net.peer.ip": pdata.NewValueString("192.168.99.101"), + "net.peer.port": pdata.NewValueInt(9000), }).Sort() actual := span.Attributes().Sort() diff --git a/receiver/zookeeperreceiver/go.mod b/receiver/zookeeperreceiver/go.mod index 9a05c2127b53..ed054e189625 100644 --- a/receiver/zookeeperreceiver/go.mod +++ b/receiver/zookeeperreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.47.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/receiver/zookeeperreceiver/go.sum b/receiver/zookeeperreceiver/go.sum index 319f6900ff72..b6e872df2aab 100644 --- a/receiver/zookeeperreceiver/go.sum +++ b/receiver/zookeeperreceiver/go.sum @@ -696,10 +696,10 @@ 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.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/receiver/zookeeperreceiver/internal/metadata/generated_metrics_v2.go b/receiver/zookeeperreceiver/internal/metadata/generated_metrics_v2.go index bdea74a0a5df..a1569941fdf6 100644 --- a/receiver/zookeeperreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/zookeeperreceiver/internal/metadata/generated_metrics_v2.go @@ -360,7 +360,7 @@ func (m *metricZookeeperFollowerCount) recordDataPoint(start pdata.Timestamp, ts dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.State, pdata.NewAttributeValueString(stateAttributeValue)) + dp.Attributes().Insert(A.State, pdata.NewValueString(stateAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -611,7 +611,7 @@ func (m *metricZookeeperPacketCount) recordDataPoint(start pdata.Timestamp, ts p dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert(A.Direction, pdata.NewAttributeValueString(directionAttributeValue)) + dp.Attributes().Insert(A.Direction, pdata.NewValueString(directionAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. diff --git a/testbed/correctnesstests/metrics/metric_diff.go b/testbed/correctnesstests/metrics/metric_diff.go index fe258f3851ed..942156b71979 100644 --- a/testbed/correctnesstests/metrics/metric_diff.go +++ b/testbed/correctnesstests/metrics/metric_diff.go @@ -243,7 +243,7 @@ func diffValues( func attrMapToString(m pdata.AttributeMap) string { out := "" - m.Range(func(k string, v pdata.AttributeValue) bool { + m.Range(func(k string, v pdata.Value) bool { out += "[" + k + "=" + v.StringVal() + "]" return true }) diff --git a/testbed/datasenders/fluent.go b/testbed/datasenders/fluent.go index d1afe15c5b42..68d2f3e50ba8 100644 --- a/testbed/datasenders/fluent.go +++ b/testbed/datasenders/fluent.go @@ -109,19 +109,19 @@ func (f *FluentLogsForwarder) ConsumeLogs(_ context.Context, logs pdata.Logs) er func (f *FluentLogsForwarder) convertLogToMap(lr pdata.LogRecord) map[string]string { out := map[string]string{} - if lr.Body().Type() == pdata.AttributeValueTypeString { + if lr.Body().Type() == pdata.ValueTypeString { out["log"] = lr.Body().StringVal() } - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: out[k] = v.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: out[k] = strconv.FormatInt(v.IntVal(), 10) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: out[k] = strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: out[k] = strconv.FormatBool(v.BoolVal()) default: panic("missing case") @@ -138,15 +138,15 @@ func (f *FluentLogsForwarder) convertLogToJSON(lr pdata.LogRecord) []byte { } rec["log"] = lr.Body().StringVal() - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: rec[k] = v.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: rec[k] = strconv.FormatInt(v.IntVal(), 10) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: rec[k] = strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: rec[k] = strconv.FormatBool(v.BoolVal()) default: panic("missing case") diff --git a/testbed/datasenders/fluentbit.go b/testbed/datasenders/fluentbit.go index a6d5e7a1fdfd..f726b33bff9b 100644 --- a/testbed/datasenders/fluentbit.go +++ b/testbed/datasenders/fluentbit.go @@ -112,15 +112,15 @@ func (f *FluentBitFileLogWriter) convertLogToJSON(lr pdata.LogRecord) []byte { } rec["log"] = lr.Body().StringVal() - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: rec[k] = v.StringVal() - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: rec[k] = strconv.FormatInt(v.IntVal(), 10) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: rec[k] = strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: rec[k] = strconv.FormatBool(v.BoolVal()) default: panic("missing case") diff --git a/testbed/datasenders/k8s.go b/testbed/datasenders/k8s.go index 4dd39fe5bdd8..ce1c93b79732 100644 --- a/testbed/datasenders/k8s.go +++ b/testbed/datasenders/k8s.go @@ -115,22 +115,22 @@ func (f *FileLogK8sWriter) convertLogToTextLine(lr pdata.LogRecord) []byte { sb.WriteString(lr.SeverityText()) sb.WriteString(" ") - if lr.Body().Type() == pdata.AttributeValueTypeString { + if lr.Body().Type() == pdata.ValueTypeString { sb.WriteString(lr.Body().StringVal()) } - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { sb.WriteString(" ") sb.WriteString(k) sb.WriteString("=") switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: sb.WriteString(v.StringVal()) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: sb.WriteString(strconv.FormatInt(v.IntVal(), 10)) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: sb.WriteString(strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64)) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: sb.WriteString(strconv.FormatBool(v.BoolVal())) default: panic("missing case") diff --git a/testbed/datasenders/stanza.go b/testbed/datasenders/stanza.go index d54158c36acb..e68b43f8074c 100644 --- a/testbed/datasenders/stanza.go +++ b/testbed/datasenders/stanza.go @@ -89,22 +89,22 @@ func (f *FileLogWriter) convertLogToTextLine(lr pdata.LogRecord) []byte { sb.WriteString(lr.SeverityText()) sb.WriteString(" ") - if lr.Body().Type() == pdata.AttributeValueTypeString { + if lr.Body().Type() == pdata.ValueTypeString { sb.WriteString(lr.Body().StringVal()) } - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { sb.WriteString(" ") sb.WriteString(k) sb.WriteString("=") switch v.Type() { - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: sb.WriteString(v.StringVal()) - case pdata.AttributeValueTypeInt: + case pdata.ValueTypeInt: sb.WriteString(strconv.FormatInt(v.IntVal(), 10)) - case pdata.AttributeValueTypeDouble: + case pdata.ValueTypeDouble: sb.WriteString(strconv.FormatFloat(v.DoubleVal(), 'f', -1, 64)) - case pdata.AttributeValueTypeBool: + case pdata.ValueTypeBool: sb.WriteString(strconv.FormatBool(v.BoolVal())) default: panic("missing case") diff --git a/testbed/datasenders/syslog.go b/testbed/datasenders/syslog.go index d1c78eebf902..85674c719cb1 100644 --- a/testbed/datasenders/syslog.go +++ b/testbed/datasenders/syslog.go @@ -104,7 +104,7 @@ func (f *SyslogWriter) Send(lr pdata.LogRecord) error { sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", "trace_id", lr.TraceID().HexString())) sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", "span_id", lr.SpanID().HexString())) sdid.WriteString(fmt.Sprintf("%s=\"%d\" ", "trace_flags", lr.Flags())) - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", k, v.StringVal())) return true }) diff --git a/testbed/datasenders/tcpudp.go b/testbed/datasenders/tcpudp.go index 24a6aab20d7e..153c7b1dfe5f 100644 --- a/testbed/datasenders/tcpudp.go +++ b/testbed/datasenders/tcpudp.go @@ -102,7 +102,7 @@ func (f *TCPUDPWriter) Send(lr pdata.LogRecord) error { sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", "trace_id", lr.TraceID().HexString())) sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", "span_id", lr.SpanID().HexString())) sdid.WriteString(fmt.Sprintf("%s=\"%d\" ", "trace_flags", lr.Flags())) - lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool { + lr.Attributes().Range(func(k string, v pdata.Value) bool { sdid.WriteString(fmt.Sprintf("%s=\"%s\" ", k, v.StringVal())) return true }) diff --git a/testbed/go.mod b/testbed/go.mod index 68e58886bf8a..e969fe0412ac 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -26,8 +26,8 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20220117154355-4855a0c067e2 github.com/shirou/gopsutil/v3 v3.22.2 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 golang.org/x/text v0.3.7 diff --git a/testbed/go.sum b/testbed/go.sum index 69444b3b7040..2b14ed42b870 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -1679,13 +1679,14 @@ 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/model v0.46.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod index f7b952d34014..2525170f0e3f 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/gorilla/mux v1.8.0 - go.opentelemetry.io/collector v0.47.0 - go.opentelemetry.io/collector/model v0.47.0 + go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 + go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 go.uber.org/zap v1.21.0 ) diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum index 6cc4a2ca7858..6daf237ddf4c 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum @@ -148,10 +148,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.47.0 h1:jri01YG2UehiqDnSRGYekruZISosz5p75ppKhNLxHnc= -go.opentelemetry.io/collector v0.47.0/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= -go.opentelemetry.io/collector/model v0.47.0 h1:qfIc/rhua50MTowB5BFveEVaYyZWL3Yld3pMmhUDU5w= -go.opentelemetry.io/collector/model v0.47.0/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8 h1:PKsGQ0x3HubXExLAm1M/b8/0xC7FqYXoJg3kNsviY8M= +go.opentelemetry.io/collector v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:jIdx4BySsmKANBZYlTsigZT/I+vGsAhJIHTYjsx7/O8= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8 h1:XqAgf8uUyJ5zZnjcx623Ip53JPOwaL68F7SjYNAALfI= +go.opentelemetry.io/collector/model v0.47.1-0.20220316214317-e6ea17cf27a8/go.mod h1:tyZ1XdPtljZ9I09pJGcz5ktV9G1AAZ/HDmf6YOMHebc= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= diff --git a/testbed/testbed/validator.go b/testbed/testbed/validator.go index 79bdd5cc2d40..dea2567e3e00 100644 --- a/testbed/testbed/validator.go +++ b/testbed/testbed/validator.go @@ -416,7 +416,7 @@ func (v *CorrectnessTestValidator) diffSpanStatus(sentSpan pdata.Span, recdSpan func (v *CorrectnessTestValidator) diffAttributeMap(spanName string, sentAttrs pdata.AttributeMap, recdAttrs pdata.AttributeMap, fmtStr string) { - sentAttrs.Range(func(sentKey string, sentVal pdata.AttributeValue) bool { + sentAttrs.Range(func(sentKey string, sentVal pdata.Value) bool { recdVal, ok := recdAttrs.Get(sentKey) if !ok { af := &TraceAssertionFailure{ @@ -430,7 +430,7 @@ func (v *CorrectnessTestValidator) diffAttributeMap(spanName string, return true } switch sentVal.Type() { - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: v.compareKeyValueList(spanName, sentVal, recdVal, fmtStr, sentKey) default: v.compareSimpleValues(spanName, sentVal, recdVal, fmtStr, sentKey) @@ -439,7 +439,7 @@ func (v *CorrectnessTestValidator) diffAttributeMap(spanName string, }) } -func (v *CorrectnessTestValidator) compareSimpleValues(spanName string, sentVal pdata.AttributeValue, recdVal pdata.AttributeValue, +func (v *CorrectnessTestValidator) compareSimpleValues(spanName string, sentVal pdata.Value, recdVal pdata.Value, fmtStr string, attrKey string) { if !sentVal.Equal(recdVal) { sentStr := sentVal.AsString() @@ -458,11 +458,11 @@ func (v *CorrectnessTestValidator) compareSimpleValues(spanName string, sentVal } func (v *CorrectnessTestValidator) compareKeyValueList( - spanName string, sentVal pdata.AttributeValue, recdVal pdata.AttributeValue, fmtStr string, attrKey string) { + spanName string, sentVal pdata.Value, recdVal pdata.Value, fmtStr string, attrKey string) { switch recdVal.Type() { - case pdata.AttributeValueTypeMap: + case pdata.ValueTypeMap: v.diffAttributeMap(spanName, sentVal.MapVal(), recdVal.MapVal(), fmtStr) - case pdata.AttributeValueTypeString: + case pdata.ValueTypeString: v.compareSimpleValues(spanName, sentVal, recdVal, fmtStr, attrKey) default: af := &TraceAssertionFailure{