From dd79483e20e449c586ef573249afbd76cb71fe93 Mon Sep 17 00:00:00 2001 From: ET Date: Thu, 16 Jul 2020 10:07:59 -0700 Subject: [PATCH 01/60] Create protobuf generation GitHub action (#938) * Add protogen workflow * Move out protobuf generation to Makefile.proto * Include in Changelog * Update Makefile.proto Move file-local mode variable to line by itself. Co-authored-by: Tyler Yahn Co-authored-by: Tyler Yahn --- .github/workflows/protogen.yml | 23 +++++++++++ CHANGELOG.md | 4 ++ Makefile | 2 +- Makefile.proto | 72 ++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/protogen.yml create mode 100644 Makefile.proto diff --git a/.github/workflows/protogen.yml b/.github/workflows/protogen.yml new file mode 100644 index 00000000000..e526f17be99 --- /dev/null +++ b/.github/workflows/protogen.yml @@ -0,0 +1,23 @@ +name: Proto-go-generator +on: + pull_request: + paths: + - 'internal/opentelemetry-proto' + +jobs: + protogen: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + submodules: true + - uses: actions/setup-go@v2 + with: + go-version: '^1.14.0' + - run: sudo apt-get -y install pax + - run: make -f Makefile.proto protobuf + - uses: stefanzweifel/git-auto-commit-action@v4 + id: commit-changes + with: + commit_message: Commit changes in updated/new protobuf files diff --git a/CHANGELOG.md b/CHANGELOG.md index 55fc2e8e72e..589b75fce7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Added + +- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) + ## [0.8.0] - 2020-07-09 ### Added diff --git a/Makefile b/Makefile index 8a23adab081..3cf4a3e70d5 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ generate: $(TOOLS_DIR)/stringer .PHONY: license-check license-check: - @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path './vendor/*') ; do \ + @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path './vendor/*' ! -path './internal/opentelemetry-proto/*') ; do \ awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=3 { found=1; next } END { if (!found) print FILENAME }' $$f; \ done); \ if [ -n "$${licRes}" ]; then \ diff --git a/Makefile.proto b/Makefile.proto new file mode 100644 index 00000000000..68662514563 --- /dev/null +++ b/Makefile.proto @@ -0,0 +1,72 @@ +# -*- mode: makefile; -*- +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This Makefile.proto has rules to generate *.pb.go files in +# `internal/opentelemetry-proto-gen` from the .proto files in +# `internal/opentelemetry-proto` using protoc with a go plugin. +# +# The protoc binary and other tools are sourced from a docker +# image `PROTOC_IMAGE`. +# +# Prereqs: The archiving utility `pax` is installed. + +PROTOC_IMAGE := namely/protoc-all:1.29_2 +PROTOBUF_VERSION := v1 +OTEL_PROTO_SUBMODULE := internal/opentelemetry-proto +PROTOBUF_GEN_DIR := internal/opentelemetry-proto-gen +PROTOBUF_TEMP_DIR := gen/pb-go +PROTO_SOURCE_DIR := gen/proto +SUBMODULE_PROTO_FILES := $(wildcard $(OTEL_PROTO_SUBMODULE)/opentelemetry/proto/*/$(PROTOBUF_VERSION)/*.proto \ + $(OTEL_PROTO_SUBMODULE)/opentelemetry/proto/collector/*/$(PROTOBUF_VERSION)/*.proto) +SOURCE_PROTO_FILES := $(subst $(OTEL_PROTO_SUBMODULE),$(PROTO_SOURCE_DIR),$(SUBMODULE_PROTO_FILES)) + +default: protobuf + +.PHONY: protobuf protobuf-source gen-protobuf copy-protobufs +protobuf: protobuf-source gen-protobuf copy-protobufs + +protobuf-source: $(SOURCE_PROTO_FILES) | $(PROTO_SOURCE_DIR)/ + +# Changes go_package in .proto file to point to repo-local location +define exec-replace-pkgname +sed 's,go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go,go_package = "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen,' < $(1) > $(2) + +endef + +# replace opentelemetry-proto package name by go.opentelemetry.io/otel specific version +$(SOURCE_PROTO_FILES): $(PROTO_SOURCE_DIR)/%.proto: $(OTEL_PROTO_SUBMODULE)/%.proto + @mkdir -p $(@D) + $(call exec-replace-pkgname,$<,$@) + +# Command to run protoc using docker image +define exec-protoc-all +docker run -v `pwd`:/defs $(PROTOC_IMAGE) $(1) + +endef + +gen-protobuf: $(SOURCE_PROTO_FILES) | $(PROTOBUF_GEN_DIR)/ + $(foreach file,$(subst ${PROTO_SOURCE_DIR}/,,$(SOURCE_PROTO_FILES)),$(call exec-protoc-all, -i $(PROTO_SOURCE_DIR) -f ${file} -l go -o ${PROTOBUF_TEMP_DIR})) + +# requires `pax` to be installed, as it has consistent options for both BSD (Darwin) and Linux +copy-protobufs: | $(PROTOBUF_GEN_DIR)/ + find ./$(PROTOBUF_TEMP_DIR)/go.opentelemetry.io/otel/$(PROTOBUF_GEN_DIR) -type f -print0 | \ + pax -0 -s ',^./$(PROTOBUF_TEMP_DIR)/go.opentelemetry.io/otel/$(PROTOBUF_GEN_DIR),,' -rw ./$(PROTOBUF_GEN_DIR) + +$(PROTO_SOURCE_DIR)/ $(PROTOBUF_GEN_DIR)/: + mkdir -p $@ + +.PHONY: clean +clean: + rm -rf ./gen From 166c703bd031040c8c3976863c901ae56fd74473 Mon Sep 17 00:00:00 2001 From: ET Date: Thu, 16 Jul 2020 13:59:14 -0700 Subject: [PATCH 02/60] Import open-telemetry/opentelemetry-proto submodule and generate protobuf bindings locally (#942) * Import open-telemetry/opentelemetry-proto submodule under internal * Commit changes in updated/new protobuf files * Refer to new location of .pb.go files after rewrite from import * Describe in CHANGELOG --- .gitignore | 2 + .gitmodules | 3 + CHANGELOG.md | 2 + example/otel-collector/go.sum | 9 - exporters/otlp/go.mod | 3 +- exporters/otlp/go.sum | 10 - .../otlp/internal/transform/attribute.go | 2 +- .../otlp/internal/transform/attribute_test.go | 2 +- .../internal/transform/instrumentation.go | 2 +- exporters/otlp/internal/transform/metric.go | 6 +- .../otlp/internal/transform/metric_test.go | 5 +- exporters/otlp/internal/transform/resource.go | 2 +- exporters/otlp/internal/transform/span.go | 2 +- .../otlp/internal/transform/span_test.go | 3 +- exporters/otlp/mock_collector_test.go | 12 +- exporters/otlp/otlp.go | 4 +- exporters/otlp/otlp_integration_test.go | 4 +- exporters/otlp/otlp_metric_test.go | 9 +- exporters/otlp/otlp_span_test.go | 9 +- internal/opentelemetry-proto | 1 + .../metrics/v1/metrics_service.pb.go | 215 ++++ .../collector/trace/v1/trace_config.pb.go | 368 ++++++ .../collector/trace/v1/trace_service.pb.go | 215 ++++ .../common/v1/common.pb.go | 445 +++++++ .../metrics/v1/metrics.pb.go | 1131 +++++++++++++++++ .../resource/v1/resource.pb.go | 100 ++ .../trace/v1/trace.pb.go | 767 +++++++++++ 27 files changed, 3283 insertions(+), 50 deletions(-) create mode 100644 .gitmodules create mode 160000 internal/opentelemetry-proto create mode 100644 internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go create mode 100644 internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go create mode 100644 internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go create mode 100644 internal/opentelemetry-proto-gen/common/v1/common.pb.go create mode 100644 internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go create mode 100644 internal/opentelemetry-proto-gen/resource/v1/resource.pb.go create mode 100644 internal/opentelemetry-proto-gen/trace/v1/trace.pb.go diff --git a/.gitignore b/.gitignore index 1f4d25f3c45..cbef19714a7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ Thumbs.db *.so coverage.* +gen/ + /example/basic/basic /example/grpc/client/client /example/grpc/server/server diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..64f784989dc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "opentelemetry-proto"] + path = internal/opentelemetry-proto + url = https://github.com/open-telemetry/opentelemetry-proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 589b75fce7d..1c6cda6b565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added - Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) +- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. + References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#948) ## [0.8.0] - 2020-07-09 diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 0aa43e6a183..d1127b1f3a1 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -47,7 +47,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -491,8 +490,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.11.1/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY= -github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -711,8 +708,6 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/open-telemetry/opentelemetry-collector v0.3.0 h1:/i106g9t6xNQ4hOAuczEwW10UX+S8ZnkdWDGawo9fyg= github.com/open-telemetry/opentelemetry-collector v0.3.0/go.mod h1:c5EgyLBK6FoGCaJpOEQ0j+sHqmfuoRzOm29tdVA/wDg= github.com/open-telemetry/opentelemetry-proto v0.3.0/go.mod h1:PMR5GI0F7BSpio+rBGFxNm6SLzg3FypDTcFuQZnO+F8= -github.com/open-telemetry/opentelemetry-proto v0.4.0 h1:7EGs7QkdnR039zcQv71/wPLeeUUzqpH855VEWN4IHTE= -github.com/open-telemetry/opentelemetry-proto v0.4.0/go.mod h1:PMR5GI0F7BSpio+rBGFxNm6SLzg3FypDTcFuQZnO+F8= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -793,7 +788,6 @@ github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1: github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1199,7 +1193,6 @@ google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1210,7 +1203,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -1247,7 +1239,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index 88672e1d763..70abb340013 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -5,11 +5,10 @@ replace go.opentelemetry.io/otel => ../.. require ( github.com/gogo/protobuf v1.3.1 github.com/google/go-cmp v0.5.0 - github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect github.com/kr/pretty v0.2.0 // indirect - github.com/open-telemetry/opentelemetry-proto v0.4.0 github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.8.0 + golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.30.0 ) diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 6d6135ac50a..07a3f0e900e 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -2,7 +2,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -14,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -37,8 +35,6 @@ github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY= -github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -47,13 +43,10 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/open-telemetry/opentelemetry-proto v0.4.0 h1:7EGs7QkdnR039zcQv71/wPLeeUUzqpH855VEWN4IHTE= -github.com/open-telemetry/opentelemetry-proto v0.4.0/go.mod h1:PMR5GI0F7BSpio+rBGFxNm6SLzg3FypDTcFuQZnO+F8= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= @@ -94,12 +87,10 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -113,7 +104,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporters/otlp/internal/transform/attribute.go b/exporters/otlp/internal/transform/attribute.go index 9d32ba494bf..d3ef165768c 100644 --- a/exporters/otlp/internal/transform/attribute.go +++ b/exporters/otlp/internal/transform/attribute.go @@ -15,7 +15,7 @@ package transform import ( - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" "go.opentelemetry.io/otel/api/kv/value" diff --git a/exporters/otlp/internal/transform/attribute_test.go b/exporters/otlp/internal/transform/attribute_test.go index 463a58b34d7..8e9808a9057 100644 --- a/exporters/otlp/internal/transform/attribute_test.go +++ b/exporters/otlp/internal/transform/attribute_test.go @@ -17,10 +17,10 @@ package transform import ( "testing" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/api/kv" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" ) func TestAttributes(t *testing.T) { diff --git a/exporters/otlp/internal/transform/instrumentation.go b/exporters/otlp/internal/transform/instrumentation.go index 28bb4c4d7ac..e29e51bc083 100644 --- a/exporters/otlp/internal/transform/instrumentation.go +++ b/exporters/otlp/internal/transform/instrumentation.go @@ -15,7 +15,7 @@ package transform import ( - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" "go.opentelemetry.io/otel/sdk/instrumentation" ) diff --git a/exporters/otlp/internal/transform/metric.go b/exporters/otlp/internal/transform/metric.go index 5f1e6009606..28a34fe0b38 100644 --- a/exporters/otlp/internal/transform/metric.go +++ b/exporters/otlp/internal/transform/metric.go @@ -23,9 +23,9 @@ import ( "strings" "sync" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - metricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1" - resourcepb "github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + metricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" + resourcepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" diff --git a/exporters/otlp/internal/transform/metric_test.go b/exporters/otlp/internal/transform/metric_test.go index e63d7a4914c..f4c7308c491 100644 --- a/exporters/otlp/internal/transform/metric_test.go +++ b/exporters/otlp/internal/transform/metric_test.go @@ -20,11 +20,12 @@ import ( "testing" "time" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - metricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + metricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" + "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" diff --git a/exporters/otlp/internal/transform/resource.go b/exporters/otlp/internal/transform/resource.go index f9559932b12..9af724992ca 100644 --- a/exporters/otlp/internal/transform/resource.go +++ b/exporters/otlp/internal/transform/resource.go @@ -15,7 +15,7 @@ package transform import ( - resourcepb "github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1" + resourcepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" "go.opentelemetry.io/otel/sdk/resource" ) diff --git a/exporters/otlp/internal/transform/span.go b/exporters/otlp/internal/transform/span.go index aa0f560f189..6f695b6145b 100644 --- a/exporters/otlp/internal/transform/span.go +++ b/exporters/otlp/internal/transform/span.go @@ -17,7 +17,7 @@ package transform import ( "google.golang.org/grpc/codes" - tracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1" + tracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/api/label" apitrace "go.opentelemetry.io/otel/api/trace" diff --git a/exporters/otlp/internal/transform/span_test.go b/exporters/otlp/internal/transform/span_test.go index 346ff4b4639..646c9435165 100644 --- a/exporters/otlp/internal/transform/span_test.go +++ b/exporters/otlp/internal/transform/span_test.go @@ -21,11 +21,12 @@ import ( "github.com/gogo/protobuf/proto" "github.com/google/go-cmp/cmp" - tracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" + tracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1" + "go.opentelemetry.io/otel/api/kv" apitrace "go.opentelemetry.io/otel/api/trace" export "go.opentelemetry.io/otel/sdk/export/trace" diff --git a/exporters/otlp/mock_collector_test.go b/exporters/otlp/mock_collector_test.go index 78cb33e7650..77157af4647 100644 --- a/exporters/otlp/mock_collector_test.go +++ b/exporters/otlp/mock_collector_test.go @@ -26,12 +26,12 @@ import ( "google.golang.org/grpc" metadata "google.golang.org/grpc/metadata" - colmetricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1" - coltracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - metricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1" - resourcepb "github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1" - tracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1" + colmetricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1" + coltracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + metricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" + resourcepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" + tracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1" ) func makeMockCollector(t *testing.T) *mockCol { diff --git a/exporters/otlp/otlp.go b/exporters/otlp/otlp.go index c51d3f43052..9bd48919c1c 100644 --- a/exporters/otlp/otlp.go +++ b/exporters/otlp/otlp.go @@ -25,8 +25,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - colmetricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1" - coltracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1" + colmetricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1" + coltracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/exporters/otlp/internal/transform" diff --git a/exporters/otlp/otlp_integration_test.go b/exporters/otlp/otlp_integration_test.go index a5185656aa0..195006ca60f 100644 --- a/exporters/otlp/otlp_integration_test.go +++ b/exporters/otlp/otlp_integration_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - metricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + metricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" diff --git a/exporters/otlp/otlp_metric_test.go b/exporters/otlp/otlp_metric_test.go index 417259cb836..1c4cf554953 100644 --- a/exporters/otlp/otlp_metric_test.go +++ b/exporters/otlp/otlp_metric_test.go @@ -20,13 +20,14 @@ import ( "testing" "time" - colmetricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - metricpb "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1" - resourcepb "github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + colmetricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + metricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" + resourcepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" + "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" diff --git a/exporters/otlp/otlp_span_test.go b/exporters/otlp/otlp_span_test.go index 1c49ae94e98..41fc753908c 100644 --- a/exporters/otlp/otlp_span_test.go +++ b/exporters/otlp/otlp_span_test.go @@ -19,14 +19,15 @@ import ( "testing" "time" - coltracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1" - commonpb "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1" - resourcepb "github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1" - tracepb "github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1" "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/codes" + coltracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1" + commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + resourcepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" + tracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1" + "go.opentelemetry.io/otel/api/kv" apitrace "go.opentelemetry.io/otel/api/trace" tracesdk "go.opentelemetry.io/otel/sdk/export/trace" diff --git a/internal/opentelemetry-proto b/internal/opentelemetry-proto new file mode 160000 index 00000000000..e43e1abc404 --- /dev/null +++ b/internal/opentelemetry-proto @@ -0,0 +1 @@ +Subproject commit e43e1abc40428a6ee98e3bfd79bec1dfa2ed18cd diff --git a/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go b/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go new file mode 100644 index 00000000000..aab12beb611 --- /dev/null +++ b/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto + +package v1 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v1 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ExportMetricsServiceRequest struct { + // An array of ResourceMetrics. + // For data coming from a single resource this array will typically contain one + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive + // data from multiple origins typically batch the data before forwarding further and + // in that case this array will contain multiple elements. + ResourceMetrics []*v1.ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExportMetricsServiceRequest) Reset() { *m = ExportMetricsServiceRequest{} } +func (m *ExportMetricsServiceRequest) String() string { return proto.CompactTextString(m) } +func (*ExportMetricsServiceRequest) ProtoMessage() {} +func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_75fb6015e6e64798, []int{0} +} + +func (m *ExportMetricsServiceRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExportMetricsServiceRequest.Unmarshal(m, b) +} +func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic) +} +func (m *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportMetricsServiceRequest.Merge(m, src) +} +func (m *ExportMetricsServiceRequest) XXX_Size() int { + return xxx_messageInfo_ExportMetricsServiceRequest.Size(m) +} +func (m *ExportMetricsServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExportMetricsServiceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportMetricsServiceRequest proto.InternalMessageInfo + +func (m *ExportMetricsServiceRequest) GetResourceMetrics() []*v1.ResourceMetrics { + if m != nil { + return m.ResourceMetrics + } + return nil +} + +type ExportMetricsServiceResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExportMetricsServiceResponse) Reset() { *m = ExportMetricsServiceResponse{} } +func (m *ExportMetricsServiceResponse) String() string { return proto.CompactTextString(m) } +func (*ExportMetricsServiceResponse) ProtoMessage() {} +func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75fb6015e6e64798, []int{1} +} + +func (m *ExportMetricsServiceResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExportMetricsServiceResponse.Unmarshal(m, b) +} +func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic) +} +func (m *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportMetricsServiceResponse.Merge(m, src) +} +func (m *ExportMetricsServiceResponse) XXX_Size() int { + return xxx_messageInfo_ExportMetricsServiceResponse.Size(m) +} +func (m *ExportMetricsServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExportMetricsServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportMetricsServiceResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExportMetricsServiceRequest)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest") + proto.RegisterType((*ExportMetricsServiceResponse)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/collector/metrics/v1/metrics_service.proto", fileDescriptor_75fb6015e6e64798) +} + +var fileDescriptor_75fb6015e6e64798 = []byte{ + // 265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x41, 0x4b, 0x03, 0x31, + 0x10, 0x85, 0x0d, 0x42, 0x0f, 0x11, 0x54, 0xd6, 0x8b, 0x54, 0x11, 0xd9, 0x53, 0x41, 0x9b, 0xd0, + 0x7a, 0xf7, 0x50, 0xa8, 0x37, 0xa5, 0xac, 0xb7, 0x5e, 0x8a, 0x86, 0xa1, 0x04, 0x62, 0x66, 0x9d, + 0x4c, 0x17, 0xfb, 0x3f, 0xbc, 0xf8, 0x1f, 0xfc, 0x91, 0xd2, 0xcd, 0xaa, 0x44, 0x83, 0x14, 0xbc, + 0x85, 0x37, 0xf3, 0xbe, 0xf7, 0x12, 0x22, 0xaf, 0xb1, 0x06, 0xcf, 0xe0, 0xe0, 0x09, 0x98, 0xd6, + 0xba, 0x26, 0x64, 0xd4, 0x06, 0x9d, 0x03, 0xc3, 0x48, 0x7a, 0xa3, 0x5a, 0x13, 0x74, 0x33, 0xfa, + 0x3c, 0x2e, 0x02, 0x50, 0x63, 0x0d, 0xa8, 0x76, 0xb5, 0x18, 0x24, 0xfe, 0x28, 0xaa, 0x2f, 0xbf, + 0xea, 0x4c, 0xaa, 0x19, 0xf5, 0x2f, 0x73, 0x49, 0xbf, 0xf9, 0x11, 0x51, 0xae, 0xe5, 0xc9, 0xf4, + 0xa5, 0x46, 0xe2, 0xdb, 0x28, 0xdf, 0xc7, 0xd4, 0x0a, 0x9e, 0x57, 0x10, 0xb8, 0x98, 0xcb, 0x43, + 0x82, 0x80, 0x2b, 0x32, 0xb0, 0xe8, 0x8c, 0xc7, 0xe2, 0x7c, 0x77, 0xb0, 0x37, 0xd6, 0x2a, 0xd7, + 0xe8, 0xbb, 0x87, 0xaa, 0x3a, 0x5f, 0x07, 0xae, 0x0e, 0x28, 0x15, 0xca, 0x33, 0x79, 0x9a, 0x8f, + 0x0e, 0x35, 0xfa, 0x00, 0xe3, 0x77, 0x21, 0xf7, 0xd3, 0x51, 0xf1, 0x26, 0x64, 0x2f, 0x7a, 0x8a, + 0xa9, 0xda, 0xf6, 0x45, 0xd4, 0x1f, 0x17, 0xec, 0xdf, 0xfc, 0x17, 0x13, 0xcb, 0x96, 0x3b, 0x93, + 0x57, 0x21, 0x2f, 0x2c, 0x6e, 0x8d, 0x9b, 0x1c, 0xa5, 0xa4, 0xd9, 0x66, 0x73, 0x26, 0xe6, 0x77, + 0xcb, 0x9f, 0x0c, 0x8b, 0x1a, 0x19, 0x9c, 0xb6, 0x9e, 0x81, 0xfc, 0x83, 0xd3, 0xc9, 0x78, 0xd8, + 0x46, 0x0c, 0x97, 0xe0, 0xb3, 0xdf, 0xe9, 0xb1, 0xd7, 0xce, 0xaf, 0x3e, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xd6, 0x4e, 0x10, 0x9f, 0x81, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MetricsServiceClient is the client API for MetricsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsServiceClient interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) +} + +type metricsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { + return &metricsServiceClient{cc} +} + +func (c *metricsServiceClient) Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) { + out := new(ExportMetricsServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsServiceServer is the server API for MetricsService service. +type MetricsServiceServer interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(context.Context, *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) +} + +// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsServiceServer struct { +} + +func (*UnimplementedMetricsServiceServer) Export(ctx context.Context, req *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { + s.RegisterService(&_MetricsService_serviceDesc, srv) +} + +func _MetricsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportMetricsServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServiceServer).Export(ctx, req.(*ExportMetricsServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MetricsService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.metrics.v1.MetricsService", + HandlerType: (*MetricsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: _MetricsService_Export_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", +} diff --git a/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go b/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go new file mode 100644 index 00000000000..839577d8d1e --- /dev/null +++ b/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/trace/v1/trace_config.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// How spans should be sampled: +// - Always off +// - Always on +// - Always follow the parent Span's decision (off if no parent). +type ConstantSampler_ConstantDecision int32 + +const ( + ConstantSampler_ALWAYS_OFF ConstantSampler_ConstantDecision = 0 + ConstantSampler_ALWAYS_ON ConstantSampler_ConstantDecision = 1 + ConstantSampler_ALWAYS_PARENT ConstantSampler_ConstantDecision = 2 +) + +var ConstantSampler_ConstantDecision_name = map[int32]string{ + 0: "ALWAYS_OFF", + 1: "ALWAYS_ON", + 2: "ALWAYS_PARENT", +} + +var ConstantSampler_ConstantDecision_value = map[string]int32{ + "ALWAYS_OFF": 0, + "ALWAYS_ON": 1, + "ALWAYS_PARENT": 2, +} + +func (x ConstantSampler_ConstantDecision) String() string { + return proto.EnumName(ConstantSampler_ConstantDecision_name, int32(x)) +} + +func (ConstantSampler_ConstantDecision) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5936aa8fa6443e6f, []int{1, 0} +} + +// Global configuration of the trace service. All fields must be specified, or +// the default (zero) values will be used for each type. +type TraceConfig struct { + // The global default sampler used to make decisions on span sampling. + // + // Types that are valid to be assigned to Sampler: + // *TraceConfig_ConstantSampler + // *TraceConfig_ProbabilitySampler + // *TraceConfig_RateLimitingSampler + Sampler isTraceConfig_Sampler `protobuf_oneof:"sampler"` + // The global default max number of attributes per span. + MaxNumberOfAttributes int64 `protobuf:"varint,4,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"max_number_of_attributes,omitempty"` + // The global default max number of annotation events per span. + MaxNumberOfTimedEvents int64 `protobuf:"varint,5,opt,name=max_number_of_timed_events,json=maxNumberOfTimedEvents,proto3" json:"max_number_of_timed_events,omitempty"` + // The global default max number of attributes per timed event. + MaxNumberOfAttributesPerTimedEvent int64 `protobuf:"varint,6,opt,name=max_number_of_attributes_per_timed_event,json=maxNumberOfAttributesPerTimedEvent,proto3" json:"max_number_of_attributes_per_timed_event,omitempty"` + // The global default max number of link entries per span. + MaxNumberOfLinks int64 `protobuf:"varint,7,opt,name=max_number_of_links,json=maxNumberOfLinks,proto3" json:"max_number_of_links,omitempty"` + // The global default max number of attributes per span. + MaxNumberOfAttributesPerLink int64 `protobuf:"varint,8,opt,name=max_number_of_attributes_per_link,json=maxNumberOfAttributesPerLink,proto3" json:"max_number_of_attributes_per_link,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TraceConfig) Reset() { *m = TraceConfig{} } +func (m *TraceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceConfig) ProtoMessage() {} +func (*TraceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_5936aa8fa6443e6f, []int{0} +} + +func (m *TraceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TraceConfig.Unmarshal(m, b) +} +func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) +} +func (m *TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceConfig.Merge(m, src) +} +func (m *TraceConfig) XXX_Size() int { + return xxx_messageInfo_TraceConfig.Size(m) +} +func (m *TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceConfig proto.InternalMessageInfo + +type isTraceConfig_Sampler interface { + isTraceConfig_Sampler() +} + +type TraceConfig_ConstantSampler struct { + ConstantSampler *ConstantSampler `protobuf:"bytes,1,opt,name=constant_sampler,json=constantSampler,proto3,oneof"` +} + +type TraceConfig_ProbabilitySampler struct { + ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,2,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"` +} + +type TraceConfig_RateLimitingSampler struct { + RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"` +} + +func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {} + +func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {} + +func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {} + +func (m *TraceConfig) GetSampler() isTraceConfig_Sampler { + if m != nil { + return m.Sampler + } + return nil +} + +func (m *TraceConfig) GetConstantSampler() *ConstantSampler { + if x, ok := m.GetSampler().(*TraceConfig_ConstantSampler); ok { + return x.ConstantSampler + } + return nil +} + +func (m *TraceConfig) GetProbabilitySampler() *ProbabilitySampler { + if x, ok := m.GetSampler().(*TraceConfig_ProbabilitySampler); ok { + return x.ProbabilitySampler + } + return nil +} + +func (m *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler { + if x, ok := m.GetSampler().(*TraceConfig_RateLimitingSampler); ok { + return x.RateLimitingSampler + } + return nil +} + +func (m *TraceConfig) GetMaxNumberOfAttributes() int64 { + if m != nil { + return m.MaxNumberOfAttributes + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfTimedEvents() int64 { + if m != nil { + return m.MaxNumberOfTimedEvents + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfAttributesPerTimedEvent() int64 { + if m != nil { + return m.MaxNumberOfAttributesPerTimedEvent + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfLinks() int64 { + if m != nil { + return m.MaxNumberOfLinks + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfAttributesPerLink() int64 { + if m != nil { + return m.MaxNumberOfAttributesPerLink + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TraceConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TraceConfig_ConstantSampler)(nil), + (*TraceConfig_ProbabilitySampler)(nil), + (*TraceConfig_RateLimitingSampler)(nil), + } +} + +// Sampler that always makes a constant decision on span sampling. +type ConstantSampler struct { + Decision ConstantSampler_ConstantDecision `protobuf:"varint,1,opt,name=decision,proto3,enum=opentelemetry.proto.trace.v1.ConstantSampler_ConstantDecision" json:"decision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConstantSampler) Reset() { *m = ConstantSampler{} } +func (m *ConstantSampler) String() string { return proto.CompactTextString(m) } +func (*ConstantSampler) ProtoMessage() {} +func (*ConstantSampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5936aa8fa6443e6f, []int{1} +} + +func (m *ConstantSampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConstantSampler.Unmarshal(m, b) +} +func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic) +} +func (m *ConstantSampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConstantSampler.Merge(m, src) +} +func (m *ConstantSampler) XXX_Size() int { + return xxx_messageInfo_ConstantSampler.Size(m) +} +func (m *ConstantSampler) XXX_DiscardUnknown() { + xxx_messageInfo_ConstantSampler.DiscardUnknown(m) +} + +var xxx_messageInfo_ConstantSampler proto.InternalMessageInfo + +func (m *ConstantSampler) GetDecision() ConstantSampler_ConstantDecision { + if m != nil { + return m.Decision + } + return ConstantSampler_ALWAYS_OFF +} + +// Sampler that tries to uniformly sample traces with a given probability. +// The probability of sampling a trace is equal to that of the specified probability. +type ProbabilitySampler struct { + // The desired probability of sampling. Must be within [0.0, 1.0]. + SamplingProbability float64 `protobuf:"fixed64,1,opt,name=samplingProbability,proto3" json:"samplingProbability,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProbabilitySampler) Reset() { *m = ProbabilitySampler{} } +func (m *ProbabilitySampler) String() string { return proto.CompactTextString(m) } +func (*ProbabilitySampler) ProtoMessage() {} +func (*ProbabilitySampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5936aa8fa6443e6f, []int{2} +} + +func (m *ProbabilitySampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProbabilitySampler.Unmarshal(m, b) +} +func (m *ProbabilitySampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProbabilitySampler.Marshal(b, m, deterministic) +} +func (m *ProbabilitySampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProbabilitySampler.Merge(m, src) +} +func (m *ProbabilitySampler) XXX_Size() int { + return xxx_messageInfo_ProbabilitySampler.Size(m) +} +func (m *ProbabilitySampler) XXX_DiscardUnknown() { + xxx_messageInfo_ProbabilitySampler.DiscardUnknown(m) +} + +var xxx_messageInfo_ProbabilitySampler proto.InternalMessageInfo + +func (m *ProbabilitySampler) GetSamplingProbability() float64 { + if m != nil { + return m.SamplingProbability + } + return 0 +} + +// Sampler that tries to sample with a rate per time window. +type RateLimitingSampler struct { + // Rate per second. + Qps int64 `protobuf:"varint,1,opt,name=qps,proto3" json:"qps,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimitingSampler) Reset() { *m = RateLimitingSampler{} } +func (m *RateLimitingSampler) String() string { return proto.CompactTextString(m) } +func (*RateLimitingSampler) ProtoMessage() {} +func (*RateLimitingSampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5936aa8fa6443e6f, []int{3} +} + +func (m *RateLimitingSampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimitingSampler.Unmarshal(m, b) +} +func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic) +} +func (m *RateLimitingSampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimitingSampler.Merge(m, src) +} +func (m *RateLimitingSampler) XXX_Size() int { + return xxx_messageInfo_RateLimitingSampler.Size(m) +} +func (m *RateLimitingSampler) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimitingSampler.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimitingSampler proto.InternalMessageInfo + +func (m *RateLimitingSampler) GetQps() int64 { + if m != nil { + return m.Qps + } + return 0 +} + +func init() { + proto.RegisterEnum("opentelemetry.proto.trace.v1.ConstantSampler_ConstantDecision", ConstantSampler_ConstantDecision_name, ConstantSampler_ConstantDecision_value) + proto.RegisterType((*TraceConfig)(nil), "opentelemetry.proto.trace.v1.TraceConfig") + proto.RegisterType((*ConstantSampler)(nil), "opentelemetry.proto.trace.v1.ConstantSampler") + proto.RegisterType((*ProbabilitySampler)(nil), "opentelemetry.proto.trace.v1.ProbabilitySampler") + proto.RegisterType((*RateLimitingSampler)(nil), "opentelemetry.proto.trace.v1.RateLimitingSampler") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/trace/v1/trace_config.proto", fileDescriptor_5936aa8fa6443e6f) +} + +var fileDescriptor_5936aa8fa6443e6f = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x6f, 0x9b, 0x40, + 0x10, 0xc5, 0x43, 0xdc, 0xfc, 0x9b, 0x28, 0x09, 0x5d, 0x2b, 0x15, 0xaa, 0x22, 0x35, 0xe5, 0x52, + 0x5f, 0x6c, 0xe2, 0xf4, 0x50, 0xa9, 0x87, 0x4a, 0x76, 0x12, 0xb7, 0x07, 0xcb, 0xb1, 0x88, 0xa5, + 0xaa, 0xbe, 0xa0, 0x85, 0x8c, 0xd1, 0xaa, 0xb0, 0x4b, 0x97, 0x8d, 0x95, 0x9c, 0xab, 0x7e, 0xa2, + 0x7e, 0xc1, 0x8a, 0x35, 0xc5, 0x60, 0x3b, 0x48, 0xb9, 0xed, 0xcc, 0xe3, 0xfd, 0xde, 0x2e, 0x0c, + 0x0b, 0x8e, 0x48, 0x90, 0x2b, 0x8c, 0x30, 0x46, 0x25, 0x9f, 0x9c, 0x44, 0x0a, 0x25, 0x1c, 0x25, + 0x69, 0x80, 0xce, 0xbc, 0xbb, 0x58, 0x78, 0x81, 0xe0, 0x33, 0x16, 0x76, 0xb4, 0x46, 0xce, 0x2a, + 0x86, 0x45, 0xb3, 0xa3, 0x9f, 0xeb, 0xcc, 0xbb, 0xf6, 0x9f, 0x1d, 0x38, 0x9c, 0x64, 0xc5, 0x95, + 0xf6, 0x90, 0x29, 0x98, 0x81, 0xe0, 0xa9, 0xa2, 0x5c, 0x79, 0x29, 0x8d, 0x93, 0x08, 0xa5, 0x65, + 0x9c, 0x1b, 0xad, 0xc3, 0xcb, 0x76, 0xa7, 0x0e, 0xd4, 0xb9, 0xca, 0x5d, 0x77, 0x0b, 0xd3, 0xb7, + 0x2d, 0xf7, 0x24, 0xa8, 0xb6, 0x48, 0x00, 0xcd, 0x44, 0x0a, 0x9f, 0xfa, 0x2c, 0x62, 0xea, 0xa9, + 0xc0, 0x6f, 0x6b, 0xfc, 0x45, 0x3d, 0x7e, 0xbc, 0x34, 0x2e, 0x13, 0x48, 0xb2, 0xd6, 0x25, 0x21, + 0x9c, 0x4a, 0xaa, 0xd0, 0x8b, 0x58, 0xcc, 0x14, 0xe3, 0x61, 0x11, 0xd3, 0xd0, 0x31, 0xdd, 0xfa, + 0x18, 0x97, 0x2a, 0x1c, 0xe6, 0xce, 0x65, 0x4e, 0x53, 0xae, 0xb7, 0xc9, 0x27, 0xb0, 0x62, 0xfa, + 0xe8, 0xf1, 0x87, 0xd8, 0x47, 0xe9, 0x89, 0x99, 0x47, 0x95, 0x92, 0xcc, 0x7f, 0x50, 0x98, 0x5a, + 0xaf, 0xce, 0x8d, 0x56, 0xc3, 0x3d, 0x8d, 0xe9, 0xe3, 0x48, 0xcb, 0xb7, 0xb3, 0x5e, 0x21, 0x92, + 0xcf, 0xf0, 0xb6, 0x6a, 0x54, 0x2c, 0xc6, 0x7b, 0x0f, 0xe7, 0xc8, 0x55, 0x6a, 0xed, 0x68, 0xeb, + 0x9b, 0x92, 0x75, 0x92, 0xc9, 0x37, 0x5a, 0x25, 0x13, 0x68, 0x3d, 0x17, 0xea, 0x25, 0x28, 0xcb, + 0x28, 0x6b, 0x57, 0x93, 0xec, 0x8d, 0x9b, 0x18, 0xa3, 0x5c, 0x62, 0x49, 0x1b, 0x9a, 0x55, 0x6a, + 0xc4, 0xf8, 0xcf, 0xd4, 0xda, 0xd3, 0x00, 0xb3, 0x04, 0x18, 0x66, 0x7d, 0xf2, 0x15, 0xde, 0xd7, + 0x6e, 0x22, 0x73, 0x5b, 0xfb, 0xda, 0x7c, 0xf6, 0x5c, 0x7a, 0x46, 0xea, 0x1f, 0xc0, 0x5e, 0xfe, + 0x75, 0xec, 0xbf, 0x06, 0x9c, 0xac, 0x8c, 0x10, 0x99, 0xc2, 0xfe, 0x3d, 0x06, 0x2c, 0x65, 0x82, + 0xeb, 0x19, 0x3c, 0xbe, 0xfc, 0xf2, 0xa2, 0x19, 0x2c, 0xea, 0xeb, 0x9c, 0xe2, 0x16, 0x3c, 0xfb, + 0x1a, 0xcc, 0x55, 0x95, 0x1c, 0x03, 0xf4, 0x86, 0xdf, 0x7b, 0x3f, 0xee, 0xbc, 0xdb, 0xc1, 0xc0, + 0xdc, 0x22, 0x47, 0x70, 0xf0, 0xbf, 0x1e, 0x99, 0x06, 0x79, 0x0d, 0x47, 0x79, 0x39, 0xee, 0xb9, + 0x37, 0xa3, 0x89, 0xb9, 0x6d, 0x0f, 0x80, 0xac, 0x0f, 0x26, 0xb9, 0x80, 0xa6, 0x3e, 0x16, 0xe3, + 0x61, 0x49, 0xd5, 0x47, 0x30, 0xdc, 0x4d, 0x92, 0xfd, 0x01, 0x9a, 0x1b, 0x26, 0x8f, 0x98, 0xd0, + 0xf8, 0x95, 0xa4, 0xda, 0xd8, 0x70, 0xb3, 0x65, 0xff, 0xb7, 0x01, 0xef, 0x98, 0xa8, 0x7d, 0x0b, + 0x7d, 0xb3, 0xf4, 0x3f, 0x8f, 0x33, 0x69, 0x6c, 0x4c, 0x87, 0xe1, 0xaa, 0x89, 0x09, 0x47, 0x28, + 0x8c, 0x1c, 0xc6, 0x15, 0x4a, 0x4e, 0xa3, 0xea, 0xbd, 0xd2, 0xd6, 0xcc, 0x76, 0x88, 0xdc, 0x09, + 0x44, 0x14, 0x61, 0xa0, 0x84, 0x2c, 0x6e, 0x19, 0x7f, 0x57, 0xab, 0x1f, 0xff, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x5b, 0xb2, 0x4e, 0x84, 0x8c, 0x04, 0x00, 0x00, +} diff --git a/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go b/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go new file mode 100644 index 00000000000..f241868b946 --- /dev/null +++ b/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/collector/trace/v1/trace_service.proto + +package v1 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v1 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ExportTraceServiceRequest struct { + // An array of ResourceSpans. + // For data coming from a single resource this array will typically contain one + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive + // data from multiple origins typically batch the data before forwarding further and + // in that case this array will contain multiple elements. + ResourceSpans []*v1.ResourceSpans `protobuf:"bytes,1,rep,name=resource_spans,json=resourceSpans,proto3" json:"resource_spans,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExportTraceServiceRequest) Reset() { *m = ExportTraceServiceRequest{} } +func (m *ExportTraceServiceRequest) String() string { return proto.CompactTextString(m) } +func (*ExportTraceServiceRequest) ProtoMessage() {} +func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_192a962890318cf4, []int{0} +} + +func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExportTraceServiceRequest.Unmarshal(m, b) +} +func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic) +} +func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportTraceServiceRequest.Merge(m, src) +} +func (m *ExportTraceServiceRequest) XXX_Size() int { + return xxx_messageInfo_ExportTraceServiceRequest.Size(m) +} +func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo + +func (m *ExportTraceServiceRequest) GetResourceSpans() []*v1.ResourceSpans { + if m != nil { + return m.ResourceSpans + } + return nil +} + +type ExportTraceServiceResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExportTraceServiceResponse) Reset() { *m = ExportTraceServiceResponse{} } +func (m *ExportTraceServiceResponse) String() string { return proto.CompactTextString(m) } +func (*ExportTraceServiceResponse) ProtoMessage() {} +func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_192a962890318cf4, []int{1} +} + +func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExportTraceServiceResponse.Unmarshal(m, b) +} +func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic) +} +func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportTraceServiceResponse.Merge(m, src) +} +func (m *ExportTraceServiceResponse) XXX_Size() int { + return xxx_messageInfo_ExportTraceServiceResponse.Size(m) +} +func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExportTraceServiceRequest)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest") + proto.RegisterType((*ExportTraceServiceResponse)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/collector/trace/v1/trace_service.proto", fileDescriptor_192a962890318cf4) +} + +var fileDescriptor_192a962890318cf4 = []byte{ + // 267 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x3f, 0x4b, 0xc4, 0x40, + 0x10, 0xc5, 0x5d, 0x84, 0x2b, 0xd6, 0x3f, 0x60, 0x2a, 0x0d, 0x16, 0x92, 0x42, 0x4e, 0xe4, 0x76, + 0xb9, 0xb3, 0xb3, 0x33, 0x60, 0x67, 0x71, 0xe4, 0xac, 0x6c, 0x24, 0x86, 0xe1, 0x08, 0xac, 0x3b, + 0xeb, 0xec, 0x5c, 0xd0, 0x2f, 0x21, 0xf8, 0x15, 0xfc, 0xa4, 0x92, 0xac, 0x4a, 0x22, 0x2b, 0x04, + 0xae, 0x4b, 0x66, 0xde, 0xef, 0xbd, 0x37, 0xb0, 0xf2, 0x1a, 0x1d, 0x58, 0x06, 0x03, 0xcf, 0xc0, + 0xf4, 0xa6, 0x1d, 0x21, 0xa3, 0xae, 0xd0, 0x18, 0xa8, 0x18, 0x49, 0x33, 0x95, 0x15, 0xe8, 0x66, + 0x1e, 0x3e, 0x1e, 0x3d, 0x50, 0x53, 0x57, 0xa0, 0x3a, 0x59, 0x72, 0x3e, 0x60, 0xc3, 0x50, 0xfd, + 0xb2, 0xaa, 0x43, 0x54, 0x33, 0x4f, 0xa7, 0xb1, 0x8c, 0xa1, 0x73, 0x80, 0x33, 0x94, 0x27, 0xb7, + 0xaf, 0x0e, 0x89, 0xef, 0xdb, 0xe1, 0x2a, 0xa4, 0x15, 0xf0, 0xb2, 0x01, 0xcf, 0x49, 0x21, 0x0f, + 0x09, 0x3c, 0x6e, 0xa8, 0x2d, 0xe2, 0x4a, 0xeb, 0x8f, 0xc5, 0xd9, 0xee, 0x74, 0x6f, 0x71, 0xa9, + 0x62, 0x3d, 0x7e, 0xd2, 0x55, 0xf1, 0xcd, 0xac, 0x5a, 0xa4, 0x38, 0xa0, 0xfe, 0x6f, 0x76, 0x2a, + 0xd3, 0x58, 0xa0, 0x77, 0x68, 0x3d, 0x2c, 0x3e, 0x85, 0xdc, 0xef, 0x2f, 0x92, 0x0f, 0x21, 0x27, + 0x41, 0x9f, 0xdc, 0xa8, 0x71, 0xd7, 0xab, 0x7f, 0x0f, 0x4a, 0xf3, 0x6d, 0x2c, 0x42, 0xc5, 0x6c, + 0x27, 0x7f, 0x17, 0xf2, 0xa2, 0xc6, 0x91, 0x56, 0xf9, 0x51, 0xdf, 0x65, 0xd9, 0xaa, 0x96, 0xe2, + 0xe1, 0x6e, 0xfd, 0x97, 0xaf, 0x51, 0x23, 0x83, 0xd1, 0xb5, 0x65, 0x20, 0x5b, 0x1a, 0x3d, 0x58, + 0xcf, 0x3a, 0xfb, 0xd9, 0x1a, 0x6c, 0xe4, 0xa9, 0x3c, 0x4d, 0xba, 0xed, 0xd5, 0x57, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xbc, 0x8e, 0x2c, 0x0e, 0x5b, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TraceServiceClient is the client API for TraceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TraceServiceClient interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) +} + +type traceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTraceServiceClient(cc grpc.ClientConnInterface) TraceServiceClient { + return &traceServiceClient{cc} +} + +func (c *traceServiceClient) Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) { + out := new(ExportTraceServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TraceServiceServer is the server API for TraceService service. +type TraceServiceServer interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(context.Context, *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) +} + +// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTraceServiceServer struct { +} + +func (*UnimplementedTraceServiceServer) Export(ctx context.Context, req *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { + s.RegisterService(&_TraceService_serviceDesc, srv) +} + +func _TraceService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportTraceServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TraceServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.trace.v1.TraceService/Export", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TraceServiceServer).Export(ctx, req.(*ExportTraceServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _TraceService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.trace.v1.TraceService", + HandlerType: (*TraceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: _TraceService_Export_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/trace/v1/trace_service.proto", +} diff --git a/internal/opentelemetry-proto-gen/common/v1/common.pb.go b/internal/opentelemetry-proto-gen/common/v1/common.pb.go new file mode 100644 index 00000000000..7ead48f67d5 --- /dev/null +++ b/internal/opentelemetry-proto-gen/common/v1/common.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/common/v1/common.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// AnyValue is used to represent any type of attribute value. AnyValue may contain a +// primitive value such as a string or integer or it may contain an arbitrary nested +// object containing arrays, key-value lists and primitives. +type AnyValue struct { + // The value is one of the listed fields. It is valid for all values to be unspecified + // in which case this AnyValue is considered to be "null". + // + // Types that are valid to be assigned to Value: + // *AnyValue_StringValue + // *AnyValue_BoolValue + // *AnyValue_IntValue + // *AnyValue_DoubleValue + // *AnyValue_ArrayValue + // *AnyValue_KvlistValue + Value isAnyValue_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnyValue) Reset() { *m = AnyValue{} } +func (m *AnyValue) String() string { return proto.CompactTextString(m) } +func (*AnyValue) ProtoMessage() {} +func (*AnyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{0} +} + +func (m *AnyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnyValue.Unmarshal(m, b) +} +func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) +} +func (m *AnyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnyValue.Merge(m, src) +} +func (m *AnyValue) XXX_Size() int { + return xxx_messageInfo_AnyValue.Size(m) +} +func (m *AnyValue) XXX_DiscardUnknown() { + xxx_messageInfo_AnyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_AnyValue proto.InternalMessageInfo + +type isAnyValue_Value interface { + isAnyValue_Value() +} + +type AnyValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type AnyValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type AnyValue_IntValue struct { + IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type AnyValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type AnyValue_ArrayValue struct { + ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof"` +} + +type AnyValue_KvlistValue struct { + KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof"` +} + +func (*AnyValue_StringValue) isAnyValue_Value() {} + +func (*AnyValue_BoolValue) isAnyValue_Value() {} + +func (*AnyValue_IntValue) isAnyValue_Value() {} + +func (*AnyValue_DoubleValue) isAnyValue_Value() {} + +func (*AnyValue_ArrayValue) isAnyValue_Value() {} + +func (*AnyValue_KvlistValue) isAnyValue_Value() {} + +func (m *AnyValue) GetValue() isAnyValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *AnyValue) GetStringValue() string { + if x, ok := m.GetValue().(*AnyValue_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *AnyValue) GetBoolValue() bool { + if x, ok := m.GetValue().(*AnyValue_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *AnyValue) GetIntValue() int64 { + if x, ok := m.GetValue().(*AnyValue_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (m *AnyValue) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*AnyValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (m *AnyValue) GetArrayValue() *ArrayValue { + if x, ok := m.GetValue().(*AnyValue_ArrayValue); ok { + return x.ArrayValue + } + return nil +} + +func (m *AnyValue) GetKvlistValue() *KeyValueList { + if x, ok := m.GetValue().(*AnyValue_KvlistValue); ok { + return x.KvlistValue + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AnyValue) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AnyValue_StringValue)(nil), + (*AnyValue_BoolValue)(nil), + (*AnyValue_IntValue)(nil), + (*AnyValue_DoubleValue)(nil), + (*AnyValue_ArrayValue)(nil), + (*AnyValue_KvlistValue)(nil), + } +} + +// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message +// since oneof in AnyValue does not allow repeated fields. +type ArrayValue struct { + // Array of values. The array may be empty (contain 0 elements). + Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArrayValue) Reset() { *m = ArrayValue{} } +func (m *ArrayValue) String() string { return proto.CompactTextString(m) } +func (*ArrayValue) ProtoMessage() {} +func (*ArrayValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{1} +} + +func (m *ArrayValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ArrayValue.Unmarshal(m, b) +} +func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) +} +func (m *ArrayValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArrayValue.Merge(m, src) +} +func (m *ArrayValue) XXX_Size() int { + return xxx_messageInfo_ArrayValue.Size(m) +} +func (m *ArrayValue) XXX_DiscardUnknown() { + xxx_messageInfo_ArrayValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ArrayValue proto.InternalMessageInfo + +func (m *ArrayValue) GetValues() []*AnyValue { + if m != nil { + return m.Values + } + return nil +} + +// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message +// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need +// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to +// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches +// are semantically equivalent. +type KeyValueList struct { + // A collection of key/value pairs of key-value pairs. The list may be empty (may + // contain 0 elements). + Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValueList) Reset() { *m = KeyValueList{} } +func (m *KeyValueList) String() string { return proto.CompactTextString(m) } +func (*KeyValueList) ProtoMessage() {} +func (*KeyValueList) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{2} +} + +func (m *KeyValueList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValueList.Unmarshal(m, b) +} +func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) +} +func (m *KeyValueList) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValueList.Merge(m, src) +} +func (m *KeyValueList) XXX_Size() int { + return xxx_messageInfo_KeyValueList.Size(m) +} +func (m *KeyValueList) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValueList.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValueList proto.InternalMessageInfo + +func (m *KeyValueList) GetValues() []*KeyValue { + if m != nil { + return m.Values + } + return nil +} + +// KeyValue is a key-value pair that is used to store Span attributes, Link +// attributes, etc. +type KeyValue struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{3} +} + +func (m *KeyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValue.Unmarshal(m, b) +} +func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) +} +func (m *KeyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValue.Merge(m, src) +} +func (m *KeyValue) XXX_Size() int { + return xxx_messageInfo_KeyValue.Size(m) +} +func (m *KeyValue) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValue proto.InternalMessageInfo + +func (m *KeyValue) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *KeyValue) GetValue() *AnyValue { + if m != nil { + return m.Value + } + return nil +} + +// StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version +// of KeyValue that only supports string values. +type StringKeyValue struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringKeyValue) Reset() { *m = StringKeyValue{} } +func (m *StringKeyValue) String() string { return proto.CompactTextString(m) } +func (*StringKeyValue) ProtoMessage() {} +func (*StringKeyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{4} +} + +func (m *StringKeyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringKeyValue.Unmarshal(m, b) +} +func (m *StringKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringKeyValue.Marshal(b, m, deterministic) +} +func (m *StringKeyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringKeyValue.Merge(m, src) +} +func (m *StringKeyValue) XXX_Size() int { + return xxx_messageInfo_StringKeyValue.Size(m) +} +func (m *StringKeyValue) XXX_DiscardUnknown() { + xxx_messageInfo_StringKeyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_StringKeyValue proto.InternalMessageInfo + +func (m *StringKeyValue) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *StringKeyValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// InstrumentationLibrary is a message representing the instrumentation library information +// such as the fully qualified name and version. +type InstrumentationLibrary struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InstrumentationLibrary) Reset() { *m = InstrumentationLibrary{} } +func (m *InstrumentationLibrary) String() string { return proto.CompactTextString(m) } +func (*InstrumentationLibrary) ProtoMessage() {} +func (*InstrumentationLibrary) Descriptor() ([]byte, []int) { + return fileDescriptor_62ba46dcb97aa817, []int{5} +} + +func (m *InstrumentationLibrary) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstrumentationLibrary.Unmarshal(m, b) +} +func (m *InstrumentationLibrary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstrumentationLibrary.Marshal(b, m, deterministic) +} +func (m *InstrumentationLibrary) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstrumentationLibrary.Merge(m, src) +} +func (m *InstrumentationLibrary) XXX_Size() int { + return xxx_messageInfo_InstrumentationLibrary.Size(m) +} +func (m *InstrumentationLibrary) XXX_DiscardUnknown() { + xxx_messageInfo_InstrumentationLibrary.DiscardUnknown(m) +} + +var xxx_messageInfo_InstrumentationLibrary proto.InternalMessageInfo + +func (m *InstrumentationLibrary) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *InstrumentationLibrary) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func init() { + proto.RegisterType((*AnyValue)(nil), "opentelemetry.proto.common.v1.AnyValue") + proto.RegisterType((*ArrayValue)(nil), "opentelemetry.proto.common.v1.ArrayValue") + proto.RegisterType((*KeyValueList)(nil), "opentelemetry.proto.common.v1.KeyValueList") + proto.RegisterType((*KeyValue)(nil), "opentelemetry.proto.common.v1.KeyValue") + proto.RegisterType((*StringKeyValue)(nil), "opentelemetry.proto.common.v1.StringKeyValue") + proto.RegisterType((*InstrumentationLibrary)(nil), "opentelemetry.proto.common.v1.InstrumentationLibrary") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/common/v1/common.proto", fileDescriptor_62ba46dcb97aa817) +} + +var fileDescriptor_62ba46dcb97aa817 = []byte{ + // 411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5f, 0xab, 0xd3, 0x30, + 0x14, 0x6f, 0x6e, 0xef, 0xdd, 0xda, 0xd3, 0x21, 0x12, 0x44, 0xf6, 0x32, 0x2c, 0xf3, 0xc1, 0xaa, + 0xac, 0x65, 0xf3, 0xc5, 0x17, 0x91, 0x6d, 0x20, 0x15, 0x27, 0x8e, 0x0a, 0x3e, 0xe8, 0x83, 0xa4, + 0x1a, 0x46, 0x58, 0x9b, 0x8c, 0x34, 0x2b, 0xf4, 0xc3, 0xf9, 0xdd, 0xa4, 0x49, 0xba, 0x3f, 0xf7, + 0x61, 0x63, 0x6f, 0xe7, 0xfc, 0xf2, 0xfb, 0x73, 0x4e, 0x93, 0xc2, 0x1b, 0xb1, 0xa3, 0x5c, 0xd1, + 0x82, 0x96, 0x54, 0xc9, 0x26, 0xd9, 0x49, 0xa1, 0x44, 0xf2, 0x47, 0x94, 0xa5, 0xe0, 0x49, 0x3d, + 0xb5, 0x55, 0xac, 0x61, 0x3c, 0x3a, 0xe3, 0x1a, 0x30, 0xb6, 0x8c, 0x7a, 0x3a, 0xfe, 0x77, 0x07, + 0xde, 0x9c, 0x37, 0x3f, 0x48, 0xb1, 0xa7, 0xf8, 0x25, 0x0c, 0x2a, 0x25, 0x19, 0xdf, 0xfc, 0xae, + 0xdb, 0x7e, 0x88, 0x42, 0x14, 0xf9, 0xa9, 0x93, 0x05, 0x06, 0x35, 0xa4, 0x17, 0x00, 0xb9, 0x10, + 0x85, 0xa5, 0xdc, 0x85, 0x28, 0xf2, 0x52, 0x27, 0xf3, 0x5b, 0xcc, 0x10, 0x46, 0xe0, 0x33, 0xae, + 0xec, 0xb9, 0x1b, 0xa2, 0xc8, 0x4d, 0x9d, 0xcc, 0x63, 0x5c, 0x1d, 0x42, 0xfe, 0x8a, 0x7d, 0x5e, + 0x50, 0xcb, 0xb8, 0x0f, 0x51, 0x84, 0xda, 0x10, 0x83, 0x1a, 0xd2, 0x0a, 0x02, 0x22, 0x25, 0x69, + 0x2c, 0xe7, 0x21, 0x44, 0x51, 0x30, 0x7b, 0x1d, 0x5f, 0xdc, 0x25, 0x9e, 0xb7, 0x0a, 0xad, 0x4f, + 0x9d, 0x0c, 0xc8, 0xa1, 0xc3, 0x6b, 0x18, 0x6c, 0xeb, 0x82, 0x55, 0xdd, 0x50, 0x3d, 0x6d, 0xf7, + 0xf6, 0x8a, 0xdd, 0x17, 0x6a, 0xe4, 0x2b, 0x56, 0xa9, 0x76, 0x3e, 0x63, 0xa1, 0xa1, 0x45, 0x1f, + 0x1e, 0xb4, 0xd5, 0xf8, 0x2b, 0xc0, 0x31, 0x16, 0x7f, 0x84, 0x9e, 0x86, 0xab, 0x21, 0x0a, 0xdd, + 0x28, 0x98, 0xbd, 0xba, 0x36, 0xb1, 0xfd, 0xf2, 0x99, 0x95, 0x8d, 0xbf, 0xc1, 0xe0, 0x34, 0xf6, + 0x66, 0xc3, 0x4e, 0x7c, 0x30, 0xfc, 0x05, 0x5e, 0x87, 0xe1, 0xa7, 0xe0, 0x6e, 0x69, 0x63, 0x6e, + 0x35, 0x6b, 0x4b, 0xfc, 0xc1, 0xae, 0xa1, 0xaf, 0xf1, 0x86, 0x71, 0xed, 0xf2, 0xef, 0xe1, 0xc9, + 0x77, 0xfd, 0x32, 0x2e, 0x44, 0x3c, 0x3b, 0x8d, 0xf0, 0x3b, 0xe5, 0x27, 0x78, 0xfe, 0x99, 0x57, + 0x4a, 0xee, 0x4b, 0xca, 0x15, 0x51, 0x4c, 0xf0, 0x15, 0xcb, 0x25, 0x91, 0x0d, 0xc6, 0x70, 0xcf, + 0x49, 0x69, 0xdf, 0x5e, 0xa6, 0x6b, 0x3c, 0x84, 0x7e, 0x4d, 0x65, 0xc5, 0x04, 0xb7, 0x2e, 0x5d, + 0xbb, 0xa8, 0x21, 0x64, 0xe2, 0xf2, 0xd4, 0x8b, 0x60, 0xa9, 0xcb, 0x75, 0x0b, 0xaf, 0xd1, 0xcf, + 0xe5, 0xe6, 0xb1, 0x80, 0x89, 0x44, 0x28, 0x5a, 0x24, 0x8c, 0x2b, 0x2a, 0x39, 0x29, 0x92, 0xb3, + 0xe3, 0x89, 0xf6, 0x9b, 0x6c, 0x28, 0x3f, 0xfe, 0x62, 0x79, 0x4f, 0x83, 0xef, 0xfe, 0x07, 0x00, + 0x00, 0xff, 0xff, 0x23, 0xab, 0xab, 0x36, 0x8a, 0x03, 0x00, 0x00, +} diff --git a/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go b/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go new file mode 100644 index 00000000000..7d3d176634c --- /dev/null +++ b/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go @@ -0,0 +1,1131 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/metrics/v1/metrics.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v11 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + v1 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Type is the type of values a metric has. +type MetricDescriptor_Type int32 + +const ( + // INVALID_TYPE is the default Type, it MUST not be used. + MetricDescriptor_INVALID_TYPE MetricDescriptor_Type = 0 + // INT64 values are signed 64-bit integers. + // + // A Metric of this Type MUST store its values as Int64DataPoint. + MetricDescriptor_INT64 MetricDescriptor_Type = 1 + // MONOTONIC_INT64 values are monotonically increasing signed 64-bit + // integers. + // + // A Metric of this Type MUST store its values as Int64DataPoint. + MetricDescriptor_MONOTONIC_INT64 MetricDescriptor_Type = 2 + // DOUBLE values are double-precision floating-point numbers. + // + // A Metric of this Type MUST store its values as DoubleDataPoint. + MetricDescriptor_DOUBLE MetricDescriptor_Type = 3 + // MONOTONIC_DOUBLE values are monotonically increasing double-precision + // floating-point numbers. + // + // A Metric of this Type MUST store its values as DoubleDataPoint. + MetricDescriptor_MONOTONIC_DOUBLE MetricDescriptor_Type = 4 + // Histogram measurement. + // Corresponding values are stored in HistogramDataPoint. + MetricDescriptor_HISTOGRAM MetricDescriptor_Type = 5 + // Summary value. Some frameworks implemented Histograms as a summary of observations + // (usually things like request durations and response sizes). While it + // also provides a total count of observations and a sum of all observed + // values, it calculates configurable percentiles over a sliding time + // window. + // Corresponding values are stored in SummaryDataPoint. + MetricDescriptor_SUMMARY MetricDescriptor_Type = 6 +) + +var MetricDescriptor_Type_name = map[int32]string{ + 0: "INVALID_TYPE", + 1: "INT64", + 2: "MONOTONIC_INT64", + 3: "DOUBLE", + 4: "MONOTONIC_DOUBLE", + 5: "HISTOGRAM", + 6: "SUMMARY", +} + +var MetricDescriptor_Type_value = map[string]int32{ + "INVALID_TYPE": 0, + "INT64": 1, + "MONOTONIC_INT64": 2, + "DOUBLE": 3, + "MONOTONIC_DOUBLE": 4, + "HISTOGRAM": 5, + "SUMMARY": 6, +} + +func (x MetricDescriptor_Type) String() string { + return proto.EnumName(MetricDescriptor_Type_name, int32(x)) +} + +func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 0} +} + +// Temporality is the temporal quality values of a metric have. It +// describes how those values relate to the time interval over which they +// are reported. +type MetricDescriptor_Temporality int32 + +const ( + // INVALID_TEMPORALITY is the default Temporality, it MUST not be + // used. + MetricDescriptor_INVALID_TEMPORALITY MetricDescriptor_Temporality = 0 + // INSTANTANEOUS is a metric whose values are measured at a particular + // instant. The values are not aggregated over any time interval and are + // unique per timestamp. As such, these metrics are not expected to have + // an associated start time. + MetricDescriptor_INSTANTANEOUS MetricDescriptor_Temporality = 1 + // DELTA is a metric whose values are the aggregation of measurements + // made over a time interval. Successive metrics contain aggregation of + // values from continuous and non-overlapping intervals. + // + // The values for a DELTA metric are based only on the time interval + // associated with one measurement cycle. There is no dependency on + // previous measurements like is the case for CUMULATIVE metrics. + // + // For example, consider a system measuring the number of requests that + // it receives and reports the sum of these requests every second as a + // DELTA metric: + // + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0+1 to + // t_0+2 with a value of 2. + MetricDescriptor_DELTA MetricDescriptor_Temporality = 2 + // CUMULATIVE is a metric whose values are the aggregation of + // successively made measurements from a fixed start time until the last + // reported measurement. This means that current values of a CUMULATIVE + // metric depend on all previous measurements since the start time. + // Because of this, the sender is required to retain this state in some + // form. If this state is lost or invalidated, the CUMULATIVE metric + // values MUST be reset and a new fixed start time following the last + // reported measurement time sent MUST be used. + // + // For example, consider a system measuring the number of requests that + // it receives and reports the sum of these requests every second as a + // CUMULATIVE metric: + // + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+2 with a value of 5. + // 9. The system experiences a fault and loses state. + // 10. The system recovers and resumes receiving at time=t_1. + // 11. A request is received, the system measures 1 request. + // 12. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_1 to + // t_0+1 with a value of 1. + MetricDescriptor_CUMULATIVE MetricDescriptor_Temporality = 3 +) + +var MetricDescriptor_Temporality_name = map[int32]string{ + 0: "INVALID_TEMPORALITY", + 1: "INSTANTANEOUS", + 2: "DELTA", + 3: "CUMULATIVE", +} + +var MetricDescriptor_Temporality_value = map[string]int32{ + "INVALID_TEMPORALITY": 0, + "INSTANTANEOUS": 1, + "DELTA": 2, + "CUMULATIVE": 3, +} + +func (x MetricDescriptor_Temporality) String() string { + return proto.EnumName(MetricDescriptor_Temporality_name, int32(x)) +} + +func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 1} +} + +// A collection of InstrumentationLibraryMetrics from a Resource. +type ResourceMetrics struct { + // The resource for the metrics in this message. + // If this field is not set then no resource info is known. + Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // A list of metrics that originate from a resource. + InstrumentationLibraryMetrics []*InstrumentationLibraryMetrics `protobuf:"bytes,2,rep,name=instrumentation_library_metrics,json=instrumentationLibraryMetrics,proto3" json:"instrumentation_library_metrics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceMetrics) Reset() { *m = ResourceMetrics{} } +func (m *ResourceMetrics) String() string { return proto.CompactTextString(m) } +func (*ResourceMetrics) ProtoMessage() {} +func (*ResourceMetrics) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{0} +} + +func (m *ResourceMetrics) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceMetrics.Unmarshal(m, b) +} +func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceMetrics.Marshal(b, m, deterministic) +} +func (m *ResourceMetrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceMetrics.Merge(m, src) +} +func (m *ResourceMetrics) XXX_Size() int { + return xxx_messageInfo_ResourceMetrics.Size(m) +} +func (m *ResourceMetrics) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceMetrics.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceMetrics proto.InternalMessageInfo + +func (m *ResourceMetrics) GetResource() *v1.Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (m *ResourceMetrics) GetInstrumentationLibraryMetrics() []*InstrumentationLibraryMetrics { + if m != nil { + return m.InstrumentationLibraryMetrics + } + return nil +} + +// A collection of Metrics produced by an InstrumentationLibrary. +type InstrumentationLibraryMetrics struct { + // The instrumentation library information for the metrics in this message. + // If this field is not set then no library info is known. + InstrumentationLibrary *v11.InstrumentationLibrary `protobuf:"bytes,1,opt,name=instrumentation_library,json=instrumentationLibrary,proto3" json:"instrumentation_library,omitempty"` + // A list of metrics that originate from an instrumentation library. + Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InstrumentationLibraryMetrics) Reset() { *m = InstrumentationLibraryMetrics{} } +func (m *InstrumentationLibraryMetrics) String() string { return proto.CompactTextString(m) } +func (*InstrumentationLibraryMetrics) ProtoMessage() {} +func (*InstrumentationLibraryMetrics) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{1} +} + +func (m *InstrumentationLibraryMetrics) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstrumentationLibraryMetrics.Unmarshal(m, b) +} +func (m *InstrumentationLibraryMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstrumentationLibraryMetrics.Marshal(b, m, deterministic) +} +func (m *InstrumentationLibraryMetrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstrumentationLibraryMetrics.Merge(m, src) +} +func (m *InstrumentationLibraryMetrics) XXX_Size() int { + return xxx_messageInfo_InstrumentationLibraryMetrics.Size(m) +} +func (m *InstrumentationLibraryMetrics) XXX_DiscardUnknown() { + xxx_messageInfo_InstrumentationLibraryMetrics.DiscardUnknown(m) +} + +var xxx_messageInfo_InstrumentationLibraryMetrics proto.InternalMessageInfo + +func (m *InstrumentationLibraryMetrics) GetInstrumentationLibrary() *v11.InstrumentationLibrary { + if m != nil { + return m.InstrumentationLibrary + } + return nil +} + +func (m *InstrumentationLibraryMetrics) GetMetrics() []*Metric { + if m != nil { + return m.Metrics + } + return nil +} + +// Defines a Metric which has one or more timeseries. +// +// The data model and relation between entities is shown in the diagram below. +// +// - Metric is composed of a MetricDescriptor and a list of data points. +// - MetricDescriptor contains a list of label keys (shown horizontally). +// - Data is a list of DataPoints (shown vertically). +// - DataPoint contains a list of label values and a value. +// +// Metric +// +----------+ +------------------------+ +// |descriptor|-------->| MetricDescriptor | +// | | |+-----+-----+ +-----+ | +// | | ||label|label|...|label| | +// | data|--+ ||key1 |key2 | |keyN | | +// +----------+ | |+-----+-----+ +-----+ | +// | +------------------------+ +// | +// | +---------------------------+ +// | |DataPoint 1 | +// v |+------+------+ +------+ | +// +-----+ ||label |label |...|label | | +// | 1 |-->||value1|value2|...|valueN| | +// +-----+ |+------+------+ +------+ | +// | . | |+-----+ | +// | . | ||value| | +// | . | |+-----+ | +// | . | +---------------------------+ +// | . | . +// | . | . +// | . | . +// | . | +---------------------------+ +// | . | |DataPoint M | +// +-----+ |+------+------+ +------+ | +// | M |-->||label |label |...|label | | +// +-----+ ||value1|value2|...|valueN| | +// |+------+------+ +------+ | +// |+-----+ | +// ||value| | +// |+-----+ | +// +---------------------------+ +// +//----------------------------------------------------------------------- +// DataPoint is a value of specific type corresponding to a given moment in +// time. Each DataPoint is timestamped. +// +// DataPoint is strongly typed: each DataPoint type has a specific Protobuf message +// depending on the value type of the metric and thus there are currently 4 DataPoint +// messages, which correspond to the types of metric values. +type Metric struct { + // metric_descriptor describes the Metric. + MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` + // Data is a list of one or more DataPoints for a single metric. Only one of the + // following fields is used for the data, depending on the type of the metric defined + // by MetricDescriptor.type field. + Int64DataPoints []*Int64DataPoint `protobuf:"bytes,2,rep,name=int64_data_points,json=int64DataPoints,proto3" json:"int64_data_points,omitempty"` + DoubleDataPoints []*DoubleDataPoint `protobuf:"bytes,3,rep,name=double_data_points,json=doubleDataPoints,proto3" json:"double_data_points,omitempty"` + HistogramDataPoints []*HistogramDataPoint `protobuf:"bytes,4,rep,name=histogram_data_points,json=histogramDataPoints,proto3" json:"histogram_data_points,omitempty"` + SummaryDataPoints []*SummaryDataPoint `protobuf:"bytes,5,rep,name=summary_data_points,json=summaryDataPoints,proto3" json:"summary_data_points,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metric) Reset() { *m = Metric{} } +func (m *Metric) String() string { return proto.CompactTextString(m) } +func (*Metric) ProtoMessage() {} +func (*Metric) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{2} +} + +func (m *Metric) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metric.Unmarshal(m, b) +} +func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metric.Marshal(b, m, deterministic) +} +func (m *Metric) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metric.Merge(m, src) +} +func (m *Metric) XXX_Size() int { + return xxx_messageInfo_Metric.Size(m) +} +func (m *Metric) XXX_DiscardUnknown() { + xxx_messageInfo_Metric.DiscardUnknown(m) +} + +var xxx_messageInfo_Metric proto.InternalMessageInfo + +func (m *Metric) GetMetricDescriptor() *MetricDescriptor { + if m != nil { + return m.MetricDescriptor + } + return nil +} + +func (m *Metric) GetInt64DataPoints() []*Int64DataPoint { + if m != nil { + return m.Int64DataPoints + } + return nil +} + +func (m *Metric) GetDoubleDataPoints() []*DoubleDataPoint { + if m != nil { + return m.DoubleDataPoints + } + return nil +} + +func (m *Metric) GetHistogramDataPoints() []*HistogramDataPoint { + if m != nil { + return m.HistogramDataPoints + } + return nil +} + +func (m *Metric) GetSummaryDataPoints() []*SummaryDataPoint { + if m != nil { + return m.SummaryDataPoints + } + return nil +} + +// Defines a metric type and its schema. +type MetricDescriptor struct { + // name of the metric, including its DNS name prefix. It must be unique. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // description of the metric, which can be used in documentation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // unit in which the metric value is reported. Follows the format + // described by http://unitsofmeasure.org/ucum.html. + Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` + // type is the type of values this metric has. + Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` + // temporality is the Temporality of values this metric has. + Temporality MetricDescriptor_Temporality `protobuf:"varint,5,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetricDescriptor) Reset() { *m = MetricDescriptor{} } +func (m *MetricDescriptor) String() string { return proto.CompactTextString(m) } +func (*MetricDescriptor) ProtoMessage() {} +func (*MetricDescriptor) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3} +} + +func (m *MetricDescriptor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetricDescriptor.Unmarshal(m, b) +} +func (m *MetricDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetricDescriptor.Marshal(b, m, deterministic) +} +func (m *MetricDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricDescriptor.Merge(m, src) +} +func (m *MetricDescriptor) XXX_Size() int { + return xxx_messageInfo_MetricDescriptor.Size(m) +} +func (m *MetricDescriptor) XXX_DiscardUnknown() { + xxx_messageInfo_MetricDescriptor.DiscardUnknown(m) +} + +var xxx_messageInfo_MetricDescriptor proto.InternalMessageInfo + +func (m *MetricDescriptor) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MetricDescriptor) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MetricDescriptor) GetUnit() string { + if m != nil { + return m.Unit + } + return "" +} + +func (m *MetricDescriptor) GetType() MetricDescriptor_Type { + if m != nil { + return m.Type + } + return MetricDescriptor_INVALID_TYPE +} + +func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { + if m != nil { + return m.Temporality + } + return MetricDescriptor_INVALID_TEMPORALITY +} + +// Int64DataPoint is a single data point in a timeseries that describes the time-varying +// values of a int64 metric. +type Int64DataPoint struct { + // The set of labels that uniquely identify this timeseries. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // start_time_unix_nano is the time when the cumulative value was reset to zero. + // This is used for Counter type only. For Gauge the value is not specified and + // defaults to 0. + // + // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp + // may be decided by the backend. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // time_unix_nano is the moment when this value was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // value itself. + Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int64DataPoint) Reset() { *m = Int64DataPoint{} } +func (m *Int64DataPoint) String() string { return proto.CompactTextString(m) } +func (*Int64DataPoint) ProtoMessage() {} +func (*Int64DataPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{4} +} + +func (m *Int64DataPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Int64DataPoint.Unmarshal(m, b) +} +func (m *Int64DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Int64DataPoint.Marshal(b, m, deterministic) +} +func (m *Int64DataPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64DataPoint.Merge(m, src) +} +func (m *Int64DataPoint) XXX_Size() int { + return xxx_messageInfo_Int64DataPoint.Size(m) +} +func (m *Int64DataPoint) XXX_DiscardUnknown() { + xxx_messageInfo_Int64DataPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64DataPoint proto.InternalMessageInfo + +func (m *Int64DataPoint) GetLabels() []*v11.StringKeyValue { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Int64DataPoint) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *Int64DataPoint) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *Int64DataPoint) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +// DoubleDataPoint is a single data point in a timeseries that describes the time-varying +// value of a double metric. +type DoubleDataPoint struct { + // The set of labels that uniquely identify this timeseries. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // start_time_unix_nano is the time when the cumulative value was reset to zero. + // This is used for Counter type only. For Gauge the value is not specified and + // defaults to 0. + // + // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp + // may be decided by the backend. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // time_unix_nano is the moment when this value was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // value itself. + Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleDataPoint) Reset() { *m = DoubleDataPoint{} } +func (m *DoubleDataPoint) String() string { return proto.CompactTextString(m) } +func (*DoubleDataPoint) ProtoMessage() {} +func (*DoubleDataPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{5} +} + +func (m *DoubleDataPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DoubleDataPoint.Unmarshal(m, b) +} +func (m *DoubleDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DoubleDataPoint.Marshal(b, m, deterministic) +} +func (m *DoubleDataPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleDataPoint.Merge(m, src) +} +func (m *DoubleDataPoint) XXX_Size() int { + return xxx_messageInfo_DoubleDataPoint.Size(m) +} +func (m *DoubleDataPoint) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleDataPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleDataPoint proto.InternalMessageInfo + +func (m *DoubleDataPoint) GetLabels() []*v11.StringKeyValue { + if m != nil { + return m.Labels + } + return nil +} + +func (m *DoubleDataPoint) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *DoubleDataPoint) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *DoubleDataPoint) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +// HistogramDataPoint is a single data point in a timeseries that describes the time-varying +// values of a Histogram. A Histogram contains summary statistics for a population of values, +// it may optionally contain the distribution of those values across a set of buckets. +type HistogramDataPoint struct { + // The set of labels that uniquely identify this timeseries. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // start_time_unix_nano is the time when the cumulative value was reset to zero. + // + // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp + // may be decided by the backend. + // Note: this field is always unspecified and ignored if MetricDescriptor.type==GAUGE_HISTOGRAM. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // time_unix_nano is the moment when this value was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // count is the number of values in the population. Must be non-negative. This value + // must be equal to the sum of the "count" fields in buckets if a histogram is provided. + Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` + // sum of the values in the population. If count is zero then this field + // must be zero. This value must be equal to the sum of the "sum" fields in buckets if + // a histogram is provided. + Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` + // buckets is an optional field contains the values of histogram for each bucket. + // + // The sum of the values in the buckets "count" field must equal the value in the count field. + // + // The number of elements in buckets array must be by one greater than the + // number of elements in bucket_bounds array. + // + // Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field + // must also be present and number of elements in this field must be equal to the + // number of buckets defined by bucket_options. + Buckets []*HistogramDataPoint_Bucket `protobuf:"bytes,6,rep,name=buckets,proto3" json:"buckets,omitempty"` + // explicit_bounds specifies buckets with explicitly defined bounds for values. + // The bucket boundaries are described by "bounds" field. + // + // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket + // at index i are: + // + // [0, bounds[i]) for i == 0 + // [bounds[i-1], bounds[i]) for 0 < i < N-1 + // [bounds[i], +infinity) for i == N-1 + // The values in bounds array must be strictly increasing and > 0. + // + // Note: only [a, b) intervals are currently supported for each bucket. If we decides + // to also support (a, b] intervals we should add support for these by defining a boolean + // value which decides what type of intervals to use. + ExplicitBounds []float64 `protobuf:"fixed64,7,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HistogramDataPoint) Reset() { *m = HistogramDataPoint{} } +func (m *HistogramDataPoint) String() string { return proto.CompactTextString(m) } +func (*HistogramDataPoint) ProtoMessage() {} +func (*HistogramDataPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{6} +} + +func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HistogramDataPoint.Unmarshal(m, b) +} +func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HistogramDataPoint.Marshal(b, m, deterministic) +} +func (m *HistogramDataPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_HistogramDataPoint.Merge(m, src) +} +func (m *HistogramDataPoint) XXX_Size() int { + return xxx_messageInfo_HistogramDataPoint.Size(m) +} +func (m *HistogramDataPoint) XXX_DiscardUnknown() { + xxx_messageInfo_HistogramDataPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo + +func (m *HistogramDataPoint) GetLabels() []*v11.StringKeyValue { + if m != nil { + return m.Labels + } + return nil +} + +func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *HistogramDataPoint) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *HistogramDataPoint) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *HistogramDataPoint) GetSum() float64 { + if m != nil { + return m.Sum + } + return 0 +} + +func (m *HistogramDataPoint) GetBuckets() []*HistogramDataPoint_Bucket { + if m != nil { + return m.Buckets + } + return nil +} + +func (m *HistogramDataPoint) GetExplicitBounds() []float64 { + if m != nil { + return m.ExplicitBounds + } + return nil +} + +// Bucket contains values for a bucket. +type HistogramDataPoint_Bucket struct { + // The number of values in each bucket of the histogram, as described by + // bucket_options. + Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + // exemplar is an optional representative value of the bucket. + Exemplar *HistogramDataPoint_Bucket_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HistogramDataPoint_Bucket) Reset() { *m = HistogramDataPoint_Bucket{} } +func (m *HistogramDataPoint_Bucket) String() string { return proto.CompactTextString(m) } +func (*HistogramDataPoint_Bucket) ProtoMessage() {} +func (*HistogramDataPoint_Bucket) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{6, 0} +} + +func (m *HistogramDataPoint_Bucket) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HistogramDataPoint_Bucket.Unmarshal(m, b) +} +func (m *HistogramDataPoint_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HistogramDataPoint_Bucket.Marshal(b, m, deterministic) +} +func (m *HistogramDataPoint_Bucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_HistogramDataPoint_Bucket.Merge(m, src) +} +func (m *HistogramDataPoint_Bucket) XXX_Size() int { + return xxx_messageInfo_HistogramDataPoint_Bucket.Size(m) +} +func (m *HistogramDataPoint_Bucket) XXX_DiscardUnknown() { + xxx_messageInfo_HistogramDataPoint_Bucket.DiscardUnknown(m) +} + +var xxx_messageInfo_HistogramDataPoint_Bucket proto.InternalMessageInfo + +func (m *HistogramDataPoint_Bucket) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *HistogramDataPoint_Bucket) GetExemplar() *HistogramDataPoint_Bucket_Exemplar { + if m != nil { + return m.Exemplar + } + return nil +} + +// Exemplars are example points that may be used to annotate aggregated +// Histogram values. They are metadata that gives information about a +// particular value added to a Histogram bucket. +type HistogramDataPoint_Bucket_Exemplar struct { + // Value of the exemplar point. It determines which bucket the exemplar belongs to. + // If bucket_options define bounds for this bucket then this value must be within + // the defined bounds. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + // time_unix_nano is the moment when this exemplar was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // exemplar_attachments are contextual information about the example value. + // Keys in this list must be unique. + Attachments []*v11.StringKeyValue `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HistogramDataPoint_Bucket_Exemplar) Reset() { *m = HistogramDataPoint_Bucket_Exemplar{} } +func (m *HistogramDataPoint_Bucket_Exemplar) String() string { return proto.CompactTextString(m) } +func (*HistogramDataPoint_Bucket_Exemplar) ProtoMessage() {} +func (*HistogramDataPoint_Bucket_Exemplar) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{6, 0, 0} +} + +func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Unmarshal(m, b) +} +func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Marshal(b, m, deterministic) +} +func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Merge(src proto.Message) { + xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Merge(m, src) +} +func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Size() int { + return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Size(m) +} +func (m *HistogramDataPoint_Bucket_Exemplar) XXX_DiscardUnknown() { + xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.DiscardUnknown(m) +} + +var xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar proto.InternalMessageInfo + +func (m *HistogramDataPoint_Bucket_Exemplar) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *HistogramDataPoint_Bucket_Exemplar) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *HistogramDataPoint_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { + if m != nil { + return m.Attachments + } + return nil +} + +// SummaryDataPoint is a single data point in a timeseries that describes the time-varying +// values of a Summary metric. +type SummaryDataPoint struct { + // The set of labels that uniquely identify this timeseries. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // start_time_unix_nano is the time when the cumulative value was reset to zero. + // + // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp + // may be decided by the backend. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // time_unix_nano is the moment when this value was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // The total number of recorded values since start_time. Optional since + // some systems don't expose this. + Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` + // The total sum of recorded values since start_time. Optional since some + // systems don't expose this. If count is zero then this field must be zero. + Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` + // A list of values at different percentiles of the distribution calculated + // from the current snapshot. The percentiles must be strictly increasing. + PercentileValues []*SummaryDataPoint_ValueAtPercentile `protobuf:"bytes,6,rep,name=percentile_values,json=percentileValues,proto3" json:"percentile_values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SummaryDataPoint) Reset() { *m = SummaryDataPoint{} } +func (m *SummaryDataPoint) String() string { return proto.CompactTextString(m) } +func (*SummaryDataPoint) ProtoMessage() {} +func (*SummaryDataPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{7} +} + +func (m *SummaryDataPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SummaryDataPoint.Unmarshal(m, b) +} +func (m *SummaryDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SummaryDataPoint.Marshal(b, m, deterministic) +} +func (m *SummaryDataPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_SummaryDataPoint.Merge(m, src) +} +func (m *SummaryDataPoint) XXX_Size() int { + return xxx_messageInfo_SummaryDataPoint.Size(m) +} +func (m *SummaryDataPoint) XXX_DiscardUnknown() { + xxx_messageInfo_SummaryDataPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_SummaryDataPoint proto.InternalMessageInfo + +func (m *SummaryDataPoint) GetLabels() []*v11.StringKeyValue { + if m != nil { + return m.Labels + } + return nil +} + +func (m *SummaryDataPoint) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *SummaryDataPoint) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *SummaryDataPoint) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *SummaryDataPoint) GetSum() float64 { + if m != nil { + return m.Sum + } + return 0 +} + +func (m *SummaryDataPoint) GetPercentileValues() []*SummaryDataPoint_ValueAtPercentile { + if m != nil { + return m.PercentileValues + } + return nil +} + +// Represents the value at a given percentile of a distribution. +// +// To record Min and Max values following conventions are used: +// - The 100th percentile is equivalent to the maximum value observed. +// - The 0th percentile is equivalent to the minimum value observed. +// +// See the following issue for more context: +// https://github.com/open-telemetry/opentelemetry-proto/issues/125 +type SummaryDataPoint_ValueAtPercentile struct { + // The percentile of a distribution. Must be in the interval + // [0.0, 100.0]. + Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"` + // The value at the given percentile of a distribution. + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SummaryDataPoint_ValueAtPercentile) Reset() { *m = SummaryDataPoint_ValueAtPercentile{} } +func (m *SummaryDataPoint_ValueAtPercentile) String() string { return proto.CompactTextString(m) } +func (*SummaryDataPoint_ValueAtPercentile) ProtoMessage() {} +func (*SummaryDataPoint_ValueAtPercentile) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{7, 0} +} + +func (m *SummaryDataPoint_ValueAtPercentile) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Unmarshal(m, b) +} +func (m *SummaryDataPoint_ValueAtPercentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Marshal(b, m, deterministic) +} +func (m *SummaryDataPoint_ValueAtPercentile) XXX_Merge(src proto.Message) { + xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Merge(m, src) +} +func (m *SummaryDataPoint_ValueAtPercentile) XXX_Size() int { + return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Size(m) +} +func (m *SummaryDataPoint_ValueAtPercentile) XXX_DiscardUnknown() { + xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.DiscardUnknown(m) +} + +var xxx_messageInfo_SummaryDataPoint_ValueAtPercentile proto.InternalMessageInfo + +func (m *SummaryDataPoint_ValueAtPercentile) GetPercentile() float64 { + if m != nil { + return m.Percentile + } + return 0 +} + +func (m *SummaryDataPoint_ValueAtPercentile) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +func init() { + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality", MetricDescriptor_Temporality_name, MetricDescriptor_Temporality_value) + proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") + proto.RegisterType((*InstrumentationLibraryMetrics)(nil), "opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics") + proto.RegisterType((*Metric)(nil), "opentelemetry.proto.metrics.v1.Metric") + proto.RegisterType((*MetricDescriptor)(nil), "opentelemetry.proto.metrics.v1.MetricDescriptor") + proto.RegisterType((*Int64DataPoint)(nil), "opentelemetry.proto.metrics.v1.Int64DataPoint") + proto.RegisterType((*DoubleDataPoint)(nil), "opentelemetry.proto.metrics.v1.DoubleDataPoint") + proto.RegisterType((*HistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint") + proto.RegisterType((*HistogramDataPoint_Bucket)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket") + proto.RegisterType((*HistogramDataPoint_Bucket_Exemplar)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar") + proto.RegisterType((*SummaryDataPoint)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint") + proto.RegisterType((*SummaryDataPoint_ValueAtPercentile)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/metrics/v1/metrics.proto", fileDescriptor_3c3112f9fa006917) +} + +var fileDescriptor_3c3112f9fa006917 = []byte{ + // 1012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xef, 0x6e, 0xe3, 0x44, + 0x10, 0x3f, 0xc7, 0x69, 0xda, 0x4e, 0x7a, 0xad, 0xb3, 0x2d, 0x5c, 0x54, 0xe9, 0x8e, 0x12, 0x21, + 0x28, 0x88, 0x3a, 0xb4, 0x94, 0x4a, 0x48, 0x20, 0x91, 0x5c, 0x22, 0xce, 0x22, 0xff, 0xb4, 0x71, + 0x2a, 0xf5, 0xa4, 0x3b, 0xe3, 0xa4, 0x4b, 0xbb, 0xc2, 0xde, 0x8d, 0xec, 0x75, 0xd4, 0x3c, 0x00, + 0x6f, 0x80, 0x04, 0x0f, 0x04, 0x0f, 0xc0, 0x07, 0xbe, 0xf3, 0x00, 0x7c, 0xe3, 0x05, 0x90, 0xd7, + 0x76, 0xec, 0xa4, 0x69, 0x43, 0xf9, 0x04, 0xf7, 0x6d, 0xfc, 0x9b, 0x99, 0xdf, 0xfc, 0x66, 0x76, + 0x36, 0xdb, 0xc2, 0xc7, 0x7c, 0x4c, 0x98, 0x20, 0x0e, 0x71, 0x89, 0xf0, 0xa6, 0xd5, 0xb1, 0xc7, + 0x05, 0xaf, 0x86, 0x36, 0x1d, 0xf9, 0xd5, 0xc9, 0x71, 0x62, 0xea, 0xd2, 0x81, 0x9e, 0xcd, 0x45, + 0x47, 0xa0, 0x9e, 0x84, 0x4c, 0x8e, 0xf7, 0x3f, 0x5a, 0xc6, 0x36, 0xe2, 0xae, 0xcb, 0x59, 0x48, + 0x16, 0x59, 0x51, 0xda, 0xbe, 0xbe, 0x2c, 0xd6, 0x23, 0x3e, 0x0f, 0xbc, 0x11, 0x09, 0xa3, 0x13, + 0x3b, 0x8a, 0xaf, 0xfc, 0xa1, 0xc0, 0x0e, 0x8e, 0xa1, 0x76, 0x54, 0x12, 0x35, 0x61, 0x23, 0x89, + 0x2a, 0x2b, 0x07, 0xca, 0x61, 0xf1, 0xe4, 0x43, 0x7d, 0x99, 0xc4, 0x19, 0xd5, 0xe4, 0x58, 0x4f, + 0x38, 0xf0, 0x2c, 0x15, 0xfd, 0xa0, 0xc0, 0x3b, 0x94, 0xf9, 0xc2, 0x0b, 0x5c, 0xc2, 0x84, 0x2d, + 0x28, 0x67, 0x96, 0x43, 0x87, 0x9e, 0xed, 0x4d, 0xad, 0xb8, 0xbb, 0x72, 0xee, 0x40, 0x3d, 0x2c, + 0x9e, 0x7c, 0xa9, 0xdf, 0x3f, 0x01, 0xdd, 0x98, 0xa7, 0x69, 0x45, 0x2c, 0xb1, 0x5e, 0xfc, 0x94, + 0xde, 0xe7, 0xae, 0xfc, 0xa6, 0xc0, 0xd3, 0x7b, 0x09, 0x10, 0x83, 0x27, 0x77, 0x08, 0x8d, 0xfb, + 0xff, 0x6c, 0xa9, 0xc0, 0x78, 0xf0, 0x77, 0xea, 0xc3, 0x6f, 0x2f, 0x17, 0x86, 0xbe, 0x82, 0xf5, + 0xf9, 0x01, 0xbc, 0xbf, 0x6a, 0x00, 0x91, 0x52, 0x9c, 0xa4, 0x55, 0xfe, 0x54, 0xa1, 0x10, 0x61, + 0xe8, 0x15, 0x94, 0x22, 0xd4, 0xba, 0x24, 0xfe, 0xc8, 0xa3, 0x63, 0xc1, 0xbd, 0x58, 0xf6, 0x27, + 0xff, 0x8c, 0xb6, 0x31, 0xcb, 0xc3, 0x9a, 0xbb, 0x80, 0xa0, 0x97, 0x50, 0xa2, 0x4c, 0x9c, 0x9d, + 0x5a, 0x97, 0xb6, 0xb0, 0xad, 0x31, 0xa7, 0x4c, 0x24, 0xaa, 0xf5, 0xd5, 0xc7, 0x26, 0xce, 0x4e, + 0x1b, 0xb6, 0xb0, 0x7b, 0x61, 0x1a, 0xde, 0xa1, 0x73, 0xdf, 0x3e, 0x7a, 0x05, 0xe8, 0x92, 0x07, + 0x43, 0x87, 0xcc, 0x91, 0xab, 0x92, 0xbc, 0xba, 0x8a, 0xbc, 0x21, 0x33, 0x53, 0x76, 0xed, 0x72, + 0x1e, 0xf0, 0xd1, 0x77, 0xf0, 0xd6, 0x35, 0xf5, 0x05, 0xbf, 0xf2, 0x6c, 0x77, 0xae, 0x42, 0x5e, + 0x56, 0x38, 0x59, 0x55, 0xe1, 0x45, 0x92, 0x9c, 0x16, 0xd9, 0xbd, 0xbe, 0x85, 0xf9, 0xe8, 0x5b, + 0xd8, 0xf5, 0x03, 0xd7, 0x0d, 0xf7, 0x3a, 0x5b, 0x65, 0x4d, 0x56, 0x59, 0x79, 0x06, 0xfd, 0x28, + 0x35, 0xad, 0x51, 0xf2, 0x17, 0x10, 0xbf, 0xf2, 0xbb, 0x0a, 0xda, 0xe2, 0x59, 0x21, 0x04, 0x79, + 0x66, 0xbb, 0xd1, 0x15, 0xdd, 0xc4, 0xd2, 0x46, 0x07, 0x50, 0x4c, 0xb6, 0x80, 0x72, 0x56, 0xce, + 0x49, 0x57, 0x16, 0x0a, 0xb3, 0x02, 0x46, 0x45, 0x59, 0x8d, 0xb2, 0x42, 0x1b, 0x19, 0x90, 0x17, + 0xd3, 0x31, 0x29, 0xe7, 0x0f, 0x94, 0xc3, 0xed, 0x3b, 0x96, 0xfd, 0x9e, 0xad, 0xd1, 0xcd, 0xe9, + 0x98, 0x60, 0x49, 0x81, 0x5e, 0x43, 0x51, 0x10, 0x77, 0xcc, 0x3d, 0xdb, 0xa1, 0x62, 0x5a, 0x5e, + 0x93, 0x8c, 0x5f, 0x3c, 0x9c, 0x31, 0xe5, 0xc0, 0x59, 0xc2, 0xca, 0x04, 0xf2, 0x61, 0x35, 0xa4, + 0xc1, 0x96, 0xd1, 0x39, 0xaf, 0xb5, 0x8c, 0x86, 0x65, 0x5e, 0xf4, 0x9a, 0xda, 0x23, 0xb4, 0x09, + 0x6b, 0x46, 0xc7, 0x3c, 0x3b, 0xd5, 0x14, 0xb4, 0x0b, 0x3b, 0xed, 0x6e, 0xa7, 0x6b, 0x76, 0x3b, + 0xc6, 0x73, 0x2b, 0x02, 0x73, 0x08, 0xa0, 0xd0, 0xe8, 0x0e, 0xea, 0xad, 0xa6, 0xa6, 0xa2, 0x3d, + 0xd0, 0xd2, 0x80, 0x18, 0xcd, 0xa3, 0xc7, 0xb0, 0xf9, 0xc2, 0xe8, 0x9b, 0xdd, 0xaf, 0x71, 0xad, + 0xad, 0xad, 0xa1, 0x22, 0xac, 0xf7, 0x07, 0xed, 0x76, 0x0d, 0x5f, 0x68, 0x85, 0x8a, 0x09, 0xc5, + 0x8c, 0x26, 0xf4, 0x04, 0x76, 0x67, 0xe5, 0x9b, 0xed, 0x5e, 0x17, 0xd7, 0x5a, 0x86, 0x79, 0xa1, + 0x3d, 0x42, 0x25, 0x78, 0x6c, 0x74, 0xfa, 0x66, 0xad, 0x63, 0xd6, 0x3a, 0xcd, 0xee, 0xa0, 0xaf, + 0x29, 0xa1, 0xb0, 0x46, 0xb3, 0x65, 0xd6, 0xb4, 0x1c, 0xda, 0x06, 0x78, 0x3e, 0x68, 0x0f, 0x5a, + 0x35, 0xd3, 0x38, 0x6f, 0x6a, 0x6a, 0xe5, 0x17, 0x05, 0xb6, 0xe7, 0x2f, 0x09, 0x6a, 0x42, 0xc1, + 0xb1, 0x87, 0xc4, 0xf1, 0xcb, 0x8a, 0xdc, 0x9f, 0xa3, 0x15, 0x3f, 0x3d, 0x7d, 0xe1, 0x51, 0x76, + 0xf5, 0x0d, 0x99, 0x9e, 0xdb, 0x4e, 0x40, 0x70, 0x9c, 0x8c, 0xaa, 0xb0, 0xe7, 0x0b, 0xdb, 0x13, + 0x96, 0xa0, 0x2e, 0xb1, 0x02, 0x46, 0x6f, 0x2c, 0x66, 0x33, 0x2e, 0x37, 0xa2, 0x80, 0x4b, 0xd2, + 0x67, 0x52, 0x97, 0x0c, 0x18, 0xbd, 0xe9, 0xd8, 0x8c, 0xa3, 0xf7, 0x60, 0x7b, 0x21, 0x54, 0x95, + 0xa1, 0x5b, 0x22, 0x1b, 0xb5, 0x07, 0x6b, 0x93, 0xb0, 0x8e, 0x5c, 0x15, 0x15, 0x47, 0x1f, 0x95, + 0x5f, 0x15, 0xd8, 0x59, 0xb8, 0x8e, 0xff, 0xa7, 0x3e, 0x94, 0xa4, 0x8f, 0xbf, 0xf2, 0x80, 0x6e, + 0x5f, 0xfa, 0xff, 0x7e, 0x2b, 0x23, 0x1e, 0x30, 0x21, 0x5b, 0xc9, 0xe3, 0xe8, 0x03, 0x69, 0xa0, + 0xfa, 0x81, 0x2b, 0xef, 0x9f, 0x82, 0x43, 0x13, 0xf5, 0x61, 0x7d, 0x18, 0x8c, 0xbe, 0x27, 0xc2, + 0x2f, 0x17, 0x64, 0x1b, 0x9f, 0x3f, 0xfc, 0xf7, 0x4f, 0xaf, 0x4b, 0x06, 0x9c, 0x30, 0xa1, 0x0f, + 0x60, 0x87, 0xdc, 0x8c, 0x1d, 0x3a, 0xa2, 0xc2, 0x1a, 0xf2, 0x80, 0x5d, 0xfa, 0xe5, 0xf5, 0x03, + 0xf5, 0x50, 0xc1, 0xdb, 0x09, 0x5c, 0x97, 0xe8, 0xfe, 0xcf, 0x39, 0x28, 0x44, 0xc9, 0xa9, 0x60, + 0x25, 0x2b, 0xf8, 0x35, 0x6c, 0x90, 0x1b, 0xe2, 0x8e, 0x1d, 0xdb, 0x93, 0x13, 0x29, 0x9e, 0xd4, + 0xff, 0xb5, 0x3e, 0xbd, 0x19, 0x33, 0xe1, 0x19, 0xe7, 0xfe, 0x4f, 0x0a, 0x6c, 0x24, 0x70, 0x7a, + 0xfc, 0x4a, 0xe6, 0xf8, 0x97, 0xcc, 0x3b, 0xb7, 0x64, 0xde, 0x5d, 0x28, 0xda, 0x42, 0xd8, 0xa3, + 0xeb, 0xf0, 0x59, 0x4f, 0x5e, 0xab, 0x07, 0xae, 0x44, 0x96, 0xa1, 0xf2, 0xa3, 0x0a, 0xda, 0xe2, + 0x23, 0xf0, 0x86, 0xec, 0x1c, 0x87, 0xd2, 0x98, 0x78, 0x23, 0xc2, 0x04, 0x75, 0x88, 0x25, 0xa7, + 0x9c, 0x6c, 0x5f, 0xfd, 0xa1, 0xef, 0xa2, 0x2e, 0x3b, 0xab, 0x89, 0xde, 0x8c, 0x10, 0x6b, 0x29, + 0xb9, 0x74, 0xfa, 0xfb, 0x06, 0x94, 0x6e, 0x85, 0xa1, 0x67, 0x00, 0x69, 0x60, 0x7c, 0xe4, 0x19, + 0x24, 0xdd, 0x86, 0x5c, 0x66, 0x1b, 0xea, 0x53, 0x78, 0x97, 0xf2, 0x15, 0x22, 0xeb, 0x5b, 0xf1, + 0x9f, 0x90, 0xbd, 0xd0, 0xd1, 0x53, 0x5e, 0x36, 0xae, 0x16, 0x53, 0x28, 0xaf, 0x72, 0x41, 0x9c, + 0x2a, 0x65, 0x82, 0x78, 0xcc, 0x76, 0xaa, 0x73, 0xee, 0x23, 0xc9, 0x78, 0x74, 0x45, 0x58, 0xe6, + 0xdf, 0x83, 0x61, 0x41, 0xa2, 0x9f, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x61, 0x9d, 0x70, + 0x47, 0x0c, 0x00, 0x00, +} diff --git a/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go b/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go new file mode 100644 index 00000000000..58bb2e211fa --- /dev/null +++ b/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/resource/v1/resource.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v1 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Resource information. +type Resource struct { + // Set of labels that describe the resource. + Attributes []*v1.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` + // dropped_attributes_count is the number of dropped attributes. If the value is 0, then + // no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { + return fileDescriptor_446f73eacf88f3f5, []int{0} +} + +func (m *Resource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Resource.Unmarshal(m, b) +} +func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Resource.Marshal(b, m, deterministic) +} +func (m *Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *Resource) XXX_Size() int { + return xxx_messageInfo_Resource.Size(m) +} +func (m *Resource) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func (m *Resource) GetAttributes() []*v1.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Resource) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +func init() { + proto.RegisterType((*Resource)(nil), "opentelemetry.proto.resource.v1.Resource") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/resource/v1/resource.proto", fileDescriptor_446f73eacf88f3f5) +} + +var fileDescriptor_446f73eacf88f3f5 = []byte{ + // 231 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcb, 0x2f, 0x48, 0xcd, + 0x2b, 0x49, 0xcd, 0x49, 0xcd, 0x4d, 0x2d, 0x29, 0xaa, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, + 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2f, 0x33, 0x84, 0xb3, 0xf5, 0xc0, 0x52, + 0x42, 0xf2, 0x28, 0xea, 0x21, 0x82, 0x7a, 0x70, 0x35, 0x65, 0x86, 0x52, 0x5a, 0xd8, 0x0c, 0x4c, + 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0x03, 0x19, 0x07, 0x61, 0x41, 0xf4, 0x29, 0xf5, 0x32, 0x72, 0x71, + 0x04, 0x41, 0xf5, 0x0a, 0xb9, 0x73, 0x71, 0x25, 0x96, 0x94, 0x14, 0x65, 0x26, 0x95, 0x96, 0xa4, + 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0x61, 0xb3, 0x0e, 0x6a, 0x46, 0x99, + 0xa1, 0x9e, 0x77, 0x6a, 0x65, 0x58, 0x62, 0x4e, 0x69, 0x6a, 0x10, 0x92, 0x56, 0x21, 0x0b, 0x2e, + 0x89, 0x94, 0xa2, 0xfc, 0x82, 0x82, 0xd4, 0x94, 0x78, 0x84, 0x68, 0x7c, 0x72, 0x7e, 0x69, 0x5e, + 0x89, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6f, 0x90, 0x18, 0x54, 0xde, 0x11, 0x2e, 0xed, 0x0c, 0x92, + 0x75, 0xaa, 0xe1, 0x52, 0xca, 0xcc, 0xd7, 0x23, 0xe0, 0x43, 0x27, 0x5e, 0x98, 0x93, 0x03, 0x40, + 0x52, 0x01, 0x8c, 0x51, 0xae, 0xe9, 0xe8, 0x9a, 0x32, 0xf3, 0xf5, 0xf3, 0x4b, 0x52, 0x73, 0xf4, + 0x33, 0xf3, 0x4a, 0x52, 0x8b, 0xf2, 0x12, 0x73, 0xf4, 0x51, 0xa4, 0x75, 0xc1, 0x66, 0xea, 0xa6, + 0xa7, 0xe6, 0x21, 0x87, 0x74, 0x12, 0x1b, 0x58, 0xd8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x91, + 0x7f, 0x43, 0x92, 0x93, 0x01, 0x00, 0x00, +} diff --git a/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go b/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go new file mode 100644 index 00000000000..c332977fbf3 --- /dev/null +++ b/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go @@ -0,0 +1,767 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opentelemetry/proto/trace/v1/trace.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + v11 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" + v1 "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// SpanKind is the type of span. Can be used to specify additional relationships between spans +// in addition to a parent/child relationship. +type Span_SpanKind int32 + +const ( + // Unspecified. Do NOT use as default. + // Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. + Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0 + // Indicates that the span represents an internal operation within an application, + // as opposed to an operations happening at the boundaries. Default value. + Span_INTERNAL Span_SpanKind = 1 + // Indicates that the span covers server-side handling of an RPC or other + // remote network request. + Span_SERVER Span_SpanKind = 2 + // Indicates that the span describes a request to some remote service. + Span_CLIENT Span_SpanKind = 3 + // Indicates that the span describes a producer sending a message to a broker. + // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship + // between producer and consumer spans. A PRODUCER span ends when the message was accepted + // by the broker while the logical processing of the message might span a much longer time. + Span_PRODUCER Span_SpanKind = 4 + // Indicates that the span describes consumer receiving a message from a broker. + // Like the PRODUCER kind, there is often no direct critical path latency relationship + // between producer and consumer spans. + Span_CONSUMER Span_SpanKind = 5 +) + +var Span_SpanKind_name = map[int32]string{ + 0: "SPAN_KIND_UNSPECIFIED", + 1: "INTERNAL", + 2: "SERVER", + 3: "CLIENT", + 4: "PRODUCER", + 5: "CONSUMER", +} + +var Span_SpanKind_value = map[string]int32{ + "SPAN_KIND_UNSPECIFIED": 0, + "INTERNAL": 1, + "SERVER": 2, + "CLIENT": 3, + "PRODUCER": 4, + "CONSUMER": 5, +} + +func (x Span_SpanKind) String() string { + return proto.EnumName(Span_SpanKind_name, int32(x)) +} + +func (Span_SpanKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{2, 0} +} + +// StatusCode mirrors the codes defined at +// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#statuscanonicalcode +type Status_StatusCode int32 + +const ( + Status_Ok Status_StatusCode = 0 + Status_Cancelled Status_StatusCode = 1 + Status_UnknownError Status_StatusCode = 2 + Status_InvalidArgument Status_StatusCode = 3 + Status_DeadlineExceeded Status_StatusCode = 4 + Status_NotFound Status_StatusCode = 5 + Status_AlreadyExists Status_StatusCode = 6 + Status_PermissionDenied Status_StatusCode = 7 + Status_ResourceExhausted Status_StatusCode = 8 + Status_FailedPrecondition Status_StatusCode = 9 + Status_Aborted Status_StatusCode = 10 + Status_OutOfRange Status_StatusCode = 11 + Status_Unimplemented Status_StatusCode = 12 + Status_InternalError Status_StatusCode = 13 + Status_Unavailable Status_StatusCode = 14 + Status_DataLoss Status_StatusCode = 15 + Status_Unauthenticated Status_StatusCode = 16 +) + +var Status_StatusCode_name = map[int32]string{ + 0: "Ok", + 1: "Cancelled", + 2: "UnknownError", + 3: "InvalidArgument", + 4: "DeadlineExceeded", + 5: "NotFound", + 6: "AlreadyExists", + 7: "PermissionDenied", + 8: "ResourceExhausted", + 9: "FailedPrecondition", + 10: "Aborted", + 11: "OutOfRange", + 12: "Unimplemented", + 13: "InternalError", + 14: "Unavailable", + 15: "DataLoss", + 16: "Unauthenticated", +} + +var Status_StatusCode_value = map[string]int32{ + "Ok": 0, + "Cancelled": 1, + "UnknownError": 2, + "InvalidArgument": 3, + "DeadlineExceeded": 4, + "NotFound": 5, + "AlreadyExists": 6, + "PermissionDenied": 7, + "ResourceExhausted": 8, + "FailedPrecondition": 9, + "Aborted": 10, + "OutOfRange": 11, + "Unimplemented": 12, + "InternalError": 13, + "Unavailable": 14, + "DataLoss": 15, + "Unauthenticated": 16, +} + +func (x Status_StatusCode) String() string { + return proto.EnumName(Status_StatusCode_name, int32(x)) +} + +func (Status_StatusCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{3, 0} +} + +// A collection of InstrumentationLibrarySpans from a Resource. +type ResourceSpans struct { + // The resource for the spans in this message. + // If this field is not set then no resource info is known. + Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // A list of InstrumentationLibrarySpans that originate from a resource. + InstrumentationLibrarySpans []*InstrumentationLibrarySpans `protobuf:"bytes,2,rep,name=instrumentation_library_spans,json=instrumentationLibrarySpans,proto3" json:"instrumentation_library_spans,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceSpans) Reset() { *m = ResourceSpans{} } +func (m *ResourceSpans) String() string { return proto.CompactTextString(m) } +func (*ResourceSpans) ProtoMessage() {} +func (*ResourceSpans) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{0} +} + +func (m *ResourceSpans) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceSpans.Unmarshal(m, b) +} +func (m *ResourceSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) +} +func (m *ResourceSpans) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSpans.Merge(m, src) +} +func (m *ResourceSpans) XXX_Size() int { + return xxx_messageInfo_ResourceSpans.Size(m) +} +func (m *ResourceSpans) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSpans.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSpans proto.InternalMessageInfo + +func (m *ResourceSpans) GetResource() *v1.Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (m *ResourceSpans) GetInstrumentationLibrarySpans() []*InstrumentationLibrarySpans { + if m != nil { + return m.InstrumentationLibrarySpans + } + return nil +} + +// A collection of Spans produced by an InstrumentationLibrary. +type InstrumentationLibrarySpans struct { + // The instrumentation library information for the spans in this message. + // If this field is not set then no library info is known. + InstrumentationLibrary *v11.InstrumentationLibrary `protobuf:"bytes,1,opt,name=instrumentation_library,json=instrumentationLibrary,proto3" json:"instrumentation_library,omitempty"` + // A list of Spans that originate from an instrumentation library. + Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InstrumentationLibrarySpans) Reset() { *m = InstrumentationLibrarySpans{} } +func (m *InstrumentationLibrarySpans) String() string { return proto.CompactTextString(m) } +func (*InstrumentationLibrarySpans) ProtoMessage() {} +func (*InstrumentationLibrarySpans) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{1} +} + +func (m *InstrumentationLibrarySpans) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstrumentationLibrarySpans.Unmarshal(m, b) +} +func (m *InstrumentationLibrarySpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstrumentationLibrarySpans.Marshal(b, m, deterministic) +} +func (m *InstrumentationLibrarySpans) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstrumentationLibrarySpans.Merge(m, src) +} +func (m *InstrumentationLibrarySpans) XXX_Size() int { + return xxx_messageInfo_InstrumentationLibrarySpans.Size(m) +} +func (m *InstrumentationLibrarySpans) XXX_DiscardUnknown() { + xxx_messageInfo_InstrumentationLibrarySpans.DiscardUnknown(m) +} + +var xxx_messageInfo_InstrumentationLibrarySpans proto.InternalMessageInfo + +func (m *InstrumentationLibrarySpans) GetInstrumentationLibrary() *v11.InstrumentationLibrary { + if m != nil { + return m.InstrumentationLibrary + } + return nil +} + +func (m *InstrumentationLibrarySpans) GetSpans() []*Span { + if m != nil { + return m.Spans + } + return nil +} + +// Span represents a single operation within a trace. Spans can be +// nested to form a trace tree. Spans may also be linked to other spans +// from the same or different trace and form graphs. Often, a trace +// contains a root span that describes the end-to-end latency, and one +// or more subspans for its sub-operations. A trace can also contain +// multiple root spans, or none at all. Spans do not need to be +// contiguous - there may be gaps or overlaps between spans in a trace. +// +// The next available field id is 17. +type Span struct { + // A unique identifier for a trace. All spans from the same trace share + // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes + // is considered invalid. + // + // This field is semantically required. Receiver should generate new + // random trace_id if empty or invalid trace_id was received. + // + // This field is required. + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // A unique identifier for a span within a trace, assigned when the span + // is created. The ID is an 8-byte array. An ID with all zeroes is considered + // invalid. + // + // This field is semantically required. Receiver should generate new + // random span_id if empty or invalid span_id was received. + // + // This field is required. + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + // trace_state conveys information about request position in multiple distributed tracing graphs. + // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header + // See also https://github.com/w3c/distributed-tracing for more details about this field. + TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` + // The `span_id` of this span's parent span. If this is a root span, then this + // field must be empty. The ID is an 8-byte array. + ParentSpanId []byte `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"` + // A description of the span's operation. + // + // For example, the name can be a qualified method name or a file name + // and a line number where the operation is called. A best practice is to use + // the same display name at the same call point in an application. + // This makes it easier to correlate spans in different traces. + // + // This field is semantically required to be set to non-empty string. + // When null or empty string received - receiver may use string "name" + // as a replacement. There might be smarted algorithms implemented by + // receiver to fix the empty span name. + // + // This field is required. + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + // Distinguishes between spans generated in a particular context. For example, + // two spans with the same name may be distinguished using `CLIENT` (caller) + // and `SERVER` (callee) to identify queueing latency associated with the span. + Kind Span_SpanKind `protobuf:"varint,6,opt,name=kind,proto3,enum=opentelemetry.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"` + // start_time_unix_nano is the start time of the span. On the client side, this is the time + // kept by the local machine where the span execution starts. On the server side, this + // is the time when the server's application handler starts running. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + StartTimeUnixNano uint64 `protobuf:"fixed64,7,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // end_time_unix_nano is the end time of the span. On the client side, this is the time + // kept by the local machine where the span execution ends. On the server side, this + // is the time when the server application handler stops running. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + EndTimeUnixNano uint64 `protobuf:"fixed64,8,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` + // attributes is a collection of key/value pairs. The value can be a string, + // an integer, a double or the Boolean values `true` or `false`. Note, global attributes + // like server name can be set using the resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + Attributes []*v11.KeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,omitempty"` + // dropped_attributes_count is the number of attributes that were discarded. Attributes + // can be discarded because their keys are too long or because there are too many + // attributes. If this value is 0, then no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,10,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + // events is a collection of Event items. + Events []*Span_Event `protobuf:"bytes,11,rep,name=events,proto3" json:"events,omitempty"` + // dropped_events_count is the number of dropped events. If the value is 0, then no + // events were dropped. + DroppedEventsCount uint32 `protobuf:"varint,12,opt,name=dropped_events_count,json=droppedEventsCount,proto3" json:"dropped_events_count,omitempty"` + // links is a collection of Links, which are references from this span to a span + // in the same or different trace. + Links []*Span_Link `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` + // dropped_links_count is the number of dropped links after the maximum size was + // enforced. If this value is 0, then no links were dropped. + DroppedLinksCount uint32 `protobuf:"varint,14,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"` + // An optional final status for this span. Semantically when Status + // wasn't set it is means span ended without errors and assume + // Status.Ok (code = 0). + Status *Status `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span) Reset() { *m = Span{} } +func (m *Span) String() string { return proto.CompactTextString(m) } +func (*Span) ProtoMessage() {} +func (*Span) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{2} +} + +func (m *Span) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span.Unmarshal(m, b) +} +func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span.Marshal(b, m, deterministic) +} +func (m *Span) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span.Merge(m, src) +} +func (m *Span) XXX_Size() int { + return xxx_messageInfo_Span.Size(m) +} +func (m *Span) XXX_DiscardUnknown() { + xxx_messageInfo_Span.DiscardUnknown(m) +} + +var xxx_messageInfo_Span proto.InternalMessageInfo + +func (m *Span) GetTraceId() []byte { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *Span) GetSpanId() []byte { + if m != nil { + return m.SpanId + } + return nil +} + +func (m *Span) GetTraceState() string { + if m != nil { + return m.TraceState + } + return "" +} + +func (m *Span) GetParentSpanId() []byte { + if m != nil { + return m.ParentSpanId + } + return nil +} + +func (m *Span) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Span) GetKind() Span_SpanKind { + if m != nil { + return m.Kind + } + return Span_SPAN_KIND_UNSPECIFIED +} + +func (m *Span) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *Span) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 +} + +func (m *Span) GetAttributes() []*v11.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Span) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +func (m *Span) GetEvents() []*Span_Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *Span) GetDroppedEventsCount() uint32 { + if m != nil { + return m.DroppedEventsCount + } + return 0 +} + +func (m *Span) GetLinks() []*Span_Link { + if m != nil { + return m.Links + } + return nil +} + +func (m *Span) GetDroppedLinksCount() uint32 { + if m != nil { + return m.DroppedLinksCount + } + return 0 +} + +func (m *Span) GetStatus() *Status { + if m != nil { + return m.Status + } + return nil +} + +// Event is a time-stamped annotation of the span, consisting of user-supplied +// text description and key-value pairs. +type Span_Event struct { + // time_unix_nano is the time the event occurred. + TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // name of the event. + // This field is semantically required to be set to non-empty string. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // attributes is a collection of attribute key/value pairs on the event. + Attributes []*v11.KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` + // dropped_attributes_count is the number of dropped attributes. If the value is 0, + // then no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Event) Reset() { *m = Span_Event{} } +func (m *Span_Event) String() string { return proto.CompactTextString(m) } +func (*Span_Event) ProtoMessage() {} +func (*Span_Event) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{2, 0} +} + +func (m *Span_Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Event.Unmarshal(m, b) +} +func (m *Span_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) +} +func (m *Span_Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Event.Merge(m, src) +} +func (m *Span_Event) XXX_Size() int { + return xxx_messageInfo_Span_Event.Size(m) +} +func (m *Span_Event) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Event proto.InternalMessageInfo + +func (m *Span_Event) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +func (m *Span_Event) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Span_Event) GetAttributes() []*v11.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Span_Event) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +// A pointer from the current span to another span in the same trace or in a +// different trace. For example, this can be used in batching operations, +// where a single batch handler processes multiple requests from different +// traces or when the handler receives a request from a different project. +type Span_Link struct { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // A unique identifier for the linked span. The ID is an 8-byte array. + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + // The trace_state associated with the link. + TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` + // attributes is a collection of attribute key/value pairs on the link. + Attributes []*v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` + // dropped_attributes_count is the number of dropped attributes. If the value is 0, + // then no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Link) Reset() { *m = Span_Link{} } +func (m *Span_Link) String() string { return proto.CompactTextString(m) } +func (*Span_Link) ProtoMessage() {} +func (*Span_Link) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{2, 1} +} + +func (m *Span_Link) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Link.Unmarshal(m, b) +} +func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) +} +func (m *Span_Link) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Link.Merge(m, src) +} +func (m *Span_Link) XXX_Size() int { + return xxx_messageInfo_Span_Link.Size(m) +} +func (m *Span_Link) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Link.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Link proto.InternalMessageInfo + +func (m *Span_Link) GetTraceId() []byte { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *Span_Link) GetSpanId() []byte { + if m != nil { + return m.SpanId + } + return nil +} + +func (m *Span_Link) GetTraceState() string { + if m != nil { + return m.TraceState + } + return "" +} + +func (m *Span_Link) GetAttributes() []*v11.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Span_Link) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +// The Status type defines a logical error model that is suitable for different +// programming environments, including REST APIs and RPC APIs. +type Status struct { + // The status code. This is optional field. It is safe to assume 0 (OK) + // when not set. + Code Status_StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=opentelemetry.proto.trace.v1.Status_StatusCode" json:"code,omitempty"` + // A developer-facing human readable error message. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_5c407ac9c675a601, []int{3} +} + +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (m *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(m, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) +} + +var xxx_messageInfo_Status proto.InternalMessageInfo + +func (m *Status) GetCode() Status_StatusCode { + if m != nil { + return m.Code + } + return Status_Ok +} + +func (m *Status) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func init() { + proto.RegisterEnum("opentelemetry.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) + proto.RegisterEnum("opentelemetry.proto.trace.v1.Status_StatusCode", Status_StatusCode_name, Status_StatusCode_value) + proto.RegisterType((*ResourceSpans)(nil), "opentelemetry.proto.trace.v1.ResourceSpans") + proto.RegisterType((*InstrumentationLibrarySpans)(nil), "opentelemetry.proto.trace.v1.InstrumentationLibrarySpans") + proto.RegisterType((*Span)(nil), "opentelemetry.proto.trace.v1.Span") + proto.RegisterType((*Span_Event)(nil), "opentelemetry.proto.trace.v1.Span.Event") + proto.RegisterType((*Span_Link)(nil), "opentelemetry.proto.trace.v1.Span.Link") + proto.RegisterType((*Status)(nil), "opentelemetry.proto.trace.v1.Status") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/trace/v1/trace.proto", fileDescriptor_5c407ac9c675a601) +} + +var fileDescriptor_5c407ac9c675a601 = []byte{ + // 1003 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x37, + 0x13, 0xce, 0xea, 0xdb, 0xa3, 0x0f, 0xaf, 0x99, 0xaf, 0x8d, 0xf3, 0xbe, 0x88, 0x20, 0x04, 0xa8, + 0xda, 0x20, 0x52, 0xed, 0xa2, 0x40, 0x0a, 0xb4, 0x68, 0x65, 0x69, 0x5d, 0x08, 0x76, 0x65, 0x81, + 0xb2, 0x72, 0xe8, 0x65, 0x41, 0x8b, 0xac, 0x42, 0x78, 0x45, 0x0a, 0x5c, 0xae, 0x6a, 0x1f, 0xfa, + 0x7b, 0xfa, 0x2b, 0x7a, 0x2b, 0xd0, 0x5f, 0xd0, 0x6b, 0xef, 0xfd, 0x17, 0x05, 0xb9, 0xbb, 0x8e, + 0x65, 0xd8, 0x72, 0x2e, 0xbe, 0x48, 0xc3, 0x99, 0xe7, 0x99, 0x67, 0x86, 0x33, 0xab, 0x15, 0xb4, + 0xe5, 0x92, 0x09, 0xcd, 0x42, 0xb6, 0x60, 0x5a, 0x5d, 0x76, 0x97, 0x4a, 0x6a, 0xd9, 0xd5, 0x8a, + 0xcc, 0x58, 0x77, 0xb5, 0x97, 0x18, 0x1d, 0xeb, 0x44, 0xff, 0x5b, 0x43, 0x26, 0xce, 0x4e, 0x02, + 0x58, 0xed, 0xed, 0x7e, 0x71, 0x5b, 0x9e, 0x99, 0x5c, 0x2c, 0xa4, 0x30, 0x89, 0x12, 0x2b, 0x21, + 0xed, 0x76, 0x6e, 0xc3, 0x2a, 0x16, 0xc9, 0x58, 0x25, 0xb2, 0x99, 0x9d, 0xe0, 0x5b, 0x7f, 0x3b, + 0x50, 0xc7, 0xa9, 0x6b, 0xb2, 0x24, 0x22, 0x42, 0x3e, 0x54, 0x32, 0x8c, 0xe7, 0x34, 0x9d, 0x76, + 0x75, 0xff, 0xf3, 0xce, 0x6d, 0xe5, 0x5d, 0x25, 0x5a, 0xed, 0x75, 0xb2, 0x0c, 0xf8, 0x8a, 0x8a, + 0x7e, 0x83, 0xff, 0x73, 0x11, 0x69, 0x15, 0x2f, 0x98, 0xd0, 0x44, 0x73, 0x29, 0x82, 0x90, 0x9f, + 0x29, 0xa2, 0x2e, 0x83, 0xc8, 0xe8, 0x78, 0xb9, 0x66, 0xbe, 0x5d, 0xdd, 0xff, 0xa6, 0xb3, 0xa9, + 0xf5, 0xce, 0x70, 0x3d, 0xc5, 0x71, 0x92, 0xc1, 0x16, 0x8a, 0x5f, 0xf2, 0xbb, 0x83, 0xad, 0xbf, + 0x1c, 0x78, 0xb9, 0x81, 0x8c, 0x04, 0x3c, 0xbf, 0xa3, 0xbc, 0xb4, 0xe9, 0xaf, 0x6f, 0x2d, 0x2c, + 0xbd, 0xeb, 0x3b, 0x2b, 0xc3, 0xcf, 0x6e, 0x2f, 0x0a, 0xbd, 0x83, 0xe2, 0xf5, 0xb6, 0x5b, 0x9b, + 0xdb, 0x36, 0x35, 0xe2, 0x84, 0xd0, 0xfa, 0x77, 0x0b, 0x0a, 0xe6, 0x8c, 0x5e, 0x40, 0xc5, 0x02, + 0x02, 0x4e, 0x6d, 0x8d, 0x35, 0x5c, 0xb6, 0xe7, 0x21, 0x45, 0xcf, 0xa1, 0x6c, 0xc0, 0x26, 0x92, + 0xb3, 0x91, 0x92, 0x39, 0x0e, 0x29, 0x7a, 0x05, 0xd5, 0x84, 0x13, 0x69, 0xa2, 0x99, 0x97, 0x6f, + 0x3a, 0xed, 0x2d, 0x0c, 0xd6, 0x35, 0x31, 0x1e, 0xf4, 0x1a, 0x1a, 0x4b, 0xa2, 0x98, 0xd0, 0x41, + 0x96, 0xa0, 0x60, 0x13, 0xd4, 0x12, 0xef, 0x24, 0x49, 0x83, 0xa0, 0x20, 0xc8, 0x82, 0x79, 0x45, + 0xcb, 0xb7, 0x36, 0xfa, 0x1e, 0x0a, 0xe7, 0x5c, 0x50, 0xaf, 0xd4, 0x74, 0xda, 0x8d, 0xfd, 0x37, + 0xf7, 0x37, 0x64, 0x3f, 0x8e, 0xb8, 0xa0, 0xd8, 0x12, 0x51, 0x17, 0x9e, 0x44, 0x9a, 0x28, 0x1d, + 0x68, 0xbe, 0x60, 0x41, 0x2c, 0xf8, 0x45, 0x20, 0x88, 0x90, 0x5e, 0xb9, 0xe9, 0xb4, 0x4b, 0x78, + 0xc7, 0xc6, 0x4e, 0xf9, 0x82, 0x4d, 0x05, 0xbf, 0x18, 0x11, 0x21, 0xd1, 0x1b, 0x40, 0x4c, 0xd0, + 0x9b, 0xf0, 0x8a, 0x85, 0x6f, 0x33, 0x41, 0xd7, 0xc0, 0x3f, 0x02, 0x10, 0xad, 0x15, 0x3f, 0x8b, + 0x35, 0x8b, 0xbc, 0x2d, 0x7b, 0xeb, 0x9f, 0xdd, 0x33, 0xd3, 0x23, 0x76, 0xf9, 0x9e, 0x84, 0x31, + 0xc3, 0xd7, 0xa8, 0xe8, 0x1d, 0x78, 0x54, 0xc9, 0xe5, 0x92, 0xd1, 0xe0, 0xa3, 0x37, 0x98, 0xc9, + 0x58, 0x68, 0x0f, 0x9a, 0x4e, 0xbb, 0x8e, 0x9f, 0xa5, 0xf1, 0xde, 0x55, 0xb8, 0x6f, 0xa2, 0xe8, + 0x07, 0x28, 0xb1, 0x15, 0x13, 0x3a, 0xf2, 0xaa, 0x56, 0xbe, 0xfd, 0x09, 0x77, 0xe4, 0x1b, 0x02, + 0x4e, 0x79, 0xe8, 0x4b, 0x78, 0x92, 0x69, 0x27, 0x9e, 0x54, 0xb7, 0x66, 0x75, 0x51, 0x1a, 0xb3, + 0x9c, 0x54, 0xf3, 0x3b, 0x28, 0x86, 0x5c, 0x9c, 0x47, 0x5e, 0x7d, 0x43, 0xc7, 0xeb, 0x92, 0xc7, + 0x5c, 0x9c, 0xe3, 0x84, 0x85, 0x3a, 0xf0, 0x38, 0x13, 0xb4, 0x8e, 0x54, 0xaf, 0x61, 0xf5, 0x76, + 0xd2, 0x90, 0x21, 0xa4, 0x72, 0xdf, 0x42, 0xc9, 0x6c, 0x56, 0x1c, 0x79, 0xdb, 0xf6, 0xa9, 0x79, + 0x7d, 0x8f, 0x9e, 0xc5, 0xe2, 0x94, 0xb3, 0xfb, 0xa7, 0x03, 0x45, 0x5b, 0xbc, 0x59, 0xc3, 0x1b, + 0x63, 0x75, 0xec, 0x58, 0x6b, 0xfa, 0xfa, 0x4c, 0xb3, 0x35, 0xcc, 0x5d, 0x5b, 0xc3, 0xf5, 0x39, + 0xe7, 0x1f, 0x66, 0xce, 0x85, 0x4d, 0x73, 0xde, 0xfd, 0xc7, 0x81, 0x82, 0xb9, 0x93, 0x87, 0x79, + 0x42, 0xd7, 0x1b, 0x2c, 0x3c, 0x4c, 0x83, 0xc5, 0x4d, 0x0d, 0xb6, 0xe6, 0x50, 0xc9, 0x9e, 0x5d, + 0xf4, 0x02, 0x9e, 0x4e, 0xc6, 0xbd, 0x51, 0x70, 0x34, 0x1c, 0x0d, 0x82, 0xe9, 0x68, 0x32, 0xf6, + 0xfb, 0xc3, 0xc3, 0xa1, 0x3f, 0x70, 0x1f, 0xa1, 0x1a, 0x54, 0x86, 0xa3, 0x53, 0x1f, 0x8f, 0x7a, + 0xc7, 0xae, 0x83, 0x00, 0x4a, 0x13, 0x1f, 0xbf, 0xf7, 0xb1, 0x9b, 0x33, 0x76, 0xff, 0x78, 0xe8, + 0x8f, 0x4e, 0xdd, 0xbc, 0x41, 0x8d, 0xf1, 0xc9, 0x60, 0xda, 0xf7, 0xb1, 0x5b, 0x30, 0xa7, 0xfe, + 0xc9, 0x68, 0x32, 0xfd, 0xc9, 0xc7, 0x6e, 0xb1, 0xf5, 0x7b, 0x1e, 0x4a, 0xc9, 0x8e, 0xa0, 0x3e, + 0x14, 0x66, 0x92, 0x26, 0xaf, 0xa0, 0xc6, 0x7e, 0xf7, 0x53, 0xf6, 0x2a, 0xfd, 0xea, 0x4b, 0xca, + 0xb0, 0x25, 0x23, 0x0f, 0xca, 0x0b, 0x16, 0x45, 0x64, 0x9e, 0xed, 0x4c, 0x76, 0x6c, 0xfd, 0x91, + 0x03, 0xf8, 0x08, 0x47, 0x25, 0xc8, 0x9d, 0x9c, 0xbb, 0x8f, 0x50, 0x1d, 0xb6, 0xfa, 0x44, 0xcc, + 0x58, 0x18, 0x32, 0xea, 0x3a, 0xc8, 0x85, 0xda, 0x54, 0x9c, 0x0b, 0xf9, 0xab, 0xf0, 0x95, 0x92, + 0xca, 0xcd, 0xa1, 0xc7, 0xb0, 0x3d, 0x14, 0x2b, 0x12, 0x72, 0xda, 0x53, 0x73, 0xfb, 0x33, 0xef, + 0xe6, 0xd1, 0x13, 0x70, 0x07, 0x8c, 0xd0, 0x90, 0x0b, 0xe6, 0x5f, 0xcc, 0x18, 0xa3, 0x8c, 0x26, + 0xad, 0x8d, 0xa4, 0x3e, 0x94, 0xb1, 0xa0, 0x6e, 0x11, 0xed, 0x40, 0xbd, 0x17, 0x2a, 0x46, 0xe8, + 0xa5, 0x7f, 0xc1, 0x23, 0x1d, 0xb9, 0x25, 0x43, 0x1b, 0x33, 0xb5, 0xe0, 0x51, 0xc4, 0xa5, 0x18, + 0x30, 0xc1, 0x19, 0x75, 0xcb, 0xe8, 0x29, 0xec, 0x64, 0xaf, 0x53, 0xff, 0xe2, 0x03, 0x89, 0x23, + 0xcd, 0xa8, 0x5b, 0x41, 0xcf, 0x00, 0x1d, 0x12, 0x1e, 0x32, 0x3a, 0x56, 0x6c, 0x26, 0x05, 0xe5, + 0xe6, 0xed, 0xe2, 0x6e, 0xa1, 0x2a, 0x94, 0x7b, 0x67, 0x52, 0x19, 0x10, 0xa0, 0x06, 0xc0, 0x49, + 0xac, 0x4f, 0x7e, 0xc1, 0x44, 0xcc, 0x99, 0x5b, 0x35, 0xa2, 0x53, 0xc1, 0x17, 0x4b, 0x73, 0x6d, + 0xc2, 0x40, 0x6a, 0xc6, 0x35, 0x14, 0x9a, 0x29, 0x41, 0xc2, 0xa4, 0xa7, 0x3a, 0xda, 0x86, 0xea, + 0x54, 0x90, 0x15, 0xe1, 0x21, 0x39, 0x0b, 0x99, 0xdb, 0x30, 0x95, 0x0f, 0x88, 0x26, 0xc7, 0x32, + 0x8a, 0xdc, 0x6d, 0xd3, 0xf2, 0x54, 0x90, 0x58, 0x7f, 0x60, 0x42, 0xf3, 0x19, 0x31, 0x69, 0xdc, + 0x83, 0x08, 0x5e, 0x71, 0xb9, 0x71, 0x28, 0x07, 0x70, 0x6a, 0xac, 0xb1, 0x71, 0x8e, 0x9d, 0x9f, + 0x0f, 0xe6, 0x37, 0xe1, 0x5c, 0x76, 0xa5, 0x66, 0x61, 0x97, 0xa7, 0xe5, 0x74, 0xd7, 0xc2, 0x6f, + 0x6d, 0xb6, 0xb7, 0x73, 0x26, 0xae, 0xfe, 0x32, 0x9d, 0x95, 0xac, 0xef, 0xab, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x6c, 0x41, 0x9d, 0xfb, 0x59, 0x09, 0x00, 0x00, +} From 4f3fab3ba7df677205e673ae743ee067c99dbe87 Mon Sep 17 00:00:00 2001 From: ET Date: Thu, 16 Jul 2020 14:18:45 -0700 Subject: [PATCH 03/60] Remove github.com/open-telemetry/opentelemetry-collector dependency (#943) --- CHANGELOG.md | 4 + example/otel-collector/go.mod | 2 +- example/otel-collector/go.sum | 1172 -------------------------------- example/otel-collector/main.go | 5 +- 4 files changed, 7 insertions(+), 1176 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6cda6b565..64f5f38fb12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#948) +### Removed + +- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) + ## [0.8.0] - 2020-07-09 ### Added diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 36d495578ed..2c899ee7537 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -3,9 +3,9 @@ module go.opentelemetry.io/otel/example/otel-collector go 1.14 require ( - github.com/open-telemetry/opentelemetry-collector v0.3.0 go.opentelemetry.io/otel v0.8.0 go.opentelemetry.io/otel/exporters/otlp v0.8.0 + golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect google.golang.org/grpc v1.30.0 ) diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index d1127b1f3a1..6444ee66c88 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -1,418 +1,25 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -contrib.go.opencensus.io/exporter/jaeger v0.1.1-0.20190430175949-e8b55949d948/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= -contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= -contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= -contrib.go.opencensus.io/resource v0.1.2/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= -github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/Songmu/retry v0.1.0/go.mod h1:7sXIW7eseB9fq0FUvigRcQMVLR9tuHI0Scok+rkpAuA= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.23.12/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.23.19/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= -github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= -github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE= -github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= -github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.3/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr v1.22.0/go.mod h1:Qr3Wtxr3+HuQEwWqlLnNW4t1oTvK+7Gc/Rnoi/lDFvA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.3.0/go.mod h1:d+q1s/xVJxZGKWwC/6UfPIF33J+G1Tq4GYv9Y+Tg/EU= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/gddo v0.0.0-20180828051604-96d2a289f41e/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= -github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -420,788 +27,69 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.24.0/go.mod h1:yIqiAZ2SSQqg+1JeFlAdvEWjGVz4uu5jr4lrciqA1gE= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/google/addlicense v0.0.0-20200301095109-7c013a14f2e2/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= -github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= -github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gotestyourself/gotestyourself v1.3.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.11.1/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaIf3bM= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.4.1/go.mod h1:6iSW+JznC0YT+SgBn7rNxoEBsBgSmnC5FwyCekOGUiE= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jaegertracing/jaeger v1.17.0/go.mod h1:LUWPSnzNPGRubM8pk0inANGitpiMOOxihXx0+53llXI= -github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= -github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/luna-duclos/instrumentedsql v0.0.0-20181127104832-b7d587d28109/go.mod h1:PWUIzhtavmOR965zfawVsHXbEuU1G29BPZ/CB3C7jXk= -github.com/luna-duclos/instrumentedsql v1.1.2/go.mod h1:4LGbEqDnopzNAiyxPPDXhLspyunZxgPTMJBKtC6U0BQ= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/open-telemetry/opentelemetry-collector v0.3.0 h1:/i106g9t6xNQ4hOAuczEwW10UX+S8ZnkdWDGawo9fyg= -github.com/open-telemetry/opentelemetry-collector v0.3.0/go.mod h1:c5EgyLBK6FoGCaJpOEQ0j+sHqmfuoRzOm29tdVA/wDg= -github.com/open-telemetry/opentelemetry-proto v0.3.0/go.mod h1:PMR5GI0F7BSpio+rBGFxNm6SLzg3FypDTcFuQZnO+F8= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/orijtech/prometheus-go-metrics-exporter v0.0.4/go.mod h1:BiTx/ugZex8LheBk3j53tktWaRdFjV5FCfT2o0P7msE= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/ory/dockertest/v3 v3.5.4/go.mod h1:J8ZUbNB2FOhm1cFZW9xBpDsODqsSWcyYgtJYVPcnF70= -github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0= -github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4= -github.com/ory/go-acc v0.2.1/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0= -github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs= -github.com/ory/gojsonreference v0.0.0-20190720135523-6b606c2d8ee8/go.mod h1:wsH1C4nIeeQClDtD5AH7kF1uTS6zWyqfjVDTmB0Em7A= -github.com/ory/gojsonschema v1.1.1-0.20190919112458-f254ca73d5e9/go.mod h1:BNZpdJgB74KOLSsWFvzw6roXg1I6O51WO8roMmW+T7Y= -github.com/ory/herodot v0.6.2/go.mod h1:3BOneqcyBsVybCPAJoi92KN2BpJHcmDqAMcAAaJiJow= -github.com/ory/herodot v0.7.0/go.mod h1:YXKOfAXYdQojDP5sD8m0ajowq3+QXNdtxA+QiUXBwn0= -github.com/ory/jsonschema/v3 v3.0.1/go.mod h1:jgLHekkFk0uiGdEWGleC+tOm6JSSP8cbf17PnBuGXlw= -github.com/ory/viper v1.5.6/go.mod h1:TYmpFpKLxjQwvT4f0QPpkOn4sDXU1kDgAwJpgLYiQ28= -github.com/ory/viper v1.7.4/go.mod h1:T6sodNZKNGPpashUOk7EtXz2isovz8oCd57GNVkkNmE= -github.com/ory/x v0.0.84/go.mod h1:RXLPBG7B+hAViONVg0sHwK+U/ie1Y/NeXrq1JcARfoE= -github.com/ory/x v0.0.85/go.mod h1:s44V8t3xyjWZREcU+mWlp4h302rTuM4aLXcW+y5FbQ8= -github.com/ory/x v0.0.93/go.mod h1:lfcTaGXpTZs7IEQAW00r9EtTCOxD//SiP5uWtNiz31g= -github.com/ory/x v0.0.109/go.mod h1:tStpZsifohWoQk609GQoc2yNS2gRBDt5abkfx9pEPJg= -github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pavius/impi v0.0.0-20180302134524-c1cbdcb8df2b/go.mod h1:x/hU0bfdWIhuOT1SKwiJg++yvkk6EuOtJk8WtDZqgr8= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prashantv/protectmem v0.0.0-20171002184600-e20412882b3a/go.mod h1:lzZQ3Noex5pfAy7mkAeCjcBDteYU85uWWnJ/y6gKU8k= -github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= -github.com/prometheus/prometheus v1.8.2-0.20190924101040-52e0504f83ea/go.mod h1:elNqjVbwD3sCZJqKzyN7uEuwGcCpeJvv67D6BrHsDbw= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rubenv/sql-migrate v0.0.0-20190212093014-1007f53448d7/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= -github.com/santhosh-tekuri/jsonschema/v2 v2.1.0/go.mod h1:yzJzKUGV4RbWqWIBBP4wSOBqavX5saE02yirLS0OTyg= -github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= -github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd/go.mod h1:NurAFZsWJAEZjogSwdVPlHkOZB3DOAU7gsPP8VFZCHc= -github.com/segmentio/analytics-go v3.0.1+incompatible/go.mod h1:C7CYBtQWk4vRk2RyLu0qOcbHJ18E3F1HV2C/8JvKN48= -github.com/segmentio/analytics-go v3.1.0+incompatible/go.mod h1:C7CYBtQWk4vRk2RyLu0qOcbHJ18E3F1HV2C/8JvKN48= -github.com/segmentio/backo-go v0.0.0-20160424052352-204274ad699c/go.mod h1:kJ9mm9YmoWSkk+oQ+5Cj8DEoRCX2JT6As4kEtIIOp1M= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518/go.mod h1:CKI4AZ4XmGV240rTHfO0hfE83S6/a3/Q1siZJ/vXf7A= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8tGiBjZ5YWIc2fzuRpTaz0b/53vT6PEs3QuAWzuU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tcnksm/ghr v0.13.0/go.mod h1:tcp6tzbRYE0LqFSG7ykXP/BVG1/2BkX6aIn9FFV1mIQ= -github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= -github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= -github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/tchannel-go v1.10.0/go.mod h1:Rrgz1eL8kMjW/nEzZos0t+Heq0O4LhnUJVA32OvWKHo= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= -github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.0.4/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180830192347-182538f80094/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200121082415-34d275377bf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 h1:TC0v2RSO1u2kn1ZugjrFXkRZAEaqMN/RW+OTZkBzmLE= -golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190711191110-9a621aea19f8/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200203215610-ab391d50b528/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200228224639-71482053b885/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20191229114700-bbb4dff026f8/go.mod h1:2IgXn/sJaRbePPBA1wRj8OE+QLvVaH0q8SK6TSTKlnk= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.0.0-20200111075622-4abb28f724d5/go.mod h1:+HbaZVpsa73UwN7kXGCECULRHovLRJjH+t5cFPgxErs= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= @@ -1213,70 +101,10 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.55.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= -k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= -k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= -k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= -k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k= -k8s.io/client-go v12.0.0+incompatible/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6/go.mod h1:RZvgC8MSN6DjiMV6oIfEE9pDL9CYXokkfaCKZeHm3nc= -k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index b062c5368e9..1318f37dcc1 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -28,13 +28,12 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/exporters/otlp" "go.opentelemetry.io/otel/sdk/metric/controller/push" "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - - "github.com/open-telemetry/opentelemetry-collector/translator/conventions" ) // Initializes an OTLP exporter, and configures the corresponding trace and @@ -57,7 +56,7 @@ func initProvider() (*otlp.Exporter, *push.Controller) { sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), sdktrace.WithResource(resource.New( // the service name used to display traces in backends - kv.Key(conventions.AttributeServiceName).String("test-service"), + kv.Key(standard.ServiceNameKey).String("test-service"), )), sdktrace.WithSyncer(exp), ) From d6ad4d4d6e27b41c3e5d34e32333e8a71fbcca9a Mon Sep 17 00:00:00 2001 From: Michal Hruby Date: Fri, 17 Jul 2020 17:00:58 +0100 Subject: [PATCH 04/60] [jaeger] Stop ignoring uints (#945) * Stop ignoring uints * Ignore values that overflow --- exporters/trace/jaeger/jaeger.go | 16 ++++++++++++++++ exporters/trace/jaeger/jaeger_test.go | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/exporters/trace/jaeger/jaeger.go b/exporters/trace/jaeger/jaeger.go index 05a29e2d0e0..778560f2eb8 100644 --- a/exporters/trace/jaeger/jaeger.go +++ b/exporters/trace/jaeger/jaeger.go @@ -324,6 +324,22 @@ func keyValueToTag(keyValue kv.KeyValue) *gen.Tag { VLong: &i, VType: gen.TagType_LONG, } + case value.UINT32: + i := int64(keyValue.Value.AsUint32()) + tag = &gen.Tag{ + Key: string(keyValue.Key), + VLong: &i, + VType: gen.TagType_LONG, + } + case value.UINT64: + // we'll ignore the value if it overflows + if i := int64(keyValue.Value.AsUint64()); i >= 0 { + tag = &gen.Tag{ + Key: string(keyValue.Key), + VLong: &i, + VType: gen.TagType_LONG, + } + } case value.FLOAT32: f := float64(keyValue.Value.AsFloat32()) tag = &gen.Tag{ diff --git a/exporters/trace/jaeger/jaeger_test.go b/exporters/trace/jaeger/jaeger_test.go index 0ad4ded05d2..7f28a6c6fa1 100644 --- a/exporters/trace/jaeger/jaeger_test.go +++ b/exporters/trace/jaeger/jaeger_test.go @@ -17,6 +17,7 @@ package jaeger import ( "context" "encoding/binary" + "math" "os" "sort" "testing" @@ -213,6 +214,7 @@ func Test_spanDataToThrift(t *testing.T) { keyValue := "value" statusCodeValue := int64(2) doubleValue := 123.456 + uintValue := int64(123) boolTrue := true statusMessage := "this is a problem" spanKind := "client" @@ -245,8 +247,8 @@ func Test_spanDataToThrift(t *testing.T) { Attributes: []kv.KeyValue{ kv.String("key", keyValue), kv.Float64("double", doubleValue), - // Jaeger doesn't handle Uint tags, this should be ignored. - kv.Uint64("ignored", 123), + kv.Uint64("uint", uint64(uintValue)), + kv.Uint64("overflows", math.MaxUint64), }, MessageEvents: []export.Event{ {Name: eventNameValue, Attributes: []kv.KeyValue{kv.String("k1", keyValue)}, Time: now}, @@ -266,6 +268,7 @@ func Test_spanDataToThrift(t *testing.T) { Tags: []*gen.Tag{ {Key: "double", VType: gen.TagType_DOUBLE, VDouble: &doubleValue}, {Key: "key", VType: gen.TagType_STRING, VStr: &keyValue}, + {Key: "uint", VType: gen.TagType_LONG, VLong: &uintValue}, {Key: "error", VType: gen.TagType_BOOL, VBool: &boolTrue}, {Key: "status.code", VType: gen.TagType_LONG, VLong: &statusCodeValue}, {Key: "status.message", VType: gen.TagType_STRING, VStr: &statusMessage}, From b2b23e15e5724d2fdb3107ee8aa2d022de3af508 Mon Sep 17 00:00:00 2001 From: Liz Fong-Jones Date: Fri, 17 Jul 2020 16:10:19 -0400 Subject: [PATCH 05/60] supports marshaling values as json (#948) --- CHANGELOG.md | 6 +++++- api/kv/kv.go | 4 ++++ api/kv/kv_test.go | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64f5f38fb12..38494fe2c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) - OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. - References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#948) + References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) + +### Changed + +- Non-nil value structs for key-value pairs will be marshalled using JSON rather than Sprintf. (#948) ### Removed diff --git a/api/kv/kv.go b/api/kv/kv.go index 8f2238c173a..826c2b27591 100644 --- a/api/kv/kv.go +++ b/api/kv/kv.go @@ -15,6 +15,7 @@ package kv import ( + "encoding/json" "fmt" "reflect" @@ -138,5 +139,8 @@ func Infer(k string, value interface{}) KeyValue { case reflect.String: return String(k, rv.String()) } + if b, err := json.Marshal(value); value != nil && err == nil { + return String(k, string(b)) + } return String(k, fmt.Sprint(value)) } diff --git a/api/kv/kv_test.go b/api/kv/kv_test.go index 9d2ccf47653..5d6b9d00a5f 100644 --- a/api/kv/kv_test.go +++ b/api/kv/kv_test.go @@ -124,6 +124,17 @@ func TestKeyValueConstructors(t *testing.T) { func TestInfer(t *testing.T) { builder := &strings.Builder{} builder.WriteString("foo") + jsonifyStruct := struct { + Public string + private string + Tagged string `json:"tagName"` + Empty string + OmitEmpty string `json:",omitempty"` + Omit string `json:"-"` + }{"foo", "bar", "baz", "", "", "omitted"} + invalidStruct := struct { + N complex64 + }{complex(0, 0)} for _, testcase := range []struct { key string value interface{} @@ -190,6 +201,18 @@ func TestInfer(t *testing.T) { wantType: value.STRING, wantValue: "", }, + { + key: "JSON struct serialized correctly", + value: &jsonifyStruct, + wantType: value.STRING, + wantValue: `{"Public":"foo","tagName":"baz","Empty":""}`, + }, + { + key: "Invalid JSON struct falls back to string", + value: &invalidStruct, + wantType: value.STRING, + wantValue: "&{(0+0i)}", + }, } { t.Logf("Running test case %s", testcase.key) keyValue := kv.Infer(testcase.key, testcase.value) From 99c299877dbd70df7455bd7df65e5ed8ac5c114f Mon Sep 17 00:00:00 2001 From: YANYZP Date: Mon, 20 Jul 2020 11:43:51 -0400 Subject: [PATCH 06/60] OT resource detector (#939) * first * all included * constant * res keys * env detector * Update sdk/detect/env.go Co-authored-by: Anthony Mirabella * new test cases and strings operation to handle labels * solved conflict * typo * corrected comments * deleted env var handling * push again * rerun * restructuring * new way to aggregate errors * all in resources package and verbose comments * solved merge conflicts * included new error types * improved error handling * updated changelog.md * updated changelog * updated changelog.md * updated changelog * Update CHANGELOG.md Co-authored-by: Anthony Mirabella Co-authored-by: Liz Fong-Jones Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + sdk/resource/auto.go | 67 ++++++++++++++++++++++++++++++++++++ sdk/resource/doc.go | 28 +++++++++++++++ sdk/resource/env.go | 69 +++++++++++++++++++++++++++++++++++++ sdk/resource/env_test.go | 73 ++++++++++++++++++++++++++++++++++++++++ sdk/resource/resource.go | 4 +-- 6 files changed, 239 insertions(+), 3 deletions(-) create mode 100644 sdk/resource/auto.go create mode 100644 sdk/resource/doc.go create mode 100644 sdk/resource/env.go create mode 100644 sdk/resource/env_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 38494fe2c16..58b59ff5e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added +- Define a general Resources Detector Interface and allow resources to be detected from environment variables. (#939) - Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) - OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) diff --git a/sdk/resource/auto.go b/sdk/resource/auto.go new file mode 100644 index 00000000000..4a1f765fbac --- /dev/null +++ b/sdk/resource/auto.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resource + +import ( + "context" + "errors" + "fmt" +) + +var ( + // ErrMissingResource is returned by a detector when source information + // is unavailable for a Resource. + ErrMissingResource = errors.New("missing resource") + // ErrPartialResource is returned by a detector when complete source + // information for a Resource is unavailable or the source information + // contains invalid values that are omitted from the returned Resource. + ErrPartialResource = errors.New("partial resource") +) + +// Detector detects OpenTelemetry resource information +type Detector interface { + // Detect returns an initialized Resource based on gathered information. + // If source information to construct a Resource is inaccessible, an + // uninitialized Resource is returned with an appropriately wrapped + // ErrMissingResource error is returned. If the source information to + // construct a Resource contains invalid values, a Resource is returned + // with the valid parts of the source information used for + // initialization along with an appropriately wrapped ErrPartialResource + // error. + Detect(ctx context.Context) (*Resource, error) +} + +// Detect calls all input detectors sequentially and merges each result with the previous one. +// It returns the merged error too. +func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) { + var autoDetectedRes *Resource + var errInfo []string + for _, detector := range detectors { + res, err := detector.Detect(ctx) + if err != nil { + errInfo = append(errInfo, err.Error()) + if !errors.Is(err, ErrPartialResource) { + continue + } + } + autoDetectedRes = Merge(autoDetectedRes, res) + } + + var aggregatedError error + if len(errInfo) > 0 { + aggregatedError = fmt.Errorf("detecting resources: %s", errInfo) + } + return autoDetectedRes, aggregatedError +} diff --git a/sdk/resource/doc.go b/sdk/resource/doc.go new file mode 100644 index 00000000000..c3a43c7886f --- /dev/null +++ b/sdk/resource/doc.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package resource provides detecting and representing resources. +// +// The fundamental struct is a Resource which holds identifying information +// about the entities for which telemetry is exported. +// +// To automatically construct Resources from an environment a Detector +// interface is defined. Implementations of this interface can be passed to +// the Detect function to generate a Resource from the merged information. +// +// To load a user defined Resource from the environment variable +// OTEL_RESOURCE_LABELS the FromEnv Detector can be used. It will interpret +// the value as a list of comma delimited key/value pairs +// (e.g. `=,=,...`). +package resource diff --git a/sdk/resource/env.go b/sdk/resource/env.go new file mode 100644 index 00000000000..a03e387ba5b --- /dev/null +++ b/sdk/resource/env.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resource + +import ( + "context" + "fmt" + "os" + "strings" + + "go.opentelemetry.io/otel/api/kv" +) + +// envVar is the environment variable name OpenTelemetry Resource information can be assigned to. +const envVar = "OTEL_RESOURCE_LABELS" + +var ( + //errMissingValue is returned when a resource value is missing. + errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource) +) + +// FromEnv is a detector that implements the Detector and collects resources +// from environment +type FromEnv struct{} + +// compile time assertion that FromEnv implements Detector interface +var _ Detector = (*FromEnv)(nil) + +// Detect collects resources from environment +func (d *FromEnv) Detect(context.Context) (*Resource, error) { + labels := strings.TrimSpace(os.Getenv(envVar)) + + if labels == "" { + return Empty(), ErrMissingResource + } + return constructOTResources(labels) +} + +func constructOTResources(s string) (*Resource, error) { + pairs := strings.Split(s, ",") + labels := []kv.KeyValue{} + var invalid []string + for _, p := range pairs { + field := strings.SplitN(p, "=", 2) + if len(field) != 2 { + invalid = append(invalid, p) + continue + } + k, v := strings.TrimSpace(field[0]), strings.TrimSpace(field[1]) + labels = append(labels, kv.String(k, v)) + } + var err error + if len(invalid) > 0 { + err = fmt.Errorf("%w: %v", errMissingValue, invalid) + } + return New(labels...), err +} diff --git a/sdk/resource/env_test.go b/sdk/resource/env_test.go new file mode 100644 index 00000000000..5302976540a --- /dev/null +++ b/sdk/resource/env_test.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resource + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/otel/api/kv" +) + +func TestDetectOnePair(t *testing.T) { + os.Setenv(envVar, "key=value") + + detector := &FromEnv{} + res, err := detector.Detect(context.Background()) + require.NoError(t, err) + assert.Equal(t, New(kv.String("key", "value")), res) +} + +func TestDetectMultiPairs(t *testing.T) { + os.Setenv("x", "1") + os.Setenv(envVar, "key=value, k = v , a= x, a=z") + + detector := &FromEnv{} + res, err := detector.Detect(context.Background()) + require.NoError(t, err) + assert.Equal(t, res, New( + kv.String("key", "value"), + kv.String("k", "v"), + kv.String("a", "x"), + kv.String("a", "z"), + )) +} + +func TestEmpty(t *testing.T) { + os.Setenv(envVar, "") + + detector := &FromEnv{} + res, err := detector.Detect(context.Background()) + require.Error(t, err) + assert.Equal(t, err, ErrMissingResource) + assert.Equal(t, Empty(), res) +} + +func TestMissingKeyError(t *testing.T) { + os.Setenv(envVar, "key=value,key") + + detector := &FromEnv{} + res, err := detector.Detect(context.Background()) + assert.Error(t, err) + assert.Equal(t, err, fmt.Errorf("%w: %v", errMissingValue, "[key]")) + assert.Equal(t, res, New( + kv.String("key", "value"), + )) +} diff --git a/sdk/resource/resource.go b/sdk/resource/resource.go index 608fd4d0edf..1f53e50db1c 100644 --- a/sdk/resource/resource.go +++ b/sdk/resource/resource.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package resource provides functionality for resource, which capture -// identifying information about the entities for which signals are exported. package resource import ( @@ -34,7 +32,7 @@ type Resource struct { var emptyResource Resource -// Key creates a resource from a set of attributes. If there are +// New creates a resource from a set of attributes. If there are // duplicate keys present in the list of attributes, then the last // value found for the key is preserved. func New(kvs ...kv.KeyValue) *Resource { From e6537c6aa6f287660d76f939cb5b24a407db03fb Mon Sep 17 00:00:00 2001 From: Kanji Yomoda Date: Tue, 21 Jul 2020 00:49:35 +0900 Subject: [PATCH 07/60] Fix typo in comment (#951) Co-authored-by: Tyler Yahn --- instrumentation/grpctrace/interceptor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/grpctrace/interceptor.go b/instrumentation/grpctrace/interceptor.go index 3b4f0886dea..7a8d195e21d 100644 --- a/instrumentation/grpctrace/interceptor.go +++ b/instrumentation/grpctrace/interceptor.go @@ -296,7 +296,7 @@ func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { // for use in a grpc.NewServer call. // // For example: -// tracer := global.Tracer("client-tracer") +// tracer := global.Tracer("server-tracer") // s := grpc.Dial( // grpc.UnaryInterceptor(grpctrace.UnaryServerInterceptor(tracer)), // ..., // (existing ServerOptions)) @@ -339,7 +339,7 @@ func UnaryServerInterceptor(tracer trace.Tracer) grpc.UnaryServerInterceptor { } } -// clientStream wraps around the embedded grpc.ServerStream, and intercepts the RecvMsg and +// serverStream wraps around the embedded grpc.ServerStream, and intercepts the RecvMsg and // SendMsg method call. type serverStream struct { grpc.ServerStream @@ -384,7 +384,7 @@ func wrapServerStream(ctx context.Context, ss grpc.ServerStream) *serverStream { // for use in a grpc.NewServer call. // // For example: -// tracer := global.Tracer("client-tracer") +// tracer := global.Tracer("server-tracer") // s := grpc.Dial( // grpc.StreamInterceptor(grpctrace.StreamServerInterceptor(tracer)), // ..., // (existing ServerOptions)) From 58e50e249fe4c57f64e421e300b5d2316ae96811 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Mon, 20 Jul 2020 12:40:42 -0700 Subject: [PATCH 08/60] Release v0.9.0 (#952) * Prepare for releasing v0.9.0 * Update Changelog --- CHANGELOG.md | 10 +++++++--- example/basic/go.mod | 2 +- example/grpc/go.mod | 2 +- example/http/go.mod | 2 +- example/jaeger/go.mod | 4 ++-- example/namedtracer/go.mod | 2 +- example/otel-collector/go.mod | 4 ++-- example/prometheus/go.mod | 4 ++-- example/zipkin/go.mod | 4 ++-- exporters/metric/prometheus/go.mod | 2 +- exporters/otlp/go.mod | 2 +- exporters/trace/jaeger/go.mod | 2 +- exporters/trace/zipkin/go.mod | 2 +- sdk/opentelemetry.go | 2 +- 14 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b59ff5e28..c646ecf78b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,16 +8,19 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [0.9.0] - 2020-07-20 + ### Added -- Define a general Resources Detector Interface and allow resources to be detected from environment variables. (#939) +- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939) +- A Detector to automatically detect resources from an environment variable. (#939) - Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) - OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) ### Changed -- Non-nil value structs for key-value pairs will be marshalled using JSON rather than Sprintf. (#948) +- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) ### Removed @@ -677,7 +680,8 @@ It contains api and sdk for trace and meter. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v0.8.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v0.9.0...HEAD +[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 [0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 [0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 [0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0 diff --git a/example/basic/go.mod b/example/basic/go.mod index e73658b9296..d73d0030ea7 100644 --- a/example/basic/go.mod +++ b/example/basic/go.mod @@ -4,4 +4,4 @@ go 1.13 replace go.opentelemetry.io/otel => ../.. -require go.opentelemetry.io/otel v0.8.0 +require go.opentelemetry.io/otel v0.9.0 diff --git a/example/grpc/go.mod b/example/grpc/go.mod index 06cef8b3fd8..8b65a4b0c3b 100644 --- a/example/grpc/go.mod +++ b/example/grpc/go.mod @@ -6,7 +6,7 @@ replace go.opentelemetry.io/otel => ../.. require ( github.com/golang/protobuf v1.4.2 - go.opentelemetry.io/otel v0.8.0 + go.opentelemetry.io/otel v0.9.0 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 google.golang.org/grpc v1.30.0 ) diff --git a/example/http/go.mod b/example/http/go.mod index 906c7410a5b..34d2feb4444 100644 --- a/example/http/go.mod +++ b/example/http/go.mod @@ -4,4 +4,4 @@ go 1.13 replace go.opentelemetry.io/otel => ../.. -require go.opentelemetry.io/otel v0.8.0 +require go.opentelemetry.io/otel v0.9.0 diff --git a/example/jaeger/go.mod b/example/jaeger/go.mod index 6352bdb52b7..29505afa2f4 100644 --- a/example/jaeger/go.mod +++ b/example/jaeger/go.mod @@ -8,6 +8,6 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.8.0 - go.opentelemetry.io/otel/exporters/trace/jaeger v0.8.0 + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/trace/jaeger v0.9.0 ) diff --git a/example/namedtracer/go.mod b/example/namedtracer/go.mod index 498ed28b086..bb6f07160fb 100644 --- a/example/namedtracer/go.mod +++ b/example/namedtracer/go.mod @@ -4,4 +4,4 @@ go 1.13 replace go.opentelemetry.io/otel => ../.. -require go.opentelemetry.io/otel v0.8.0 +require go.opentelemetry.io/otel v0.9.0 diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 2c899ee7537..c732ccd3c09 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/otel/example/otel-collector go 1.14 require ( - go.opentelemetry.io/otel v0.8.0 - go.opentelemetry.io/otel/exporters/otlp v0.8.0 + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/otlp v0.9.0 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect google.golang.org/grpc v1.30.0 ) diff --git a/example/prometheus/go.mod b/example/prometheus/go.mod index ab1056b2362..627aead3f9f 100644 --- a/example/prometheus/go.mod +++ b/example/prometheus/go.mod @@ -8,6 +8,6 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.8.0 - go.opentelemetry.io/otel/exporters/metric/prometheus v0.8.0 + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/metric/prometheus v0.9.0 ) diff --git a/example/zipkin/go.mod b/example/zipkin/go.mod index 1ac252b8102..c6d6fd2f9f6 100644 --- a/example/zipkin/go.mod +++ b/example/zipkin/go.mod @@ -8,6 +8,6 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.8.0 - go.opentelemetry.io/otel/exporters/trace/zipkin v0.8.0 + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/trace/zipkin v0.9.0 ) diff --git a/exporters/metric/prometheus/go.mod b/exporters/metric/prometheus/go.mod index b6b9444b28a..0785729d711 100644 --- a/exporters/metric/prometheus/go.mod +++ b/exporters/metric/prometheus/go.mod @@ -7,5 +7,5 @@ replace go.opentelemetry.io/otel => ../../.. require ( github.com/prometheus/client_golang v1.7.1 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.8.0 + go.opentelemetry.io/otel v0.9.0 ) diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index 70abb340013..47b16b4360f 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.5.0 github.com/kr/pretty v0.2.0 // indirect github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.8.0 + go.opentelemetry.io/otel v0.9.0 golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.30.0 diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index cab00b806be..7f02d949f44 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -8,7 +8,7 @@ require ( github.com/apache/thrift v0.13.0 github.com/google/go-cmp v0.5.0 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.8.0 + go.opentelemetry.io/otel v0.9.0 google.golang.org/api v0.29.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/trace/zipkin/go.mod b/exporters/trace/zipkin/go.mod index fbd4db0ce20..d21ed4bcdc1 100644 --- a/exporters/trace/zipkin/go.mod +++ b/exporters/trace/zipkin/go.mod @@ -7,6 +7,6 @@ replace go.opentelemetry.io/otel => ../../.. require ( github.com/openzipkin/zipkin-go v0.2.2 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.8.0 + go.opentelemetry.io/otel v0.9.0 google.golang.org/grpc v1.30.0 ) diff --git a/sdk/opentelemetry.go b/sdk/opentelemetry.go index 72d8532a3e3..b749d6666d6 100644 --- a/sdk/opentelemetry.go +++ b/sdk/opentelemetry.go @@ -17,5 +17,5 @@ package opentelemetry // import "go.opentelemetry.io/otel/sdk" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "0.8.0" + return "0.9.0" } From f6b51df544b1cc386aa799c241ad12557d6b5482 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2020 08:43:51 -0400 Subject: [PATCH 09/60] Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools (#953) * Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.28.3 to 1.29.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.28.3...v1.29.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- tools/go.mod | 4 ++-- tools/go.sum | 37 ++++++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index da759cd1a61..dc463d6c42b 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.28.3 + github.com/golangci/golangci-lint v1.29.0 github.com/itchyny/gojq v0.11.0 - golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347 + golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1 ) diff --git a/tools/go.sum b/tools/go.sum index 2aa02ff7966..645a420c54d 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -128,8 +128,8 @@ github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d h1:pXTK/gkVNs7Zyy github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.28.3 h1:i6KRBN2WlbtEflyjNe6zDaUjLuPkp/j16x/IOxikVnA= -github.com/golangci/golangci-lint v1.28.3/go.mod h1:JlLqleIwwgLVJtjKtrB37OKp3LGLrUhEx9tWY4VKWSY= +github.com/golangci/golangci-lint v1.29.0 h1:0ufaO3l2R1R712cFC+KT3TtwO/IOcsloKZBavRtzrBk= +github.com/golangci/golangci-lint v1.29.0/go.mod h1:Iq2GFBB9OoolSDWD81m0iJ2MR4MwDVbi4eC93fO7wh0= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= @@ -149,8 +149,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -232,8 +232,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kyoh86/exportloopref v0.1.4 h1:t8QP+vBUykOFp6Bks/ZVYm3+Rp3+aj+AKWpGXgK4anA= -github.com/kyoh86/exportloopref v0.1.4/go.mod h1:h1rDl2Kdj97+Kwh4gdz3ujE7XHmH51Q0lUiZ1z4NLj8= +github.com/kyoh86/exportloopref v0.1.7 h1:u+iHuTbkbTS2D/JP7fCuZDo/t3rBVGo3Hf58Rc+lQVY= +github.com/kyoh86/exportloopref v0.1.7/go.mod h1:h1rDl2Kdj97+Kwh4gdz3ujE7XHmH51Q0lUiZ1z4NLj8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= github.com/lestrrat-go/strftime v1.0.1 h1:o7qz5pmLzPDLyGW4lG6JvTKPUfTFXwe+vOamIYWtnVU= @@ -287,8 +287,8 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1 github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.0.0-20200525081945-8e46705b6132 h1:NjznefjSrral0MiR4KlB41io/d3OklvhcgQUdfZTqJE= -github.com/nishanths/exhaustive v0.0.0-20200525081945-8e46705b6132/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= +github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856 h1:W3KBC2LFyfgd+wNudlfgCCsTo4q97MeNWrfz8/wSdSc= +github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= @@ -328,7 +328,7 @@ github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.1.0 h1:DWbye9KyMgytn8uYpuHkwf0RHqAYO6Ay/D0TbCpPtVU= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= @@ -338,6 +338,8 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/securego/gosec/v2 v2.3.0 h1:y/9mCF2WPDbSDpL3QDWZD3HHGrSYw0QSHnCqTfs4JPE= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= @@ -406,12 +408,13 @@ github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjP github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.12.0/go.mod h1:229t1eWu9UXTPmoUkbpN/fctKPBY4IJoFXQnxHGXy6E= -github.com/valyala/quicktemplate v1.5.0/go.mod h1:v7yYWpBEiutDyNfVaph6oC/yKwejzVyTX/2cwwHxyok= +github.com/valyala/quicktemplate v1.5.1/go.mod h1:v7yYWpBEiutDyNfVaph6oC/yKwejzVyTX/2cwwHxyok= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -424,6 +427,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -467,6 +471,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -476,6 +482,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -542,11 +549,11 @@ golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e h1:3Dzrrxi54Io7Aoyb0PYLsI47K2TxkRQg+cqUn+m04do= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200428185508-e9a00ec82136/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347 h1:/e4fNMHdLn7SQSxTrRZTma2xjQW6ELdxcnpqMhpo9X4= -golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1 h1:rD1FcWVsRaMY+l8biE9jbWP5MS/CJJ/90a9TMkMgNrM= +golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -607,8 +614,8 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -mvdan.cc/gofumpt v0.0.0-20200513141252-abc0db2c416a h1:TTEzidAa7rn93JGy1ACigx6o9VcsRLKG7qICdErmvUs= -mvdan.cc/gofumpt v0.0.0-20200513141252-abc0db2c416a/go.mod h1:4q/PlrZKQLU5MowSvCKM3U4xJUPtJ8vKWx7vsWFJ3MI= +mvdan.cc/gofumpt v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE= +mvdan.cc/gofumpt v0.0.0-20200709182408-4fd085cb6d5f/go.mod h1:9VQ397fNXEnF84t90W4r4TRCQK+pg9f8ugVfyj+S26w= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= From c8b657eb6ce7d15d4e7fb7825c240c85fceadc60 Mon Sep 17 00:00:00 2001 From: alrex Date: Tue, 21 Jul 2020 11:18:15 -0700 Subject: [PATCH 10/60] use global handler for span export err in otlp (#946) Currently there is no way to report errors using the global handlers for spans in the OTLP exporter, this change fixes that. Errors for the metrics exporter are already handled by the global handler. Co-authored-by: Liz Fong-Jones --- exporters/otlp/otlp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exporters/otlp/otlp.go b/exporters/otlp/otlp.go index 9bd48919c1c..bde99d527b5 100644 --- a/exporters/otlp/otlp.go +++ b/exporters/otlp/otlp.go @@ -28,6 +28,7 @@ import ( colmetricpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1" coltracepb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1" + "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/exporters/otlp/internal/transform" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" @@ -301,6 +302,7 @@ func (e *Exporter) uploadTraces(ctx context.Context, sdl []*tracesdk.SpanData) { e.senderMu.Unlock() if err != nil { e.setStateDisconnected(err) + global.Handle(err) } } } From c5d77d234cf2e28cd72e46ec5621b3827071b1b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:03:41 -0400 Subject: [PATCH 11/60] Bump github.com/google/go-cmp from 0.5.0 to 0.5.1 (#957) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- example/basic/go.sum | 4 ++-- example/grpc/go.sum | 4 ++-- example/http/go.sum | 4 ++-- example/jaeger/go.sum | 4 ++-- example/namedtracer/go.sum | 4 ++-- example/otel-collector/go.sum | 4 ++-- example/prometheus/go.sum | 4 ++-- example/zipkin/go.sum | 4 ++-- exporters/metric/prometheus/go.sum | 4 ++-- exporters/otlp/go.mod | 2 +- exporters/otlp/go.sum | 4 ++-- exporters/trace/jaeger/go.mod | 2 +- exporters/trace/jaeger/go.sum | 4 ++-- exporters/trace/zipkin/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 16 files changed, 29 insertions(+), 29 deletions(-) diff --git a/example/basic/go.sum b/example/basic/go.sum index 2279c3ed7dc..4a27418c706 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= diff --git a/example/grpc/go.sum b/example/grpc/go.sum index 7b8e2e57cf0..bb8f6dd728b 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= diff --git a/example/http/go.sum b/example/http/go.sum index 2279c3ed7dc..4a27418c706 100644 --- a/example/http/go.sum +++ b/example/http/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index ed7d77cf143..fde764b9362 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -75,8 +75,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 2279c3ed7dc..4a27418c706 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 6444ee66c88..45060743a37 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index 1e7d06852c0..b06c03c6ef5 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -52,8 +52,8 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 2d8d3bf4327..37ac03e82a1 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -41,8 +41,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index 10c4aa7091b..721ea4f39b2 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -50,8 +50,8 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index 47b16b4360f..b6d744f49f8 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -4,7 +4,7 @@ replace go.opentelemetry.io/otel => ../.. require ( github.com/gogo/protobuf v1.3.1 - github.com/google/go-cmp v0.5.0 + github.com/google/go-cmp v0.5.1 github.com/kr/pretty v0.2.0 // indirect github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 07a3f0e900e..3f52ce4db88 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index 7f02d949f44..e7f22b92be2 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -6,7 +6,7 @@ replace go.opentelemetry.io/otel => ../../.. require ( github.com/apache/thrift v0.13.0 - github.com/google/go-cmp v0.5.0 + github.com/google/go-cmp v0.5.1 github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 google.golang.org/api v0.29.0 diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index ff758054e0c..a783dbfa3f1 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -79,8 +79,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 2d8d3bf4327..37ac03e82a1 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -41,8 +41,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= diff --git a/go.mod b/go.mod index 538101e7c46..4ddd086ad10 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/benbjohnson/clock v1.0.3 github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.4.2 - github.com/google/go-cmp v0.5.0 + github.com/google/go-cmp v0.5.1 github.com/google/gofuzz v1.0.0 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 diff --git a/go.sum b/go.sum index 5b4f22b8325..23a43ce10f5 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= From f31d8ec1d082a480cdaba3b553005f50412c63a0 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Wed, 22 Jul 2020 20:57:48 +0200 Subject: [PATCH 12/60] Unify trace and metric exporter helpers (#944) * Adjust Jaeger and Zipkin exporters helper methods * Update and add tests, examples, various minor improvements * Update changelog * Correct the Zipkin example - wait for the spans to be exported - rebuild the example * Zipkin service name as argument * Rework Jaeger and Zipkin tests * Include more detailed Changelog Co-authored-by: ET Co-authored-by: Liz Fong-Jones Co-authored-by: Tyler Yahn --- CHANGELOG.md | 5 + example/jaeger/main.go | 3 +- example/zipkin/main.go | 30 +- exporters/trace/jaeger/jaeger.go | 29 +- exporters/trace/jaeger/jaeger_test.go | 339 ++++++++++++------ exporters/trace/zipkin/doc.go | 16 + exporters/trace/zipkin/zipkin.go | 82 ++++- .../{exporter_test.go => zipkin_test.go} | 109 +++++- internal/testing/env.go | 2 +- 9 files changed, 452 insertions(+), 163 deletions(-) create mode 100644 exporters/trace/zipkin/doc.go rename exporters/trace/zipkin/{exporter_test.go => zipkin_test.go} (75%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c646ecf78b4..5199d48b670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Changed + +- Jaeger exporter helpers: added InstallNewPipeline and removed RegisterGlobal option instead. (#944) +- Zipkin exporter helpers: pipeline methods introduced, new exporter method adjusted. (#944) + ## [0.9.0] - 2020-07-20 ### Added diff --git a/example/jaeger/main.go b/example/jaeger/main.go index 7ef9e238933..e28592e0f60 100644 --- a/example/jaeger/main.go +++ b/example/jaeger/main.go @@ -30,7 +30,7 @@ import ( // initTracer creates a new trace provider instance and registers it as global trace provider. func initTracer() func() { // Create and install Jaeger export pipeline - _, flush, err := jaeger.NewExportPipeline( + flush, err := jaeger.InstallNewPipeline( jaeger.WithCollectorEndpoint("http://localhost:14268/api/traces"), jaeger.WithProcess(jaeger.Process{ ServiceName: "trace-demo", @@ -39,7 +39,6 @@ func initTracer() func() { kv.Float64("float", 312.23), }, }), - jaeger.RegisterAsGlobal(), jaeger.WithSDK(&sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), ) if err != nil { diff --git a/example/zipkin/main.go b/example/zipkin/main.go index 94e0e6e2958..ed85056d39f 100644 --- a/example/zipkin/main.go +++ b/example/zipkin/main.go @@ -33,30 +33,20 @@ var logger = log.New(os.Stderr, "zipkin-example", log.Ldate|log.Ltime|log.Llongf // initTracer creates a new trace provider instance and registers it as global trace provider. func initTracer(url string) { - // Create Zipkin Exporter - exporter, err := zipkin.NewExporter( - url, - "zipkin-example", - zipkin.WithLogger(logger), - ) - if err != nil { - log.Fatal(err) - } - + // Create Zipkin Exporter and install it as a global tracer. + // // For demoing purposes, always sample. In a production application, you should - // configure this to a trace.ProbabilitySampler set at the desired + // configure the sampler to a trace.ProbabilitySampler set at the desired // probability. - tp, err := sdktrace.NewProvider( - sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithBatcher(exporter, - sdktrace.WithBatchTimeout(5), - sdktrace.WithMaxExportBatchSize(10), - ), + err := zipkin.InstallNewPipeline( + url, + "zipkin-test", + zipkin.WithLogger(logger), + zipkin.WithSDK(&sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), ) if err != nil { log.Fatal(err) } - global.SetTraceProvider(tp) } func main() { @@ -73,7 +63,9 @@ func main() { bar(ctx) <-time.After(6 * time.Millisecond) span.End() - <-time.After(24 * time.Millisecond) + + // Wait for the spans to be exported. + <-time.After(5 * time.Second) } func bar(ctx context.Context) { diff --git a/exporters/trace/jaeger/jaeger.go b/exporters/trace/jaeger/jaeger.go index 778560f2eb8..9d9fd325ce2 100644 --- a/exporters/trace/jaeger/jaeger.go +++ b/exporters/trace/jaeger/jaeger.go @@ -47,10 +47,6 @@ type options struct { Config *sdktrace.Config - // RegisterGlobal is set to true if the trace provider of the new pipeline should be - // registered as Global Trace Provider - RegisterGlobal bool - Disabled bool } @@ -82,14 +78,8 @@ func WithSDK(config *sdktrace.Config) Option { } } -// RegisterAsGlobal enables the registration of the trace provider of the new pipeline -// as Global Trace Provider. -func RegisterAsGlobal() Option { - return func(o *options) { - o.RegisterGlobal = true - } -} - +// WithDisabled option will cause pipeline methods to use +// a no-op provider func WithDisabled(disabled bool) Option { return func(o *options) { o.Disabled = disabled @@ -177,13 +167,22 @@ func NewExportPipeline(endpointOption EndpointOption, opts ...Option) (apitrace. if exporter.o.Config != nil { tp.ApplyConfig(*exporter.o.Config) } - if exporter.o.RegisterGlobal { - global.SetTraceProvider(tp) - } return tp, exporter.Flush, nil } +// InstallNewPipeline instantiates a NewExportPipeline with the +// recommended configuration and registers it globally. +func InstallNewPipeline(endpointOption EndpointOption, opts ...Option) (func(), error) { + tp, flushFn, err := NewExportPipeline(endpointOption, opts...) + if err != nil { + return nil, err + } + + global.SetTraceProvider(tp) + return flushFn, nil +} + // Process contains the information exported to jaeger about the source // of the trace data. type Process struct { diff --git a/exporters/trace/jaeger/jaeger_test.go b/exporters/trace/jaeger/jaeger_test.go index 7f28a6c6fa1..df94e457444 100644 --- a/exporters/trace/jaeger/jaeger_test.go +++ b/exporters/trace/jaeger/jaeger_test.go @@ -26,10 +26,12 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/api/support/bundler" "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/api/trace" apitrace "go.opentelemetry.io/otel/api/trace" gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger" ottest "go.opentelemetry.io/otel/internal/testing" @@ -38,77 +40,251 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" ) -func TestNewExporterPipelineWithRegistration(t *testing.T) { - tp, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - RegisterAsGlobal(), - ) - defer fn() - assert.NoError(t, err) - assert.Same(t, tp, global.TraceProvider()) +const ( + collectorEndpoint = "http://localhost:14268/api/traces" + agentEndpoint = "localhost:6831" +) + +func TestInstallNewPipeline(t *testing.T) { + testCases := []struct { + name string + endpoint EndpointOption + options []Option + expectedProvider trace.Provider + }{ + { + name: "simple pipeline", + endpoint: WithCollectorEndpoint(collectorEndpoint), + expectedProvider: &sdktrace.Provider{}, + }, + { + name: "with agent endpoint", + endpoint: WithAgentEndpoint(agentEndpoint), + expectedProvider: &sdktrace.Provider{}, + }, + { + name: "with disabled", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithDisabled(true), + }, + expectedProvider: &apitrace.NoopProvider{}, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + fn, err := InstallNewPipeline( + tc.endpoint, + tc.options..., + ) + defer fn() + + assert.NoError(t, err) + assert.IsType(t, tc.expectedProvider, global.TraceProvider()) + + global.SetTraceProvider(nil) + }) + } } -func TestNewExporterPipelineWithoutRegistration(t *testing.T) { - tp, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - ) - defer fn() - assert.NoError(t, err) - assert.NotEqual(t, tp, global.TraceProvider()) +func TestNewExportPipeline(t *testing.T) { + testCases := []struct { + name string + endpoint EndpointOption + options []Option + expectedProviderType trace.Provider + testSpanSampling, spanShouldBeSampled bool + }{ + { + name: "simple pipeline", + endpoint: WithCollectorEndpoint(collectorEndpoint), + expectedProviderType: &sdktrace.Provider{}, + }, + { + name: "with disabled", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithDisabled(true), + }, + expectedProviderType: &apitrace.NoopProvider{}, + }, + { + name: "always on", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithSDK(&sdktrace.Config{ + DefaultSampler: sdktrace.AlwaysSample(), + }), + }, + expectedProviderType: &sdktrace.Provider{}, + testSpanSampling: true, + spanShouldBeSampled: true, + }, + { + name: "never", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithSDK(&sdktrace.Config{ + DefaultSampler: sdktrace.NeverSample(), + }), + }, + expectedProviderType: &sdktrace.Provider{}, + testSpanSampling: true, + spanShouldBeSampled: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + tp, fn, err := NewExportPipeline( + tc.endpoint, + tc.options..., + ) + defer fn() + + assert.NoError(t, err) + assert.NotEqual(t, tp, global.TraceProvider()) + assert.IsType(t, tc.expectedProviderType, tp) + + if tc.testSpanSampling { + _, span := tp.Tracer("jaeger test").Start(context.Background(), tc.name) + spanCtx := span.SpanContext() + assert.Equal(t, tc.spanShouldBeSampled, spanCtx.IsSampled()) + span.End() + } + }) + } } -func TestNewExporterPipelineWithSDK(t *testing.T) { - tp, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - WithSDK(&sdktrace.Config{ - DefaultSampler: sdktrace.AlwaysSample(), - }), - ) - defer fn() - assert.NoError(t, err) - _, span := tp.Tracer("jaeger test").Start(context.Background(), "always-on") - spanCtx := span.SpanContext() - assert.True(t, spanCtx.IsSampled()) - span.End() +func TestNewExportPipelineWithDisabledFromEnv(t *testing.T) { + envStore, err := ottest.SetEnvVariables(map[string]string{ + envDisabled: "true", + }) + require.NoError(t, err) + envStore.Record(envDisabled) + defer func() { + require.NoError(t, envStore.Restore()) + }() - tp2, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - WithSDK(&sdktrace.Config{ - DefaultSampler: sdktrace.NeverSample(), - }), + tp, fn, err := NewExportPipeline( + WithCollectorEndpoint(collectorEndpoint), ) defer fn() assert.NoError(t, err) - _, span2 := tp2.Tracer("jaeger test").Start(context.Background(), "never") - span2Ctx := span2.SpanContext() - assert.False(t, span2Ctx.IsSampled()) - span2.End() + assert.IsType(t, &apitrace.NoopProvider{}, tp) } func TestNewRawExporter(t *testing.T) { - const ( - collectorEndpoint = "http://localhost" - serviceName = "test-service" - tagKey = "key" - tagVal = "val" - ) - // Create Jaeger Exporter - exp, err := NewRawExporter( - WithCollectorEndpoint(collectorEndpoint), - WithProcess(Process{ - ServiceName: serviceName, - Tags: []kv.KeyValue{ - kv.String(tagKey, tagVal), + testCases := []struct { + name string + endpoint EndpointOption + options []Option + expectedServiceName string + expectedTagsLen, expectedBufferMaxCount, expectedBatchMaxCount int + }{ + { + name: "default exporter", + endpoint: WithCollectorEndpoint(collectorEndpoint), + expectedServiceName: defaultServiceName, + expectedBufferMaxCount: bundler.DefaultBufferedByteLimit, + expectedBatchMaxCount: bundler.DefaultBundleCountThreshold, + }, + { + name: "default exporter with agent endpoint", + endpoint: WithAgentEndpoint(agentEndpoint), + expectedServiceName: defaultServiceName, + expectedBufferMaxCount: bundler.DefaultBufferedByteLimit, + expectedBatchMaxCount: bundler.DefaultBundleCountThreshold, + }, + { + name: "with process", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithProcess( + Process{ + ServiceName: "jaeger-test", + Tags: []kv.KeyValue{ + kv.String("key", "val"), + }, + }, + ), }, - }), - ) + expectedServiceName: "jaeger-test", + expectedTagsLen: 1, + expectedBufferMaxCount: bundler.DefaultBufferedByteLimit, + expectedBatchMaxCount: bundler.DefaultBundleCountThreshold, + }, + { + name: "with buffer and batch max count", + endpoint: WithCollectorEndpoint(collectorEndpoint), + options: []Option{ + WithProcess( + Process{ + ServiceName: "jaeger-test", + }, + ), + WithBufferMaxCount(99), + WithBatchMaxCount(99), + }, + expectedServiceName: "jaeger-test", + expectedBufferMaxCount: 99, + expectedBatchMaxCount: 99, + }, + } - assert.NoError(t, err) - assert.EqualValues(t, serviceName, exp.process.ServiceName) - assert.Len(t, exp.process.Tags, 1) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + exp, err := NewRawExporter( + tc.endpoint, + tc.options..., + ) + + assert.NoError(t, err) + assert.Equal(t, tc.expectedServiceName, exp.process.ServiceName) + assert.Len(t, exp.process.Tags, tc.expectedTagsLen) + assert.Equal(t, tc.expectedBufferMaxCount, exp.bundler.BufferedByteLimit) + assert.Equal(t, tc.expectedBatchMaxCount, exp.bundler.BundleCountThreshold) + }) + } } -func TestNewRawExporterShouldFailIfCollectorEndpointEmpty(t *testing.T) { +func TestNewRawExporterShouldFail(t *testing.T) { + testCases := []struct { + name string + endpoint EndpointOption + expectedErrMsg string + }{ + { + name: "with empty collector endpoint", + endpoint: WithCollectorEndpoint(""), + expectedErrMsg: "collectorEndpoint must not be empty", + }, + { + name: "with empty agent endpoint", + endpoint: WithAgentEndpoint(""), + expectedErrMsg: "agentEndpoint must not be empty", + }, + { + name: "with invalid agent endpoint", + endpoint: WithAgentEndpoint("localhost"), + expectedErrMsg: "address localhost: missing port in address", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := NewRawExporter( + tc.endpoint, + ) + + assert.Error(t, err) + assert.EqualError(t, err, tc.expectedErrMsg) + }) + } +} + +func TestNewRawExporterShouldFailIfCollectorUnset(t *testing.T) { // Record and restore env envStore := ottest.NewEnvStore() envStore.Record(envEndpoint) @@ -179,29 +355,6 @@ func TestExporter_ExportSpan(t *testing.T) { assert.True(t, len(tc.spansUploaded) == 1) } -func TestNewRawExporterWithAgentEndpoint(t *testing.T) { - const agentEndpoint = "localhost:6831" - // Create Jaeger Exporter - _, err := NewRawExporter( - WithAgentEndpoint(agentEndpoint), - ) - assert.NoError(t, err) -} - -func TestNewRawExporterWithAgentShouldFailIfEndpointInvalid(t *testing.T) { - //empty - _, err := NewRawExporter( - WithAgentEndpoint(""), - ) - assert.Error(t, err) - - //invalid endpoint addr - _, err = NewRawExporter( - WithAgentEndpoint("http://localhost"), - ) - assert.Error(t, err) -} - func Test_spanDataToThrift(t *testing.T) { now := time.Now() traceID, _ := apitrace.IDFromHex("0102030405060708090a0b0c0d0e0f10") @@ -319,31 +472,3 @@ func Test_spanDataToThrift(t *testing.T) { }) } } - -func TestNewExporterPipelineWithDisabled(t *testing.T) { - tp, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - WithDisabled(true), - ) - defer fn() - assert.NoError(t, err) - assert.IsType(t, &apitrace.NoopProvider{}, tp) -} - -func TestNewExporterPipelineWithDisabledFromEnv(t *testing.T) { - envStore, err := ottest.SetEnvVariables(map[string]string{ - envDisabled: "true", - }) - require.NoError(t, err) - envStore.Record(envDisabled) - defer func() { - require.NoError(t, envStore.Restore()) - }() - - tp, fn, err := NewExportPipeline( - WithCollectorEndpoint("http://localhost:14268/api/traces"), - ) - defer fn() - assert.NoError(t, err) - assert.IsType(t, &apitrace.NoopProvider{}, tp) -} diff --git a/exporters/trace/zipkin/doc.go b/exporters/trace/zipkin/doc.go new file mode 100644 index 00000000000..fb6d363d6be --- /dev/null +++ b/exporters/trace/zipkin/doc.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package zipkin contains an OpenTelemetry tracing exporter for Zipkin. +package zipkin // import "go.opentelemetry.io/otel/exporters/trace/zipkin" diff --git a/exporters/trace/zipkin/zipkin.go b/exporters/trace/zipkin/zipkin.go index a356e5e70b6..7c16d61b5bc 100644 --- a/exporters/trace/zipkin/zipkin.go +++ b/exporters/trace/zipkin/zipkin.go @@ -18,13 +18,16 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io/ioutil" "log" "net/http" "net/url" + "go.opentelemetry.io/otel/api/global" export "go.opentelemetry.io/otel/sdk/export/trace" + sdktrace "go.opentelemetry.io/otel/sdk/trace" ) // Exporter exports SpanData to the zipkin collector. It implements @@ -35,6 +38,7 @@ type Exporter struct { serviceName string client *http.Client logger *log.Logger + o options } var ( @@ -42,51 +46,97 @@ var ( ) // Options contains configuration for the exporter. -type Options struct { +type options struct { client *http.Client logger *log.Logger + config *sdktrace.Config } // Option defines a function that configures the exporter. -type Option func(*Options) +type Option func(*options) // WithLogger configures the exporter to use the passed logger. func WithLogger(logger *log.Logger) Option { - return func(opts *Options) { + return func(opts *options) { opts.logger = logger } } // WithClient configures the exporter to use the passed HTTP client. func WithClient(client *http.Client) Option { - return func(opts *Options) { + return func(opts *options) { opts.client = client } } -// NewExporter creates a new zipkin exporter. -func NewExporter(collectorURL string, serviceName string, os ...Option) (*Exporter, error) { - if _, err := url.Parse(collectorURL); err != nil { +// WithSDK sets the SDK config for the exporter pipeline. +func WithSDK(config *sdktrace.Config) Option { + return func(o *options) { + o.config = config + } +} + +// NewRawExporter creates a new Zipkin exporter. +func NewRawExporter(collectorURL, serviceName string, opts ...Option) (*Exporter, error) { + if collectorURL == "" { + return nil, errors.New("collector URL cannot be empty") + } + u, err := url.Parse(collectorURL) + if err != nil { return nil, fmt.Errorf("invalid collector URL: %v", err) } - if serviceName == "" { - return nil, fmt.Errorf("service name must be non-empty string") + if u.Scheme == "" || u.Host == "" { + return nil, errors.New("invalid collector URL") } - opts := Options{} - for _, o := range os { - o(&opts) + + o := options{} + for _, opt := range opts { + opt(&o) } - if opts.client == nil { - opts.client = http.DefaultClient + if o.client == nil { + o.client = http.DefaultClient } return &Exporter{ url: collectorURL, - client: opts.client, - logger: opts.logger, + client: o.client, + logger: o.logger, serviceName: serviceName, + o: o, }, nil } +// NewExportPipeline sets up a complete export pipeline +// with the recommended setup for trace provider +func NewExportPipeline(collectorURL, serviceName string, opts ...Option) (*sdktrace.Provider, error) { + exp, err := NewRawExporter(collectorURL, serviceName, opts...) + if err != nil { + return nil, err + } + + batcher := sdktrace.WithBatcher(exp) + tp, err := sdktrace.NewProvider(batcher) + if err != nil { + return nil, err + } + if exp.o.config != nil { + tp.ApplyConfig(*exp.o.config) + } + + return tp, err +} + +// InstallNewPipeline instantiates a NewExportPipeline with the +// recommended configuration and registers it globally. +func InstallNewPipeline(collectorURL, serviceName string, opts ...Option) error { + tp, err := NewExportPipeline(collectorURL, serviceName, opts...) + if err != nil { + return err + } + + global.SetTraceProvider(tp) + return nil +} + // ExportSpans is a part of an implementation of the SpanBatcher // interface. func (e *Exporter) ExportSpans(ctx context.Context, batch []*export.SpanData) { diff --git a/exporters/trace/zipkin/exporter_test.go b/exporters/trace/zipkin/zipkin_test.go similarity index 75% rename from exporters/trace/zipkin/exporter_test.go rename to exporters/trace/zipkin/zipkin_test.go index 7665b020ab7..c77f633b89d 100644 --- a/exporters/trace/zipkin/exporter_test.go +++ b/exporters/trace/zipkin/zipkin_test.go @@ -27,13 +27,118 @@ import ( "time" zkmodel "github.com/openzipkin/zipkin-go/model" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" + "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/trace" export "go.opentelemetry.io/otel/sdk/export/trace" + sdktrace "go.opentelemetry.io/otel/sdk/trace" ) +const ( + collectorURL = "http://localhost:9411/api/v2/spans" + serviceName = "zipkin-test" +) + +func TestInstallNewPipeline(t *testing.T) { + err := InstallNewPipeline( + collectorURL, + serviceName, + ) + assert.NoError(t, err) + assert.IsType(t, &sdktrace.Provider{}, global.TraceProvider()) +} + +func TestNewExportPipeline(t *testing.T) { + testCases := []struct { + name string + options []Option + testSpanSampling, spanShouldBeSampled bool + }{ + { + name: "simple pipeline", + }, + { + name: "always on", + options: []Option{ + WithSDK(&sdktrace.Config{ + DefaultSampler: sdktrace.AlwaysSample(), + }), + }, + testSpanSampling: true, + spanShouldBeSampled: true, + }, + { + name: "never", + options: []Option{ + WithSDK(&sdktrace.Config{ + DefaultSampler: sdktrace.NeverSample(), + }), + }, + testSpanSampling: true, + spanShouldBeSampled: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + tp, err := NewExportPipeline( + collectorURL, + serviceName, + tc.options..., + ) + assert.NoError(t, err) + assert.NotEqual(t, tp, global.TraceProvider()) + + if tc.testSpanSampling { + _, span := tp.Tracer("zipkin test").Start(context.Background(), tc.name) + spanCtx := span.SpanContext() + assert.Equal(t, tc.spanShouldBeSampled, spanCtx.IsSampled()) + span.End() + } + }) + } +} + +func TestNewRawExporter(t *testing.T) { + exp, err := NewRawExporter( + collectorURL, + serviceName, + ) + + assert.NoError(t, err) + assert.EqualValues(t, serviceName, exp.serviceName) +} + +func TestNewRawExporterShouldFailInvalidCollectorURL(t *testing.T) { + var ( + exp *Exporter + err error + ) + + // cannot be empty + exp, err = NewRawExporter( + "", + serviceName, + ) + + assert.Error(t, err) + assert.EqualError(t, err, "collector URL cannot be empty") + assert.Nil(t, exp) + + // invalid URL + exp, err = NewRawExporter( + "localhost", + serviceName, + ) + + assert.Error(t, err) + assert.EqualError(t, err, "invalid collector URL") + assert.Nil(t, exp) +} + type mockZipkinCollector struct { t *testing.T url string @@ -230,9 +335,7 @@ func TestExportSpans(t *testing.T) { defer collector.Close() ls := &logStore{T: t} logger := logStoreLogger(ls) - _, err := NewExporter(collector.url, "", WithLogger(logger)) - require.Error(t, err, "service name must be non-empty string") - exporter, err := NewExporter(collector.url, "exporter-test", WithLogger(logger)) + exporter, err := NewRawExporter(collector.url, "exporter-test", WithLogger(logger)) require.NoError(t, err) ctx := context.Background() require.Len(t, ls.Messages, 0) diff --git a/internal/testing/env.go b/internal/testing/env.go index db481ae1cba..d8458c644d7 100644 --- a/internal/testing/env.go +++ b/internal/testing/env.go @@ -29,7 +29,7 @@ type EnvStore interface { // Records the environment variable into the store. Record(key string) - // Restore recover the environment variables in the store. + // Restore recovers the environment variables in the store. Restore() error } From 452256cbf419c51b3cec0bdf64c0cff64980e9f4 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Jul 2020 12:34:44 -0700 Subject: [PATCH 13/60] Unify trace and metric stdout exporters (#956) * Consolidate stdout exporter * Move config to own file and match project standard * Abstract Exporter into unified struct * Rename trace part of the exporter * Update import paths and configuration * Update tests * Update InstallNewPipeline to not return traceProvider It is a registered global, access it that way. * Update example_test * Update docs * Update example to be for whole package * Update metric output Closer match the span output. * Clean up span output Print as a batch and cleanup marshaling. * Correct spelling error in doc * Add Exporters README * Update Changelog * Propagate changes to rest of project * Lint fixes * Fix example test in metric SDK * Add disable config options for trace and metric Co-authored-by: Liz Fong-Jones --- CHANGELOG.md | 1 + README.md | 16 +- api/global/internal/meter_test.go | 22 +- example/basic/main.go | 44 +-- example/grpc/config/config.go | 4 +- example/http/client/client.go | 4 +- example/http/server/server.go | 4 +- example/namedtracer/main.go | 4 +- exporters/README.md | 18 ++ exporters/metric/stdout/example_test.go | 60 ---- exporters/metric/stdout/stdout.go | 280 ------------------ exporters/stdout/config.go | 175 +++++++++++ exporters/{trace => }/stdout/doc.go | 5 +- exporters/stdout/example_test.go | 91 ++++++ exporters/stdout/exporter.go | 94 ++++++ exporters/stdout/metric.go | 186 ++++++++++++ .../stdout_test.go => stdout/metric_test.go} | 124 ++++---- exporters/stdout/trace.go | 58 ++++ .../stdout_test.go => stdout/trace_test.go} | 9 +- exporters/trace/stdout/stdout.go | 68 ----- .../othttp/handler_example_test.go | 30 +- sdk/metric/example_test.go | 42 +-- 22 files changed, 746 insertions(+), 593 deletions(-) create mode 100644 exporters/README.md delete mode 100644 exporters/metric/stdout/example_test.go delete mode 100644 exporters/metric/stdout/stdout.go create mode 100644 exporters/stdout/config.go rename exporters/{trace => }/stdout/doc.go (73%) create mode 100644 exporters/stdout/example_test.go create mode 100644 exporters/stdout/exporter.go create mode 100644 exporters/stdout/metric.go rename exporters/{metric/stdout/stdout_test.go => stdout/metric_test.go} (77%) create mode 100644 exporters/stdout/trace.go rename exporters/{trace/stdout/stdout_test.go => stdout/trace_test.go} (95%) delete mode 100644 exporters/trace/stdout/stdout.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 5199d48b670..cfa84e16d2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Jaeger exporter helpers: added InstallNewPipeline and removed RegisterGlobal option instead. (#944) - Zipkin exporter helpers: pipeline methods introduced, new exporter method adjusted. (#944) +- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. (#956) ## [0.9.0] - 2020-07-20 diff --git a/README.md b/README.md index 431fce88a46..3604be53db9 100644 --- a/README.md +++ b/README.md @@ -38,25 +38,17 @@ import ( "log" "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) -func initTracer() { - exporter, err := stdout.NewExporter(stdout.Options{PrettyPrint: true}) - if err != nil { - log.Fatal(err) - } - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithSyncer(exporter)) +func main() { + pusher, err := stdout.InstallNewPipeline(nil, nil) if err != nil { log.Fatal(err) } - global.SetTraceProvider(tp) -} + defer pusher.Stop() -func main() { - initTracer() tracer := global.Tracer("ex.com/basic") tracer.WithSpan(context.Background(), "foo", diff --git a/api/global/internal/meter_test.go b/api/global/internal/meter_test.go index ca47b464972..5413ac25fbe 100644 --- a/api/global/internal/meter_test.go +++ b/api/global/internal/meter_test.go @@ -30,7 +30,7 @@ import ( "go.opentelemetry.io/otel/api/global/internal" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/stdout" + "go.opentelemetry.io/otel/exporters/stdout" metrictest "go.opentelemetry.io/otel/internal/metric" ) @@ -243,10 +243,10 @@ func TestDefaultSDK(t *testing.T) { counter.Add(ctx, 1, labels1...) in, out := io.Pipe() - pusher, err := stdout.InstallNewPipeline(stdout.Config{ - Writer: out, - DoNotPrintTime: true, - }) + pusher, err := stdout.InstallNewPipeline([]stdout.Option{ + stdout.WithWriter(out), + stdout.WithoutTimestamps(), + }, nil) if err != nil { panic(err) } @@ -262,7 +262,7 @@ func TestDefaultSDK(t *testing.T) { pusher.Stop() out.Close() - require.Equal(t, `{"updates":[{"name":"test.builtin{instrumentation.name=builtin,A=B}","sum":1}]} + require.Equal(t, `[{"Name":"test.builtin{instrumentation.name=builtin,A=B}","Sum":1}] `, <-ch) } @@ -408,10 +408,10 @@ func TestRecordBatchRealSDK(t *testing.T) { var buf bytes.Buffer - pusher, err := stdout.InstallNewPipeline(stdout.Config{ - Writer: &buf, - DoNotPrintTime: true, - }) + pusher, err := stdout.InstallNewPipeline([]stdout.Option{ + stdout.WithWriter(&buf), + stdout.WithoutTimestamps(), + }, nil) if err != nil { t.Fatal(err) } @@ -420,6 +420,6 @@ func TestRecordBatchRealSDK(t *testing.T) { meter.RecordBatch(context.Background(), nil, counter.Measurement(1)) pusher.Stop() - require.Equal(t, `{"updates":[{"name":"test.counter{instrumentation.name=builtin}","sum":1}]} + require.Equal(t, `[{"Name":"test.counter{instrumentation.name=builtin}","Sum":1}] `, buf.String()) } diff --git a/example/basic/main.go b/example/basic/main.go index 91135004978..90dc59466cd 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -23,11 +23,7 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/api/trace" - metricstdout "go.opentelemetry.io/otel/exporters/metric/stdout" - tracestdout "go.opentelemetry.io/otel/exporters/trace/stdout" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/resource" - sdktrace "go.opentelemetry.io/otel/sdk/trace" + "go.opentelemetry.io/otel/exporters/stdout" ) var ( @@ -37,37 +33,15 @@ var ( anotherKey = kv.Key("ex.com/another") ) -// initTracer creates and registers trace provider instance. -func initTracer() { - var err error - exp, err := tracestdout.NewExporter(tracestdout.Options{PrettyPrint: false}) - if err != nil { - log.Panicf("failed to initialize trace stdout exporter %v", err) - return - } - tp, err := sdktrace.NewProvider(sdktrace.WithSyncer(exp), - sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithResource(resource.New(kv.String("rk1", "rv11"), kv.Int64("rk2", 5)))) - if err != nil { - log.Panicf("failed to initialize trace provider %v", err) - } - global.SetTraceProvider(tp) -} - -func initMeter() *push.Controller { - pusher, err := metricstdout.InstallNewPipeline(metricstdout.Config{ - Quantiles: []float64{0.5, 0.9, 0.99}, - PrettyPrint: false, - }) +func main() { + pusher, err := stdout.InstallNewPipeline([]stdout.Option{ + stdout.WithQuantiles([]float64{0.5, 0.9, 0.99}), + stdout.WithPrettyPrint(), + }, nil) if err != nil { - log.Panicf("failed to initialize metric stdout exporter %v", err) + log.Fatalf("failed to initialize stdout export pipeline: %v", err) } - return pusher -} - -func main() { - defer initMeter().Stop() - initTracer() + defer pusher.Stop() tracer := global.Tracer("ex.com/basic") meter := global.Meter("ex.com/basic") @@ -93,7 +67,7 @@ func main() { valuerecorder := valuerecorderTwo.Bind(commonLabels...) defer valuerecorder.Unbind() - err := tracer.WithSpan(ctx, "operation", func(ctx context.Context) error { + err = tracer.WithSpan(ctx, "operation", func(ctx context.Context) error { trace.SpanFromContext(ctx).AddEvent(ctx, "Nice operation!", kv.Key("bogons").Int(100)) diff --git a/example/grpc/config/config.go b/example/grpc/config/config.go index f15b5b6db07..9c1034e7ebf 100644 --- a/example/grpc/config/config.go +++ b/example/grpc/config/config.go @@ -18,13 +18,13 @@ import ( "log" "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) // Init configures an OpenTelemetry exporter and trace provider func Init() { - exporter, err := stdout.NewExporter(stdout.Options{PrettyPrint: true}) + exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } diff --git a/example/http/client/client.go b/example/http/client/client.go index d63ea9579ac..2a4529bb38a 100644 --- a/example/http/client/client.go +++ b/example/http/client/client.go @@ -30,7 +30,7 @@ import ( "go.opentelemetry.io/otel/api/correlation" "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" "go.opentelemetry.io/otel/instrumentation/httptrace" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) @@ -38,7 +38,7 @@ import ( func initTracer() { // Create stdout exporter to be able to retrieve // the collected spans. - exporter, err := stdout.NewExporter(stdout.Options{PrettyPrint: true}) + exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } diff --git a/example/http/server/server.go b/example/http/server/server.go index b6944d5f3bb..d3543818881 100644 --- a/example/http/server/server.go +++ b/example/http/server/server.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" "go.opentelemetry.io/otel/instrumentation/httptrace" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" @@ -32,7 +32,7 @@ import ( func initTracer() { // Create stdout exporter to be able to retrieve // the collected spans. - exporter, err := stdout.NewExporter(stdout.Options{PrettyPrint: true}) + exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } diff --git a/example/namedtracer/main.go b/example/namedtracer/main.go index f0aae45ad75..a98abefc04b 100644 --- a/example/namedtracer/main.go +++ b/example/namedtracer/main.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/trace" "go.opentelemetry.io/otel/example/namedtracer/foo" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) @@ -39,7 +39,7 @@ var tp *sdktrace.Provider // initTracer creates and registers trace provider instance. func initTracer() { var err error - exp, err := stdout.NewExporter(stdout.Options{}) + exp, err := stdout.NewExporter(stdout.WithPrettyPrint()) if err != nil { log.Panicf("failed to initialize stdout exporter %v\n", err) return diff --git a/exporters/README.md b/exporters/README.md new file mode 100644 index 00000000000..13d52bbfe8a --- /dev/null +++ b/exporters/README.md @@ -0,0 +1,18 @@ +# Exporters + +Included in this directory are exporters that export both metric and trace telemetry. + +- [stdout](./stdout): Writes telemetry to a specified local output as structured JSON. +- [otlp](./otlp): Sends telemetry to an OpenTelemetry collector as OTLP. + +Additionally, there are [metric](./metric) and [trace](./trace) only exporters. + +## Metric Telemetry Only + +- [prometheus](./metric/prometheus): Exposes metric telemetry as Prometheus metrics. +- [test](./metric/test): A development tool when testing the telemetry pipeline. + +## Trace Telemetry Only + +- [jaeger](./trace/jaeger): Sends properly transformed trace telemetry to a Jaeger endpoint. +- [zipkin](./trace/zipkin): Sends properly transformed trace telemetry to a Zipkin endpoint. diff --git a/exporters/metric/stdout/example_test.go b/exporters/metric/stdout/example_test.go deleted file mode 100644 index 60861cdc27d..00000000000 --- a/exporters/metric/stdout/example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package stdout_test - -import ( - "context" - "log" - - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/stdout" -) - -func ExampleNewExportPipeline() { - // Create a meter - pusher, err := stdout.NewExportPipeline(stdout.Config{ - PrettyPrint: true, - DoNotPrintTime: true, - }) - if err != nil { - log.Fatal("Could not initialize stdout exporter:", err) - } - defer pusher.Stop() - - ctx := context.Background() - - key := kv.Key("key") - meter := pusher.Provider().Meter( - "github.com/instrumentron", - metric.WithInstrumentationVersion("v0.1.0"), - ) - - // Create and update a single counter: - counter := metric.Must(meter).NewInt64Counter("a.counter") - labels := []kv.KeyValue{key.String("value")} - - counter.Add(ctx, 100, labels...) - - // Output: - // { - // "updates": [ - // { - // "name": "a.counter{instrumentation.name=github.com/instrumentron,instrumentation.version=v0.1.0,key=value}", - // "sum": 100 - // } - // ] - // } -} diff --git a/exporters/metric/stdout/stdout.go b/exporters/metric/stdout/stdout.go deleted file mode 100644 index 4ffadb021c2..00000000000 --- a/exporters/metric/stdout/stdout.go +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package stdout // import "go.opentelemetry.io/otel/exporters/metric/stdout" - -import ( - "context" - "encoding/json" - "fmt" - "io" - "os" - "strings" - "time" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/label" - "go.opentelemetry.io/otel/api/metric" - export "go.opentelemetry.io/otel/sdk/export/metric" - "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/controller/push" - "go.opentelemetry.io/otel/sdk/metric/selector/simple" -) - -type Exporter struct { - config Config -} - -var _ export.Exporter = &Exporter{} - -// Config is the configuration to be used when initializing a stdout export. -type Config struct { - // Writer is the destination. If not set, os.Stdout is used. - Writer io.Writer - - // PrettyPrint will pretty the json representation of the span, - // making it print "pretty". Default is false. - PrettyPrint bool - - // DoNotPrintTime suppresses timestamp printing. This is - // useful to create deterministic test conditions. - DoNotPrintTime bool - - // Quantiles are the desired aggregation quantiles for distribution - // summaries, used when the configured aggregator supports - // quantiles. - // - // Note: this exporter is meant as a demonstration; a real - // exporter may wish to configure quantiles on a per-metric - // basis. - Quantiles []float64 - - // LabelEncoder encodes the labels - LabelEncoder label.Encoder -} - -type expoBatch struct { - Timestamp *time.Time `json:"time,omitempty"` - Updates []expoLine `json:"updates"` -} - -type expoLine struct { - Name string `json:"name"` - Min interface{} `json:"min,omitempty"` - Max interface{} `json:"max,omitempty"` - Sum interface{} `json:"sum,omitempty"` - Count interface{} `json:"count,omitempty"` - LastValue interface{} `json:"last,omitempty"` - - Quantiles interface{} `json:"quantiles,omitempty"` - - // Note: this is a pointer because omitempty doesn't work when time.IsZero() - Timestamp *time.Time `json:"time,omitempty"` -} - -type expoQuantile struct { - Q interface{} `json:"q"` - V interface{} `json:"v"` -} - -// NewRawExporter creates a stdout Exporter for use in a pipeline. -func NewRawExporter(config Config) (*Exporter, error) { - if config.Writer == nil { - config.Writer = os.Stdout - } - if config.Quantiles == nil { - config.Quantiles = []float64{0.5, 0.9, 0.99} - } else { - for _, q := range config.Quantiles { - if q < 0 || q > 1 { - return nil, aggregation.ErrInvalidQuantile - } - } - } - if config.LabelEncoder == nil { - config.LabelEncoder = label.DefaultEncoder() - } - return &Exporter{ - config: config, - }, nil -} - -// InstallNewPipeline instantiates a NewExportPipeline and registers it globally. -// Typically called as: -// -// pipeline, err := stdout.InstallNewPipeline(stdout.Config{...}) -// if err != nil { -// ... -// } -// defer pipeline.Stop() -// ... Done -func InstallNewPipeline(config Config, options ...push.Option) (*push.Controller, error) { - controller, err := NewExportPipeline(config, options...) - if err != nil { - return controller, err - } - global.SetMeterProvider(controller.Provider()) - return controller, err -} - -// NewExportPipeline sets up a complete export pipeline with the -// recommended setup, chaining a NewRawExporter into the recommended -// selectors and processors. -func NewExportPipeline(config Config, options ...push.Option) (*push.Controller, error) { - exporter, err := NewRawExporter(config) - if err != nil { - return nil, err - } - pusher := push.New( - simple.NewWithExactDistribution(), - exporter, - options..., - ) - pusher.Start() - - return pusher, nil -} - -func (e *Exporter) ExportKindFor(*metric.Descriptor, aggregation.Kind) export.ExportKind { - return export.PassThroughExporter -} - -func (e *Exporter) Export(_ context.Context, checkpointSet export.CheckpointSet) error { - var aggError error - var batch expoBatch - if !e.config.DoNotPrintTime { - ts := time.Now() - batch.Timestamp = &ts - } - aggError = checkpointSet.ForEach(e, func(record export.Record) error { - desc := record.Descriptor() - agg := record.Aggregation() - kind := desc.NumberKind() - encodedResource := record.Resource().Encoded(e.config.LabelEncoder) - - var instLabels []kv.KeyValue - if name := desc.InstrumentationName(); name != "" { - instLabels = append(instLabels, kv.String("instrumentation.name", name)) - if version := desc.InstrumentationVersion(); version != "" { - instLabels = append(instLabels, kv.String("instrumentation.version", version)) - } - } - instSet := label.NewSet(instLabels...) - encodedInstLabels := instSet.Encoded(e.config.LabelEncoder) - - var expose expoLine - - if sum, ok := agg.(aggregation.Sum); ok { - value, err := sum.Sum() - if err != nil { - return err - } - expose.Sum = value.AsInterface(kind) - } - - if mmsc, ok := agg.(aggregation.MinMaxSumCount); ok { - count, err := mmsc.Count() - if err != nil { - return err - } - expose.Count = count - - max, err := mmsc.Max() - if err != nil { - return err - } - expose.Max = max.AsInterface(kind) - - min, err := mmsc.Min() - if err != nil { - return err - } - expose.Min = min.AsInterface(kind) - - if dist, ok := agg.(aggregation.Distribution); ok && len(e.config.Quantiles) != 0 { - summary := make([]expoQuantile, len(e.config.Quantiles)) - expose.Quantiles = summary - - for i, q := range e.config.Quantiles { - var vstr interface{} - value, err := dist.Quantile(q) - if err != nil { - return err - } - vstr = value.AsInterface(kind) - summary[i] = expoQuantile{ - Q: q, - V: vstr, - } - } - } - } else if lv, ok := agg.(aggregation.LastValue); ok { - value, timestamp, err := lv.LastValue() - if err != nil { - return err - } - expose.LastValue = value.AsInterface(kind) - - if !e.config.DoNotPrintTime { - expose.Timestamp = ×tamp - } - } - - var encodedLabels string - iter := record.Labels().Iter() - if iter.Len() > 0 { - encodedLabels = record.Labels().Encoded(e.config.LabelEncoder) - } - - var sb strings.Builder - - sb.WriteString(desc.Name()) - - if len(encodedLabels) > 0 || len(encodedResource) > 0 || len(encodedInstLabels) > 0 { - sb.WriteRune('{') - sb.WriteString(encodedResource) - if len(encodedInstLabels) > 0 && len(encodedResource) > 0 { - sb.WriteRune(',') - } - sb.WriteString(encodedInstLabels) - if len(encodedLabels) > 0 && (len(encodedInstLabels) > 0 || len(encodedResource) > 0) { - sb.WriteRune(',') - } - sb.WriteString(encodedLabels) - sb.WriteRune('}') - } - - expose.Name = sb.String() - - batch.Updates = append(batch.Updates, expose) - return nil - }) - - var data []byte - var err error - if e.config.PrettyPrint { - data, err = json.MarshalIndent(batch, "", "\t") - } else { - data, err = json.Marshal(batch) - } - - if err == nil { - fmt.Fprintln(e.config.Writer, string(data)) - } else { - return err - } - - return aggError -} diff --git a/exporters/stdout/config.go b/exporters/stdout/config.go new file mode 100644 index 00000000000..2255b560958 --- /dev/null +++ b/exporters/stdout/config.go @@ -0,0 +1,175 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stdout + +import ( + "io" + "os" + + "go.opentelemetry.io/otel/api/label" + "go.opentelemetry.io/otel/sdk/export/metric/aggregation" +) + +var ( + defaultWriter = os.Stdout + defaultPrettyPrint = false + defaultTimestamps = true + defaultQuantiles = []float64{0.5, 0.9, 0.99} + defaultLabelEncoder = label.DefaultEncoder() + defaultDisableTraceExport = false + defaultDisableMetricExport = false +) + +// Config contains options for the STDOUT exporter. +type Config struct { + // Writer is the destination. If not set, os.Stdout is used. + Writer io.Writer + + // PrettyPrint will encode the output into readable JSON. Default is + // false. + PrettyPrint bool + + // Timestamps specifies if timestamps should be pritted. Default is + // true. + Timestamps bool + + // Quantiles are the desired aggregation quantiles for distribution + // summaries, used when the configured aggregator supports + // quantiles. + // + // Note: this exporter is meant as a demonstration; a real + // exporter may wish to configure quantiles on a per-metric + // basis. + Quantiles []float64 + + // LabelEncoder encodes the labels. + LabelEncoder label.Encoder + + // DisableTraceExport prevents any export of trace telemetry. + DisableTraceExport bool + + // DisableMetricExport prevents any export of metric telemetry. + DisableMetricExport bool +} + +// Configure creates a validated Config configured with options. +func Configure(options ...Option) (Config, error) { + config := Config{ + Writer: defaultWriter, + PrettyPrint: defaultPrettyPrint, + Timestamps: defaultTimestamps, + Quantiles: defaultQuantiles, + LabelEncoder: defaultLabelEncoder, + DisableTraceExport: defaultDisableTraceExport, + DisableMetricExport: defaultDisableMetricExport, + } + for _, opt := range options { + opt.Apply(&config) + + } + for _, q := range config.Quantiles { + if q < 0 || q > 1 { + return config, aggregation.ErrInvalidQuantile + } + } + return config, nil +} + +// Option sets the value of an option for a Config. +type Option interface { + // Apply option value to Config. + Apply(*Config) +} + +// WithWriter sets the export stream destination. +func WithWriter(w io.Writer) Option { + return writerOption{w} +} + +type writerOption struct { + W io.Writer +} + +func (o writerOption) Apply(config *Config) { + config.Writer = o.W +} + +// WithPrettyPrint sets the export stream format to use JSON. +func WithPrettyPrint() Option { + return prettyPrintOption(true) +} + +type prettyPrintOption bool + +func (o prettyPrintOption) Apply(config *Config) { + config.PrettyPrint = bool(o) +} + +// WithoutTimestamps sets the export stream to not include timestamps. +func WithoutTimestamps() Option { + return timestampsOption(false) +} + +type timestampsOption bool + +func (o timestampsOption) Apply(config *Config) { + config.Timestamps = bool(o) +} + +// WithQuantiles sets the quantile values to export. +func WithQuantiles(quantiles []float64) Option { + return quantilesOption(quantiles) +} + +type quantilesOption []float64 + +func (o quantilesOption) Apply(config *Config) { + config.Quantiles = []float64(o) +} + +// WithLabelEncoder sets the label encoder used in export. +func WithLabelEncoder(enc label.Encoder) Option { + return labelEncoderOption{enc} +} + +type labelEncoderOption struct { + LabelEncoder label.Encoder +} + +func (o labelEncoderOption) Apply(config *Config) { + config.LabelEncoder = o.LabelEncoder +} + +// WithoutTraceExport disables all trace exporting. +func WithoutTraceExport() Option { + return disableTraceExportOption(true) +} + +type disableTraceExportOption bool + +func (o disableTraceExportOption) Apply(config *Config) { + config.DisableTraceExport = bool(o) +} + +// WithoutMetricExport disables all metric exporting. +func WithoutMetricExport() Option { + return disableMetricExportOption(true) +} + +type disableMetricExportOption bool + +func (o disableMetricExportOption) Apply(config *Config) { + config.DisableMetricExport = bool(o) +} diff --git a/exporters/trace/stdout/doc.go b/exporters/stdout/doc.go similarity index 73% rename from exporters/trace/stdout/doc.go rename to exporters/stdout/doc.go index d099942d88b..9f577c2e85b 100644 --- a/exporters/trace/stdout/doc.go +++ b/exporters/stdout/doc.go @@ -12,5 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package stdout contains an OpenTelemetry tracing exporter for writing to stdout. -package stdout // import "go.opentelemetry.io/otel/exporters/trace/stdout" +// Package stdout contains an OpenTelemetry exporter for both tracing and +// metric telemetry to be written to an output destination as JSON. +package stdout // import "go.opentelemetry.io/otel/exporters/stdout" diff --git a/exporters/stdout/example_test.go b/exporters/stdout/example_test.go new file mode 100644 index 00000000000..9ad8df6fab8 --- /dev/null +++ b/exporters/stdout/example_test.go @@ -0,0 +1,91 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stdout_test + +import ( + "context" + "log" + + "go.opentelemetry.io/otel/api/global" + "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/exporters/stdout" +) + +const ( + instrumentationName = "github.com/instrumentron" + instrumentationVersion = "v0.1.0" +) + +var ( + tracer = global.TraceProvider().Tracer( + instrumentationName, + trace.WithInstrumentationVersion(instrumentationVersion), + ) + + meter = global.MeterProvider().Meter( + instrumentationName, + metric.WithInstrumentationVersion(instrumentationVersion), + ) + + loopCounter = metric.Must(meter).NewInt64Counter("function.loops") + paramValue = metric.Must(meter).NewFloat64ValueRecorder("function.param") + + nameKey = kv.Key("function.name") +) + +func myFunction(ctx context.Context, values ...float64) error { + nameKV := nameKey.String("myFunction") + boundCount := loopCounter.Bind(nameKV) + boundValue := paramValue.Bind(nameKV) + for _, value := range values { + boundCount.Add(ctx, 1) + boundValue.Record(ctx, value) + } + return nil +} + +func Example() { + exportOpts := []stdout.Option{ + stdout.WithQuantiles([]float64{0.5}), + stdout.WithPrettyPrint(), + } + // Registers both a trace and meter Provider globally. + pusher, err := stdout.InstallNewPipeline(exportOpts, nil) + if err != nil { + log.Fatal("Could not initialize stdout exporter:", err) + } + defer pusher.Stop() + + err = tracer.WithSpan( + context.Background(), + "myFunction/call", + func(ctx context.Context) error { + err := tracer.WithSpan( + ctx, + "internal/call", + func(ctx context.Context) error { return myFunction(ctx, 200, 100, 5000, 600) }, + ) + if err != nil { + return err + } + return myFunction(ctx, 100, 200, 500, 800) + }, + ) + if err != nil { + log.Fatal("Failed to call myFunction", err) + } +} diff --git a/exporters/stdout/exporter.go b/exporters/stdout/exporter.go new file mode 100644 index 00000000000..f8555181370 --- /dev/null +++ b/exporters/stdout/exporter.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stdout + +import ( + "go.opentelemetry.io/otel/api/global" + apitrace "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/sdk/export/metric" + "go.opentelemetry.io/otel/sdk/export/trace" + "go.opentelemetry.io/otel/sdk/metric/controller/push" + "go.opentelemetry.io/otel/sdk/metric/selector/simple" + sdktrace "go.opentelemetry.io/otel/sdk/trace" +) + +type Exporter struct { + traceExporter + metricExporter +} + +var ( + _ metric.Exporter = &Exporter{} + _ trace.SpanSyncer = &Exporter{} + _ trace.SpanBatcher = &Exporter{} +) + +// NewExporter creates an Exporter with the passed options. +func NewExporter(options ...Option) (*Exporter, error) { + config, err := Configure(options...) + if err != nil { + return nil, err + } + return &Exporter{ + traceExporter: traceExporter{config}, + metricExporter: metricExporter{config}, + }, nil +} + +// NewExportPipeline creates a complete export pipeline with the default +// selectors, processors, and trace registration. It is the responsibility +// of the caller to stop the returned push Controller. +func NewExportPipeline(exportOpts []Option, pushOpts []push.Option) (apitrace.Provider, *push.Controller, error) { + exporter, err := NewExporter(exportOpts...) + if err != nil { + return nil, nil, err + } + + tp, err := sdktrace.NewProvider(sdktrace.WithSyncer(exporter)) + if err != nil { + return nil, nil, err + } + + pusher := push.New( + simple.NewWithExactDistribution(), + exporter, + pushOpts..., + ) + pusher.Start() + + return tp, pusher, nil +} + +// InstallNewPipeline creates a complete export pipelines with defaults and +// registers it globally. It is the responsibility of the caller to stop the +// returned push Controller. +// +// Typically this is called as: +// +// pipeline, err := stdout.InstallNewPipeline(stdout.Config{...}) +// if err != nil { +// ... +// } +// defer pipeline.Stop() +// ... Done +func InstallNewPipeline(exportOpts []Option, pushOpts []push.Option) (*push.Controller, error) { + traceProvider, controller, err := NewExportPipeline(exportOpts, pushOpts) + if err != nil { + return controller, err + } + global.SetTraceProvider(traceProvider) + global.SetMeterProvider(controller.Provider()) + return controller, err +} diff --git a/exporters/stdout/metric.go b/exporters/stdout/metric.go new file mode 100644 index 00000000000..a809809a0ae --- /dev/null +++ b/exporters/stdout/metric.go @@ -0,0 +1,186 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stdout + +import ( + "context" + "encoding/json" + "fmt" + "strings" + "time" + + "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/api/label" + apimetric "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/sdk/export/metric" + "go.opentelemetry.io/otel/sdk/export/metric/aggregation" +) + +type metricExporter struct { + config Config +} + +var _ metric.Exporter = &metricExporter{} + +type line struct { + Name string `json:"Name"` + Min interface{} `json:"Min,omitempty"` + Max interface{} `json:"Max,omitempty"` + Sum interface{} `json:"Sum,omitempty"` + Count interface{} `json:"Count,omitempty"` + LastValue interface{} `json:"Last,omitempty"` + + Quantiles []quantile `json:"Quantiles,omitempty"` + + // Note: this is a pointer because omitempty doesn't work when time.IsZero() + Timestamp *time.Time `json:"Timestamp,omitempty"` +} + +type quantile struct { + Quantile interface{} `json:"Quantile"` + Value interface{} `json:"Value"` +} + +func (e *metricExporter) ExportKindFor(*apimetric.Descriptor, aggregation.Kind) metric.ExportKind { + return metric.PassThroughExporter +} + +func (e *metricExporter) Export(_ context.Context, checkpointSet metric.CheckpointSet) error { + if e.config.DisableMetricExport { + return nil + } + var aggError error + var batch []line + aggError = checkpointSet.ForEach(e, func(record metric.Record) error { + desc := record.Descriptor() + agg := record.Aggregation() + kind := desc.NumberKind() + encodedResource := record.Resource().Encoded(e.config.LabelEncoder) + + var instLabels []kv.KeyValue + if name := desc.InstrumentationName(); name != "" { + instLabels = append(instLabels, kv.String("instrumentation.name", name)) + if version := desc.InstrumentationVersion(); version != "" { + instLabels = append(instLabels, kv.String("instrumentation.version", version)) + } + } + instSet := label.NewSet(instLabels...) + encodedInstLabels := instSet.Encoded(e.config.LabelEncoder) + + var expose line + + if sum, ok := agg.(aggregation.Sum); ok { + value, err := sum.Sum() + if err != nil { + return err + } + expose.Sum = value.AsInterface(kind) + } + + if mmsc, ok := agg.(aggregation.MinMaxSumCount); ok { + count, err := mmsc.Count() + if err != nil { + return err + } + expose.Count = count + + max, err := mmsc.Max() + if err != nil { + return err + } + expose.Max = max.AsInterface(kind) + + min, err := mmsc.Min() + if err != nil { + return err + } + expose.Min = min.AsInterface(kind) + + if dist, ok := agg.(aggregation.Distribution); ok && len(e.config.Quantiles) != 0 { + summary := make([]quantile, len(e.config.Quantiles)) + expose.Quantiles = summary + + for i, q := range e.config.Quantiles { + value, err := dist.Quantile(q) + if err != nil { + return err + } + summary[i] = quantile{ + Quantile: q, + Value: value.AsInterface(kind), + } + } + } + } else if lv, ok := agg.(aggregation.LastValue); ok { + value, timestamp, err := lv.LastValue() + if err != nil { + return err + } + expose.LastValue = value.AsInterface(kind) + + if e.config.Timestamps { + expose.Timestamp = ×tamp + } + } + + var encodedLabels string + iter := record.Labels().Iter() + if iter.Len() > 0 { + encodedLabels = record.Labels().Encoded(e.config.LabelEncoder) + } + + var sb strings.Builder + + sb.WriteString(desc.Name()) + + if len(encodedLabels) > 0 || len(encodedResource) > 0 || len(encodedInstLabels) > 0 { + sb.WriteRune('{') + sb.WriteString(encodedResource) + if len(encodedInstLabels) > 0 && len(encodedResource) > 0 { + sb.WriteRune(',') + } + sb.WriteString(encodedInstLabels) + if len(encodedLabels) > 0 && (len(encodedInstLabels) > 0 || len(encodedResource) > 0) { + sb.WriteRune(',') + } + sb.WriteString(encodedLabels) + sb.WriteRune('}') + } + + expose.Name = sb.String() + + batch = append(batch, expose) + return nil + }) + if len(batch) == 0 { + return aggError + } + + data, err := e.marshal(batch) + if err != nil { + return err + } + fmt.Fprintln(e.config.Writer, string(data)) + + return aggError +} + +// marshal v with approriate indentation. +func (e *metricExporter) marshal(v interface{}) ([]byte, error) { + if e.config.PrettyPrint { + return json.MarshalIndent(v, "", "\t") + } + return json.Marshal(v) +} diff --git a/exporters/metric/stdout/stdout_test.go b/exporters/stdout/metric_test.go similarity index 77% rename from exporters/metric/stdout/stdout_test.go rename to exporters/stdout/metric_test.go index 582b7dab0ba..16839ae5e08 100644 --- a/exporters/metric/stdout/stdout_test.go +++ b/exporters/stdout/metric_test.go @@ -23,12 +23,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/stdout" "go.opentelemetry.io/otel/exporters/metric/test" + "go.opentelemetry.io/otel/exporters/stdout" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" "go.opentelemetry.io/otel/sdk/metric/aggregator/array" @@ -49,11 +50,11 @@ type testFixture struct { var testResource = resource.New(kv.String("R", "V")) -func newFixture(t *testing.T, config stdout.Config) testFixture { +func newFixture(t *testing.T, opts ...stdout.Option) testFixture { buf := &bytes.Buffer{} - config.Writer = buf - config.DoNotPrintTime = true - exp, err := stdout.NewRawExporter(config) + opts = append(opts, stdout.WithWriter(buf)) + opts = append(opts, stdout.WithoutTimestamps()) + exp, err := stdout.NewExporter(opts...) if err != nil { t.Fatal("Error building fixture: ", err) } @@ -77,19 +78,18 @@ func (fix testFixture) Export(checkpointSet export.CheckpointSet) { } func TestStdoutInvalidQuantile(t *testing.T) { - _, err := stdout.NewRawExporter(stdout.Config{ - Quantiles: []float64{1.1, 0.9}, - }) + _, err := stdout.NewExporter( + stdout.WithQuantiles([]float64{1.1, 0.9}), + ) require.Error(t, err, "Invalid quantile error expected") require.Equal(t, aggregation.ErrInvalidQuantile, err) } func TestStdoutTimestamp(t *testing.T) { var buf bytes.Buffer - exporter, err := stdout.NewRawExporter(stdout.Config{ - Writer: &buf, - DoNotPrintTime: false, - }) + exporter, err := stdout.NewExporter( + stdout.WithWriter(&buf), + ) if err != nil { t.Fatal("Invalid config: ", err) } @@ -114,35 +114,27 @@ func TestStdoutTimestamp(t *testing.T) { after := time.Now() - var printed map[string]interface{} - + var printed []interface{} if err := json.Unmarshal(buf.Bytes(), &printed); err != nil { t.Fatal("JSON parse error: ", err) } - updateTS := printed["time"].(string) - updateTimestamp, err := time.Parse(time.RFC3339Nano, updateTS) - if err != nil { - t.Fatal("JSON parse error: ", updateTS, ": ", err) - } - - lastValueTS := printed["updates"].([]interface{})[0].(map[string]interface{})["time"].(string) + require.Len(t, printed, 1) + lastValue, ok := printed[0].(map[string]interface{}) + require.True(t, ok, "last value format") + require.Contains(t, lastValue, "Timestamp") + lastValueTS := lastValue["Timestamp"].(string) lastValueTimestamp, err := time.Parse(time.RFC3339Nano, lastValueTS) if err != nil { t.Fatal("JSON parse error: ", lastValueTS, ": ", err) } - require.True(t, updateTimestamp.After(before)) - require.True(t, updateTimestamp.Before(after)) - - require.True(t, lastValueTimestamp.After(before)) - require.True(t, lastValueTimestamp.Before(after)) - - require.True(t, lastValueTimestamp.Before(updateTimestamp)) + assert.True(t, lastValueTimestamp.After(before)) + assert.True(t, lastValueTimestamp.Before(after)) } func TestStdoutCounterFormat(t *testing.T) { - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(testResource) @@ -157,11 +149,11 @@ func TestStdoutCounterFormat(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":[{"name":"test.name{R=V,A=B,C=D}","sum":123}]}`, fix.Output()) + require.Equal(t, `[{"Name":"test.name{R=V,A=B,C=D}","Sum":123}]`, fix.Output()) } func TestStdoutLastValueFormat(t *testing.T) { - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(testResource) @@ -175,11 +167,11 @@ func TestStdoutLastValueFormat(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":[{"name":"test.name{R=V,A=B,C=D}","last":123.456}]}`, fix.Output()) + require.Equal(t, `[{"Name":"test.name{R=V,A=B,C=D}","Last":123.456}]`, fix.Output()) } func TestStdoutMinMaxSumCount(t *testing.T) { - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(testResource) @@ -195,13 +187,11 @@ func TestStdoutMinMaxSumCount(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":[{"name":"test.name{R=V,A=B,C=D}","min":123.456,"max":876.543,"sum":999.999,"count":2}]}`, fix.Output()) + require.Equal(t, `[{"Name":"test.name{R=V,A=B,C=D}","Min":123.456,"Max":876.543,"Sum":999.999,"Count":2}]`, fix.Output()) } func TestStdoutValueRecorderFormat(t *testing.T) { - fix := newFixture(t, stdout.Config{ - PrettyPrint: true, - }) + fix := newFixture(t, stdout.WithPrettyPrint()) checkpointSet := test.NewCheckpointSet(testResource) @@ -218,31 +208,29 @@ func TestStdoutValueRecorderFormat(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{ - "updates": [ - { - "name": "test.name{R=V,A=B,C=D}", - "min": 0.5, - "max": 999.5, - "sum": 500000, - "count": 1000, - "quantiles": [ - { - "q": 0.5, - "v": 500.5 - }, - { - "q": 0.9, - "v": 900.5 - }, - { - "q": 0.99, - "v": 990.5 - } - ] - } - ] -}`, fix.Output()) + require.Equal(t, `[ + { + "Name": "test.name{R=V,A=B,C=D}", + "Min": 0.5, + "Max": 999.5, + "Sum": 500000, + "Count": 1000, + "Quantiles": [ + { + "Quantile": 0.5, + "Value": 500.5 + }, + { + "Quantile": 0.9, + "Value": 900.5 + }, + { + "Quantile": 0.99, + "Value": 990.5 + } + ] + } +]`, fix.Output()) } func TestStdoutNoData(t *testing.T) { @@ -252,7 +240,7 @@ func TestStdoutNoData(t *testing.T) { t.Run(fmt.Sprintf("%T", agg), func(t *testing.T) { t.Parallel() - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(testResource) @@ -262,7 +250,7 @@ func TestStdoutNoData(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":null}`, fix.Output()) + require.Equal(t, "", fix.Output()) }) } @@ -271,7 +259,7 @@ func TestStdoutNoData(t *testing.T) { } func TestStdoutLastValueNotSet(t *testing.T) { - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(testResource) @@ -284,7 +272,7 @@ func TestStdoutLastValueNotSet(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":null}`, fix.Output()) + require.Equal(t, "", fix.Output()) } func TestStdoutResource(t *testing.T) { @@ -322,7 +310,7 @@ func TestStdoutResource(t *testing.T) { } for _, tc := range testCases { - fix := newFixture(t, stdout.Config{}) + fix := newFixture(t) checkpointSet := test.NewCheckpointSet(tc.res) @@ -336,6 +324,6 @@ func TestStdoutResource(t *testing.T) { fix.Export(checkpointSet) - require.Equal(t, `{"updates":[{"name":"test.name{`+tc.expect+`}","last":123.456}]}`, fix.Output()) + require.Equal(t, `[{"Name":"test.name{`+tc.expect+`}","Last":123.456}]`, fix.Output()) } } diff --git a/exporters/stdout/trace.go b/exporters/stdout/trace.go new file mode 100644 index 00000000000..af2d3bd81d9 --- /dev/null +++ b/exporters/stdout/trace.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package stdout + +import ( + "context" + "encoding/json" + "fmt" + + "go.opentelemetry.io/otel/sdk/export/trace" +) + +// Exporter is an implementation of trace.SpanSyncer that writes spans to stdout. +type traceExporter struct { + config Config +} + +// ExportSpan writes a SpanData in json format to stdout. +func (e *traceExporter) ExportSpan(ctx context.Context, data *trace.SpanData) { + if e.config.DisableTraceExport { + return + } + e.ExportSpans(ctx, []*trace.SpanData{data}) +} + +// ExportSpans writes SpanData in json format to stdout. +func (e *traceExporter) ExportSpans(ctx context.Context, data []*trace.SpanData) { + if e.config.DisableTraceExport || len(data) == 0 { + return + } + out, err := e.marshal(data) + if err != nil { + fmt.Fprintf(e.config.Writer, "error converting spanData to json: %v", err) + return + + } + fmt.Fprintln(e.config.Writer, string(out)) +} + +// marshal v with approriate indentation. +func (e *traceExporter) marshal(v interface{}) ([]byte, error) { + if e.config.PrettyPrint { + return json.MarshalIndent(v, "", "\t") + } + return json.Marshal(v) +} diff --git a/exporters/trace/stdout/stdout_test.go b/exporters/stdout/trace_test.go similarity index 95% rename from exporters/trace/stdout/stdout_test.go rename to exporters/stdout/trace_test.go index 3531bc2cce4..03078d25f33 100644 --- a/exporters/trace/stdout/stdout_test.go +++ b/exporters/stdout/trace_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package stdout +package stdout_test import ( "bytes" @@ -25,6 +25,7 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/exporters/stdout" export "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/resource" ) @@ -32,7 +33,7 @@ import ( func TestExporter_ExportSpan(t *testing.T) { // write to buffer for testing var b bytes.Buffer - ex, err := NewExporter(Options{Writer: &b}) + ex, err := stdout.NewExporter(stdout.WithWriter(&b)) if err != nil { t.Errorf("Error constructing stdout exporter %s", err) } @@ -71,7 +72,7 @@ func TestExporter_ExportSpan(t *testing.T) { expectedSerializedNow, _ := json.Marshal(now) got := b.String() - expectedOutput := `{"SpanContext":{` + + expectedOutput := `[{"SpanContext":{` + `"TraceID":"0102030405060708090a0b0c0d0e0f10",` + `"SpanID":"0102030405060708","TraceFlags":0},` + `"ParentSpanID":"0000000000000000",` + @@ -126,7 +127,7 @@ func TestExporter_ExportSpan(t *testing.T) { `"InstrumentationLibrary":{` + `"Name":"",` + `"Version":""` + - `}}` + "\n" + `}}]` + "\n" if got != expectedOutput { t.Errorf("Want: %v but got: %v", expectedOutput, got) diff --git a/exporters/trace/stdout/stdout.go b/exporters/trace/stdout/stdout.go deleted file mode 100644 index 29f3d0eff04..00000000000 --- a/exporters/trace/stdout/stdout.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package stdout - -import ( - "context" - "encoding/json" - "io" - "os" - - export "go.opentelemetry.io/otel/sdk/export/trace" -) - -// Options are the options to be used when initializing a stdout export. -type Options struct { - // Writer is the destination. If not set, os.Stdout is used. - Writer io.Writer - - // PrettyPrint will pretty the json representation of the span, - // making it print "pretty". Default is false. - PrettyPrint bool -} - -// Exporter is an implementation of trace.SpanSyncer that writes spans to stdout. -type Exporter struct { - pretty bool - outputWriter io.Writer -} - -func NewExporter(o Options) (*Exporter, error) { - if o.Writer == nil { - o.Writer = os.Stdout - } - return &Exporter{ - pretty: o.PrettyPrint, - outputWriter: o.Writer, - }, nil -} - -// ExportSpan writes a SpanData in json format to stdout. -func (e *Exporter) ExportSpan(ctx context.Context, data *export.SpanData) { - var jsonSpan []byte - var err error - if e.pretty { - jsonSpan, err = json.MarshalIndent(data, "", "\t") - } else { - jsonSpan, err = json.Marshal(data) - } - if err != nil { - // ignore writer failures for now - _, _ = e.outputWriter.Write([]byte("Error converting spanData to json: " + err.Error())) - return - } - // ignore writer failures for now - _, _ = e.outputWriter.Write(append(jsonSpan, byte('\n'))) -} diff --git a/instrumentation/othttp/handler_example_test.go b/instrumentation/othttp/handler_example_test.go index b819da04727..c01c379ae01 100644 --- a/instrumentation/othttp/handler_example_test.go +++ b/instrumentation/othttp/handler_example_test.go @@ -24,12 +24,9 @@ import ( "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/trace" - mstdout "go.opentelemetry.io/otel/exporters/metric/stdout" - "go.opentelemetry.io/otel/exporters/trace/stdout" + "go.opentelemetry.io/otel/exporters/stdout" "go.opentelemetry.io/otel/instrumentation/othttp" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) func ExampleNewHandler() { @@ -48,29 +45,14 @@ func ExampleNewHandler() { */ // Write spans to stdout - exporter, err := stdout.NewExporter(stdout.Options{PrettyPrint: true}) + pusher, err := stdout.InstallNewPipeline([]stdout.Option{ + stdout.WithPrettyPrint(), + stdout.WithoutTimestamps(), // This makes the output deterministic + }, nil) if err != nil { log.Fatal(err) } - - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithSyncer(exporter)) - if err != nil { - log.Fatal(err) - } - - pusher, err := mstdout.NewExportPipeline(mstdout.Config{ - PrettyPrint: true, - DoNotPrintTime: true, // This makes the output deterministic - }) - - if err != nil { - log.Fatal(err) - } - - meterProvider := pusher.Provider() - global.SetTraceProvider(tp) - global.SetMeterProvider(meterProvider) + defer pusher.Stop() figureOutName := func(ctx context.Context, s string) (string, error) { pp := strings.SplitN(s, "/", 2) diff --git a/sdk/metric/example_test.go b/sdk/metric/example_test.go index a48b8dfb46c..28b1c0d40bb 100644 --- a/sdk/metric/example_test.go +++ b/sdk/metric/example_test.go @@ -15,41 +15,41 @@ package metric_test import ( + "bytes" "context" "fmt" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/stdout" + "go.opentelemetry.io/otel/exporters/stdout" ) func ExampleNew() { - pusher, err := stdout.NewExportPipeline(stdout.Config{ - PrettyPrint: true, - DoNotPrintTime: true, // This makes the output deterministic - }) + buf := bytes.Buffer{} + _, pusher, err := stdout.NewExportPipeline([]stdout.Option{ + // Defaults to STDOUT. + stdout.WithWriter(&buf), + stdout.WithPrettyPrint(), + stdout.WithoutTimestamps(), // This makes the output deterministic + }, nil) if err != nil { panic(fmt.Sprintln("Could not initialize stdout exporter:", err)) } - defer pusher.Stop() - ctx := context.Background() + meter := metric.Must(pusher.Provider().Meter("example")) + counter := meter.NewInt64Counter("a.counter") + counter.Add(context.Background(), 100, kv.String("key", "value")) - key := kv.Key("key") - meter := pusher.Provider().Meter("example") - - counter := metric.Must(meter).NewInt64Counter("a.counter") - - counter.Add(ctx, 100, key.String("value")) + // Flush everything + pusher.Stop() + fmt.Println(buf.String()) // Output: - // { - // "updates": [ - // { - // "name": "a.counter{instrumentation.name=example,key=value}", - // "sum": 100 - // } - // ] - // } + // [ + // { + // "Name": "a.counter{instrumentation.name=example,key=value}", + // "Sum": 100 + // } + // ] } From 79180706177b5dc834311c911cb3fcab9d21b441 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Thu, 23 Jul 2020 09:08:26 -0700 Subject: [PATCH 14/60] README: fixup spaces on code example (#961) The code example was rendering oddly in github.com because the first line had 4 spaces instead of tabs like the rest of the example. Fix this. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3604be53db9..8c60928dec6 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ import ( ) func main() { - pusher, err := stdout.InstallNewPipeline(nil, nil) + pusher, err := stdout.InstallNewPipeline(nil, nil) if err != nil { log.Fatal(err) } @@ -67,7 +67,6 @@ func main() { }, ) } - ``` See the [API From fd54b6c6422b64712ac0ef880365a610046f7af7 Mon Sep 17 00:00:00 2001 From: Liz Fong-Jones Date: Thu, 23 Jul 2020 14:19:58 -0400 Subject: [PATCH 15/60] paivagustavo to emeritus for now (#960) Co-authored-by: Tyler Yahn --- CODEOWNERS | 2 +- CONTRIBUTING.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 868eb24052d..b9ee11a30ba 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -12,6 +12,6 @@ # https://help.github.com/en/articles/about-code-owners # -* @jmacd @paivagustavo @lizthegrey @MrAlias @Aneurysm9 @evantorrie +* @jmacd @lizthegrey @MrAlias @Aneurysm9 @evantorrie CODEOWNERS @MrAlias @jmacd diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 210f933151f..4547040e9bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -144,7 +144,6 @@ https://github.com/open-telemetry/opentelemetry-specification/issues/165 Approvers: - [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb -- [Gustavo Silva Paiva](https://github.com/paivagustavo), Stilingue - [Anthony Mirabella](https://github.com/Aneurysm9), Centene - [Evan Torrie](https://github.com/evantorrie), Verizon Media From d99ac0993ef027dc9d4fac95b2accbbc2fc15572 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 24 Jul 2020 12:25:27 -0700 Subject: [PATCH 16/60] Remove sub-package value from kv (#968) * Remove sub-package value from kv * Update refs to `go.opentelemetry.io/api/kv/value` * Update Changelog --- CHANGELOG.md | 1 + .../correlation_context_propagator_test.go | 6 +- api/correlation/map.go | 5 +- api/correlation/map_test.go | 4 +- api/global/internal/meter_test.go | 8 +- api/kv/key.go | 26 ++-- api/kv/key_test.go | 30 ++-- api/kv/kv.go | 4 +- api/kv/kv_test.go | 49 ++++--- api/kv/{value => }/type_string.go | 2 +- api/kv/{value => }/value.go | 42 +++--- api/kv/{value => }/value_test.go | 58 ++++---- api/label/encoder.go | 4 +- api/label/set.go | 10 +- api/trace/testtrace/event.go | 4 +- api/trace/testtrace/span.go | 10 +- api/trace/testtrace/span_test.go | 16 +-- api/trace/testtrace/tracer.go | 4 +- .../otlp/internal/transform/attribute.go | 12 +- exporters/trace/jaeger/env.go | 11 +- exporters/trace/jaeger/env_test.go | 45 +++--- exporters/trace/jaeger/jaeger.go | 17 ++- instrumentation/grpctrace/interceptor_test.go | 133 +++++++++--------- sdk/resource/resource_test.go | 6 +- sdk/trace/span.go | 5 +- sdk/trace/trace_test.go | 3 +- 26 files changed, 239 insertions(+), 276 deletions(-) rename api/kv/{value => }/type_string.go (98%) rename api/kv/{value => }/value.go (89%) rename api/kv/{value => }/value_test.go (86%) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfa84e16d2d..ac70e572c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Removed - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) +- Removed `go.opentelemetry.io/otel/api/kv/value` by flattening all value functionality and structures into the `go.opentelemetry.io/otel/api/kv` package. (#968) ## [0.8.0] - 2020-07-09 diff --git a/api/correlation/correlation_context_propagator_test.go b/api/correlation/correlation_context_propagator_test.go index e5569c0ade2..e6d7804b88a 100644 --- a/api/correlation/correlation_context_propagator_test.go +++ b/api/correlation/correlation_context_propagator_test.go @@ -20,8 +20,6 @@ import ( "strings" "testing" - "go.opentelemetry.io/otel/api/kv/value" - "github.com/google/go-cmp/cmp" "go.opentelemetry.io/otel/api/correlation" @@ -105,7 +103,7 @@ func TestExtractValidDistributedContextFromHTTPReq(t *testing.T) { totalDiff := "" wantCorCtx.Foreach(func(keyValue kv.KeyValue) bool { val, _ := gotCorCtx.Value(keyValue.Key) - diff := cmp.Diff(keyValue, kv.KeyValue{Key: keyValue.Key, Value: val}, cmp.AllowUnexported(value.Value{})) + diff := cmp.Diff(keyValue, kv.KeyValue{Key: keyValue.Key, Value: val}, cmp.AllowUnexported(kv.Value{})) if diff != "" { totalDiff += diff + "\n" } @@ -166,7 +164,7 @@ func TestExtractInvalidDistributedContextFromHTTPReq(t *testing.T) { totalDiff := "" wantCorCtx.Foreach(func(keyValue kv.KeyValue) bool { val, _ := gotCorCtx.Value(keyValue.Key) - diff := cmp.Diff(keyValue, kv.KeyValue{Key: keyValue.Key, Value: val}, cmp.AllowUnexported(value.Value{})) + diff := cmp.Diff(keyValue, kv.KeyValue{Key: keyValue.Key, Value: val}, cmp.AllowUnexported(kv.Value{})) if diff != "" { totalDiff += diff + "\n" } diff --git a/api/correlation/map.go b/api/correlation/map.go index 93e92eedde8..2bbb0435611 100644 --- a/api/correlation/map.go +++ b/api/correlation/map.go @@ -16,10 +16,9 @@ package correlation import ( "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" ) -type rawMap map[kv.Key]value.Value +type rawMap map[kv.Key]kv.Value type keySet map[kv.Key]struct{} // Map is an immutable storage for correlations. @@ -147,7 +146,7 @@ func getNewMapSize(m rawMap, delSet, addSet keySet) int { // Value gets a value from correlations map and returns a boolean // value indicating whether the key exist in the map. -func (m Map) Value(k kv.Key) (value.Value, bool) { +func (m Map) Value(k kv.Key) (kv.Value, bool) { value, ok := m.m[k] return value, ok } diff --git a/api/correlation/map_test.go b/api/correlation/map_test.go index c886b842dbd..f2eb2abc960 100644 --- a/api/correlation/map_test.go +++ b/api/correlation/map_test.go @@ -18,8 +18,6 @@ import ( "fmt" "testing" - "go.opentelemetry.io/otel/api/kv/value" - "go.opentelemetry.io/otel/api/kv" ) @@ -281,7 +279,7 @@ func getTestCases() []testCase { func makeTestMap(ints []int) Map { r := make(rawMap, len(ints)) for _, v := range ints { - r[kv.Key(fmt.Sprintf("key%d", v))] = value.Int(v) + r[kv.Key(fmt.Sprintf("key%d", v))] = kv.IntValue(v) } return newMap(r) } diff --git a/api/global/internal/meter_test.go b/api/global/internal/meter_test.go index 5413ac25fbe..6bc65c350cb 100644 --- a/api/global/internal/meter_test.go +++ b/api/global/internal/meter_test.go @@ -22,8 +22,6 @@ import ( "io/ioutil" "testing" - "go.opentelemetry.io/otel/api/kv/value" - "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/api/global" @@ -39,7 +37,7 @@ type measured struct { Name string InstrumentationName string InstrumentationVersion string - Labels map[kv.Key]value.Value + Labels map[kv.Key]kv.Value Number metric.Number } @@ -59,8 +57,8 @@ func asStructs(batches []metrictest.Batch) []measured { return r } -func asMap(kvs ...kv.KeyValue) map[kv.Key]value.Value { - m := map[kv.Key]value.Value{} +func asMap(kvs ...kv.KeyValue) map[kv.Key]kv.Value { + m := map[kv.Key]kv.Value{} for _, kv := range kvs { m[kv.Key] = kv.Value } diff --git a/api/kv/key.go b/api/kv/key.go index fb4b9e6cf53..a6ca9499864 100644 --- a/api/kv/key.go +++ b/api/kv/key.go @@ -14,10 +14,6 @@ package kv -import ( - "go.opentelemetry.io/otel/api/kv/value" -) - // Key represents the key part in key-value pairs. It's a string. The // allowed character set in the key depends on the use of the key. type Key string @@ -31,7 +27,7 @@ type Key string func (k Key) Bool(v bool) KeyValue { return KeyValue{ Key: k, - Value: value.Bool(v), + Value: BoolValue(v), } } @@ -44,7 +40,7 @@ func (k Key) Bool(v bool) KeyValue { func (k Key) Int64(v int64) KeyValue { return KeyValue{ Key: k, - Value: value.Int64(v), + Value: Int64Value(v), } } @@ -57,7 +53,7 @@ func (k Key) Int64(v int64) KeyValue { func (k Key) Uint64(v uint64) KeyValue { return KeyValue{ Key: k, - Value: value.Uint64(v), + Value: Uint64Value(v), } } @@ -70,7 +66,7 @@ func (k Key) Uint64(v uint64) KeyValue { func (k Key) Float64(v float64) KeyValue { return KeyValue{ Key: k, - Value: value.Float64(v), + Value: Float64Value(v), } } @@ -83,7 +79,7 @@ func (k Key) Float64(v float64) KeyValue { func (k Key) Int32(v int32) KeyValue { return KeyValue{ Key: k, - Value: value.Int32(v), + Value: Int32Value(v), } } @@ -96,7 +92,7 @@ func (k Key) Int32(v int32) KeyValue { func (k Key) Uint32(v uint32) KeyValue { return KeyValue{ Key: k, - Value: value.Uint32(v), + Value: Uint32Value(v), } } @@ -109,7 +105,7 @@ func (k Key) Uint32(v uint32) KeyValue { func (k Key) Float32(v float32) KeyValue { return KeyValue{ Key: k, - Value: value.Float32(v), + Value: Float32Value(v), } } @@ -122,7 +118,7 @@ func (k Key) Float32(v float32) KeyValue { func (k Key) String(v string) KeyValue { return KeyValue{ Key: k, - Value: value.String(v), + Value: StringValue(v), } } @@ -136,7 +132,7 @@ func (k Key) String(v string) KeyValue { func (k Key) Int(v int) KeyValue { return KeyValue{ Key: k, - Value: value.Int(v), + Value: IntValue(v), } } @@ -150,7 +146,7 @@ func (k Key) Int(v int) KeyValue { func (k Key) Uint(v uint) KeyValue { return KeyValue{ Key: k, - Value: value.Uint(v), + Value: UintValue(v), } } @@ -168,6 +164,6 @@ func (k Key) Defined() bool { func (k Key) Array(v interface{}) KeyValue { return KeyValue{ Key: k, - Value: value.Array(v), + Value: ArrayValue(v), } } diff --git a/api/kv/key_test.go b/api/kv/key_test.go index 277750e02c9..f8c7311c6d3 100644 --- a/api/kv/key_test.go +++ b/api/kv/key_test.go @@ -21,8 +21,6 @@ import ( "go.opentelemetry.io/otel/api/kv" "github.com/stretchr/testify/require" - - "go.opentelemetry.io/otel/api/kv/value" ) func TestDefined(t *testing.T) { @@ -68,47 +66,47 @@ func TestJSONValue(t *testing.T) { func TestEmit(t *testing.T) { for _, testcase := range []struct { name string - v value.Value + v kv.Value want string }{ { name: `test Key.Emit() can emit a string representing self.BOOL`, - v: value.Bool(true), + v: kv.BoolValue(true), want: "true", }, { name: `test Key.Emit() can emit a string representing self.INT32`, - v: value.Int32(42), + v: kv.Int32Value(42), want: "42", }, { name: `test Key.Emit() can emit a string representing self.INT64`, - v: value.Int64(42), + v: kv.Int64Value(42), want: "42", }, { name: `test Key.Emit() can emit a string representing self.UINT32`, - v: value.Uint32(42), + v: kv.Uint32Value(42), want: "42", }, { name: `test Key.Emit() can emit a string representing self.UINT64`, - v: value.Uint64(42), + v: kv.Uint64Value(42), want: "42", }, { name: `test Key.Emit() can emit a string representing self.FLOAT32`, - v: value.Float32(42.1), + v: kv.Float32Value(42.1), want: "42.1", }, { name: `test Key.Emit() can emit a string representing self.FLOAT64`, - v: value.Float64(42.1), + v: kv.Float64Value(42.1), want: "42.1", }, { name: `test Key.Emit() can emit a string representing self.STRING`, - v: value.String("foo"), + v: kv.StringValue("foo"), want: "foo", }, } { @@ -125,7 +123,7 @@ func TestEmit(t *testing.T) { func BenchmarkEmitBool(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - n := value.Bool(i%2 == 0) + n := kv.BoolValue(i%2 == 0) _ = n.Emit() } } @@ -133,7 +131,7 @@ func BenchmarkEmitBool(b *testing.B) { func BenchmarkEmitInt64(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - n := value.Int64(int64(i)) + n := kv.Int64Value(int64(i)) _ = n.Emit() } } @@ -141,7 +139,7 @@ func BenchmarkEmitInt64(b *testing.B) { func BenchmarkEmitUInt64(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - n := value.Uint64(uint64(i)) + n := kv.Uint64Value(uint64(i)) _ = n.Emit() } } @@ -149,7 +147,7 @@ func BenchmarkEmitUInt64(b *testing.B) { func BenchmarkEmitFloat64(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - n := value.Float64(float64(i)) + n := kv.Float64Value(float64(i)) _ = n.Emit() } } @@ -157,7 +155,7 @@ func BenchmarkEmitFloat64(b *testing.B) { func BenchmarkEmitFloat32(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - n := value.Float32(float32(i)) + n := kv.Float32Value(float32(i)) _ = n.Emit() } } diff --git a/api/kv/kv.go b/api/kv/kv.go index 826c2b27591..83ed878b896 100644 --- a/api/kv/kv.go +++ b/api/kv/kv.go @@ -18,14 +18,12 @@ import ( "encoding/json" "fmt" "reflect" - - "go.opentelemetry.io/otel/api/kv/value" ) // KeyValue holds a key and value pair. type KeyValue struct { Key Key - Value value.Value + Value Value } // Bool creates a new key-value pair with a passed name and a bool diff --git a/api/kv/kv_test.go b/api/kv/kv_test.go index 5d6b9d00a5f..40be1ceee51 100644 --- a/api/kv/kv_test.go +++ b/api/kv/kv_test.go @@ -21,7 +21,6 @@ import ( "github.com/google/go-cmp/cmp" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" ) func TestKeyValueConstructors(t *testing.T) { @@ -35,7 +34,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Bool("k1", true), expected: kv.KeyValue{ Key: "k1", - Value: value.Bool(true), + Value: kv.BoolValue(true), }, }, { @@ -43,7 +42,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Int64("k1", 123), expected: kv.KeyValue{ Key: "k1", - Value: value.Int64(123), + Value: kv.Int64Value(123), }, }, { @@ -51,7 +50,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Uint64("k1", 1), expected: kv.KeyValue{ Key: "k1", - Value: value.Uint64(1), + Value: kv.Uint64Value(1), }, }, { @@ -59,7 +58,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Float64("k1", 123.5), expected: kv.KeyValue{ Key: "k1", - Value: value.Float64(123.5), + Value: kv.Float64Value(123.5), }, }, { @@ -67,7 +66,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Int32("k1", 123), expected: kv.KeyValue{ Key: "k1", - Value: value.Int32(123), + Value: kv.Int32Value(123), }, }, { @@ -75,7 +74,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Uint32("k1", 123), expected: kv.KeyValue{ Key: "k1", - Value: value.Uint32(123), + Value: kv.Uint32Value(123), }, }, { @@ -83,7 +82,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Float32("k1", 123.5), expected: kv.KeyValue{ Key: "k1", - Value: value.Float32(123.5), + Value: kv.Float32Value(123.5), }, }, { @@ -91,7 +90,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.String("k1", "123.5"), expected: kv.KeyValue{ Key: "k1", - Value: value.String("123.5"), + Value: kv.StringValue("123.5"), }, }, { @@ -99,7 +98,7 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Int("k1", 123), expected: kv.KeyValue{ Key: "k1", - Value: value.Int(123), + Value: kv.IntValue(123), }, }, { @@ -107,14 +106,14 @@ func TestKeyValueConstructors(t *testing.T) { actual: kv.Uint("k1", 123), expected: kv.KeyValue{ Key: "k1", - Value: value.Uint(123), + Value: kv.UintValue(123), }, }, } for _, test := range tt { t.Run(test.name, func(t *testing.T) { - if diff := cmp.Diff(test.actual, test.expected, cmp.AllowUnexported(value.Value{})); diff != "" { + if diff := cmp.Diff(test.actual, test.expected, cmp.AllowUnexported(kv.Value{})); diff != "" { t.Fatal(diff) } }) @@ -138,79 +137,79 @@ func TestInfer(t *testing.T) { for _, testcase := range []struct { key string value interface{} - wantType value.Type + wantType kv.Type wantValue interface{} }{ { key: "bool type inferred", value: true, - wantType: value.BOOL, + wantType: kv.BOOL, wantValue: true, }, { key: "int64 type inferred", value: int64(42), - wantType: value.INT64, + wantType: kv.INT64, wantValue: int64(42), }, { key: "uint64 type inferred", value: uint64(42), - wantType: value.UINT64, + wantType: kv.UINT64, wantValue: uint64(42), }, { key: "float64 type inferred", value: float64(42.1), - wantType: value.FLOAT64, + wantType: kv.FLOAT64, wantValue: 42.1, }, { key: "int32 type inferred", value: int32(42), - wantType: value.INT32, + wantType: kv.INT32, wantValue: int32(42), }, { key: "uint32 type inferred", value: uint32(42), - wantType: value.UINT32, + wantType: kv.UINT32, wantValue: uint32(42), }, { key: "float32 type inferred", value: float32(42.1), - wantType: value.FLOAT32, + wantType: kv.FLOAT32, wantValue: float32(42.1), }, { key: "string type inferred", value: "foo", - wantType: value.STRING, + wantType: kv.STRING, wantValue: "foo", }, { key: "stringer type inferred", value: builder, - wantType: value.STRING, + wantType: kv.STRING, wantValue: "foo", }, { key: "unknown value serialized as %v", value: nil, - wantType: value.STRING, + wantType: kv.STRING, wantValue: "", }, { key: "JSON struct serialized correctly", value: &jsonifyStruct, - wantType: value.STRING, + wantType: kv.STRING, wantValue: `{"Public":"foo","tagName":"baz","Empty":""}`, }, { key: "Invalid JSON struct falls back to string", value: &invalidStruct, - wantType: value.STRING, + wantType: kv.STRING, wantValue: "&{(0+0i)}", }, } { diff --git a/api/kv/value/type_string.go b/api/kv/type_string.go similarity index 98% rename from api/kv/value/type_string.go rename to api/kv/type_string.go index b7d130d0b4b..7b1d143ef2e 100644 --- a/api/kv/value/type_string.go +++ b/api/kv/type_string.go @@ -1,6 +1,6 @@ // Code generated by "stringer -type=Type"; DO NOT EDIT. -package value +package kv import "strconv" diff --git a/api/kv/value/value.go b/api/kv/value.go similarity index 89% rename from api/kv/value/value.go rename to api/kv/value.go index b3641a1535b..fa44cfd9d52 100644 --- a/api/kv/value/value.go +++ b/api/kv/value.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package value +package kv import ( "encoding/json" @@ -53,40 +53,40 @@ const ( ARRAY // Array value of arbitrary type, use AsArray() to get it. ) -// Bool creates a BOOL Value. -func Bool(v bool) Value { +// BoolValue creates a BOOL Value. +func BoolValue(v bool) Value { return Value{ vtype: BOOL, numeric: internal.BoolToRaw(v), } } -// Int64 creates an INT64 Value. -func Int64(v int64) Value { +// Int64Value creates an INT64 Value. +func Int64Value(v int64) Value { return Value{ vtype: INT64, numeric: internal.Int64ToRaw(v), } } -// Uint64 creates a UINT64 Value. -func Uint64(v uint64) Value { +// Uint64Value creates a UINT64 Value. +func Uint64Value(v uint64) Value { return Value{ vtype: UINT64, numeric: internal.Uint64ToRaw(v), } } -// Float64 creates a FLOAT64 Value. -func Float64(v float64) Value { +// Float64Value creates a FLOAT64 Value. +func Float64Value(v float64) Value { return Value{ vtype: FLOAT64, numeric: internal.Float64ToRaw(v), } } -// Int32 creates an INT32 Value. -func Int32(v int32) Value { +// Int32Value creates an INT32 Value. +func Int32Value(v int32) Value { return Value{ vtype: INT32, numeric: internal.Int32ToRaw(v), @@ -94,7 +94,7 @@ func Int32(v int32) Value { } // Uint32 creates a UINT32 Value. -func Uint32(v uint32) Value { +func Uint32Value(v uint32) Value { return Value{ vtype: UINT32, numeric: internal.Uint32ToRaw(v), @@ -102,7 +102,7 @@ func Uint32(v uint32) Value { } // Float32 creates a FLOAT32 Value. -func Float32(v float32) Value { +func Float32Value(v float32) Value { return Value{ vtype: FLOAT32, numeric: internal.Float32ToRaw(v), @@ -110,7 +110,7 @@ func Float32(v float32) Value { } // String creates a STRING Value. -func String(v string) Value { +func StringValue(v string) Value { return Value{ vtype: STRING, stringly: v, @@ -119,24 +119,24 @@ func String(v string) Value { // Int creates either an INT32 or an INT64 Value, depending on whether // the int type is 32 or 64 bits wide. -func Int(v int) Value { +func IntValue(v int) Value { if unsafe.Sizeof(v) == 4 { - return Int32(int32(v)) + return Int32Value(int32(v)) } - return Int64(int64(v)) + return Int64Value(int64(v)) } // Uint creates either a UINT32 or a UINT64 Value, depending on // whether the uint type is 32 or 64 bits wide. -func Uint(v uint) Value { +func UintValue(v uint) Value { if unsafe.Sizeof(v) == 4 { - return Uint32(uint32(v)) + return Uint32Value(uint32(v)) } - return Uint64(uint64(v)) + return Uint64Value(uint64(v)) } // Array creates an ARRAY value. -func Array(array interface{}) Value { +func ArrayValue(array interface{}) Value { switch reflect.TypeOf(array).Kind() { case reflect.Array, reflect.Slice: isValidType := func() bool { diff --git a/api/kv/value/value_test.go b/api/kv/value_test.go similarity index 86% rename from api/kv/value/value_test.go rename to api/kv/value_test.go index cd9a17dc8d3..5d7e9bb1c3c 100644 --- a/api/kv/value/value_test.go +++ b/api/kv/value_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package value_test +package kv_test import ( "testing" @@ -21,8 +21,6 @@ import ( "go.opentelemetry.io/otel/api/kv" "github.com/google/go-cmp/cmp" - - "go.opentelemetry.io/otel/api/kv/value" ) func TestValue(t *testing.T) { @@ -30,62 +28,62 @@ func TestValue(t *testing.T) { bli := getBitlessInfo(42) for _, testcase := range []struct { name string - value value.Value - wantType value.Type + value kv.Value + wantType kv.Type wantValue interface{} }{ { name: "Key.Bool() correctly returns keys's internal bool value", value: k.Bool(true).Value, - wantType: value.BOOL, + wantType: kv.BOOL, wantValue: true, }, { name: "Key.Array([]bool) correctly return key's internal bool values", value: k.Array([]bool{true, false}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []bool{true, false}, }, { name: "Key.Int64() correctly returns keys's internal int64 value", value: k.Int64(42).Value, - wantType: value.INT64, + wantType: kv.INT64, wantValue: int64(42), }, { name: "Key.Uint64() correctly returns keys's internal uint64 value", value: k.Uint64(42).Value, - wantType: value.UINT64, + wantType: kv.UINT64, wantValue: uint64(42), }, { name: "Key.Float64() correctly returns keys's internal float64 value", value: k.Float64(42.1).Value, - wantType: value.FLOAT64, + wantType: kv.FLOAT64, wantValue: 42.1, }, { name: "Key.Int32() correctly returns keys's internal int32 value", value: k.Int32(42).Value, - wantType: value.INT32, + wantType: kv.INT32, wantValue: int32(42), }, { name: "Key.Uint32() correctly returns keys's internal uint32 value", value: k.Uint32(42).Value, - wantType: value.UINT32, + wantType: kv.UINT32, wantValue: uint32(42), }, { name: "Key.Float32() correctly returns keys's internal float32 value", value: k.Float32(42.1).Value, - wantType: value.FLOAT32, + wantType: kv.FLOAT32, wantValue: float32(42.1), }, { name: "Key.String() correctly returns keys's internal string value", value: k.String("foo").Value, - wantType: value.STRING, + wantType: kv.STRING, wantValue: "foo", }, { @@ -103,61 +101,61 @@ func TestValue(t *testing.T) { { name: "Key.Array([]int64) correctly returns keys's internal int64 values", value: k.Array([]int64{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []int64{42, 43}, }, { name: "KeyArray([]uint64) correctly returns keys's internal uint64 values", value: k.Array([]uint64{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []uint64{42, 43}, }, { name: "Key.Array([]float64) correctly returns keys's internal float64 values", value: k.Array([]float64{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []float64{42, 43}, }, { name: "Key.Array([]int32) correctly returns keys's internal int32 values", value: k.Array([]int32{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []int32{42, 43}, }, { name: "Key.Array([]uint32) correctly returns keys's internal uint32 values", value: k.Array([]uint32{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []uint32{42, 43}, }, { name: "Key.Array([]float32) correctly returns keys's internal float32 values", value: k.Array([]float32{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []float32{42, 43}, }, { name: "Key.Array([]string) correctly return key's internal string values", value: k.Array([]string{"foo", "bar"}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []string{"foo", "bar"}, }, { name: "Key.Array([]int) correctly returns keys's internal signed integral values", value: k.Array([]int{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []int{42, 43}, }, { name: "Key.Array([]uint) correctly returns keys's internal unsigned integral values", value: k.Array([]uint{42, 43}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: []uint{42, 43}, }, { name: "Key.Array([][]int) correctly return key's multi dimensional array", value: k.Array([][]int{{1, 2}, {3, 4}}).Value, - wantType: value.ARRAY, + wantType: kv.ARRAY, wantValue: [][]int{{1, 2}, {3, 4}}, }, } { @@ -175,8 +173,8 @@ func TestValue(t *testing.T) { type bitlessInfo struct { intValue int uintValue uint - signedType value.Type - unsignedType value.Type + signedType kv.Type + unsignedType kv.Type signedValue interface{} unsignedValue interface{} } @@ -186,8 +184,8 @@ func getBitlessInfo(i int) bitlessInfo { return bitlessInfo{ intValue: i, uintValue: uint(i), - signedType: value.INT32, - unsignedType: value.UINT32, + signedType: kv.INT32, + unsignedType: kv.UINT32, signedValue: int32(i), unsignedValue: uint32(i), } @@ -195,8 +193,8 @@ func getBitlessInfo(i int) bitlessInfo { return bitlessInfo{ intValue: i, uintValue: uint(i), - signedType: value.INT64, - unsignedType: value.UINT64, + signedType: kv.INT64, + unsignedType: kv.UINT64, signedValue: int64(i), unsignedValue: uint64(i), } diff --git a/api/label/encoder.go b/api/label/encoder.go index 0c14ee520a2..915b437dd69 100644 --- a/api/label/encoder.go +++ b/api/label/encoder.go @@ -19,7 +19,7 @@ import ( "sync" "sync/atomic" - "go.opentelemetry.io/otel/api/kv/value" + "go.opentelemetry.io/otel/api/kv" ) type ( @@ -119,7 +119,7 @@ func (d *defaultLabelEncoder) Encode(iter Iterator) string { _, _ = buf.WriteRune('=') - if keyValue.Value.Type() == value.STRING { + if keyValue.Value.Type() == kv.STRING { copyAndEscape(buf, keyValue.Value.AsString()) } else { _, _ = buf.WriteString(keyValue.Value.Emit()) diff --git a/api/label/set.go b/api/label/set.go index 5b39287f5a5..2f281e909e9 100644 --- a/api/label/set.go +++ b/api/label/set.go @@ -20,8 +20,6 @@ import ( "sort" "sync" - "go.opentelemetry.io/otel/api/kv/value" - "go.opentelemetry.io/otel/api/kv" ) @@ -114,9 +112,9 @@ func (l *Set) Get(idx int) (kv.KeyValue, bool) { } // Value returns the value of a specified key in this set. -func (l *Set) Value(k kv.Key) (value.Value, bool) { +func (l *Set) Value(k kv.Key) (kv.Value, bool) { if l == nil { - return value.Value{}, false + return kv.Value{}, false } rValue := l.equivalent.reflect() vlen := rValue.Len() @@ -125,13 +123,13 @@ func (l *Set) Value(k kv.Key) (value.Value, bool) { return rValue.Index(idx).Interface().(kv.KeyValue).Key >= k }) if idx >= vlen { - return value.Value{}, false + return kv.Value{}, false } keyValue := rValue.Index(idx).Interface().(kv.KeyValue) if k == keyValue.Key { return keyValue.Value, true } - return value.Value{}, false + return kv.Value{}, false } // HasValue tests whether a key is defined in this set. diff --git a/api/trace/testtrace/event.go b/api/trace/testtrace/event.go index 69e0e1dba67..84598df4252 100644 --- a/api/trace/testtrace/event.go +++ b/api/trace/testtrace/event.go @@ -18,13 +18,11 @@ import ( "time" "go.opentelemetry.io/otel/api/kv" - - "go.opentelemetry.io/otel/api/kv/value" ) // Event encapsulates the properties of calls to AddEvent or AddEventWithTimestamp. type Event struct { Timestamp time.Time Name string - Attributes map[kv.Key]value.Value + Attributes map[kv.Key]kv.Value } diff --git a/api/trace/testtrace/span.go b/api/trace/testtrace/span.go index 9053bfff7e3..66f6e005efa 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/testtrace/span.go @@ -21,8 +21,6 @@ import ( "sync" "time" - "go.opentelemetry.io/otel/api/kv/value" - "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/kv" @@ -48,7 +46,7 @@ type Span struct { endTime time.Time statusCode codes.Code statusMessage string - attributes map[kv.Key]value.Value + attributes map[kv.Key]kv.Value events []Event links map[trace.SpanContext][]kv.KeyValue } @@ -122,7 +120,7 @@ func (s *Span) AddEventWithTimestamp(ctx context.Context, timestamp time.Time, n return } - attributes := make(map[kv.Key]value.Value) + attributes := make(map[kv.Key]kv.Value) for _, attr := range attrs { attributes[attr.Key] = attr.Value @@ -199,11 +197,11 @@ func (s *Span) ParentSpanID() trace.SpanID { // Attributes returns the attributes set on the Span, either at or after creation time. // If the same attribute key was set multiple times, the last call will be used. // Attributes cannot be changed after End has been called on the Span. -func (s *Span) Attributes() map[kv.Key]value.Value { +func (s *Span) Attributes() map[kv.Key]kv.Value { s.lock.RLock() defer s.lock.RUnlock() - attributes := make(map[kv.Key]value.Value) + attributes := make(map[kv.Key]kv.Value) for k, v := range s.attributes { attributes[k] = v diff --git a/api/trace/testtrace/span_test.go b/api/trace/testtrace/span_test.go index 9b46bd6e0c3..e5229e24614 100644 --- a/api/trace/testtrace/span_test.go +++ b/api/trace/testtrace/span_test.go @@ -22,8 +22,6 @@ import ( "testing" "time" - "go.opentelemetry.io/otel/api/kv/value" - "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/kv" @@ -161,9 +159,9 @@ func TestSpan(t *testing.T) { expectedEvents := []testtrace.Event{{ Timestamp: testTime, Name: "error", - Attributes: map[kv.Key]value.Value{ - kv.Key("error.type"): value.String(s.typ), - kv.Key("error.message"): value.String(s.msg), + Attributes: map[kv.Key]kv.Value{ + kv.Key("error.type"): kv.StringValue(s.typ), + kv.Key("error.message"): kv.StringValue(s.msg), }, }} e.Expect(subject.Events()).ToEqual(expectedEvents) @@ -192,9 +190,9 @@ func TestSpan(t *testing.T) { expectedEvents := []testtrace.Event{{ Timestamp: testTime, Name: "error", - Attributes: map[kv.Key]value.Value{ - kv.Key("error.type"): value.String("go.opentelemetry.io/otel/internal/testing.TestError"), - kv.Key("error.message"): value.String(errMsg), + Attributes: map[kv.Key]kv.Value{ + kv.Key("error.type"): kv.StringValue("go.opentelemetry.io/otel/internal/testing.TestError"), + kv.Key("error.message"): kv.StringValue(errMsg), }, }} e.Expect(subject.Events()).ToEqual(expectedEvents) @@ -327,7 +325,7 @@ func TestSpan(t *testing.T) { subject, ok := span.(*testtrace.Span) e.Expect(ok).ToBeTrue() - e.Expect(subject.Attributes()).ToEqual(map[kv.Key]value.Value{}) + e.Expect(subject.Attributes()).ToEqual(map[kv.Key]kv.Value{}) }) t.Run("returns the most recently set attributes", func(t *testing.T) { diff --git a/api/trace/testtrace/tracer.go b/api/trace/testtrace/tracer.go index cbb1c88388c..fe383a672df 100644 --- a/api/trace/testtrace/tracer.go +++ b/api/trace/testtrace/tracer.go @@ -19,8 +19,6 @@ import ( "sync" "time" - "go.opentelemetry.io/otel/api/kv/value" - "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" @@ -82,7 +80,7 @@ func (t *Tracer) Start(ctx context.Context, name string, opts ...trace.StartOpti SpanID: spanID, }, parentSpanID: parentSpanID, - attributes: make(map[kv.Key]value.Value), + attributes: make(map[kv.Key]kv.Value), links: make(map[trace.SpanContext][]kv.KeyValue), } diff --git a/exporters/otlp/internal/transform/attribute.go b/exporters/otlp/internal/transform/attribute.go index d3ef165768c..51ba32f9307 100644 --- a/exporters/otlp/internal/transform/attribute.go +++ b/exporters/otlp/internal/transform/attribute.go @@ -17,8 +17,6 @@ package transform import ( commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" - "go.opentelemetry.io/otel/api/kv/value" - "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/sdk/resource" ) @@ -56,23 +54,23 @@ func toAttribute(v kv.KeyValue) *commonpb.KeyValue { Value: new(commonpb.AnyValue), } switch v.Value.Type() { - case value.BOOL: + case kv.BOOL: result.Value.Value = &commonpb.AnyValue_BoolValue{ BoolValue: v.Value.AsBool(), } - case value.INT64, value.INT32, value.UINT32, value.UINT64: + case kv.INT64, kv.INT32, kv.UINT32, kv.UINT64: result.Value.Value = &commonpb.AnyValue_IntValue{ IntValue: v.Value.AsInt64(), } - case value.FLOAT32: + case kv.FLOAT32: result.Value.Value = &commonpb.AnyValue_DoubleValue{ DoubleValue: float64(v.Value.AsFloat32()), } - case value.FLOAT64: + case kv.FLOAT64: result.Value.Value = &commonpb.AnyValue_DoubleValue{ DoubleValue: v.Value.AsFloat64(), } - case value.STRING: + case kv.STRING: result.Value.Value = &commonpb.AnyValue_StringValue{ StringValue: v.Value.AsString(), } diff --git a/exporters/trace/jaeger/env.go b/exporters/trace/jaeger/env.go index ad99b633ac5..abff351a7c3 100644 --- a/exporters/trace/jaeger/env.go +++ b/exporters/trace/jaeger/env.go @@ -22,7 +22,6 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" ) // Environment variable names @@ -147,17 +146,17 @@ func parseKeyValue(k, v string) kv.KeyValue { } } -func parseValue(str string) value.Value { +func parseValue(str string) kv.Value { if v, err := strconv.ParseInt(str, 10, 64); err == nil { - return value.Int64(v) + return kv.Int64Value(v) } if v, err := strconv.ParseFloat(str, 64); err == nil { - return value.Float64(v) + return kv.Float64Value(v) } if v, err := strconv.ParseBool(str); err == nil { - return value.Bool(v) + return kv.BoolValue(v) } // Fallback - return value.String(str) + return kv.StringValue(str) } diff --git a/exporters/trace/jaeger/env_test.go b/exporters/trace/jaeger/env_test.go index 9fcfc0c283d..51b459c4ddc 100644 --- a/exporters/trace/jaeger/env_test.go +++ b/exporters/trace/jaeger/env_test.go @@ -23,7 +23,6 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" ottest "go.opentelemetry.io/otel/internal/testing" ) @@ -48,7 +47,7 @@ func Test_parseTags(t *testing.T) { expectedTags: []kv.KeyValue{ { Key: "key", - Value: value.String("value"), + Value: kv.StringValue("value"), }, }, }, @@ -58,11 +57,11 @@ func Test_parseTags(t *testing.T) { expectedTags: []kv.KeyValue{ { Key: "k", - Value: value.Int64(math.MaxInt64), + Value: kv.Int64Value(math.MaxInt64), }, { Key: "k2", - Value: value.Int64(math.MinInt64), + Value: kv.Int64Value(math.MinInt64), }, }, }, @@ -72,15 +71,15 @@ func Test_parseTags(t *testing.T) { expectedTags: []kv.KeyValue{ { Key: "k", - Value: value.Float64(math.MaxFloat64), + Value: kv.Float64Value(math.MaxFloat64), }, { Key: "k2", - Value: value.Float64(math.SmallestNonzeroFloat64), + Value: kv.Float64Value(math.SmallestNonzeroFloat64), }, { Key: "k3", - Value: value.Float64(-1.2), + Value: kv.Float64Value(-1.2), }, }, }, @@ -90,27 +89,27 @@ func Test_parseTags(t *testing.T) { expectedTags: []kv.KeyValue{ { Key: "k", - Value: value.String("v"), + Value: kv.StringValue("v"), }, { Key: "k2", - Value: value.Int64(123), + Value: kv.Int64Value(123), }, { Key: "k3", - Value: value.String("v3"), + Value: kv.StringValue("v3"), }, { Key: "k4", - Value: value.Float64(-1.2), + Value: kv.Float64Value(-1.2), }, { Key: "k5", - Value: value.String("not-default"), + Value: kv.StringValue("not-default"), }, { Key: "k6", - Value: value.String("default"), + Value: kv.StringValue("default"), }, }, }, @@ -145,52 +144,52 @@ func Test_parseValue(t *testing.T) { testCases := []struct { name string str string - expected value.Value + expected kv.Value }{ { name: "bool: true", str: "true", - expected: value.Bool(true), + expected: kv.BoolValue(true), }, { name: "bool: false", str: "false", - expected: value.Bool(false), + expected: kv.BoolValue(false), }, { name: "int64: 012340", str: "012340", - expected: value.Int64(12340), + expected: kv.Int64Value(12340), }, { name: "int64: -012340", str: "-012340", - expected: value.Int64(-12340), + expected: kv.Int64Value(-12340), }, { name: "int64: 0", str: "0", - expected: value.Int64(0), + expected: kv.Int64Value(0), }, { name: "float64: -0.1", str: "-0.1", - expected: value.Float64(-0.1), + expected: kv.Float64Value(-0.1), }, { name: "float64: 00.001", str: "00.001", - expected: value.Float64(0.001), + expected: kv.Float64Value(0.001), }, { name: "float64: 1E23", str: "1E23", - expected: value.Float64(1e23), + expected: kv.Float64Value(1e23), }, { name: "string: foo", str: "foo", - expected: value.String("foo"), + expected: kv.StringValue("foo"), }, } diff --git a/exporters/trace/jaeger/jaeger.go b/exporters/trace/jaeger/jaeger.go index 9d9fd325ce2..281adc884d0 100644 --- a/exporters/trace/jaeger/jaeger.go +++ b/exporters/trace/jaeger/jaeger.go @@ -23,7 +23,6 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" apitrace "go.opentelemetry.io/otel/api/trace" gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger" export "go.opentelemetry.io/otel/sdk/export/trace" @@ -295,42 +294,42 @@ func spanDataToThrift(data *export.SpanData) *gen.Span { func keyValueToTag(keyValue kv.KeyValue) *gen.Tag { var tag *gen.Tag switch keyValue.Value.Type() { - case value.STRING: + case kv.STRING: s := keyValue.Value.AsString() tag = &gen.Tag{ Key: string(keyValue.Key), VStr: &s, VType: gen.TagType_STRING, } - case value.BOOL: + case kv.BOOL: b := keyValue.Value.AsBool() tag = &gen.Tag{ Key: string(keyValue.Key), VBool: &b, VType: gen.TagType_BOOL, } - case value.INT32: + case kv.INT32: i := int64(keyValue.Value.AsInt32()) tag = &gen.Tag{ Key: string(keyValue.Key), VLong: &i, VType: gen.TagType_LONG, } - case value.INT64: + case kv.INT64: i := keyValue.Value.AsInt64() tag = &gen.Tag{ Key: string(keyValue.Key), VLong: &i, VType: gen.TagType_LONG, } - case value.UINT32: + case kv.UINT32: i := int64(keyValue.Value.AsUint32()) tag = &gen.Tag{ Key: string(keyValue.Key), VLong: &i, VType: gen.TagType_LONG, } - case value.UINT64: + case kv.UINT64: // we'll ignore the value if it overflows if i := int64(keyValue.Value.AsUint64()); i >= 0 { tag = &gen.Tag{ @@ -339,14 +338,14 @@ func keyValueToTag(keyValue kv.KeyValue) *gen.Tag { VType: gen.TagType_LONG, } } - case value.FLOAT32: + case kv.FLOAT32: f := float64(keyValue.Value.AsFloat32()) tag = &gen.Tag{ Key: string(keyValue.Key), VDouble: &f, VType: gen.TagType_DOUBLE, } - case value.FLOAT64: + case kv.FLOAT64: f := keyValue.Value.AsFloat64() tag = &gen.Tag{ Key: string(keyValue.Key), diff --git a/instrumentation/grpctrace/interceptor_test.go b/instrumentation/grpctrace/interceptor_test.go index fce3be59058..68a812f8c78 100644 --- a/instrumentation/grpctrace/interceptor_test.go +++ b/instrumentation/grpctrace/interceptor_test.go @@ -32,7 +32,6 @@ import ( "google.golang.org/grpc/status" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" export "go.opentelemetry.io/otel/sdk/export/trace" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) @@ -92,119 +91,119 @@ func TestUnaryClientInterceptor(t *testing.T) { checks := []struct { method string name string - expectedAttr map[kv.Key]value.Value - eventsAttr []map[kv.Key]value.Value + expectedAttr map[kv.Key]kv.Value + eventsAttr []map[kv.Key]kv.Value }{ { method: "/github.com.serviceName/bar", name: "github.com.serviceName/bar", - expectedAttr: map[kv.Key]value.Value{ - standard.RPCSystemKey: value.String("grpc"), - standard.RPCServiceKey: value.String("github.com.serviceName"), - standard.RPCMethodKey: value.String("bar"), - standard.NetPeerIPKey: value.String("fake"), - standard.NetPeerPortKey: value.String("connection"), + expectedAttr: map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.RPCServiceKey: kv.StringValue("github.com.serviceName"), + standard.RPCMethodKey: kv.StringValue("bar"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), }, - eventsAttr: []map[kv.Key]value.Value{ + eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: value.String("SENT"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(req))), + standard.RPCMessageTypeKey: kv.StringValue("SENT"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: value.String("RECEIVED"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(reply))), + standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, { method: "/serviceName/bar", name: "serviceName/bar", - expectedAttr: map[kv.Key]value.Value{ - standard.RPCSystemKey: value.String("grpc"), - standard.RPCServiceKey: value.String("serviceName"), - standard.RPCMethodKey: value.String("bar"), - standard.NetPeerIPKey: value.String("fake"), - standard.NetPeerPortKey: value.String("connection"), + expectedAttr: map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.RPCServiceKey: kv.StringValue("serviceName"), + standard.RPCMethodKey: kv.StringValue("bar"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), }, - eventsAttr: []map[kv.Key]value.Value{ + eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: value.String("SENT"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(req))), + standard.RPCMessageTypeKey: kv.StringValue("SENT"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: value.String("RECEIVED"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(reply))), + standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, { method: "serviceName/bar", name: "serviceName/bar", - expectedAttr: map[kv.Key]value.Value{ - standard.RPCSystemKey: value.String("grpc"), - standard.RPCServiceKey: value.String("serviceName"), - standard.RPCMethodKey: value.String("bar"), - standard.NetPeerIPKey: value.String("fake"), - standard.NetPeerPortKey: value.String("connection"), + expectedAttr: map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.RPCServiceKey: kv.StringValue("serviceName"), + standard.RPCMethodKey: kv.StringValue("bar"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), }, - eventsAttr: []map[kv.Key]value.Value{ + eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: value.String("SENT"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(req))), + standard.RPCMessageTypeKey: kv.StringValue("SENT"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: value.String("RECEIVED"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(reply))), + standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, { method: "invalidName", name: "invalidName", - expectedAttr: map[kv.Key]value.Value{ - standard.RPCSystemKey: value.String("grpc"), - standard.NetPeerIPKey: value.String("fake"), - standard.NetPeerPortKey: value.String("connection"), + expectedAttr: map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), }, - eventsAttr: []map[kv.Key]value.Value{ + eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: value.String("SENT"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(req))), + standard.RPCMessageTypeKey: kv.StringValue("SENT"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: value.String("RECEIVED"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(reply))), + standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, { method: "/github.com.foo.serviceName_123/method", name: "github.com.foo.serviceName_123/method", - expectedAttr: map[kv.Key]value.Value{ - standard.RPCSystemKey: value.String("grpc"), - standard.RPCServiceKey: value.String("github.com.foo.serviceName_123"), - standard.RPCMethodKey: value.String("method"), - standard.NetPeerIPKey: value.String("fake"), - standard.NetPeerPortKey: value.String("connection"), + expectedAttr: map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.RPCServiceKey: kv.StringValue("github.com.foo.serviceName_123"), + standard.RPCMethodKey: kv.StringValue("method"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), }, - eventsAttr: []map[kv.Key]value.Value{ + eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: value.String("SENT"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(req))), + standard.RPCMessageTypeKey: kv.StringValue("SENT"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: value.String("RECEIVED"), - standard.RPCMessageIDKey: value.Int(1), - standard.RPCMessageUncompressedSizeKey: value.Int(proto.Size(proto.Message(reply))), + standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + standard.RPCMessageIDKey: kv.IntValue(1), + standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -389,7 +388,7 @@ func TestStreamClientInterceptor(t *testing.T) { if attr.Key == standard.RPCMessageTypeKey && attr.Value.AsString() != eventName { t.Errorf("invalid event on index: %d expecting %s event, receive %s event", i, eventName, attr.Value.AsString()) } - if attr.Key == standard.RPCMessageIDKey && attr.Value != value.Int(msgID) { + if attr.Key == standard.RPCMessageIDKey && attr.Value != kv.IntValue(msgID) { t.Errorf("invalid id for message event expected %d received %d", msgID, attr.Value.AsInt32()) } } diff --git a/sdk/resource/resource_test.go b/sdk/resource/resource_test.go index e9b560f1ae2..10222023207 100644 --- a/sdk/resource/resource_test.go +++ b/sdk/resource/resource_test.go @@ -19,8 +19,6 @@ import ( "fmt" "testing" - "go.opentelemetry.io/otel/api/kv/value" - "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" @@ -64,7 +62,7 @@ func TestNew(t *testing.T) { if diff := cmp.Diff( res.Attributes(), c.want, - cmp.AllowUnexported(value.Value{})); diff != "" { + cmp.AllowUnexported(kv.Value{})); diff != "" { t.Fatalf("unwanted result: diff %+v,", diff) } }) @@ -144,7 +142,7 @@ func TestMerge(t *testing.T) { if diff := cmp.Diff( res.Attributes(), c.want, - cmp.AllowUnexported(value.Value{})); diff != "" { + cmp.AllowUnexported(kv.Value{})); diff != "" { t.Fatalf("unwanted result: diff %+v,", diff) } }) diff --git a/sdk/trace/span.go b/sdk/trace/span.go index 3cabdd4a035..6c782d7eef3 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -26,7 +26,6 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/kv/value" apitrace "go.opentelemetry.io/otel/api/trace" export "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/internal" @@ -105,7 +104,7 @@ func (s *span) SetAttributes(attributes ...kv.KeyValue) { func (s *span) SetAttribute(k string, v interface{}) { attr := kv.Infer(k, v) - if attr.Value.Type() != value.INVALID { + if attr.Value.Type() != kv.INVALID { s.SetAttributes(attr) } } @@ -297,7 +296,7 @@ func (s *span) copyToCappedAttributes(attributes ...kv.KeyValue) { s.mu.Lock() defer s.mu.Unlock() for _, a := range attributes { - if a.Value.Type() != value.INVALID { + if a.Value.Type() != kv.INVALID { s.attributes.add(a) } } diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 86a8398bc36..752c80a6707 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -25,7 +25,6 @@ import ( "time" "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv/value" "github.com/google/go-cmp/cmp" "google.golang.org/grpc/codes" @@ -617,7 +616,7 @@ func TestSetSpanStatus(t *testing.T) { func cmpDiff(x, y interface{}) string { return cmp.Diff(x, y, - cmp.AllowUnexported(value.Value{}), + cmp.AllowUnexported(kv.Value{}), cmp.AllowUnexported(export.Event{})) } From c6611f44785883c1d5dfa712a3464493d285dba6 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 24 Jul 2020 20:32:52 -0700 Subject: [PATCH 17/60] Move export test package to SDK (#962) * Move export test package to SDK * Rename package to metrictest Follow Go std lib conventions in test package naming. * Update import paths --- .../otlp/internal/transform/metric_test.go | 12 +++---- exporters/otlp/otlp_metric_test.go | 6 ++-- exporters/stdout/metric_test.go | 36 +++++++++---------- .../export/metric/metrictest}/test.go | 2 +- .../export/metric/metrictest}/test_test.go | 2 +- sdk/metric/controller/push/push_test.go | 6 ++-- sdk/metric/processor/basic/basic_test.go | 6 ++-- 7 files changed, 35 insertions(+), 35 deletions(-) rename {exporters/metric/test => sdk/export/metric/metrictest}/test.go (97%) rename {exporters/metric/test => sdk/export/metric/metrictest}/test_test.go (97%) diff --git a/exporters/otlp/internal/transform/metric_test.go b/exporters/otlp/internal/transform/metric_test.go index f4c7308c491..2d19d3c15b8 100644 --- a/exporters/otlp/internal/transform/metric_test.go +++ b/exporters/otlp/internal/transform/metric_test.go @@ -30,9 +30,9 @@ import ( "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/api/unit" - "go.opentelemetry.io/otel/exporters/metric/test" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/sdk/export/metric/metrictest" "go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount" sumAgg "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" ) @@ -92,7 +92,7 @@ func TestStringKeyValues(t *testing.T) { } func TestMinMaxSumCountValue(t *testing.T) { - mmsc, ckpt := test.Unslice2(minmaxsumcount.New(2, &metric.Descriptor{})) + mmsc, ckpt := metrictest.Unslice2(minmaxsumcount.New(2, &metric.Descriptor{})) assert.NoError(t, mmsc.Update(context.Background(), 1, &metric.Descriptor{})) assert.NoError(t, mmsc.Update(context.Background(), 10, &metric.Descriptor{})) @@ -153,7 +153,7 @@ func TestMinMaxSumCountMetricDescriptor(t *testing.T) { } ctx := context.Background() - mmsc, ckpt := test.Unslice2(minmaxsumcount.New(2, &metric.Descriptor{})) + mmsc, ckpt := metrictest.Unslice2(minmaxsumcount.New(2, &metric.Descriptor{})) if !assert.NoError(t, mmsc.Update(ctx, 1, &metric.Descriptor{})) { return } @@ -174,7 +174,7 @@ func TestMinMaxSumCountMetricDescriptor(t *testing.T) { func TestMinMaxSumCountDatapoints(t *testing.T) { desc := metric.NewDescriptor("", metric.ValueRecorderKind, metric.Int64NumberKind) labels := label.NewSet() - mmsc, ckpt := test.Unslice2(minmaxsumcount.New(2, &desc)) + mmsc, ckpt := metrictest.Unslice2(minmaxsumcount.New(2, &desc)) assert.NoError(t, mmsc.Update(context.Background(), 1, &desc)) assert.NoError(t, mmsc.Update(context.Background(), 10, &desc)) @@ -275,7 +275,7 @@ func TestSumMetricDescriptor(t *testing.T) { func TestSumInt64DataPoints(t *testing.T) { desc := metric.NewDescriptor("", metric.ValueRecorderKind, metric.Int64NumberKind) labels := label.NewSet() - s, ckpt := test.Unslice2(sumAgg.New(2)) + s, ckpt := metrictest.Unslice2(sumAgg.New(2)) assert.NoError(t, s.Update(context.Background(), metric.Number(1), &desc)) require.NoError(t, s.SynchronizedMove(ckpt, &desc)) record := export.NewRecord(&desc, &labels, nil, ckpt.Aggregation(), intervalStart, intervalEnd) @@ -294,7 +294,7 @@ func TestSumInt64DataPoints(t *testing.T) { func TestSumFloat64DataPoints(t *testing.T) { desc := metric.NewDescriptor("", metric.ValueRecorderKind, metric.Float64NumberKind) labels := label.NewSet() - s, ckpt := test.Unslice2(sumAgg.New(2)) + s, ckpt := metrictest.Unslice2(sumAgg.New(2)) assert.NoError(t, s.Update(context.Background(), metric.NewFloat64Number(1), &desc)) require.NoError(t, s.SynchronizedMove(ckpt, &desc)) record := export.NewRecord(&desc, &labels, nil, ckpt.Aggregation(), intervalStart, intervalEnd) diff --git a/exporters/otlp/otlp_metric_test.go b/exporters/otlp/otlp_metric_test.go index 1c4cf554953..606e726b251 100644 --- a/exporters/otlp/otlp_metric_test.go +++ b/exporters/otlp/otlp_metric_test.go @@ -31,9 +31,9 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/test" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/sdk/export/metric/metrictest" "go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount" "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" "go.opentelemetry.io/otel/sdk/resource" @@ -689,9 +689,9 @@ func runMetricExportTest(t *testing.T, exp *Exporter, rs []record, expected []me var agg, ckpt metricsdk.Aggregator switch r.mKind { case metric.CounterKind: - agg, ckpt = test.Unslice2(sum.New(2)) + agg, ckpt = metrictest.Unslice2(sum.New(2)) default: - agg, ckpt = test.Unslice2(minmaxsumcount.New(2, &desc)) + agg, ckpt = metrictest.Unslice2(minmaxsumcount.New(2, &desc)) } ctx := context.Background() diff --git a/exporters/stdout/metric_test.go b/exporters/stdout/metric_test.go index 16839ae5e08..2d797a9d9c5 100644 --- a/exporters/stdout/metric_test.go +++ b/exporters/stdout/metric_test.go @@ -28,10 +28,10 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/metric/test" "go.opentelemetry.io/otel/exporters/stdout" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/sdk/export/metric/metrictest" "go.opentelemetry.io/otel/sdk/metric/aggregator/array" "go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch" "go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue" @@ -96,12 +96,12 @@ func TestStdoutTimestamp(t *testing.T) { before := time.Now() - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) ctx := context.Background() desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Int64NumberKind) - lvagg, ckpt := test.Unslice2(lastvalue.New(2)) + lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) aggtest.CheckedUpdate(t, lvagg, metric.NewInt64Number(321), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) @@ -136,11 +136,11 @@ func TestStdoutTimestamp(t *testing.T) { func TestStdoutCounterFormat(t *testing.T) { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) desc := metric.NewDescriptor("test.name", metric.CounterKind, metric.Int64NumberKind) - cagg, ckpt := test.Unslice2(sum.New(2)) + cagg, ckpt := metrictest.Unslice2(sum.New(2)) aggtest.CheckedUpdate(fix.t, cagg, metric.NewInt64Number(123), &desc) require.NoError(t, cagg.SynchronizedMove(ckpt, &desc)) @@ -155,10 +155,10 @@ func TestStdoutCounterFormat(t *testing.T) { func TestStdoutLastValueFormat(t *testing.T) { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Float64NumberKind) - lvagg, ckpt := test.Unslice2(lastvalue.New(2)) + lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) aggtest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) @@ -173,11 +173,11 @@ func TestStdoutLastValueFormat(t *testing.T) { func TestStdoutMinMaxSumCount(t *testing.T) { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) desc := metric.NewDescriptor("test.name", metric.ValueRecorderKind, metric.Float64NumberKind) - magg, ckpt := test.Unslice2(minmaxsumcount.New(2, &desc)) + magg, ckpt := metrictest.Unslice2(minmaxsumcount.New(2, &desc)) aggtest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(123.456), &desc) aggtest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(876.543), &desc) @@ -193,10 +193,10 @@ func TestStdoutMinMaxSumCount(t *testing.T) { func TestStdoutValueRecorderFormat(t *testing.T) { fix := newFixture(t, stdout.WithPrettyPrint()) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) desc := metric.NewDescriptor("test.name", metric.ValueRecorderKind, metric.Float64NumberKind) - aagg, ckpt := test.Unslice2(array.New(2)) + aagg, ckpt := metrictest.Unslice2(array.New(2)) for i := 0; i < 1000; i++ { aggtest.CheckedUpdate(fix.t, aagg, metric.NewFloat64Number(float64(i)+0.5), &desc) @@ -242,7 +242,7 @@ func TestStdoutNoData(t *testing.T) { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) require.NoError(t, agg.SynchronizedMove(ckpt, &desc)) @@ -254,18 +254,18 @@ func TestStdoutNoData(t *testing.T) { }) } - runTwoAggs(test.Unslice2(ddsketch.New(2, &desc, ddsketch.NewDefaultConfig()))) - runTwoAggs(test.Unslice2(minmaxsumcount.New(2, &desc))) + runTwoAggs(metrictest.Unslice2(ddsketch.New(2, &desc, ddsketch.NewDefaultConfig()))) + runTwoAggs(metrictest.Unslice2(minmaxsumcount.New(2, &desc))) } func TestStdoutLastValueNotSet(t *testing.T) { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Float64NumberKind) - lvagg, ckpt := test.Unslice2(lastvalue.New(2)) + lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, lvagg, kv.String("A", "B"), kv.String("C", "D")) @@ -312,10 +312,10 @@ func TestStdoutResource(t *testing.T) { for _, tc := range testCases { fix := newFixture(t) - checkpointSet := test.NewCheckpointSet(tc.res) + checkpointSet := metrictest.NewCheckpointSet(tc.res) desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Float64NumberKind) - lvagg, ckpt := test.Unslice2(lastvalue.New(2)) + lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) aggtest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) diff --git a/exporters/metric/test/test.go b/sdk/export/metric/metrictest/test.go similarity index 97% rename from exporters/metric/test/test.go rename to sdk/export/metric/metrictest/test.go index 59e7ba8a869..28a0c34110c 100644 --- a/exporters/metric/test/test.go +++ b/sdk/export/metric/metrictest/test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package metrictest // import "go.opentelemetry.io/otel/sdk/export/metric/metrictest" import ( "context" diff --git a/exporters/metric/test/test_test.go b/sdk/export/metric/metrictest/test_test.go similarity index 97% rename from exporters/metric/test/test_test.go rename to sdk/export/metric/metrictest/test_test.go index 711c6ab4719..890c8000118 100644 --- a/exporters/metric/test/test_test.go +++ b/sdk/export/metric/metrictest/test_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package metrictest import ( "testing" diff --git a/sdk/metric/controller/push/push_test.go b/sdk/metric/controller/push/push_test.go index df9dbe098ae..6749f6f0ed3 100644 --- a/sdk/metric/controller/push/push_test.go +++ b/sdk/metric/controller/push/push_test.go @@ -28,9 +28,9 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" - exporterTest "go.opentelemetry.io/otel/exporters/metric/test" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/sdk/export/metric/metrictest" "go.opentelemetry.io/otel/sdk/metric/controller/push" controllerTest "go.opentelemetry.io/otel/sdk/metric/controller/test" "go.opentelemetry.io/otel/sdk/metric/processor/test" @@ -75,12 +75,12 @@ type testExporter struct { } type testFixture struct { - checkpointSet *exporterTest.CheckpointSet + checkpointSet *metrictest.CheckpointSet exporter *testExporter } func newFixture(t *testing.T) testFixture { - checkpointSet := exporterTest.NewCheckpointSet(testResource) + checkpointSet := metrictest.NewCheckpointSet(testResource) exporter := &testExporter{ t: t, diff --git a/sdk/metric/processor/basic/basic_test.go b/sdk/metric/processor/basic/basic_test.go index 051621833f7..4d3f6392be1 100644 --- a/sdk/metric/processor/basic/basic_test.go +++ b/sdk/metric/processor/basic/basic_test.go @@ -26,9 +26,9 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" - exportTest "go.opentelemetry.io/otel/exporters/metric/test" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" + "go.opentelemetry.io/otel/sdk/export/metric/metrictest" "go.opentelemetry.io/otel/sdk/metric/aggregator/array" "go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch" "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" @@ -315,7 +315,7 @@ func TestBasicInconsistent(t *testing.T) { b = basic.New(test.AggregatorSelector(), export.PassThroughExporter) desc := metric.NewDescriptor("inst", metric.CounterKind, metric.Int64NumberKind) - accum := export.NewAccumulation(&desc, label.EmptySet(), resource.Empty(), exportTest.NoopAggregator{}) + accum := export.NewAccumulation(&desc, label.EmptySet(), resource.Empty(), metrictest.NoopAggregator{}) require.Equal(t, basic.ErrInconsistentState, b.Process(accum)) // Test invalid kind: @@ -338,7 +338,7 @@ func TestBasicTimestamps(t *testing.T) { afterNew := time.Now() desc := metric.NewDescriptor("inst", metric.CounterKind, metric.Int64NumberKind) - accum := export.NewAccumulation(&desc, label.EmptySet(), resource.Empty(), exportTest.NoopAggregator{}) + accum := export.NewAccumulation(&desc, label.EmptySet(), resource.Empty(), metrictest.NoopAggregator{}) b.StartCollection() _ = b.Process(accum) From 3b01a854d1cbdcaebf38f89af8b2f28fb90489eb Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 24 Jul 2020 20:44:51 -0700 Subject: [PATCH 18/60] Make the stdout exporter a package (#963) * Make the stdout exporter its own package Follow the pattern of the other exporters. * Update dependabot with stdout exporter * Add replace directives for stdout exporter * Remove outdated example test from metric SDK * go mod tidy * Update othttp example test Remove unused stdout exporter. * Remove tests in API that depend on stdout exporter The global package does not need to be validated with the SDK. A more properly constructed end-to-end integration test should be built if this is actually needed. * Add replace clause for otel in stdout go.mod --- .github/dependabot.yml | 4 + api/global/internal/meter_test.go | 66 ------------- example/basic/go.mod | 10 +- example/grpc/go.mod | 6 +- example/http/go.mod | 10 +- example/namedtracer/go.mod | 10 +- exporters/stdout/go.mod | 11 +++ exporters/stdout/go.sum | 97 +++++++++++++++++++ .../othttp/handler_example_test.go | 11 --- sdk/metric/example_test.go | 55 ----------- 10 files changed, 141 insertions(+), 139 deletions(-) create mode 100644 exporters/stdout/go.mod create mode 100644 exporters/stdout/go.sum delete mode 100644 sdk/metric/example_test.go diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b14a2c11fc1..4f5154d410a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,6 +17,10 @@ updates: directory: "/exporters/otlp" # Location of package manifests schedule: interval: "daily" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/exporters/stdout" # Location of package manifests + schedule: + interval: "daily" - package-ecosystem: "gomod" # See documentation for possible values directory: "/exporters/metric/prometheus" # Location of package manifests schedule: diff --git a/api/global/internal/meter_test.go b/api/global/internal/meter_test.go index 6bc65c350cb..aad2e3fabd2 100644 --- a/api/global/internal/meter_test.go +++ b/api/global/internal/meter_test.go @@ -15,11 +15,8 @@ package internal_test import ( - "bytes" "context" "errors" - "io" - "io/ioutil" "testing" "github.com/stretchr/testify/require" @@ -28,7 +25,6 @@ import ( "go.opentelemetry.io/otel/api/global/internal" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/stdout" metrictest "go.opentelemetry.io/otel/internal/metric" ) @@ -229,41 +225,6 @@ func TestUnbind(t *testing.T) { boundM.Unbind() } -func TestDefaultSDK(t *testing.T) { - internal.ResetForTest() - - ctx := context.Background() - meter1 := global.Meter("builtin") - labels1 := []kv.KeyValue{kv.String("A", "B")} - - counter := Must(meter1).NewInt64Counter("test.builtin") - counter.Add(ctx, 1, labels1...) - counter.Add(ctx, 1, labels1...) - - in, out := io.Pipe() - pusher, err := stdout.InstallNewPipeline([]stdout.Option{ - stdout.WithWriter(out), - stdout.WithoutTimestamps(), - }, nil) - if err != nil { - panic(err) - } - - counter.Add(ctx, 1, labels1...) - - ch := make(chan string) - go func() { - data, _ := ioutil.ReadAll(in) - ch <- string(data) - }() - - pusher.Stop() - out.Close() - - require.Equal(t, `[{"Name":"test.builtin{instrumentation.name=builtin,A=B}","Sum":1}] -`, <-ch) -} - func TestUnbindThenRecordOne(t *testing.T) { internal.ResetForTest() @@ -394,30 +355,3 @@ func TestRecordBatchMock(t *testing.T) { }, asStructs(mock.MeasurementBatches)) } - -func TestRecordBatchRealSDK(t *testing.T) { - internal.ResetForTest() - - meter := global.MeterProvider().Meter("builtin") - - counter := Must(meter).NewInt64Counter("test.counter") - - meter.RecordBatch(context.Background(), nil, counter.Measurement(1)) - - var buf bytes.Buffer - - pusher, err := stdout.InstallNewPipeline([]stdout.Option{ - stdout.WithWriter(&buf), - stdout.WithoutTimestamps(), - }, nil) - if err != nil { - t.Fatal(err) - } - global.SetMeterProvider(pusher.Provider()) - - meter.RecordBatch(context.Background(), nil, counter.Measurement(1)) - pusher.Stop() - - require.Equal(t, `[{"Name":"test.counter{instrumentation.name=builtin}","Sum":1}] -`, buf.String()) -} diff --git a/example/basic/go.mod b/example/basic/go.mod index d73d0030ea7..d790f1c0849 100644 --- a/example/basic/go.mod +++ b/example/basic/go.mod @@ -2,6 +2,12 @@ module go.opentelemetry.io/otel/example/basic go 1.13 -replace go.opentelemetry.io/otel => ../.. +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout +) -require go.opentelemetry.io/otel v0.9.0 +require ( + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/stdout v0.9.0 +) diff --git a/example/grpc/go.mod b/example/grpc/go.mod index 8b65a4b0c3b..6d3f4a48d71 100644 --- a/example/grpc/go.mod +++ b/example/grpc/go.mod @@ -2,11 +2,15 @@ module go.opentelemetry.io/otel/example/grpc go 1.13 -replace go.opentelemetry.io/otel => ../.. +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout +) require ( github.com/golang/protobuf v1.4.2 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/stdout v0.9.0 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 google.golang.org/grpc v1.30.0 ) diff --git a/example/http/go.mod b/example/http/go.mod index 34d2feb4444..eb19941b78a 100644 --- a/example/http/go.mod +++ b/example/http/go.mod @@ -2,6 +2,12 @@ module go.opentelemetry.io/otel/example/http go 1.13 -replace go.opentelemetry.io/otel => ../.. +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout +) -require go.opentelemetry.io/otel v0.9.0 +require ( + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/stdout v0.9.0 +) diff --git a/example/namedtracer/go.mod b/example/namedtracer/go.mod index bb6f07160fb..f1e5ba11b24 100644 --- a/example/namedtracer/go.mod +++ b/example/namedtracer/go.mod @@ -2,6 +2,12 @@ module go.opentelemetry.io/otel/example/namedtracer go 1.13 -replace go.opentelemetry.io/otel => ../.. +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout +) -require go.opentelemetry.io/otel v0.9.0 +require ( + go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/exporters/stdout v0.9.0 +) diff --git a/exporters/stdout/go.mod b/exporters/stdout/go.mod new file mode 100644 index 00000000000..da51b99c4dd --- /dev/null +++ b/exporters/stdout/go.mod @@ -0,0 +1,11 @@ +module go.opentelemetry.io/otel/exporters/stdout + +go 1.14 + +replace go.opentelemetry.io/otel => ../.. + +require ( + github.com/stretchr/testify v1.6.1 + go.opentelemetry.io/otel v0.9.0 + google.golang.org/grpc v1.30.0 +) diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum new file mode 100644 index 00000000000..ac2b345dfaa --- /dev/null +++ b/exporters/stdout/go.sum @@ -0,0 +1,97 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= +github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/instrumentation/othttp/handler_example_test.go b/instrumentation/othttp/handler_example_test.go index c01c379ae01..080022d0b7e 100644 --- a/instrumentation/othttp/handler_example_test.go +++ b/instrumentation/othttp/handler_example_test.go @@ -25,7 +25,6 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/exporters/stdout" "go.opentelemetry.io/otel/instrumentation/othttp" ) @@ -44,16 +43,6 @@ func ExampleNewHandler() { a painting */ - // Write spans to stdout - pusher, err := stdout.InstallNewPipeline([]stdout.Option{ - stdout.WithPrettyPrint(), - stdout.WithoutTimestamps(), // This makes the output deterministic - }, nil) - if err != nil { - log.Fatal(err) - } - defer pusher.Stop() - figureOutName := func(ctx context.Context, s string) (string, error) { pp := strings.SplitN(s, "/", 2) var err error diff --git a/sdk/metric/example_test.go b/sdk/metric/example_test.go deleted file mode 100644 index 28b1c0d40bb..00000000000 --- a/sdk/metric/example_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package metric_test - -import ( - "bytes" - "context" - "fmt" - - "go.opentelemetry.io/otel/api/kv" - - "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/exporters/stdout" -) - -func ExampleNew() { - buf := bytes.Buffer{} - _, pusher, err := stdout.NewExportPipeline([]stdout.Option{ - // Defaults to STDOUT. - stdout.WithWriter(&buf), - stdout.WithPrettyPrint(), - stdout.WithoutTimestamps(), // This makes the output deterministic - }, nil) - if err != nil { - panic(fmt.Sprintln("Could not initialize stdout exporter:", err)) - } - - meter := metric.Must(pusher.Provider().Meter("example")) - counter := meter.NewInt64Counter("a.counter") - counter.Add(context.Background(), 100, kv.String("key", "value")) - - // Flush everything - pusher.Stop() - - fmt.Println(buf.String()) - // Output: - // [ - // { - // "Name": "a.counter{instrumentation.name=example,key=value}", - // "Sum": 100 - // } - // ] -} From c9c81379541b7bec5f4ce6e3b31f8f6865dae07e Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 24 Jul 2020 21:09:19 -0700 Subject: [PATCH 19/60] Remove IndexedAttribute from api/label (#970) * Remove IndexedAttribute from api/label IndexedAttribute is a synonym for IndexedLabel and a hold over from when this iterator pattern had multiple implementations. Given it no longer is uses, remove it to avoid introducing confusion to users. * Update Changelog * Update Changelog PR number --- CHANGELOG.md | 2 ++ api/label/iterator.go | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac70e572c56..fbc906ab464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) - Removed `go.opentelemetry.io/otel/api/kv/value` by flattening all value functionality and structures into the `go.opentelemetry.io/otel/api/kv` package. (#968) +- Remove `IndexedAttribute` from `go.opentelemetry.io/otel/api/label`. + Use `IndexedLabel` which is synonymous instead. (#970) ## [0.8.0] - 2020-07-09 diff --git a/api/label/iterator.go b/api/label/iterator.go index f4870f5dd4c..d2ab561854d 100644 --- a/api/label/iterator.go +++ b/api/label/iterator.go @@ -65,11 +65,6 @@ func (i *Iterator) IndexedLabel() (int, kv.KeyValue) { return i.idx, i.Label() } -// IndexedAttribute is a synonym for IndexedLabel(). -func (i *Iterator) IndexedAttribute() (int, kv.KeyValue) { - return i.IndexedLabel() -} - // Len returns a number of labels in the iterator's `*Set`. func (i *Iterator) Len() int { return i.storage.Len() From 691716712372ddadd4559d9b5b482e6b94e301a3 Mon Sep 17 00:00:00 2001 From: "Y.Horie" Date: Tue, 28 Jul 2020 01:29:22 +0900 Subject: [PATCH 20/60] Rename kv.Infer to kv.Any (#969) (#972) * Consider renaming Infer to Any. Any is a commonly used concept in Go. --- CHANGELOG.md | 1 + api/kv/benchmark_test.go | 6 +++--- api/kv/kv.go | 4 ++-- api/kv/kv_test.go | 4 ++-- api/trace/testtrace/span.go | 2 +- bridge/opentracing/internal/mock.go | 2 +- sdk/trace/span.go | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc906ab464..876808ecac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +- Rename `kv.Infer` to `kv.Any`. (#969) - Jaeger exporter helpers: added InstallNewPipeline and removed RegisterGlobal option instead. (#944) - Zipkin exporter helpers: pipeline methods introduced, new exporter method adjusted. (#944) - The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. (#956) diff --git a/api/kv/benchmark_test.go b/api/kv/benchmark_test.go index a258e06ac04..33aa93424f7 100644 --- a/api/kv/benchmark_test.go +++ b/api/kv/benchmark_test.go @@ -34,9 +34,9 @@ func getSpan() trace.Span { return sp } -func BenchmarkKeyInfer(b *testing.B) { +func BenchmarkKeyAny(b *testing.B) { for i := 0; i < b.N; i++ { - kv.Infer("Attr", int(256)) + kv.Any("Attr", int(256)) } } @@ -58,7 +58,7 @@ func BenchmarkMultiWithKeyInference(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - sp.SetAttributes(kv.Infer("Attr", 1)) + sp.SetAttributes(kv.Any("Attr", 1)) } } diff --git a/api/kv/kv.go b/api/kv/kv.go index 83ed878b896..c09823e85df 100644 --- a/api/kv/kv.go +++ b/api/kv/kv.go @@ -100,9 +100,9 @@ func Array(k string, v interface{}) KeyValue { return Key(k).Array(v) } -// Infer creates a new key-value pair instance with a passed name and +// Any creates a new key-value pair instance with a passed name and // automatic type inference. This is slower, and not type-safe. -func Infer(k string, value interface{}) KeyValue { +func Any(k string, value interface{}) KeyValue { if value == nil { return String(k, "") } diff --git a/api/kv/kv_test.go b/api/kv/kv_test.go index 40be1ceee51..018dd878f34 100644 --- a/api/kv/kv_test.go +++ b/api/kv/kv_test.go @@ -120,7 +120,7 @@ func TestKeyValueConstructors(t *testing.T) { } } -func TestInfer(t *testing.T) { +func TestAny(t *testing.T) { builder := &strings.Builder{} builder.WriteString("foo") jsonifyStruct := struct { @@ -214,7 +214,7 @@ func TestInfer(t *testing.T) { }, } { t.Logf("Running test case %s", testcase.key) - keyValue := kv.Infer(testcase.key, testcase.value) + keyValue := kv.Any(testcase.key, testcase.value) if keyValue.Value.Type() != testcase.wantType { t.Errorf("wrong value type, got %#v, expected %#v", keyValue.Value.Type(), testcase.wantType) } diff --git a/api/trace/testtrace/span.go b/api/trace/testtrace/span.go index 66f6e005efa..ea39dc61b9e 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/testtrace/span.go @@ -178,7 +178,7 @@ func (s *Span) SetAttributes(attrs ...kv.KeyValue) { } func (s *Span) SetAttribute(k string, v interface{}) { - s.SetAttributes(kv.Infer(k, v)) + s.SetAttributes(kv.Any(k, v)) } // Name returns the name most recently set on the Span, either at or after creation time. diff --git a/bridge/opentracing/internal/mock.go b/bridge/opentracing/internal/mock.go index 718a1f044eb..ea763731b94 100644 --- a/bridge/opentracing/internal/mock.go +++ b/bridge/opentracing/internal/mock.go @@ -239,7 +239,7 @@ func (s *MockSpan) SetAttributes(attributes ...otelcore.KeyValue) { } func (s *MockSpan) SetAttribute(k string, v interface{}) { - s.SetAttributes(otelcore.Infer(k, v)) + s.SetAttributes(otelcore.Any(k, v)) } func (s *MockSpan) applyUpdate(update otelcorrelation.MapUpdate) { diff --git a/sdk/trace/span.go b/sdk/trace/span.go index 6c782d7eef3..a312f68d1be 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -103,7 +103,7 @@ func (s *span) SetAttributes(attributes ...kv.KeyValue) { } func (s *span) SetAttribute(k string, v interface{}) { - attr := kv.Infer(k, v) + attr := kv.Any(k, v) if attr.Value.Type() != kv.INVALID { s.SetAttributes(attr) } From 7f1dc4a23720177a46280e2b92be046b099abfd6 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 28 Jul 2020 10:23:47 -0700 Subject: [PATCH 21/60] Update Contributing style guide section (#971) * Update Contributing style guide section * Update CONTRIBUTING.md Correct spelling. --- CONTRIBUTING.md | 207 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4547040e9bb..e6d9e4ef664 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -136,8 +136,211 @@ https://github.com/open-telemetry/opentelemetry-specification/issues/165 ## Style Guide -* Make sure to run `make precommit` - this will find and fix the code - formatting. +One of the primary goals of this project is that it is actually used by +developers. With this goal in mind the project strives to build +user-friendly and idiomatic Go code adhering to the Go community's best +practices. + +For a non-comprehensive but foundational overview of these best practices +the [Effective Go](https://golang.org/doc/effective_go.html) documentation +is an excellent starting place. + +As a convenience for developers building this project the `make precommit` +will format, lint, validate, and in some cases fix the changes you plan to +submit. This check will need to pass for your changes to be able to be +merged. + +In addition to idiomatic Go, the project has adopted certain standards for +implementations of common patterns. These standards should be followed as a +default, and if they are not followed documentation needs to be included as +to the reasons why. + +### Configuration + +When creating an instantiation function for a complex `struct` it is useful +to allow variable number of options to be applied. However, the strong type +system of Go restricts the function design options. There are a few ways to +solve this problem, but we have landed on the following design. + +#### `config` + +Configuration should be held in a `struct` named `config`, or prefixed with +specific type name this Configuration applies to if there are multiple +`config` in the package. This `struct` must contain configuration options. + +```go +// config contains configuration options for a thing. +type config struct { + // options ... +} +``` + +In general the `config` `struct` will not need to be used externally to the +package and should be unexported. If, however, it is expected that the user +will likely want to build custom options for the configuration, the `config` +should be exported. Please, include in the documentation for the `config` +how the user can extend the configuration. + +It is important that `config` are not shared across package boundaries. +Meaning a `config` from one package should not be directly used by another. + +Optionally, it is common to include a `configure` function (with the same +naming scheme). This function wraps any defaults setting and looping over +all options to create a configured `config`. + +```go +// configure returns an appropriately configured config. +func configure([]Option) config { + // Set default values for config. + config := config{/* […] */} + for _, option := range options { + option.Apply(&config) + } + // Preform any validation here. + return config +} +``` + +If validation of the `config` options is also preformed this can return an +error as well that is expected to be handled by the instantiation function +or propagated to the user. + +Given the design goal of not having the user need to work with the `config`, +the `configure` function should also be unexported. + +#### `Option` + +To set the value of the options a `config` contains, a corresponding +`Option` interface type should be used. + +```go +type Option interface { + Apply(*Config) +} +``` + +The name of the interface should be prefixed in the same way the +corresponding `config` is (if at all). + +#### Options + +All user configurable options for a `config` must have a related unexported +implementation of the `Option` interface and an exported configuration +function that wraps this implementation. + +The wrapping function name should be prefixed with `With*` (or in the +special case of a boolean options `Without*`) and should have the following +function signature. + +```go +func With*(…) Option { … } +``` + +##### `bool` Options + +```go +type defaultFalseOption bool + +func (o defaultFalseOption) Apply(c *Config) { + c.Bool = bool(o) +} + +// WithOption sets a T* to have an option included. +func WithOption() Option { + return defaultFalseOption(true) +} +``` + +```go +type defaultTrueOption bool + +func (o defaultTrueOption) Apply(c *Config) { + c.Bool = bool(o) +} + +// WithoutOption sets a T* to have Bool option excluded. +func WithoutOption() Option { + return defaultTrueOption(false) +} +```` + +##### Declared Type Options + +```go +type myTypeOption struct { + MyType MyType +} + +func (o myTypeOption) Apply(c *Config) { + c.MyType = o.MyType +} + +// WithMyType sets T* to have include MyType. +func WithMyType(t MyType) Option { + return myTypeOption{t} +} +``` + +#### Instantiation + +Using this configuration pattern to configure instantiation with a `New*` +function. + +```go +func NewT*(options ...Option) T* {…} +``` + +Any required parameters can be declared before the variadic `options`. + +#### Dealing with Overlap + +Sometimes there are multiple complex `struct` that share common +configuration and also have distinct configuration. To avoid repeated +portions of `config`s, a common `config` can be used with the union of +options being handled with the `Option` interface. + +For example. + +```go +// config holds options for all animals. +type config struct { + Weight float64 + Color string + MaxAltitude float64 +} + +// DogOption apply Dog specific options. +type DogOption interface { + ApplyDog(*config) +} + +// BirdOption apply Bird specific options. +type BirdOption interface { + ApplyBird(*config) +} + +// Option apply options for all animals. +type Option interface { + BirdOption + DogOption +} + +type weightOption float64 +func (o weightOption) ApplyDog(c *config) { c.Weight = float64(o) } +func (o weightOption) ApplyBird(c *config) { c.Weight = float64(o) } +func WithWeight(w float64) Option { return weightOption(w) } + +type furColorOption string +func (o furColorOption) ApplyDog(c *config) { c.Color = string(o) } +func WithFurColor(c string) DogOption { return furColorOption(c) } + +type maxAltitudeOption float64 +func (o maxAltitudeOption) ApplyBird(c *config) { c.MaxAltitude = float64(o) } +func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) } + +func NewDog(name string, o ...DogOption) Dog {…} +func NewBird(name string, o ...BirdOption) Bird {…} +``` ## Approvers and Maintainers From 2833212bd9ce73cef3ffb44ccc78f3fb3dd16d3b Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 28 Jul 2020 10:47:08 -0700 Subject: [PATCH 22/60] Decouple API from SDK (#977) * Remove SDK from othttp instrumentation * Remove dependency on SDK in api/kv pkg Benchmark the kv package not the SDK here. * Update api/global benchmarks Move SDK related tests to SDK where applicable * Add internal testing SDK implementation To be used by the API for testing so it does not depend on the actual SDK. * Update api/global/internal to use internal/sdk * Fix lint on sdk/metric benchmark * Lint internal/sdk * Merge internal/sdk into api/trace/testtrace * Update Changelog --- CHANGELOG.md | 4 + api/global/internal/benchmark_test.go | 101 +---- api/global/internal/meter_test.go | 2 + api/global/internal/trace_test.go | 44 +-- api/kv/benchmark_test.go | 350 ++++++++++++++++-- api/kv/key_test.go | 40 -- api/trace/testtrace/config.go | 134 +++++++ api/trace/testtrace/generator.go | 73 ---- api/trace/testtrace/provider.go | 64 ++++ api/trace/testtrace/span.go | 6 +- api/trace/testtrace/span_test.go | 58 +-- api/trace/testtrace/tracer.go | 125 ++----- api/trace/testtrace/tracer_test.go | 51 ++- .../othttp/transport_example_test.go | 34 +- sdk/metric/benchmark_test.go | 75 ++-- 15 files changed, 710 insertions(+), 451 deletions(-) create mode 100644 api/trace/testtrace/config.go delete mode 100644 api/trace/testtrace/generator.go create mode 100644 api/trace/testtrace/provider.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 876808ecac2..f79b64f2713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Zipkin exporter helpers: pipeline methods introduced, new exporter method adjusted. (#944) - The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. (#956) +### Fixed + +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) + ## [0.9.0] - 2020-07-20 ### Added diff --git a/api/global/internal/benchmark_test.go b/api/global/internal/benchmark_test.go index 107461cc1c1..d8e4ca932c4 100644 --- a/api/global/internal/benchmark_test.go +++ b/api/global/internal/benchmark_test.go @@ -21,48 +21,12 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/global/internal" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/api/trace" - export "go.opentelemetry.io/otel/sdk/export/metric" - sdk "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/processor/test" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) -var Must = metric.Must - -// benchFixture is copied from sdk/metric/benchmark_test.go. -// TODO refactor to share this code. -type benchFixture struct { - export.AggregatorSelector - accumulator *sdk.Accumulator - meter metric.Meter - B *testing.B -} - -var _ metric.Provider = &benchFixture{} - -func newFixture(b *testing.B) *benchFixture { - b.ReportAllocs() - bf := &benchFixture{ - B: b, - AggregatorSelector: test.AggregatorSelector(), - } - - bf.accumulator = sdk.NewAccumulator(bf) - bf.meter = metric.WrapMeterImpl(bf.accumulator, "test") - return bf -} - -func (*benchFixture) Process(export.Accumulation) error { - return nil -} - -func (fix *benchFixture) Meter(_ string, _ ...metric.MeterOption) metric.Meter { - return fix.meter -} - func BenchmarkGlobalInt64CounterAddNoSDK(b *testing.B) { + // Compare with BenchmarkGlobalInt64CounterAddWithSDK() in + // ../../../sdk/metric/benchmark_test.go to see the overhead of the + // global no-op system against a registered SDK. internal.ResetForTest() ctx := context.Background() sdk := global.Meter("test") @@ -76,60 +40,15 @@ func BenchmarkGlobalInt64CounterAddNoSDK(b *testing.B) { } } -func BenchmarkGlobalInt64CounterAddWithSDK(b *testing.B) { - // Comapare with BenchmarkInt64CounterAdd() in ../../sdk/meter/benchmark_test.go +func BenchmarkStartEndSpanNoSDK(b *testing.B) { + // Compare with BenchmarkStartEndSpan() in + // ../../../sdk/trace/benchmark_test.go. + internal.ResetForTest() + t := global.Tracer("Benchmark StartEndSpan") ctx := context.Background() - fix := newFixture(b) - - sdk := global.Meter("test") - - global.SetMeterProvider(fix) - - labs := []kv.KeyValue{kv.String("A", "B")} - cnt := Must(sdk).NewInt64Counter("int64.counter") - b.ResetTimer() - for i := 0; i < b.N; i++ { - cnt.Add(ctx, 1, labs...) - } -} - -func BenchmarkStartEndSpan(b *testing.B) { - // Comapare with BenchmarkStartEndSpan() in ../../sdk/trace/benchmark_test.go - traceBenchmark(b, func(b *testing.B) { - t := global.Tracer("Benchmark StartEndSpan") - ctx := context.Background() - b.ResetTimer() - for i := 0; i < b.N; i++ { - _, span := t.Start(ctx, "/foo") - span.End() - } - }) -} - -func traceBenchmark(b *testing.B, fn func(*testing.B)) { - internal.ResetForTest() - b.Run("No SDK", func(b *testing.B) { - b.ReportAllocs() - fn(b) - }) - b.Run("Default SDK (AlwaysSample)", func(b *testing.B) { - b.ReportAllocs() - global.SetTraceProvider(traceProvider(b, sdktrace.AlwaysSample())) - fn(b) - }) - b.Run("Default SDK (NeverSample)", func(b *testing.B) { - b.ReportAllocs() - global.SetTraceProvider(traceProvider(b, sdktrace.NeverSample())) - fn(b) - }) -} - -func traceProvider(b *testing.B, sampler sdktrace.Sampler) trace.Provider { - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sampler})) - if err != nil { - b.Fatalf("Failed to create trace provider with sampler: %v", err) + _, span := t.Start(ctx, "/foo") + span.End() } - return tp } diff --git a/api/global/internal/meter_test.go b/api/global/internal/meter_test.go index aad2e3fabd2..aa962ba0188 100644 --- a/api/global/internal/meter_test.go +++ b/api/global/internal/meter_test.go @@ -28,6 +28,8 @@ import ( metrictest "go.opentelemetry.io/otel/internal/metric" ) +var Must = metric.Must + // Note: Maybe this should be factored into ../../../internal/metric? type measured struct { Name string diff --git a/api/global/internal/trace_test.go b/api/global/internal/trace_test.go index ac6ceb43b69..58d73aa5eb0 100644 --- a/api/global/internal/trace_test.go +++ b/api/global/internal/trace_test.go @@ -18,32 +18,14 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" + "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/global/internal" - export "go.opentelemetry.io/otel/sdk/export/trace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" + "go.opentelemetry.io/otel/api/trace/testtrace" ) -type testSpanProcesor struct { - // Names of Spans started. - spansStarted []string - // Names of Spans ended. - spansEnded []string -} - -func (t *testSpanProcesor) OnStart(s *export.SpanData) { - t.spansStarted = append(t.spansStarted, s.Name) -} - -func (t *testSpanProcesor) OnEnd(s *export.SpanData) { - t.spansEnded = append(t.spansEnded, s.Name) -} - -func (t *testSpanProcesor) Shutdown() {} - -func TestTraceDefaultSDK(t *testing.T) { +func TestTraceWithSDK(t *testing.T) { internal.ResetForTest() ctx := context.Background() @@ -56,13 +38,8 @@ func TestTraceDefaultSDK(t *testing.T) { t.Errorf("failed to wrap function with span prior to initialization: %v", err) } - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - if err != nil { - t.Fatal(err) - } - tsp := &testSpanProcesor{} - tp.RegisterSpanProcessor(tsp) - + sr := new(testtrace.StandardSpanRecorder) + tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) global.SetTraceProvider(tp) // This span was started before initialization, it is expected to be dropped. @@ -83,7 +60,14 @@ func TestTraceDefaultSDK(t *testing.T) { t.Errorf("failed to wrap function with span post initialization with new tracer: %v", err) } + filterNames := func(spans []*testtrace.Span) []string { + names := make([]string, len(spans)) + for i := range spans { + names[i] = spans[i].Name() + } + return names + } expected := []string{"span2", "withSpan2", "span3", "withSpan3"} - require.Equal(t, tsp.spansStarted, expected) - require.Equal(t, tsp.spansEnded, expected) + assert.ElementsMatch(t, expected, filterNames(sr.Started())) + assert.ElementsMatch(t, expected, filterNames(sr.Completed())) } diff --git a/api/kv/benchmark_test.go b/api/kv/benchmark_test.go index 33aa93424f7..a1fea5b290d 100644 --- a/api/kv/benchmark_test.go +++ b/api/kv/benchmark_test.go @@ -15,62 +15,360 @@ package kv_test import ( - "context" "testing" "go.opentelemetry.io/otel/api/kv" +) + +type test struct{} + +var ( + arrayVal = []string{"one", "two"} + arrayKeyVal = kv.Array("array", arrayVal) + + boolVal = true + boolKeyVal = kv.Bool("bool", boolVal) + + intVal = int(1) + intKeyVal = kv.Int("int", intVal) + + int8Val = int8(1) + int8KeyVal = kv.Int("int8", int(int8Val)) + + int16Val = int16(1) + int16KeyVal = kv.Int("int16", int(int16Val)) + + int32Val = int32(1) + int32KeyVal = kv.Int32("int32", int32Val) + + int64Val = int64(1) + int64KeyVal = kv.Int64("int64", int64Val) + + uintVal = uint(1) + uintKeyVal = kv.Uint("uint", uintVal) + + uint8Val = uint8(1) + uint8KeyVal = kv.Uint("uint8", uint(uint8Val)) + + uint16Val = uint16(1) + uint16KeyVal = kv.Uint("uint16", uint(uint16Val)) + + uint32Val = uint32(1) + uint32KeyVal = kv.Uint32("uint32", uint32Val) - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/trace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" + uint64Val = uint64(1) + uint64KeyVal = kv.Uint64("uint64", uint64Val) + + float32Val = float32(1.0) + float32KeyVal = kv.Float32("float32", float32Val) + + float64Val = float64(1.0) + float64KeyVal = kv.Float64("float64", float64Val) + + stringVal = "string" + stringKeyVal = kv.String("string", stringVal) + + bytesVal = []byte("bytes") + structVal = test{} ) -// Note: The tests below load a real SDK to ensure the compiler isn't optimizing -// the test based on global analysis limited to the NoopSpan implementation. -func getSpan() trace.Span { - _, sp := global.Tracer("Test").Start(context.Background(), "Span") - tr, _ := sdktrace.NewProvider() - global.SetTraceProvider(tr) - return sp +func BenchmarkArrayKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Array("array", arrayVal) + } +} + +func BenchmarkArrayKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("array", arrayVal) + } +} + +func BenchmarkBoolKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Bool("bool", boolVal) + } +} + +func BenchmarkBoolKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("bool", boolVal) + } +} + +func BenchmarkIntKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Int("int", intVal) + } +} + +func BenchmarkIntKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("int", intVal) + } +} + +func BenchmarkInt8KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("int8", int8Val) + } +} + +func BenchmarkInt16KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("int16", int16Val) + } +} + +func BenchmarkInt32Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Int32("int32", int32Val) + } +} + +func BenchmarkInt32KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("int32", int32Val) + } +} + +func BenchmarkInt64Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Int64("int64", int64Val) + } +} + +func BenchmarkInt64KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("int64", int64Val) + } +} + +func BenchmarkUintKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Uint("uint", uintVal) + } +} + +func BenchmarkUintKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("uint", uintVal) + } +} + +func BenchmarkUint8KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("uint8", uint8Val) + } +} + +func BenchmarkUint16KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("uint16", uint16Val) + } +} + +func BenchmarkUint32Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Uint32("uint32", uint32Val) + } +} + +func BenchmarkUint32KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("uint32", uint32Val) + } +} + +func BenchmarkUint64Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Uint64("uint64", uint64Val) + } +} + +func BenchmarkUint64KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("uint64", uint64Val) + } +} + +func BenchmarkFloat32Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Float32("float32", float32Val) + } +} + +func BenchmarkFloat32KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("float32", float32Val) + } +} + +func BenchmarkFloat64Key(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Float64("float64", float64Val) + } +} + +func BenchmarkFloat64KeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("float64", float64Val) + } +} + +func BenchmarkStringKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.String("string", stringVal) + } +} + +func BenchmarkStringKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("string", stringVal) + } +} + +func BenchmarkBytesKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("bytes", bytesVal) + } +} + +func BenchmarkStructKeyAny(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = kv.Any("struct", structVal) + } } -func BenchmarkKeyAny(b *testing.B) { +func BenchmarkEmitArray(b *testing.B) { + b.ReportAllocs() for i := 0; i < b.N; i++ { - kv.Any("Attr", int(256)) + _ = arrayKeyVal.Value.Emit() } } -func BenchmarkMultiNoKeyInference(b *testing.B) { - sp := getSpan() +func BenchmarkEmitBool(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = boolKeyVal.Value.Emit() + } +} +func BenchmarkEmitInt(b *testing.B) { b.ReportAllocs() - b.ResetTimer() + for i := 0; i < b.N; i++ { + _ = intKeyVal.Value.Emit() + } +} +func BenchmarkEmitInt8(b *testing.B) { + b.ReportAllocs() for i := 0; i < b.N; i++ { - sp.SetAttributes(kv.Int("Attr", 1)) + _ = int8KeyVal.Value.Emit() } } -func BenchmarkMultiWithKeyInference(b *testing.B) { - sp := getSpan() +func BenchmarkEmitInt16(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = int16KeyVal.Value.Emit() + } +} +func BenchmarkEmitInt32(b *testing.B) { b.ReportAllocs() - b.ResetTimer() + for i := 0; i < b.N; i++ { + _ = int32KeyVal.Value.Emit() + } +} +func BenchmarkEmitInt64(b *testing.B) { + b.ReportAllocs() for i := 0; i < b.N; i++ { - sp.SetAttributes(kv.Any("Attr", 1)) + _ = int64KeyVal.Value.Emit() } } -func BenchmarkSingleWithKeyInferenceValue(b *testing.B) { - sp := getSpan() +func BenchmarkEmitUint(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = uintKeyVal.Value.Emit() + } +} +func BenchmarkEmitUint8(b *testing.B) { b.ReportAllocs() - b.ResetTimer() + for i := 0; i < b.N; i++ { + _ = uint8KeyVal.Value.Emit() + } +} +func BenchmarkEmitUint16(b *testing.B) { + b.ReportAllocs() for i := 0; i < b.N; i++ { - sp.SetAttribute("Attr", 1) + _ = uint16KeyVal.Value.Emit() } +} + +func BenchmarkEmitUint32(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = uint32KeyVal.Value.Emit() + } +} - b.StopTimer() +func BenchmarkEmitUint64(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = uint64KeyVal.Value.Emit() + } +} + +func BenchmarkEmitFloat32(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = float32KeyVal.Value.Emit() + } +} + +func BenchmarkEmitFloat64(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = float64KeyVal.Value.Emit() + } +} + +func BenchmarkEmitString(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = stringKeyVal.Value.Emit() + } } diff --git a/api/kv/key_test.go b/api/kv/key_test.go index f8c7311c6d3..d79031ff947 100644 --- a/api/kv/key_test.go +++ b/api/kv/key_test.go @@ -119,43 +119,3 @@ func TestEmit(t *testing.T) { }) } } - -func BenchmarkEmitBool(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - n := kv.BoolValue(i%2 == 0) - _ = n.Emit() - } -} - -func BenchmarkEmitInt64(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - n := kv.Int64Value(int64(i)) - _ = n.Emit() - } -} - -func BenchmarkEmitUInt64(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - n := kv.Uint64Value(uint64(i)) - _ = n.Emit() - } -} - -func BenchmarkEmitFloat64(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - n := kv.Float64Value(float64(i)) - _ = n.Emit() - } -} - -func BenchmarkEmitFloat32(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - n := kv.Float32Value(float32(i)) - _ = n.Emit() - } -} diff --git a/api/trace/testtrace/config.go b/api/trace/testtrace/config.go new file mode 100644 index 00000000000..b4557676c18 --- /dev/null +++ b/api/trace/testtrace/config.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package testtrace + +import ( + "context" + "encoding/binary" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/api/trace" +) + +// defaultSpanContextFunc returns the default SpanContextFunc. +func defaultSpanContextFunc() func(context.Context) trace.SpanContext { + var traceID, spanID uint64 = 1, 1 + return func(ctx context.Context) trace.SpanContext { + var sc trace.SpanContext + if lsc := trace.SpanFromContext(ctx).SpanContext(); lsc.IsValid() { + sc = lsc + } else if rsc := trace.RemoteSpanContextFromContext(ctx); rsc.IsValid() { + sc = rsc + } else { + binary.BigEndian.PutUint64(sc.TraceID[:], atomic.AddUint64(&traceID, 1)) + } + binary.BigEndian.PutUint64(sc.SpanID[:], atomic.AddUint64(&spanID, 1)) + return sc + } +} + +type config struct { + // SpanContextFunc returns a SpanContext from an parent Context for a + // new span. + SpanContextFunc func(context.Context) trace.SpanContext + + // SpanRecorder keeps track of spans. + SpanRecorder SpanRecorder +} + +func configure(opts ...Option) config { + conf := config{} + for _, opt := range opts { + opt.Apply(&conf) + } + if conf.SpanContextFunc == nil { + conf.SpanContextFunc = defaultSpanContextFunc() + } + return conf +} + +type Option interface { + Apply(*config) +} + +type spanContextFuncOption struct { + SpanContextFunc func(context.Context) trace.SpanContext +} + +func (o spanContextFuncOption) Apply(c *config) { + c.SpanContextFunc = o.SpanContextFunc +} + +func WithSpanContextFunc(f func(context.Context) trace.SpanContext) Option { + return spanContextFuncOption{f} +} + +type spanRecorderOption struct { + SpanRecorder SpanRecorder +} + +func (o spanRecorderOption) Apply(c *config) { + c.SpanRecorder = o.SpanRecorder +} + +func WithSpanRecorder(sr SpanRecorder) Option { + return spanRecorderOption{sr} +} + +type SpanRecorder interface { + OnStart(*Span) + OnEnd(*Span) +} + +type StandardSpanRecorder struct { + startedMu sync.RWMutex + started []*Span + + doneMu sync.RWMutex + done []*Span +} + +func (ssr *StandardSpanRecorder) OnStart(span *Span) { + ssr.startedMu.Lock() + defer ssr.startedMu.Unlock() + ssr.started = append(ssr.started, span) +} + +func (ssr *StandardSpanRecorder) OnEnd(span *Span) { + ssr.doneMu.Lock() + defer ssr.doneMu.Unlock() + ssr.done = append(ssr.done, span) +} + +func (ssr *StandardSpanRecorder) Started() []*Span { + ssr.startedMu.RLock() + defer ssr.startedMu.RUnlock() + started := make([]*Span, len(ssr.started)) + for i := range ssr.started { + started[i] = ssr.started[i] + } + return started +} + +func (ssr *StandardSpanRecorder) Completed() []*Span { + ssr.doneMu.RLock() + defer ssr.doneMu.RUnlock() + done := make([]*Span, len(ssr.done)) + for i := range ssr.done { + done[i] = ssr.done[i] + } + return done +} diff --git a/api/trace/testtrace/generator.go b/api/trace/testtrace/generator.go deleted file mode 100644 index 35a09b5e8b1..00000000000 --- a/api/trace/testtrace/generator.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package testtrace - -import ( - "encoding/binary" - "sync" - - "go.opentelemetry.io/otel/api/trace" -) - -type Generator interface { - TraceID() trace.ID - SpanID() trace.SpanID -} - -var _ Generator = (*CountGenerator)(nil) - -// CountGenerator is a simple Generator that can be used to create unique, albeit deterministic, -// trace and span IDs. -type CountGenerator struct { - lock sync.Mutex - traceIDHigh uint64 - traceIDLow uint64 - spanID uint64 -} - -func NewCountGenerator() *CountGenerator { - return &CountGenerator{} -} - -func (g *CountGenerator) TraceID() trace.ID { - g.lock.Lock() - defer g.lock.Unlock() - - if g.traceIDHigh == g.traceIDLow { - g.traceIDHigh++ - } else { - g.traceIDLow++ - } - - var traceID trace.ID - - binary.BigEndian.PutUint64(traceID[0:8], g.traceIDLow) - binary.BigEndian.PutUint64(traceID[8:], g.traceIDHigh) - - return traceID -} - -func (g *CountGenerator) SpanID() trace.SpanID { - g.lock.Lock() - defer g.lock.Unlock() - - g.spanID++ - - var spanID trace.SpanID - - binary.BigEndian.PutUint64(spanID[:], g.spanID) - - return spanID -} diff --git a/api/trace/testtrace/provider.go b/api/trace/testtrace/provider.go new file mode 100644 index 00000000000..9bd58daf226 --- /dev/null +++ b/api/trace/testtrace/provider.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package testtrace + +import ( + "sync" + + "go.opentelemetry.io/otel/api/trace" +) + +type Provider struct { + config config + + tracersMu sync.Mutex + tracers map[instrumentation]*Tracer +} + +var _ trace.Provider = (*Provider)(nil) + +func NewProvider(opts ...Option) *Provider { + return &Provider{ + config: configure(opts...), + tracers: make(map[instrumentation]*Tracer), + } +} + +type instrumentation struct { + Name, Version string +} + +func (p *Provider) Tracer(instName string, opts ...trace.TracerOption) trace.Tracer { + conf := new(trace.TracerConfig) + for _, o := range opts { + o(conf) + } + inst := instrumentation{ + Name: instName, + Version: conf.InstrumentationVersion, + } + p.tracersMu.Lock() + defer p.tracersMu.Unlock() + t, ok := p.tracers[inst] + if !ok { + t = &Tracer{ + Name: instName, + Version: conf.InstrumentationVersion, + config: &p.config, + } + p.tracers[inst] = t + } + return t +} diff --git a/api/trace/testtrace/span.go b/api/trace/testtrace/span.go index ea39dc61b9e..38dd84085c1 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/testtrace/span.go @@ -36,7 +36,7 @@ const ( var _ trace.Span = (*Span)(nil) type Span struct { - lock *sync.RWMutex + lock sync.RWMutex tracer *Tracer spanContext trace.SpanContext parentSpanID trace.SpanID @@ -64,7 +64,6 @@ func (s *Span) End(opts ...trace.EndOption) { } var c trace.EndConfig - for _, opt := range opts { opt(&c) } @@ -76,6 +75,9 @@ func (s *Span) End(opts ...trace.EndOption) { } s.ended = true + if s.tracer.config.SpanRecorder != nil { + s.tracer.config.SpanRecorder.OnEnd(s) + } } func (s *Span) RecordError(ctx context.Context, err error, opts ...trace.ErrorOption) { diff --git a/api/trace/testtrace/span_test.go b/api/trace/testtrace/span_test.go index e5229e24614..33cd23f6f6b 100644 --- a/api/trace/testtrace/span_test.go +++ b/api/trace/testtrace/span_test.go @@ -33,12 +33,13 @@ import ( func TestSpan(t *testing.T) { t.Run("#Tracer", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns the tracer used to start the span", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, subject := tracer.Start(context.Background(), "test") e.Expect(subject.Tracer()).ToEqual(tracer) @@ -46,12 +47,13 @@ func TestSpan(t *testing.T) { }) t.Run("#End", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("ends the span", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -82,7 +84,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -105,7 +107,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -124,6 +126,7 @@ func TestSpan(t *testing.T) { }) t.Run("#RecordError", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("records an error", func(t *testing.T) { t.Parallel() @@ -147,7 +150,7 @@ func TestSpan(t *testing.T) { for _, s := range scenarios { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -175,7 +178,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -204,7 +207,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -221,7 +224,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -234,12 +237,13 @@ func TestSpan(t *testing.T) { }) t.Run("#IsRecording", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns true", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, subject := tracer.Start(context.Background(), "test") e.Expect(subject.IsRecording()).ToBeTrue() @@ -247,12 +251,13 @@ func TestSpan(t *testing.T) { }) t.Run("#SpanContext", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns a valid SpanContext", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, subject := tracer.Start(context.Background(), "test") e.Expect(subject.SpanContext().IsValid()).ToBeTrue() @@ -263,7 +268,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, subject := tracer.Start(context.Background(), "test") e.Expect(subject.SpanContext()).ToEqual(subject.SpanContext()) @@ -271,12 +276,13 @@ func TestSpan(t *testing.T) { }) t.Run("#Name", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns the most recently set name on the span", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) originalName := "test" _, span := tracer.Start(context.Background(), originalName) @@ -299,7 +305,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) originalName := "test" _, span := tracer.Start(context.Background(), originalName) @@ -314,12 +320,13 @@ func TestSpan(t *testing.T) { }) t.Run("#Attributes", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns an empty map by default", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -333,7 +340,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -359,7 +366,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -382,7 +389,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -409,12 +416,13 @@ func TestSpan(t *testing.T) { }) t.Run("#Links", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns an empty map by default", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -425,12 +433,13 @@ func TestSpan(t *testing.T) { }) t.Run("#Events", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("returns an empty slice by default", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -444,7 +453,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -497,7 +506,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -518,12 +527,13 @@ func TestSpan(t *testing.T) { }) t.Run("#Status", func(t *testing.T) { + tp := testtrace.NewProvider() t.Run("defaults to OK", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -562,7 +572,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) @@ -580,7 +590,7 @@ func TestSpan(t *testing.T) { e := matchers.NewExpecter(t) - tracer := testtrace.NewTracer() + tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") subject, ok := span.(*testtrace.Span) diff --git a/api/trace/testtrace/tracer.go b/api/trace/testtrace/tracer.go index fe383a672df..5408576e206 100644 --- a/api/trace/testtrace/tracer.go +++ b/api/trace/testtrace/tracer.go @@ -16,132 +16,79 @@ package testtrace import ( "context" - "sync" "time" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" - - "go.opentelemetry.io/otel/internal/trace/parent" ) var _ trace.Tracer = (*Tracer)(nil) -// Tracer is a type of OpenTelemetry Tracer that tracks both active and ended spans, -// and which creates Spans that may be inspected to see what data has been set on them. +// Tracer is an OpenTelemetry Tracer implementation used for testing. type Tracer struct { - lock *sync.RWMutex - generator Generator - spans []*Span -} - -func NewTracer(opts ...TracerOption) *Tracer { - c := newTracerConfig(opts...) + // Name is the instrumentation name. + Name string + // Version is the instrumentation version. + Version string - return &Tracer{ - lock: &sync.RWMutex{}, - generator: c.generator, - } + config *config } func (t *Tracer) Start(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, trace.Span) { var c trace.StartConfig - for _, opt := range opts { opt(&c) } - var traceID trace.ID - var parentSpanID trace.SpanID - - parentSpanContext, _, links := parent.GetSpanContextAndLinks(ctx, c.NewRoot) - - if parentSpanContext.IsValid() { - traceID = parentSpanContext.TraceID - parentSpanID = parentSpanContext.SpanID - } else { - traceID = t.generator.TraceID() - } - - spanID := t.generator.SpanID() - startTime := time.Now() - if st := c.StartTime; !st.IsZero() { startTime = st } span := &Span{ - lock: &sync.RWMutex{}, - tracer: t, - startTime: startTime, - spanContext: trace.SpanContext{ - TraceID: traceID, - SpanID: spanID, - }, - parentSpanID: parentSpanID, - attributes: make(map[kv.Key]kv.Value), - links: make(map[trace.SpanContext][]kv.KeyValue), + tracer: t, + startTime: startTime, + attributes: make(map[kv.Key]kv.Value), + links: make(map[trace.SpanContext][]kv.KeyValue), } - span.SetName(name) - span.SetAttributes(c.Attributes...) + if c.NewRoot { + span.spanContext = trace.EmptySpanContext() - for _, link := range links { - span.links[link.SpanContext] = link.Attributes + iodKey := kv.Key("ignored-on-demand") + if lsc := trace.SpanFromContext(ctx).SpanContext(); lsc.IsValid() { + span.links[lsc] = []kv.KeyValue{iodKey.String("current")} + } + if rsc := trace.RemoteSpanContextFromContext(ctx); rsc.IsValid() { + span.links[rsc] = []kv.KeyValue{iodKey.String("remote")} + } + } else { + span.spanContext = t.config.SpanContextFunc(ctx) + if lsc := trace.SpanFromContext(ctx).SpanContext(); lsc.IsValid() { + span.spanContext.TraceID = lsc.TraceID + span.parentSpanID = lsc.SpanID + } else if rsc := trace.RemoteSpanContextFromContext(ctx); rsc.IsValid() { + span.spanContext.TraceID = rsc.TraceID + span.parentSpanID = rsc.SpanID + } } + for _, link := range c.Links { span.links[link.SpanContext] = link.Attributes } - t.lock.Lock() - - t.spans = append(t.spans, span) - - t.lock.Unlock() + span.SetName(name) + span.SetAttributes(c.Attributes...) + if t.config.SpanRecorder != nil { + t.config.SpanRecorder.OnStart(span) + } return trace.ContextWithSpan(ctx, span), span } func (t *Tracer) WithSpan(ctx context.Context, name string, body func(ctx context.Context) error, opts ...trace.StartOption) error { - ctx, _ = t.Start(ctx, name, opts...) + ctx, span := t.Start(ctx, name, opts...) + defer span.End() return body(ctx) } - -// Spans returns the list of current and ended Spans started via the Tracer. -func (t *Tracer) Spans() []*Span { - t.lock.RLock() - defer t.lock.RUnlock() - - return append([]*Span{}, t.spans...) -} - -// TracerOption enables configuration of a new Tracer. -type TracerOption func(*tracerConfig) - -// TracerWithGenerator enables customization of the Generator that the Tracer will use -// to create new trace and span IDs. -// By default, new Tracers will use the CountGenerator. -func TracerWithGenerator(generator Generator) TracerOption { - return func(c *tracerConfig) { - c.generator = generator - } -} - -type tracerConfig struct { - generator Generator -} - -func newTracerConfig(opts ...TracerOption) tracerConfig { - var c tracerConfig - defaultOpts := []TracerOption{ - TracerWithGenerator(NewCountGenerator()), - } - - for _, opt := range append(defaultOpts, opts...) { - opt(&c) - } - - return c -} diff --git a/api/trace/testtrace/tracer_test.go b/api/trace/testtrace/tracer_test.go index fff385e1d9a..13b2fbe89d0 100644 --- a/api/trace/testtrace/tracer_test.go +++ b/api/trace/testtrace/tracer_test.go @@ -16,7 +16,9 @@ package testtrace_test import ( "context" + "fmt" "sync" + "sync/atomic" "testing" "time" @@ -28,9 +30,15 @@ import ( ) func TestTracer(t *testing.T) { - testharness.NewHarness(t).TestTracer(func() trace.Tracer { - return testtrace.NewTracer() - }) + tp := testtrace.NewProvider() + + testharness.NewHarness(t).TestTracer(func() func() trace.Tracer { + tp := testtrace.NewProvider() + var i uint64 + return func() trace.Tracer { + return tp.Tracer(fmt.Sprintf("tracer %d", atomic.AddUint64(&i, 1))) + } + }()) t.Run("#Start", func(t *testing.T) { testTracedSpan(t, func(tracer trace.Tracer, name string) (trace.Span, error) { @@ -46,7 +54,7 @@ func TestTracer(t *testing.T) { expectedStartTime := time.Now().AddDate(5, 0, 0) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) _, span := subject.Start(context.Background(), "test", trace.WithStartTime(expectedStartTime)) testSpan, ok := span.(*testtrace.Span) @@ -63,7 +71,7 @@ func TestTracer(t *testing.T) { attr1 := kv.String("a", "1") attr2 := kv.String("b", "2") - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) _, span := subject.Start(context.Background(), "test", trace.WithAttributes(attr1, attr2)) testSpan, ok := span.(*testtrace.Span) @@ -79,7 +87,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) parent, parentSpan := subject.Start(context.Background(), "parent") parentSpanContext := parentSpan.SpanContext() @@ -100,7 +108,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) parent, parentSpan := subject.Start(context.Background(), "parent") _, remoteParentSpan := subject.Start(context.Background(), "remote not-a-parent") @@ -123,7 +131,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) _, remoteParentSpan := subject.Start(context.Background(), "remote parent") parent := trace.ContextWithRemoteSpanContext(context.Background(), remoteParentSpan.SpanContext()) @@ -145,7 +153,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) _, parentSpan := subject.Start(context.Background(), "not-a-parent") _, remoteParentSpan := subject.Start(context.Background(), "remote not-a-parent") @@ -170,7 +178,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) parentCtx, parentSpan := subject.Start(context.Background(), "not-a-parent") _, remoteParentSpan := subject.Start(context.Background(), "remote not-a-parent") @@ -220,7 +228,7 @@ func TestTracer(t *testing.T) { e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) _, span := subject.Start(context.Background(), "link1") link1 := trace.Link{ @@ -270,7 +278,7 @@ func TestTracer(t *testing.T) { attr1 := kv.String("a", "1") attr2 := kv.String("b", "2") - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) var span trace.Span err := subject.WithSpan(context.Background(), "test", func(ctx context.Context) error { span = trace.SpanFromContext(ctx) @@ -291,12 +299,13 @@ func TestTracer(t *testing.T) { } func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (trace.Span, error)) { + tp := testtrace.NewProvider() t.Run("starts a span with the expected name", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) expectedName := "test name" span, err := fn(subject, expectedName) @@ -314,7 +323,7 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + subject := tp.Tracer(t.Name()) start := time.Now() span, err := fn(subject, "test") @@ -329,20 +338,21 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e.Expect(testSpan.StartTime()).ToBeTemporally(matchers.BeforeOrSameTime, end) }) - t.Run("appends the span to the list of Spans", func(t *testing.T) { + t.Run("calls SpanRecorder.OnStart", func(t *testing.T) { t.Parallel() e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + sr := new(testtrace.StandardSpanRecorder) + subject := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)).Tracer(t.Name()) subject.Start(context.Background(), "span1") - e.Expect(len(subject.Spans())).ToEqual(1) + e.Expect(len(sr.Started())).ToEqual(1) span, err := fn(subject, "span2") e.Expect(err).ToBeNil() - spans := subject.Spans() + spans := sr.Started() e.Expect(len(spans)).ToEqual(2) e.Expect(spans[1]).ToEqual(span) @@ -353,7 +363,8 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e := matchers.NewExpecter(t) - subject := testtrace.NewTracer() + sr := new(testtrace.StandardSpanRecorder) + subject := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)).Tracer(t.Name()) numSpans := 2 @@ -372,6 +383,6 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra wg.Wait() - e.Expect(len(subject.Spans())).ToEqual(numSpans) + e.Expect(len(sr.Started())).ToEqual(numSpans) }) } diff --git a/instrumentation/othttp/transport_example_test.go b/instrumentation/othttp/transport_example_test.go index f31f50aeef7..9254bd19024 100644 --- a/instrumentation/othttp/transport_example_test.go +++ b/instrumentation/othttp/transport_example_test.go @@ -15,45 +15,13 @@ package othttp import ( - "fmt" - "io/ioutil" - "log" "net/http" - - "go.opentelemetry.io/otel/api/global" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) func ExampleNewTransport() { - // Start with a working trace provider - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - if err != nil { - log.Fatal(err) - } - global.SetTraceProvider(tp) - // Create an http.Client that uses the othttp.Transport // wrapped around the http.DefaultTransport - client := http.Client{ + _ = http.Client{ Transport: NewTransport(http.DefaultTransport), } - - // Make a request with our tracing client - response, err := client.Get("https://postman-echo.com/get") - if err != nil { - log.Fatal(err) - } - - // Read the whole body and close it. The span created by the - // othttp.Transport does not end until a read from the response - // body returns io.EOF or the response body is closed. - body, err := ioutil.ReadAll(response.Body) - response.Body.Close() - if err != nil { - log.Fatal(err) - } - - fmt.Printf("%s", body) - // body should look like this, with a different "traceparent" value: - // {"args":{},"headers":{"x-forwarded-proto":"https","host":"postman-echo.com","accept-encoding":"gzip","traceparent":"00-fb1d6775b94db561d9b51adbb3640de5-919c41073ec08f50-01","user-agent":"Go-http-client/1.1","x-forwarded-port":"443"},"url":"https://postman-echo.com/get"} } diff --git a/sdk/metric/benchmark_test.go b/sdk/metric/benchmark_test.go index 33d0f4953bd..204dbdfbca9 100644 --- a/sdk/metric/benchmark_test.go +++ b/sdk/metric/benchmark_test.go @@ -20,6 +20,7 @@ import ( "math/rand" "testing" + "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" @@ -29,7 +30,7 @@ import ( ) type benchFixture struct { - meter metric.MeterMust + meter metric.Meter accumulator *sdk.Accumulator B *testing.B export.AggregatorSelector @@ -43,7 +44,7 @@ func newFixture(b *testing.B) *benchFixture { } bf.accumulator = sdk.NewAccumulator(bf) - bf.meter = metric.Must(metric.WrapMeterImpl(bf.accumulator, "benchmarks")) + bf.meter = metric.WrapMeterImpl(bf.accumulator, "benchmarks") return bf } @@ -51,6 +52,14 @@ func (f *benchFixture) Process(export.Accumulation) error { return nil } +func (f *benchFixture) Meter(_ string, _ ...metric.MeterOption) metric.Meter { + return f.meter +} + +func (f *benchFixture) meterMust() metric.MeterMust { + return metric.Must(f.meter) +} + func makeManyLabels(n int) [][]kv.KeyValue { r := make([][]kv.KeyValue, n) @@ -82,7 +91,7 @@ func benchmarkLabels(b *testing.B, n int) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(n) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") b.ResetTimer() @@ -117,7 +126,7 @@ func BenchmarkInt64CounterAddWithLabels_16(b *testing.B) { func BenchmarkAcquireNewHandle(b *testing.B) { fix := newFixture(b) labelSets := makeManyLabels(b.N) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") b.ResetTimer() @@ -129,7 +138,7 @@ func BenchmarkAcquireNewHandle(b *testing.B) { func BenchmarkAcquireExistingHandle(b *testing.B) { fix := newFixture(b) labelSets := makeManyLabels(b.N) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") for i := 0; i < b.N; i++ { cnt.Bind(labelSets[i]...).Unbind() @@ -145,7 +154,7 @@ func BenchmarkAcquireExistingHandle(b *testing.B) { func BenchmarkAcquireReleaseExistingHandle(b *testing.B) { fix := newFixture(b) labelSets := makeManyLabels(b.N) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") for i := 0; i < b.N; i++ { cnt.Bind(labelSets[i]...).Unbind() @@ -199,11 +208,31 @@ func BenchmarkIterator_16(b *testing.B) { // Counters +func BenchmarkGlobalInt64CounterAddWithSDK(b *testing.B) { + // Compare with BenchmarkInt64CounterAdd() to see overhead of global + // package. This is in the SDK to avoid the API from depending on the + // SDK. + ctx := context.Background() + fix := newFixture(b) + + sdk := global.Meter("test") + global.SetMeterProvider(fix) + + labs := []kv.KeyValue{kv.String("A", "B")} + cnt := Must(sdk).NewInt64Counter("int64.counter") + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + cnt.Add(ctx, 1, labs...) + } +} + func BenchmarkInt64CounterAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") b.ResetTimer() @@ -216,7 +245,7 @@ func BenchmarkInt64CounterHandleAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - cnt := fix.meter.NewInt64Counter("int64.counter") + cnt := fix.meterMust().NewInt64Counter("int64.counter") handle := cnt.Bind(labs...) b.ResetTimer() @@ -230,7 +259,7 @@ func BenchmarkFloat64CounterAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - cnt := fix.meter.NewFloat64Counter("float64.counter") + cnt := fix.meterMust().NewFloat64Counter("float64.counter") b.ResetTimer() @@ -243,7 +272,7 @@ func BenchmarkFloat64CounterHandleAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - cnt := fix.meter.NewFloat64Counter("float64.counter") + cnt := fix.meterMust().NewFloat64Counter("float64.counter") handle := cnt.Bind(labs...) b.ResetTimer() @@ -259,7 +288,7 @@ func BenchmarkInt64LastValueAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewInt64ValueRecorder("int64.lastvalue") + mea := fix.meterMust().NewInt64ValueRecorder("int64.lastvalue") b.ResetTimer() @@ -272,7 +301,7 @@ func BenchmarkInt64LastValueHandleAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewInt64ValueRecorder("int64.lastvalue") + mea := fix.meterMust().NewInt64ValueRecorder("int64.lastvalue") handle := mea.Bind(labs...) b.ResetTimer() @@ -286,7 +315,7 @@ func BenchmarkFloat64LastValueAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewFloat64ValueRecorder("float64.lastvalue") + mea := fix.meterMust().NewFloat64ValueRecorder("float64.lastvalue") b.ResetTimer() @@ -299,7 +328,7 @@ func BenchmarkFloat64LastValueHandleAdd(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewFloat64ValueRecorder("float64.lastvalue") + mea := fix.meterMust().NewFloat64ValueRecorder("float64.lastvalue") handle := mea.Bind(labs...) b.ResetTimer() @@ -315,7 +344,7 @@ func benchmarkInt64ValueRecorderAdd(b *testing.B, name string) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewInt64ValueRecorder(name) + mea := fix.meterMust().NewInt64ValueRecorder(name) b.ResetTimer() @@ -328,7 +357,7 @@ func benchmarkInt64ValueRecorderHandleAdd(b *testing.B, name string) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewInt64ValueRecorder(name) + mea := fix.meterMust().NewInt64ValueRecorder(name) handle := mea.Bind(labs...) b.ResetTimer() @@ -342,7 +371,7 @@ func benchmarkFloat64ValueRecorderAdd(b *testing.B, name string) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewFloat64ValueRecorder(name) + mea := fix.meterMust().NewFloat64ValueRecorder(name) b.ResetTimer() @@ -355,7 +384,7 @@ func benchmarkFloat64ValueRecorderHandleAdd(b *testing.B, name string) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - mea := fix.meter.NewFloat64ValueRecorder(name) + mea := fix.meterMust().NewFloat64ValueRecorder(name) handle := mea.Bind(labs...) b.ResetTimer() @@ -378,7 +407,7 @@ func BenchmarkObserverRegistration(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - fix.meter.NewInt64ValueObserver(names[i], cb) + fix.meterMust().NewInt64ValueObserver(names[i], cb) } } @@ -386,7 +415,7 @@ func BenchmarkValueObserverObservationInt64(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - _ = fix.meter.NewInt64ValueObserver("test.valueobserver", func(_ context.Context, result metric.Int64ObserverResult) { + _ = fix.meterMust().NewInt64ValueObserver("test.valueobserver", func(_ context.Context, result metric.Int64ObserverResult) { for i := 0; i < b.N; i++ { result.Observe((int64)(i), labs...) } @@ -401,7 +430,7 @@ func BenchmarkValueObserverObservationFloat64(b *testing.B) { ctx := context.Background() fix := newFixture(b) labs := makeLabels(1) - _ = fix.meter.NewFloat64ValueObserver("test.valueobserver", func(_ context.Context, result metric.Float64ObserverResult) { + _ = fix.meterMust().NewFloat64ValueObserver("test.valueobserver", func(_ context.Context, result metric.Float64ObserverResult) { for i := 0; i < b.N; i++ { result.Observe((float64)(i), labs...) } @@ -476,7 +505,7 @@ func benchmarkBatchRecord8Labels(b *testing.B, numInst int) { var meas []metric.Measurement for i := 0; i < numInst; i++ { - inst := fix.meter.NewInt64Counter(fmt.Sprint("int64.counter.", i)) + inst := fix.meterMust().NewInt64Counter(fmt.Sprint("int64.counter.", i)) meas = append(meas, inst.Measurement(1)) } @@ -509,7 +538,7 @@ func BenchmarkRepeatedDirectCalls(b *testing.B) { ctx := context.Background() fix := newFixture(b) - c := fix.meter.NewInt64Counter("int64.counter") + c := fix.meterMust().NewInt64Counter("int64.counter") k := kv.String("bench", "true") b.ResetTimer() From 67a2c2301677f2650f6ec7c23b7bfc9b53884570 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 28 Jul 2020 14:22:35 -0700 Subject: [PATCH 23/60] Update Changelog (#982) --- CHANGELOG.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f79b64f2713..0a5e42592f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,15 +8,41 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Added + +- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. + These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) + ### Changed -- Rename `kv.Infer` to `kv.Any`. (#969) -- Jaeger exporter helpers: added InstallNewPipeline and removed RegisterGlobal option instead. (#944) -- Zipkin exporter helpers: pipeline methods introduced, new exporter method adjusted. (#944) -- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. (#956) +- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. + This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) +- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. + This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956) +- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) + - `value.Bool` was replaced with `kv.BoolValue`. + - `value.Int64` was replaced with `kv.Int64Value`. + - `value.Uint64` was replaced with `kv.Uint64Value`. + - `value.Float64` was replaced with `kv.Float64Value`. + - `value.Int32` was replaced with `kv.Int32Value`. + - `value.Uint32` was replaced with `kv.Uint32Value`. + - `value.Float32` was replaced with `kv.Float32Value`. + - `value.String` was replaced with `kv.StringValue`. + - `value.Int` was replaced with `kv.IntValue`. + - `value.Uint` was replaced with `kv.UintValue`. + - `value.Array` was replaced with `kv.ArrayValue`. +- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) + +### Removed + +- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970) ### Fixed +- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953) +- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957) +- Use `global.Handle` for span export errors in the OTLP exporter. (#946) +- Correct Go language formatting in the README documentation. (#961) - Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) ## [0.9.0] - 2020-07-20 @@ -36,9 +62,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Removed - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) -- Removed `go.opentelemetry.io/otel/api/kv/value` by flattening all value functionality and structures into the `go.opentelemetry.io/otel/api/kv` package. (#968) -- Remove `IndexedAttribute` from `go.opentelemetry.io/otel/api/label`. - Use `IndexedLabel` which is synonymous instead. (#970) ## [0.8.0] - 2020-07-09 From e06c9da91674151020fdd4c9a9b35424c9d350da Mon Sep 17 00:00:00 2001 From: Eundoo Song Date: Wed, 29 Jul 2020 06:31:56 +0900 Subject: [PATCH 24/60] Rename aggregator/test to aggregatortest (#980) Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + exporters/stdout/metric_test.go | 16 +++---- .../{test => aggregatortest}/test.go | 2 +- sdk/metric/aggregator/array/array_test.go | 48 +++++++++---------- .../aggregator/ddsketch/ddsketch_test.go | 32 ++++++------- .../aggregator/histogram/benchmark_test.go | 6 +-- .../aggregator/histogram/histogram_test.go | 38 +++++++-------- .../aggregator/lastvalue/lastvalue_test.go | 20 ++++---- .../aggregator/minmaxsumcount/mmsc_test.go | 32 ++++++------- sdk/metric/aggregator/sum/sum_test.go | 26 +++++----- 10 files changed, 111 insertions(+), 110 deletions(-) rename sdk/metric/aggregator/{test => aggregatortest}/test.go (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5e42592f5..4497da51da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `value.Uint` was replaced with `kv.UintValue`. - `value.Array` was replaced with `kv.ArrayValue`. - Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) +- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) ### Removed diff --git a/exporters/stdout/metric_test.go b/exporters/stdout/metric_test.go index 2d797a9d9c5..31fd86d166c 100644 --- a/exporters/stdout/metric_test.go +++ b/exporters/stdout/metric_test.go @@ -32,12 +32,12 @@ import ( export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" "go.opentelemetry.io/otel/sdk/export/metric/metrictest" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" "go.opentelemetry.io/otel/sdk/metric/aggregator/array" "go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch" "go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue" "go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount" "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" - aggtest "go.opentelemetry.io/otel/sdk/metric/aggregator/test" "go.opentelemetry.io/otel/sdk/resource" ) @@ -103,7 +103,7 @@ func TestStdoutTimestamp(t *testing.T) { lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) - aggtest.CheckedUpdate(t, lvagg, metric.NewInt64Number(321), &desc) + aggregatortest.CheckedUpdate(t, lvagg, metric.NewInt64Number(321), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, ckpt) @@ -142,7 +142,7 @@ func TestStdoutCounterFormat(t *testing.T) { cagg, ckpt := metrictest.Unslice2(sum.New(2)) - aggtest.CheckedUpdate(fix.t, cagg, metric.NewInt64Number(123), &desc) + aggregatortest.CheckedUpdate(fix.t, cagg, metric.NewInt64Number(123), &desc) require.NoError(t, cagg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, ckpt, kv.String("A", "B"), kv.String("C", "D")) @@ -160,7 +160,7 @@ func TestStdoutLastValueFormat(t *testing.T) { desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Float64NumberKind) lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) - aggtest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) + aggregatortest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, ckpt, kv.String("A", "B"), kv.String("C", "D")) @@ -179,8 +179,8 @@ func TestStdoutMinMaxSumCount(t *testing.T) { magg, ckpt := metrictest.Unslice2(minmaxsumcount.New(2, &desc)) - aggtest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(123.456), &desc) - aggtest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(876.543), &desc) + aggregatortest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(123.456), &desc) + aggregatortest.CheckedUpdate(fix.t, magg, metric.NewFloat64Number(876.543), &desc) require.NoError(t, magg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, ckpt, kv.String("A", "B"), kv.String("C", "D")) @@ -199,7 +199,7 @@ func TestStdoutValueRecorderFormat(t *testing.T) { aagg, ckpt := metrictest.Unslice2(array.New(2)) for i := 0; i < 1000; i++ { - aggtest.CheckedUpdate(fix.t, aagg, metric.NewFloat64Number(float64(i)+0.5), &desc) + aggregatortest.CheckedUpdate(fix.t, aagg, metric.NewFloat64Number(float64(i)+0.5), &desc) } require.NoError(t, aagg.SynchronizedMove(ckpt, &desc)) @@ -317,7 +317,7 @@ func TestStdoutResource(t *testing.T) { desc := metric.NewDescriptor("test.name", metric.ValueObserverKind, metric.Float64NumberKind) lvagg, ckpt := metrictest.Unslice2(lastvalue.New(2)) - aggtest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) + aggregatortest.CheckedUpdate(fix.t, lvagg, metric.NewFloat64Number(123.456), &desc) require.NoError(t, lvagg.SynchronizedMove(ckpt, &desc)) checkpointSet.Add(&desc, ckpt, tc.attrs...) diff --git a/sdk/metric/aggregator/test/test.go b/sdk/metric/aggregator/aggregatortest/test.go similarity index 99% rename from sdk/metric/aggregator/test/test.go rename to sdk/metric/aggregator/aggregatortest/test.go index 3e2cb8094b7..3d3a17b2d00 100644 --- a/sdk/metric/aggregator/test/test.go +++ b/sdk/metric/aggregator/aggregatortest/test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package aggregatortest import ( "context" diff --git a/sdk/metric/aggregator/array/array_test.go b/sdk/metric/aggregator/array/array_test.go index f7c44843e91..b35d8da3f01 100644 --- a/sdk/metric/aggregator/array/array_test.go +++ b/sdk/metric/aggregator/array/array_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" ) type updateTest struct { @@ -61,20 +61,20 @@ func new4() (_, _, _, _ *Aggregator) { return &alloc[0], &alloc[1], &alloc[2], &alloc[3] } -func (ut *updateTest) run(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func (ut *updateTest) run(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg, ckpt := new2() - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < ut.count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg, x, descriptor) + aggregatortest.CheckedUpdate(t, agg, x, descriptor) y := profile.Random(-1) all.Append(y) - test.CheckedUpdate(t, agg, y, descriptor) + aggregatortest.CheckedUpdate(t, agg, y, descriptor) } err := agg.SynchronizedMove(ckpt, descriptor) @@ -118,7 +118,7 @@ func TestArrayUpdate(t *testing.T) { } // Test integer and floating point - test.RunProfiles(t, ut.run) + aggregatortest.RunProfiles(t, ut.run) }) } } @@ -128,29 +128,29 @@ type mergeTest struct { absolute bool } -func (mt *mergeTest) run(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func (mt *mergeTest) run(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg1, agg2, ckpt1, ckpt2 := new4() - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < mt.count; i++ { x1 := profile.Random(+1) all.Append(x1) - test.CheckedUpdate(t, agg1, x1, descriptor) + aggregatortest.CheckedUpdate(t, agg1, x1, descriptor) x2 := profile.Random(+1) all.Append(x2) - test.CheckedUpdate(t, agg2, x2, descriptor) + aggregatortest.CheckedUpdate(t, agg2, x2, descriptor) if !mt.absolute { y1 := profile.Random(-1) all.Append(y1) - test.CheckedUpdate(t, agg1, y1, descriptor) + aggregatortest.CheckedUpdate(t, agg1, y1, descriptor) y2 := profile.Random(-1) all.Append(y2) - test.CheckedUpdate(t, agg2, y2, descriptor) + aggregatortest.CheckedUpdate(t, agg2, y2, descriptor) } } @@ -160,7 +160,7 @@ func (mt *mergeTest) run(t *testing.T, profile test.Profile) { checkZero(t, agg1, descriptor) checkZero(t, agg2, descriptor) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) all.Sort() @@ -202,7 +202,7 @@ func TestArrayMerge(t *testing.T) { } // Test integer and floating point - test.RunProfiles(t, mt.run) + aggregatortest.RunProfiles(t, mt.run) }) } }) @@ -210,7 +210,7 @@ func TestArrayMerge(t *testing.T) { } func TestArrayErrors(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg, ckpt := new2() _, err := ckpt.Max() @@ -225,12 +225,12 @@ func TestArrayErrors(t *testing.T) { require.Error(t, err) require.Equal(t, err, aggregation.ErrNoData) - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) - test.CheckedUpdate(t, agg, metric.Number(0), descriptor) + aggregatortest.CheckedUpdate(t, agg, metric.Number(0), descriptor) if profile.NumberKind == metric.Float64NumberKind { - test.CheckedUpdate(t, agg, metric.NewFloat64Number(math.NaN()), descriptor) + aggregatortest.CheckedUpdate(t, agg, metric.NewFloat64Number(math.NaN()), descriptor) } require.NoError(t, agg.SynchronizedMove(ckpt, descriptor)) @@ -253,7 +253,7 @@ func TestArrayErrors(t *testing.T) { } func TestArrayFloat64(t *testing.T) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, metric.Float64NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, metric.Float64NumberKind) fpsf := func(sign int) []float64 { // Check behavior of a bunch of odd floating @@ -282,18 +282,18 @@ func TestArrayFloat64(t *testing.T) { } } - all := test.NewNumbers(metric.Float64NumberKind) + all := aggregatortest.NewNumbers(metric.Float64NumberKind) agg, ckpt := new2() for _, f := range fpsf(1) { all.Append(metric.NewFloat64Number(f)) - test.CheckedUpdate(t, agg, metric.NewFloat64Number(f), descriptor) + aggregatortest.CheckedUpdate(t, agg, metric.NewFloat64Number(f), descriptor) } for _, f := range fpsf(-1) { all.Append(metric.NewFloat64Number(f)) - test.CheckedUpdate(t, agg, metric.NewFloat64Number(f), descriptor) + aggregatortest.CheckedUpdate(t, agg, metric.NewFloat64Number(f), descriptor) } require.NoError(t, agg.SynchronizedMove(ckpt, descriptor)) diff --git a/sdk/metric/aggregator/ddsketch/ddsketch_test.go b/sdk/metric/aggregator/ddsketch/ddsketch_test.go index f5a09dc2d00..03a9e5adde2 100644 --- a/sdk/metric/aggregator/ddsketch/ddsketch_test.go +++ b/sdk/metric/aggregator/ddsketch/ddsketch_test.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" ) const count = 1000 @@ -65,19 +65,19 @@ func checkZero(t *testing.T, agg *Aggregator, desc *metric.Descriptor) { require.Equal(t, kind.Zero(), min) } -func (ut *updateTest) run(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func (ut *updateTest) run(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg, ckpt := new2(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg, x, descriptor) + aggregatortest.CheckedUpdate(t, agg, x, descriptor) y := profile.Random(-1) all.Append(y) - test.CheckedUpdate(t, agg, y, descriptor) + aggregatortest.CheckedUpdate(t, agg, y, descriptor) } err := agg.SynchronizedMove(ckpt, descriptor) @@ -119,40 +119,40 @@ func (ut *updateTest) run(t *testing.T, profile test.Profile) { func TestDDSketchUpdate(t *testing.T) { ut := updateTest{} - test.RunProfiles(t, ut.run) + aggregatortest.RunProfiles(t, ut.run) } type mergeTest struct { absolute bool } -func (mt *mergeTest) run(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func (mt *mergeTest) run(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg1, agg2, ckpt1, ckpt2 := new4(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg1, x, descriptor) + aggregatortest.CheckedUpdate(t, agg1, x, descriptor) if !mt.absolute { y := profile.Random(-1) all.Append(y) - test.CheckedUpdate(t, agg1, y, descriptor) + aggregatortest.CheckedUpdate(t, agg1, y, descriptor) } } for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg2, x, descriptor) + aggregatortest.CheckedUpdate(t, agg2, x, descriptor) if !mt.absolute { y := profile.Random(-1) all.Append(y) - test.CheckedUpdate(t, agg2, y, descriptor) + aggregatortest.CheckedUpdate(t, agg2, y, descriptor) } } @@ -162,7 +162,7 @@ func (mt *mergeTest) run(t *testing.T, profile test.Profile) { checkZero(t, agg1, descriptor) checkZero(t, agg1, descriptor) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) all.Sort() @@ -204,7 +204,7 @@ func TestDDSketchMerge(t *testing.T) { absolute: absolute, } // Test integer and floating point - test.RunProfiles(t, mt.run) + aggregatortest.RunProfiles(t, mt.run) }) } } diff --git a/sdk/metric/aggregator/histogram/benchmark_test.go b/sdk/metric/aggregator/histogram/benchmark_test.go index eecfca403e5..3f9bda1e52d 100644 --- a/sdk/metric/aggregator/histogram/benchmark_test.go +++ b/sdk/metric/aggregator/histogram/benchmark_test.go @@ -20,8 +20,8 @@ import ( "testing" "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" ) const inputRange = 1e6 @@ -37,7 +37,7 @@ func benchmarkHistogramSearchFloat64(b *testing.B, size int) { for i := range values { values[i] = rand.Float64() * inputRange } - desc := test.NewAggregatorTest(metric.ValueRecorderKind, metric.Float64NumberKind) + desc := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, metric.Float64NumberKind) agg := &histogram.New(1, desc, boundaries)[0] ctx := context.Background() @@ -88,7 +88,7 @@ func benchmarkHistogramSearchInt64(b *testing.B, size int) { for i := range values { values[i] = int64(rand.Float64() * inputRange) } - desc := test.NewAggregatorTest(metric.ValueRecorderKind, metric.Int64NumberKind) + desc := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, metric.Int64NumberKind) agg := &histogram.New(1, desc, boundaries)[0] ctx := context.Background() diff --git a/sdk/metric/aggregator/histogram/histogram_test.go b/sdk/metric/aggregator/histogram/histogram_test.go index 66e9c61fd67..0ea25ad9797 100644 --- a/sdk/metric/aggregator/histogram/histogram_test.go +++ b/sdk/metric/aggregator/histogram/histogram_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" ) const count = 100 @@ -90,35 +90,35 @@ func checkZero(t *testing.T, agg *histogram.Aggregator, desc *metric.Descriptor) } func TestHistogramAbsolute(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { testHistogram(t, profile, positiveOnly) }) } func TestHistogramNegativeOnly(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { testHistogram(t, profile, negativeOnly) }) } func TestHistogramPositiveAndNegative(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { testHistogram(t, profile, positiveAndNegative) }) } // Validates count, sum and buckets for a given profile and policy -func testHistogram(t *testing.T, profile test.Profile, policy policy) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func testHistogram(t *testing.T, profile aggregatortest.Profile, policy policy) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg, ckpt := new2(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(policy.sign()) all.Append(x) - test.CheckedUpdate(t, agg, x, descriptor) + aggregatortest.CheckedUpdate(t, agg, x, descriptor) } require.NoError(t, agg.SynchronizedMove(ckpt, descriptor)) @@ -153,8 +153,8 @@ func testHistogram(t *testing.T, profile test.Profile, policy policy) { } func TestHistogramInitial(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg := &histogram.New(1, descriptor, boundaries)[0] buckets, err := agg.Histogram() @@ -166,28 +166,28 @@ func TestHistogramInitial(t *testing.T) { } func TestHistogramMerge(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg1, agg2, ckpt1, ckpt2 := new4(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg1, x, descriptor) + aggregatortest.CheckedUpdate(t, agg1, x, descriptor) } for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg2, x, descriptor) + aggregatortest.CheckedUpdate(t, agg2, x, descriptor) } require.NoError(t, agg1.SynchronizedMove(ckpt1, descriptor)) require.NoError(t, agg2.SynchronizedMove(ckpt2, descriptor)) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) all.Sort() @@ -218,8 +218,8 @@ func TestHistogramMerge(t *testing.T) { } func TestHistogramNotSet(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg, ckpt := new2(descriptor) @@ -231,7 +231,7 @@ func TestHistogramNotSet(t *testing.T) { }) } -func calcBuckets(points []metric.Number, profile test.Profile) []uint64 { +func calcBuckets(points []metric.Number, profile aggregatortest.Profile) []uint64 { sortedBoundaries := make([]float64, len(boundaries)) copy(sortedBoundaries, boundaries) diff --git a/sdk/metric/aggregator/lastvalue/lastvalue_test.go b/sdk/metric/aggregator/lastvalue/lastvalue_test.go index 0c842ea9675..ebe8054b475 100644 --- a/sdk/metric/aggregator/lastvalue/lastvalue_test.go +++ b/sdk/metric/aggregator/lastvalue/lastvalue_test.go @@ -28,7 +28,7 @@ import ( ottest "go.opentelemetry.io/otel/internal/testing" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" ) const count = 100 @@ -68,16 +68,16 @@ func checkZero(t *testing.T, agg *Aggregator) { } func TestLastValueUpdate(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg, ckpt := new2() - record := test.NewAggregatorTest(metric.ValueObserverKind, profile.NumberKind) + record := aggregatortest.NewAggregatorTest(metric.ValueObserverKind, profile.NumberKind) var last metric.Number for i := 0; i < count; i++ { x := profile.Random(rand.Intn(1)*2 - 1) last = x - test.CheckedUpdate(t, agg, x, record) + aggregatortest.CheckedUpdate(t, agg, x, record) } err := agg.SynchronizedMove(ckpt, record) @@ -90,17 +90,17 @@ func TestLastValueUpdate(t *testing.T) { } func TestLastValueMerge(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg1, agg2, ckpt1, ckpt2 := new4() - descriptor := test.NewAggregatorTest(metric.ValueObserverKind, profile.NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.ValueObserverKind, profile.NumberKind) first1 := profile.Random(+1) first2 := profile.Random(+1) first1.AddNumber(profile.NumberKind, first2) - test.CheckedUpdate(t, agg1, first1, descriptor) - test.CheckedUpdate(t, agg2, first2, descriptor) + aggregatortest.CheckedUpdate(t, agg1, first1, descriptor) + aggregatortest.CheckedUpdate(t, agg2, first2, descriptor) require.NoError(t, agg1.SynchronizedMove(ckpt1, descriptor)) require.NoError(t, agg2.SynchronizedMove(ckpt2, descriptor)) @@ -114,7 +114,7 @@ func TestLastValueMerge(t *testing.T) { require.Nil(t, err) require.True(t, t1.Before(t2)) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) lv, ts, err := ckpt1.LastValue() require.Nil(t, err) @@ -124,7 +124,7 @@ func TestLastValueMerge(t *testing.T) { } func TestLastValueNotSet(t *testing.T) { - descriptor := test.NewAggregatorTest(metric.ValueObserverKind, metric.Int64NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.ValueObserverKind, metric.Int64NumberKind) g, ckpt := new2() require.NoError(t, g.SynchronizedMove(ckpt, descriptor)) diff --git a/sdk/metric/aggregator/minmaxsumcount/mmsc_test.go b/sdk/metric/aggregator/minmaxsumcount/mmsc_test.go index 915fabd5ad7..b27ff7498fb 100644 --- a/sdk/metric/aggregator/minmaxsumcount/mmsc_test.go +++ b/sdk/metric/aggregator/minmaxsumcount/mmsc_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" ) const count = 100 @@ -59,19 +59,19 @@ var ( ) func TestMinMaxSumCountAbsolute(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { minMaxSumCount(t, profile, positiveOnly) }) } func TestMinMaxSumCountNegativeOnly(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { minMaxSumCount(t, profile, negativeOnly) }) } func TestMinMaxSumCountPositiveAndNegative(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { minMaxSumCount(t, profile, positiveAndNegative) }) } @@ -107,17 +107,17 @@ func checkZero(t *testing.T, agg *Aggregator, desc *metric.Descriptor) { } // Validates min, max, sum and count for a given profile and policy -func minMaxSumCount(t *testing.T, profile test.Profile, policy policy) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) +func minMaxSumCount(t *testing.T, profile aggregatortest.Profile, policy policy) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg, ckpt := new2(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(policy.sign()) all.Append(x) - test.CheckedUpdate(t, agg, x, descriptor) + aggregatortest.CheckedUpdate(t, agg, x, descriptor) } require.NoError(t, agg.SynchronizedMove(ckpt, descriptor)) @@ -155,22 +155,22 @@ func minMaxSumCount(t *testing.T, profile test.Profile, policy policy) { } func TestMinMaxSumCountMerge(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) agg1, agg2, ckpt1, ckpt2 := new4(descriptor) - all := test.NewNumbers(profile.NumberKind) + all := aggregatortest.NewNumbers(profile.NumberKind) for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg1, x, descriptor) + aggregatortest.CheckedUpdate(t, agg1, x, descriptor) } for i := 0; i < count; i++ { x := profile.Random(+1) all.Append(x) - test.CheckedUpdate(t, agg2, x, descriptor) + aggregatortest.CheckedUpdate(t, agg2, x, descriptor) } require.NoError(t, agg1.SynchronizedMove(ckpt1, descriptor)) @@ -179,7 +179,7 @@ func TestMinMaxSumCountMerge(t *testing.T) { checkZero(t, agg1, descriptor) checkZero(t, agg2, descriptor) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) all.Sort() @@ -213,8 +213,8 @@ func TestMinMaxSumCountMerge(t *testing.T) { } func TestMaxSumCountNotSet(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) alloc := New(2, descriptor) agg, ckpt := &alloc[0], &alloc[1] diff --git a/sdk/metric/aggregator/sum/sum_test.go b/sdk/metric/aggregator/sum/sum_test.go index 7372ea5655c..f38f8bd8ab8 100644 --- a/sdk/metric/aggregator/sum/sum_test.go +++ b/sdk/metric/aggregator/sum/sum_test.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/api/metric" ottest "go.opentelemetry.io/otel/internal/testing" - "go.opentelemetry.io/otel/sdk/metric/aggregator/test" + "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest" ) const count = 100 @@ -62,16 +62,16 @@ func checkZero(t *testing.T, agg *Aggregator, desc *metric.Descriptor) { } func TestCounterSum(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg, ckpt := new2() - descriptor := test.NewAggregatorTest(metric.CounterKind, profile.NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.CounterKind, profile.NumberKind) sum := metric.Number(0) for i := 0; i < count; i++ { x := profile.Random(+1) sum.AddNumber(profile.NumberKind, x) - test.CheckedUpdate(t, agg, x, descriptor) + aggregatortest.CheckedUpdate(t, agg, x, descriptor) } err := agg.SynchronizedMove(ckpt, descriptor) @@ -86,18 +86,18 @@ func TestCounterSum(t *testing.T) { } func TestValueRecorderSum(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg, ckpt := new2() - descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.ValueRecorderKind, profile.NumberKind) sum := metric.Number(0) for i := 0; i < count; i++ { r1 := profile.Random(+1) r2 := profile.Random(-1) - test.CheckedUpdate(t, agg, r1, descriptor) - test.CheckedUpdate(t, agg, r2, descriptor) + aggregatortest.CheckedUpdate(t, agg, r1, descriptor) + aggregatortest.CheckedUpdate(t, agg, r2, descriptor) sum.AddNumber(profile.NumberKind, r1) sum.AddNumber(profile.NumberKind, r2) } @@ -112,17 +112,17 @@ func TestValueRecorderSum(t *testing.T) { } func TestCounterMerge(t *testing.T) { - test.RunProfiles(t, func(t *testing.T, profile test.Profile) { + aggregatortest.RunProfiles(t, func(t *testing.T, profile aggregatortest.Profile) { agg1, agg2, ckpt1, ckpt2 := new4() - descriptor := test.NewAggregatorTest(metric.CounterKind, profile.NumberKind) + descriptor := aggregatortest.NewAggregatorTest(metric.CounterKind, profile.NumberKind) sum := metric.Number(0) for i := 0; i < count; i++ { x := profile.Random(+1) sum.AddNumber(profile.NumberKind, x) - test.CheckedUpdate(t, agg1, x, descriptor) - test.CheckedUpdate(t, agg2, x, descriptor) + aggregatortest.CheckedUpdate(t, agg1, x, descriptor) + aggregatortest.CheckedUpdate(t, agg2, x, descriptor) } require.NoError(t, agg1.SynchronizedMove(ckpt1, descriptor)) @@ -131,7 +131,7 @@ func TestCounterMerge(t *testing.T) { checkZero(t, agg1, descriptor) checkZero(t, agg2, descriptor) - test.CheckedMerge(t, ckpt1, ckpt2, descriptor) + aggregatortest.CheckedMerge(t, ckpt1, ckpt2, descriptor) sum.AddNumber(descriptor.NumberKind(), sum) From 42c2a86ea483f3952c92f490d6184c1dfb7d4ca6 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 28 Jul 2020 15:59:35 -0700 Subject: [PATCH 25/60] Move grpctrace examples from comment to code (#984) * Move grpctrace examples from comment to code The example use of the interceptors in the grpctrace package includes invalid syntax and semantics. Instead of doing this, move the example use to example tests that will be rendered in the godocs. * Add changes to Changelog --- CHANGELOG.md | 1 + .../grpctrace/example_interceptor_test.go | 51 +++++++++++++++++++ instrumentation/grpctrace/interceptor.go | 24 --------- 3 files changed, 52 insertions(+), 24 deletions(-) create mode 100644 instrumentation/grpctrace/example_interceptor_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 4497da51da2..b4228b1974d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Use `global.Handle` for span export errors in the OTLP exporter. (#946) - Correct Go language formatting in the README documentation. (#961) - Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) +- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) ## [0.9.0] - 2020-07-20 diff --git a/instrumentation/grpctrace/example_interceptor_test.go b/instrumentation/grpctrace/example_interceptor_test.go new file mode 100644 index 00000000000..7310483df0e --- /dev/null +++ b/instrumentation/grpctrace/example_interceptor_test.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpctrace + +import ( + "google.golang.org/grpc" + + "go.opentelemetry.io/otel/api/global" +) + +func ExampleStreamClientInterceptor() { + tracer := global.Tracer("client-instrumentation") + _, _ = grpc.Dial( + "localhost", + grpc.WithStreamInterceptor(StreamClientInterceptor(tracer)), + ) +} + +func ExampleUnaryClientInterceptor() { + tracer := global.Tracer("client-instrumentation") + _, _ = grpc.Dial( + "localhost", + grpc.WithUnaryInterceptor(UnaryClientInterceptor(tracer)), + ) +} + +func ExampleStreamServerInterceptor() { + tracer := global.Tracer("server-instrumentation") + _ = grpc.NewServer( + grpc.StreamInterceptor(StreamServerInterceptor(tracer)), + ) +} + +func ExampleUnaryServerInterceptor() { + tracer := global.Tracer("server-instrumentation") + _ = grpc.NewServer( + grpc.UnaryInterceptor(UnaryServerInterceptor(tracer)), + ) +} diff --git a/instrumentation/grpctrace/interceptor.go b/instrumentation/grpctrace/interceptor.go index 7a8d195e21d..1c5092c01d2 100644 --- a/instrumentation/grpctrace/interceptor.go +++ b/instrumentation/grpctrace/interceptor.go @@ -63,12 +63,6 @@ var ( // UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable // for use in a grpc.Dial call. -// -// For example: -// tracer := global.Tracer("client-tracer") -// s := grpc.NewServer( -// grpc.WithUnaryInterceptor(grpctrace.UnaryClientInterceptor(tracer)), -// ..., // (existing DialOptions)) func UnaryClientInterceptor(tracer trace.Tracer) grpc.UnaryClientInterceptor { return func( ctx context.Context, @@ -242,12 +236,6 @@ func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) { // StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable // for use in a grpc.Dial call. -// -// For example: -// tracer := global.Tracer("client-tracer") -// s := grpc.Dial( -// grpc.WithStreamInterceptor(grpctrace.StreamClientInterceptor(tracer)), -// ..., // (existing DialOptions)) func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { return func( ctx context.Context, @@ -294,12 +282,6 @@ func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { // UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable // for use in a grpc.NewServer call. -// -// For example: -// tracer := global.Tracer("server-tracer") -// s := grpc.Dial( -// grpc.UnaryInterceptor(grpctrace.UnaryServerInterceptor(tracer)), -// ..., // (existing ServerOptions)) func UnaryServerInterceptor(tracer trace.Tracer) grpc.UnaryServerInterceptor { return func( ctx context.Context, @@ -382,12 +364,6 @@ func wrapServerStream(ctx context.Context, ss grpc.ServerStream) *serverStream { // StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable // for use in a grpc.NewServer call. -// -// For example: -// tracer := global.Tracer("server-tracer") -// s := grpc.Dial( -// grpc.StreamInterceptor(grpctrace.StreamServerInterceptor(tracer)), -// ..., // (existing ServerOptions)) func StreamServerInterceptor(tracer trace.Tracer) grpc.StreamServerInterceptor { return func( srv interface{}, From d6bf2fbfc302cd06ed4536c309abc9f3bd15f5a3 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 28 Jul 2020 19:59:04 -0700 Subject: [PATCH 26/60] Decouple instrumentation from SDK (#983) * Remove otel/sdk dependency from grpctrace Use otel/trace/testtrace instead and cleanup testing code. * Update httptrace to not depend on the SDK Update testing to use api/trace/testtrace instead. * Add changes to Changelog * Restore check for `http.local` attr on `http.getconn` --- CHANGELOG.md | 1 + instrumentation/grpctrace/interceptor_test.go | 219 ++++++------------ instrumentation/httptrace/clienttrace_test.go | 208 +++++------------ instrumentation/httptrace/httptrace_test.go | 20 +- 4 files changed, 142 insertions(+), 306 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4228b1974d..c96a2054cbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Use `global.Handle` for span export errors in the OTLP exporter. (#946) - Correct Go language formatting in the README documentation. (#961) - Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) +- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983) - Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) ## [0.9.0] - 2020-07-20 diff --git a/instrumentation/grpctrace/interceptor_test.go b/instrumentation/grpctrace/interceptor_test.go index 68a812f8c78..d900e926e70 100644 --- a/instrumentation/grpctrace/interceptor_test.go +++ b/instrumentation/grpctrace/interceptor_test.go @@ -20,6 +20,7 @@ import ( "time" "go.opentelemetry.io/otel/api/standard" + "go.opentelemetry.io/otel/api/trace/testtrace" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -32,19 +33,30 @@ import ( "google.golang.org/grpc/status" "go.opentelemetry.io/otel/api/kv" - export "go.opentelemetry.io/otel/sdk/export/trace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) -type testExporter struct { - mu sync.Mutex - spanMap map[string]*export.SpanData +type SpanRecorder struct { + mu sync.RWMutex + spans map[string]*testtrace.Span } -func (t *testExporter) ExportSpan(ctx context.Context, s *export.SpanData) { - t.mu.Lock() - defer t.mu.Unlock() - t.spanMap[s.Name] = s +func NewSpanRecorder() *SpanRecorder { + return &SpanRecorder{spans: make(map[string]*testtrace.Span)} +} + +func (sr *SpanRecorder) OnStart(span *testtrace.Span) {} + +func (sr *SpanRecorder) OnEnd(span *testtrace.Span) { + sr.mu.Lock() + defer sr.mu.Unlock() + sr.spans[span.Name()] = span +} + +func (sr *SpanRecorder) Get(name string) (*testtrace.Span, bool) { + sr.mu.RLock() + defer sr.mu.RUnlock() + s, ok := sr.spans[name] + return s, ok } type mockUICInvoker struct { @@ -69,18 +81,13 @@ func (mm *mockProtoMessage) ProtoMessage() { } func TestUnaryClientInterceptor(t *testing.T) { - exp := &testExporter{spanMap: make(map[string]*export.SpanData)} - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), - sdktrace.WithConfig(sdktrace.Config{ - DefaultSampler: sdktrace.AlwaysSample(), - }, - )) - clientConn, err := grpc.Dial("fake:connection", grpc.WithInsecure()) if err != nil { t.Fatalf("failed to create client connection: %v", err) } + sr := NewSpanRecorder() + tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) tracer := tp.Tracer("grpctrace/client") unaryInterceptor := UnaryClientInterceptor(tracer) @@ -210,68 +217,24 @@ func TestUnaryClientInterceptor(t *testing.T) { } for _, check := range checks { - err = unaryInterceptor(context.Background(), check.method, req, reply, clientConn, uniInterceptorInvoker.invoker) - if err != nil { - t.Errorf("failed to run unary interceptor: %v", err) + if !assert.NoError(t, unaryInterceptor(context.Background(), check.method, req, reply, clientConn, uniInterceptorInvoker.invoker)) { continue } - - spanData, ok := exp.spanMap[check.name] - if !ok { - t.Errorf("no span data found for name < %s >", check.name) + span, ok := sr.Get(check.name) + if !assert.True(t, ok, "missing span %q", check.name) { continue } + assert.Equal(t, check.expectedAttr, span.Attributes()) + assert.Equal(t, check.eventsAttr, eventAttrMap(span.Events())) + } +} - attrs := spanData.Attributes - if len(check.expectedAttr) > len(attrs) { - t.Errorf("attributes received are less than expected attributes, received %d, expected %d", - len(attrs), len(check.expectedAttr)) - } - for _, attr := range attrs { - expectedAttr, ok := check.expectedAttr[attr.Key] - if ok { - if expectedAttr != attr.Value { - t.Errorf("name: %s invalid %s found. expected %s, actual %s", check.name, string(attr.Key), - expectedAttr.AsString(), attr.Value.AsString()) - } - delete(check.expectedAttr, attr.Key) - } else { - t.Errorf("attribute %s not found in expected attributes map", string(attr.Key)) - } - } - - // Check if any expected attr not seen - if len(check.expectedAttr) > 0 { - for attr := range check.expectedAttr { - t.Errorf("missing attribute %s in span", string(attr)) - } - } - - events := spanData.MessageEvents - if len(check.eventsAttr) > len(events) { - t.Errorf("events received are less than expected events, received %d, expected %d", - len(events), len(check.eventsAttr)) - } - for event := 0; event < len(check.eventsAttr); event++ { - for _, attr := range events[event].Attributes { - expectedAttr, ok := check.eventsAttr[event][attr.Key] - if ok { - if attr.Value != expectedAttr { - t.Errorf("invalid value for attribute %s in events, expected %s actual %s", - string(attr.Key), attr.Value.AsString(), expectedAttr.AsString()) - } - delete(check.eventsAttr[event], attr.Key) - } else { - t.Errorf("attribute in event %s not found in expected attributes map", string(attr.Key)) - } - } - if len(check.eventsAttr[event]) > 0 { - for attr := range check.eventsAttr[event] { - t.Errorf("missing attribute %s in span event", string(attr)) - } - } - } +func eventAttrMap(events []testtrace.Event) []map[kv.Key]kv.Value { + maps := make([]map[kv.Key]kv.Value, len(events)) + for i, event := range events { + maps[i] = event.Attributes } + return maps } type mockClientStream struct { @@ -287,18 +250,14 @@ func (mockClientStream) Header() (metadata.MD, error) { return nil, nil } func (mockClientStream) Trailer() metadata.MD { return nil } func TestStreamClientInterceptor(t *testing.T) { - exp := &testExporter{spanMap: make(map[string]*export.SpanData)} - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), - sdktrace.WithConfig(sdktrace.Config{ - DefaultSampler: sdktrace.AlwaysSample(), - }, - )) clientConn, err := grpc.Dial("fake:connection", grpc.WithInsecure()) if err != nil { t.Fatalf("failed to create client connection: %v", err) } // tracer + sr := NewSpanRecorder() + tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) tracer := tp.Tracer("grpctrace/Server") streamCI := StreamClientInterceptor(tracer) @@ -306,7 +265,8 @@ func TestStreamClientInterceptor(t *testing.T) { method := "/github.com.serviceName/bar" name := "github.com.serviceName/bar" - streamClient, err := streamCI(context.Background(), + streamClient, err := streamCI( + context.Background(), &grpc.StreamDesc{ServerStreams: true}, clientConn, method, @@ -317,16 +277,11 @@ func TestStreamClientInterceptor(t *testing.T) { opts ...grpc.CallOption) (grpc.ClientStream, error) { mockClStr = mockClientStream{Desc: desc, Ctx: ctx} return mockClStr, nil - }) - - if err != nil { - t.Fatalf("failed to initialize grpc stream client: %v", err) - } - - // no span exported while stream is open - if _, ok := exp.spanMap[name]; ok { - t.Fatalf("span shouldn't end while stream is open") - } + }, + ) + require.NoError(t, err, "initialize grpc stream client") + _, ok := sr.Get(name) + require.False(t, ok, "span should ended while stream is open") req := &mockProtoMessage{} reply := &mockProtoMessage{} @@ -343,53 +298,36 @@ func TestStreamClientInterceptor(t *testing.T) { _ = streamClient.RecvMsg(reply) // added retry because span end is called in separate go routine - var spanData *export.SpanData + var span *testtrace.Span for retry := 0; retry < 5; retry++ { - ok := false - exp.mu.Lock() - spanData, ok = exp.spanMap[name] - exp.mu.Unlock() + span, ok = sr.Get(name) if ok { break } time.Sleep(time.Second * 1) } - if spanData == nil { - t.Fatalf("no span data found for name < %s >", name) + require.True(t, ok, "missing span %s", name) + + expectedAttr := map[kv.Key]kv.Value{ + standard.RPCSystemKey: kv.StringValue("grpc"), + standard.RPCServiceKey: kv.StringValue("github.com.serviceName"), + standard.RPCMethodKey: kv.StringValue("bar"), + standard.NetPeerIPKey: kv.StringValue("fake"), + standard.NetPeerPortKey: kv.StringValue("connection"), } + assert.Equal(t, expectedAttr, span.Attributes()) - attrs := spanData.Attributes - expectedAttr := map[kv.Key]string{ - standard.RPCSystemKey: "grpc", - standard.RPCServiceKey: "github.com.serviceName", - standard.RPCMethodKey: "bar", - standard.NetPeerIPKey: "fake", - standard.NetPeerPortKey: "connection", - } - - for _, attr := range attrs { - expected, ok := expectedAttr[attr.Key] - if ok { - if expected != attr.Value.AsString() { - t.Errorf("name: %s invalid %s found. expected %s, actual %s", name, string(attr.Key), - expected, attr.Value.AsString()) - } - } - } - - events := spanData.MessageEvents - if len(events) != 20 { - t.Fatalf("incorrect number of events expected 20 got %d", len(events)) - } + events := span.Events() + require.Len(t, events, 20) for i := 0; i < 20; i += 2 { msgID := i/2 + 1 - validate := func(eventName string, attrs []kv.KeyValue) { - for _, attr := range attrs { - if attr.Key == standard.RPCMessageTypeKey && attr.Value.AsString() != eventName { - t.Errorf("invalid event on index: %d expecting %s event, receive %s event", i, eventName, attr.Value.AsString()) + validate := func(eventName string, attrs map[kv.Key]kv.Value) { + for k, v := range attrs { + if k == standard.RPCMessageTypeKey && v.AsString() != eventName { + t.Errorf("invalid event on index: %d expecting %s event, receive %s event", i, eventName, v.AsString()) } - if attr.Key == standard.RPCMessageIDKey && attr.Value != kv.IntValue(msgID) { - t.Errorf("invalid id for message event expected %d received %d", msgID, attr.Value.AsInt32()) + if k == standard.RPCMessageIDKey && v != kv.IntValue(msgID) { + t.Errorf("invalid id for message event expected %d received %d", msgID, v.AsInt32()) } } } @@ -402,37 +340,30 @@ func TestStreamClientInterceptor(t *testing.T) { } func TestServerInterceptorError(t *testing.T) { - exp := &testExporter{spanMap: make(map[string]*export.SpanData)} - tp, err := sdktrace.NewProvider( - sdktrace.WithSyncer(exp), - sdktrace.WithConfig(sdktrace.Config{ - DefaultSampler: sdktrace.AlwaysSample(), - }), - ) - require.NoError(t, err) - + sr := NewSpanRecorder() + tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) tracer := tp.Tracer("grpctrace/Server") usi := UnaryServerInterceptor(tracer) deniedErr := status.Error(codes.PermissionDenied, "PERMISSION_DENIED_TEXT") handler := func(_ context.Context, _ interface{}) (interface{}, error) { return nil, deniedErr } - _, err = usi(context.Background(), &mockProtoMessage{}, &grpc.UnaryServerInfo{}, handler) + _, err := usi(context.Background(), &mockProtoMessage{}, &grpc.UnaryServerInfo{}, handler) require.Error(t, err) assert.Equal(t, err, deniedErr) - span, ok := exp.spanMap[""] + span, ok := sr.Get("") if !ok { t.Fatalf("failed to export error span") } - assert.Equal(t, span.StatusCode, codes.PermissionDenied) - assert.Contains(t, deniedErr.Error(), span.StatusMessage) - assert.Len(t, span.MessageEvents, 2) - assert.Equal(t, []kv.KeyValue{ - kv.String("message.type", "SENT"), - kv.Int("message.id", 1), - kv.Int("message.uncompressed_size", 26), - }, span.MessageEvents[1].Attributes) + assert.Equal(t, span.StatusCode(), codes.PermissionDenied) + assert.Contains(t, deniedErr.Error(), span.StatusMessage()) + assert.Len(t, span.Events(), 2) + assert.Equal(t, map[kv.Key]kv.Value{ + kv.Key("message.type"): kv.StringValue("SENT"), + kv.Key("message.id"): kv.IntValue(1), + kv.Key("message.uncompressed_size"): kv.IntValue(26), + }, span.Events()[1].Attributes) } func TestParseFullMethod(t *testing.T) { diff --git a/instrumentation/httptrace/clienttrace_test.go b/instrumentation/httptrace/clienttrace_test.go index 0f65fc80e1c..db213a6f040 100644 --- a/instrumentation/httptrace/clienttrace_test.go +++ b/instrumentation/httptrace/clienttrace_test.go @@ -18,46 +18,26 @@ import ( "net/http" "net/http/httptest" nhtrace "net/http/httptrace" - "sync" "testing" - "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/api/trace/testtrace" "go.opentelemetry.io/otel/instrumentation/httptrace" - export "go.opentelemetry.io/otel/sdk/export/trace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) -type testExporter struct { - mu sync.Mutex - spanMap map[string][]*export.SpanData -} - -func (t *testExporter) ExportSpan(ctx context.Context, s *export.SpanData) { - t.mu.Lock() - defer t.mu.Unlock() - var spans []*export.SpanData - var ok bool - - if spans, ok = t.spanMap[s.Name]; !ok { - spans = []*export.SpanData{} - t.spanMap[s.Name] = spans - } - spans = append(spans, s) - t.spanMap[s.Name] = spans -} +type SpanRecorder map[string]*testtrace.Span -var _ export.SpanSyncer = (*testExporter)(nil) +func (sr *SpanRecorder) OnStart(span *testtrace.Span) {} +func (sr *SpanRecorder) OnEnd(span *testtrace.Span) { (*sr)[span.Name()] = span } func TestHTTPRequestWithClientTrace(t *testing.T) { - exp := &testExporter{ - spanMap: make(map[string][]*export.SpanData), - } - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) + sr := SpanRecorder{} + tp := testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)) global.SetTraceProvider(tp) - tr := tp.Tracer("httptrace/client") // Mock http server @@ -86,34 +66,23 @@ func TestHTTPRequestWithClientTrace(t *testing.T) { panic("unexpected error in http request: " + err.Error()) } - getSpan := func(name string) *export.SpanData { - spans, ok := exp.spanMap[name] - if !ok { - t.Fatalf("no spans found with the name %s, %v", name, exp.spanMap) - } - - if len(spans) != 1 { - t.Fatalf("Expected exactly one span for %s but found %d", name, len(spans)) - } - - return spans[0] - } - testLen := []struct { name string - attributes []kv.KeyValue + attributes map[kv.Key]kv.Value parent string }{ { - name: "http.connect", - attributes: []kv.KeyValue{kv.String("http.remote", address.String())}, - parent: "http.getconn", + name: "http.connect", + attributes: map[kv.Key]kv.Value{ + kv.Key("http.remote"): kv.StringValue(address.String()), + }, + parent: "http.getconn", }, { name: "http.getconn", - attributes: []kv.KeyValue{ - kv.String("http.remote", address.String()), - kv.String("http.host", address.String()), + attributes: map[kv.Key]kv.Value{ + kv.Key("http.remote"): kv.StringValue(address.String()), + kv.Key("http.host"): kv.StringValue(address.String()), }, parent: "test", }, @@ -134,51 +103,42 @@ func TestHTTPRequestWithClientTrace(t *testing.T) { }, } for _, tl := range testLen { - span := getSpan(tl.name) - + if !assert.Contains(t, sr, tl.name) { + continue + } + span := sr[tl.name] if tl.parent != "" { - parentSpan := getSpan(tl.parent) - - if span.ParentSpanID != parentSpan.SpanContext.SpanID { - t.Fatalf("[span %s] does not have expected parent span %s", tl.name, tl.parent) + if assert.Contains(t, sr, tl.parent) { + assert.Equal(t, span.ParentSpanID(), sr[tl.parent].SpanContext().SpanID) } } - - actualAttrs := make(map[kv.Key]string) - for _, attr := range span.Attributes { - actualAttrs[attr.Key] = attr.Value.Emit() - } - - expectedAttrs := make(map[kv.Key]string) - for _, attr := range tl.attributes { - expectedAttrs[attr.Key] = attr.Value.Emit() - } - - if tl.name == "http.getconn" { - local := kv.Key("http.local") - // http.local attribute is not deterministic, just make sure it exists for `getconn`. - if _, ok := actualAttrs[local]; ok { - delete(actualAttrs, local) - } else { - t.Fatalf("[span %s] is missing attribute %v", tl.name, local) + if len(tl.attributes) > 0 { + attrs := span.Attributes() + if tl.name == "http.getconn" { + // http.local attribute uses a non-deterministic port. + local := kv.Key("http.local") + assert.Contains(t, attrs, local) + delete(attrs, local) } - } - - if diff := cmp.Diff(actualAttrs, expectedAttrs); diff != "" { - t.Fatalf("[span %s] Attributes are different: %v", tl.name, diff) + assert.Equal(t, tl.attributes, attrs) } } } -func TestConcurrentConnectionStart(t *testing.T) { - exp := &testExporter{ - spanMap: make(map[string][]*export.SpanData), - } - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - global.SetTraceProvider(tp) +type MultiSpanRecorder map[string][]*testtrace.Span - ct := httptrace.NewClientTrace(context.Background()) +func (sr *MultiSpanRecorder) Reset() { (*sr) = MultiSpanRecorder{} } +func (sr *MultiSpanRecorder) OnStart(span *testtrace.Span) {} +func (sr *MultiSpanRecorder) OnEnd(span *testtrace.Span) { + (*sr)[span.Name()] = append((*sr)[span.Name()], span) +} +func TestConcurrentConnectionStart(t *testing.T) { + sr := MultiSpanRecorder{} + global.SetTraceProvider( + testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)), + ) + ct := httptrace.NewClientTrace(context.Background()) tts := []struct { name string run func() @@ -186,8 +146,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open1Close1Open2Close2", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "127.0.0.1:3000") ct.ConnectDone("tcp", "127.0.0.1:3000", nil) ct.ConnectStart("tcp", "[::1]:3000") @@ -197,8 +155,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open2Close2Open1Close1", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "[::1]:3000") ct.ConnectDone("tcp", "[::1]:3000", nil) ct.ConnectStart("tcp", "127.0.0.1:3000") @@ -208,8 +164,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open1Open2Close1Close2", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "127.0.0.1:3000") ct.ConnectStart("tcp", "[::1]:3000") ct.ConnectDone("tcp", "127.0.0.1:3000", nil) @@ -219,8 +173,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open1Open2Close2Close1", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "127.0.0.1:3000") ct.ConnectStart("tcp", "[::1]:3000") ct.ConnectDone("tcp", "[::1]:3000", nil) @@ -230,8 +182,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open2Open1Close1Close2", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "[::1]:3000") ct.ConnectStart("tcp", "127.0.0.1:3000") ct.ConnectDone("tcp", "127.0.0.1:3000", nil) @@ -241,8 +191,6 @@ func TestConcurrentConnectionStart(t *testing.T) { { name: "Open2Open1Close2Close1", run: func() { - exp.spanMap = make(map[string][]*export.SpanData) - ct.ConnectStart("tcp", "[::1]:3000") ct.ConnectStart("tcp", "127.0.0.1:3000") ct.ConnectDone("tcp", "[::1]:3000", nil) @@ -251,70 +199,40 @@ func TestConcurrentConnectionStart(t *testing.T) { }, } + expectedRemotes := []kv.KeyValue{ + kv.String("http.remote", "127.0.0.1:3000"), + kv.String("http.remote", "[::1]:3000"), + } for _, tt := range tts { t.Run(tt.name, func(t *testing.T) { + sr.Reset() tt.run() - spans := exp.spanMap["http.connect"] + spans := sr["http.connect"] + require.Len(t, spans, 2) - if l := len(spans); l != 2 { - t.Fatalf("Expected 2 'http.connect' traces but found %d", l) - } - - remotes := make(map[string]struct{}) + var gotRemotes []kv.KeyValue for _, span := range spans { - if l := len(span.Attributes); l != 1 { - t.Fatalf("Expected 1 attribute on each span but found %d", l) - } - - attr := span.Attributes[0] - if attr.Key != "http.remote" { - t.Fatalf("Expected attribute to be 'http.remote' but found %s", attr.Key) - } - remotes[attr.Value.Emit()] = struct{}{} - } - - if l := len(remotes); l != 2 { - t.Fatalf("Expected 2 different 'http.remote' but found %d", l) - } - - for _, remote := range []string{"127.0.0.1:3000", "[::1]:3000"} { - if _, ok := remotes[remote]; !ok { - t.Fatalf("Missing remote %s", remote) + for k, v := range span.Attributes() { + gotRemotes = append(gotRemotes, kv.Any(string(k), v.AsInterface())) } } + assert.ElementsMatch(t, expectedRemotes, gotRemotes) }) } } func TestEndBeforeStartCreatesSpan(t *testing.T) { - exp := &testExporter{ - spanMap: make(map[string][]*export.SpanData), - } - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - global.SetTraceProvider(tp) - - tr := tp.Tracer("httptrace/client") - ctx, span := tr.Start(context.Background(), "test") - defer span.End() - - ct := httptrace.NewClientTrace(ctx) + sr := MultiSpanRecorder{} + global.SetTraceProvider( + testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)), + ) + ct := httptrace.NewClientTrace(context.Background()) ct.DNSDone(nhtrace.DNSDoneInfo{}) ct.DNSStart(nhtrace.DNSStartInfo{Host: "example.com"}) - getSpan := func(name string) *export.SpanData { - spans, ok := exp.spanMap[name] - if !ok { - t.Fatalf("no spans found with the name %s, %v", name, exp.spanMap) - } - - if len(spans) != 1 { - t.Fatalf("Expected exactly one span for %s but found %d", name, len(spans)) - } - - return spans[0] - } - - getSpan("http.dns") - + name := "http.dns" + require.Contains(t, sr, name) + spans := sr[name] + require.Len(t, spans, 1) } diff --git a/instrumentation/httptrace/httptrace_test.go b/instrumentation/httptrace/httptrace_test.go index b66adbae44a..06aa9782d2f 100644 --- a/instrumentation/httptrace/httptrace_test.go +++ b/instrumentation/httptrace/httptrace_test.go @@ -24,23 +24,15 @@ import ( "github.com/google/go-cmp/cmp" "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/propagation" "go.opentelemetry.io/otel/api/standard" + "go.opentelemetry.io/otel/api/trace/testtrace" "go.opentelemetry.io/otel/instrumentation/httptrace" - export "go.opentelemetry.io/otel/sdk/export/trace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" ) func TestRoundtrip(t *testing.T) { - exp := &testExporter{ - spanMap: make(map[string][]*export.SpanData), - } - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - global.SetTraceProvider(tp) - - tr := tp.Tracer("httptrace/client") + tr := testtrace.NewProvider().Tracer("httptrace/client") var expectedAttrs map[kv.Key]string expectedCorrs := map[kv.Key]string{kv.Key("foo"): "bar"} @@ -121,13 +113,7 @@ func TestRoundtrip(t *testing.T) { } func TestSpecifyPropagators(t *testing.T) { - exp := &testExporter{ - spanMap: make(map[string][]*export.SpanData), - } - tp, _ := sdktrace.NewProvider(sdktrace.WithSyncer(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - global.SetTraceProvider(tp) - - tr := tp.Tracer("httptrace/client") + tr := testtrace.NewProvider().Tracer("httptrace/client") expectedCorrs := map[kv.Key]string{kv.Key("foo"): "bar"} From 8fbaa9d432262bfc586d32a385104648a2d9b08a Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 29 Jul 2020 15:54:26 -0700 Subject: [PATCH 27/60] Make the SDK into its own Go module (#985) * Remove otel/sdk dependency from grpctrace Use otel/trace/testtrace instead and cleanup testing code. * Update httptrace to not depend on the SDK Update testing to use api/trace/testtrace instead. * Add changes to Changelog * Make the SDK its own Go module * Upgrade go.mod to 1.14 project wide * go mod tidy --- example/basic/go.mod | 3 +- example/basic/go.sum | 8 +-- example/grpc/go.mod | 4 +- example/grpc/go.sum | 8 +-- example/http/go.mod | 4 +- example/http/go.sum | 8 +-- example/jaeger/go.mod | 4 +- example/jaeger/go.sum | 6 +- example/namedtracer/go.mod | 4 +- example/namedtracer/go.sum | 8 +-- example/otel-collector/go.mod | 12 ++-- example/otel-collector/go.sum | 8 +-- example/prometheus/go.mod | 3 +- example/prometheus/go.sum | 6 +- example/zipkin/go.mod | 4 +- example/zipkin/go.sum | 6 +- exporters/metric/prometheus/go.mod | 8 ++- exporters/metric/prometheus/go.sum | 6 +- exporters/otlp/go.mod | 10 ++- exporters/otlp/go.sum | 8 +-- exporters/stdout/go.mod | 6 +- exporters/stdout/go.sum | 8 +-- exporters/trace/jaeger/go.mod | 8 ++- exporters/trace/jaeger/go.sum | 6 +- exporters/trace/zipkin/go.mod | 8 ++- exporters/trace/zipkin/go.sum | 6 +- go.mod | 5 +- go.sum | 6 -- sdk/go.mod | 15 +++++ sdk/go.sum | 97 ++++++++++++++++++++++++++++++ tools/go.mod | 2 +- 31 files changed, 214 insertions(+), 81 deletions(-) create mode 100644 sdk/go.mod create mode 100644 sdk/go.sum diff --git a/example/basic/go.mod b/example/basic/go.mod index d790f1c0849..0622db54548 100644 --- a/example/basic/go.mod +++ b/example/basic/go.mod @@ -1,10 +1,11 @@ module go.opentelemetry.io/otel/example/basic -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( diff --git a/example/basic/go.sum b/example/basic/go.sum index 4a27418c706..84808937bf2 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/example/grpc/go.mod b/example/grpc/go.mod index 6d3f4a48d71..7270dcd4227 100644 --- a/example/grpc/go.mod +++ b/example/grpc/go.mod @@ -1,16 +1,18 @@ module go.opentelemetry.io/otel/example/grpc -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( github.com/golang/protobuf v1.4.2 go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/stdout v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 google.golang.org/grpc v1.30.0 ) diff --git a/example/grpc/go.sum b/example/grpc/go.sum index bb8f6dd728b..2eca30cdf5a 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/example/http/go.mod b/example/http/go.mod index eb19941b78a..2c895b1374d 100644 --- a/example/http/go.mod +++ b/example/http/go.mod @@ -1,13 +1,15 @@ module go.opentelemetry.io/otel/example/http -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/stdout v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 ) diff --git a/example/http/go.sum b/example/http/go.sum index 4a27418c706..84808937bf2 100644 --- a/example/http/go.sum +++ b/example/http/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/example/jaeger/go.mod b/example/jaeger/go.mod index 29505afa2f4..a2d3e93a6d7 100644 --- a/example/jaeger/go.mod +++ b/example/jaeger/go.mod @@ -1,13 +1,15 @@ module go.opentelemetry.io/otel/example/jaeger -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/trace/jaeger => ../../exporters/trace/jaeger + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/trace/jaeger v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 ) diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index fde764b9362..3c79a0209ba 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -23,8 +23,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= @@ -77,8 +76,7 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= diff --git a/example/namedtracer/go.mod b/example/namedtracer/go.mod index f1e5ba11b24..caa1991e514 100644 --- a/example/namedtracer/go.mod +++ b/example/namedtracer/go.mod @@ -1,13 +1,15 @@ module go.opentelemetry.io/otel/example/namedtracer -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/stdout v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 ) diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 4a27418c706..84808937bf2 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index c732ccd3c09..71fe7688635 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -2,14 +2,16 @@ module go.opentelemetry.io/otel/example/otel-collector go 1.14 +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/exporters/otlp => ../../exporters/otlp + go.opentelemetry.io/otel/sdk => ../../sdk +) + require ( go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/otlp v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect google.golang.org/grpc v1.30.0 ) - -replace ( - go.opentelemetry.io/otel => ../.. - go.opentelemetry.io/otel/exporters/otlp => ../../exporters/otlp -) diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 45060743a37..43863a3a098 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= diff --git a/example/prometheus/go.mod b/example/prometheus/go.mod index 627aead3f9f..c50264d0cf4 100644 --- a/example/prometheus/go.mod +++ b/example/prometheus/go.mod @@ -1,10 +1,11 @@ module go.opentelemetry.io/otel/example/prometheus -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/metric/prometheus => ../../exporters/metric/prometheus + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index b06c03c6ef5..4ddd6e6d27a 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -56,6 +56,8 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= diff --git a/example/zipkin/go.mod b/example/zipkin/go.mod index c6d6fd2f9f6..7104b2992b1 100644 --- a/example/zipkin/go.mod +++ b/example/zipkin/go.mod @@ -1,13 +1,15 @@ module go.opentelemetry.go/otel/example/zipkin -go 1.13 +go 1.14 replace ( go.opentelemetry.io/otel => ../.. go.opentelemetry.io/otel/exporters/trace/zipkin => ../../exporters/trace/zipkin + go.opentelemetry.io/otel/sdk => ../../sdk ) require ( go.opentelemetry.io/otel v0.9.0 go.opentelemetry.io/otel/exporters/trace/zipkin v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 ) diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 37ac03e82a1..15328cc5d9d 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -1,7 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= @@ -43,8 +42,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= diff --git a/exporters/metric/prometheus/go.mod b/exporters/metric/prometheus/go.mod index 0785729d711..e0b9a102f18 100644 --- a/exporters/metric/prometheus/go.mod +++ b/exporters/metric/prometheus/go.mod @@ -1,11 +1,15 @@ module go.opentelemetry.io/otel/exporters/metric/prometheus -go 1.13 +go 1.14 -replace go.opentelemetry.io/otel => ../../.. +replace ( + go.opentelemetry.io/otel => ../../.. + go.opentelemetry.io/otel/sdk => ../../../sdk +) require ( github.com/prometheus/client_golang v1.7.1 github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 ) diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index 721ea4f39b2..ffc4ec5244e 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -54,6 +54,8 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index b6d744f49f8..71f59cef054 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -1,6 +1,11 @@ module go.opentelemetry.io/otel/exporters/otlp -replace go.opentelemetry.io/otel => ../.. +go 1.14 + +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/sdk => ../../sdk +) require ( github.com/gogo/protobuf v1.3.1 @@ -8,9 +13,8 @@ require ( github.com/kr/pretty v0.2.0 // indirect github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.30.0 ) - -go 1.13 diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 3f52ce4db88..1dde85e091c 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -33,8 +33,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= diff --git a/exporters/stdout/go.mod b/exporters/stdout/go.mod index da51b99c4dd..219164cff7f 100644 --- a/exporters/stdout/go.mod +++ b/exporters/stdout/go.mod @@ -2,10 +2,14 @@ module go.opentelemetry.io/otel/exporters/stdout go 1.14 -replace go.opentelemetry.io/otel => ../.. +replace ( + go.opentelemetry.io/otel => ../.. + go.opentelemetry.io/otel/sdk => ../../sdk/ +) require ( github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index ac2b345dfaa..d97a0c74e07 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -31,8 +31,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index e7f22b92be2..11e6d3c0b75 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -1,14 +1,18 @@ module go.opentelemetry.io/otel/exporters/trace/jaeger -go 1.13 +go 1.14 -replace go.opentelemetry.io/otel => ../../.. +replace ( + go.opentelemetry.io/otel => ../../.. + go.opentelemetry.io/otel/sdk => ../../../sdk +) require ( github.com/apache/thrift v0.13.0 github.com/google/go-cmp v0.5.1 github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 google.golang.org/api v0.29.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index a783dbfa3f1..4eafaff6896 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -24,8 +24,7 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= @@ -81,8 +80,7 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= diff --git a/exporters/trace/zipkin/go.mod b/exporters/trace/zipkin/go.mod index d21ed4bcdc1..d7452902308 100644 --- a/exporters/trace/zipkin/go.mod +++ b/exporters/trace/zipkin/go.mod @@ -1,12 +1,16 @@ module go.opentelemetry.io/otel/exporters/trace/zipkin -go 1.13 +go 1.14 -replace go.opentelemetry.io/otel => ../../.. +replace ( + go.opentelemetry.io/otel => ../../.. + go.opentelemetry.io/otel/sdk => ../../../sdk +) require ( github.com/openzipkin/zipkin-go v0.2.2 github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel/sdk v0.9.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 37ac03e82a1..15328cc5d9d 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -1,7 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= @@ -43,8 +42,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= diff --git a/go.mod b/go.mod index 4ddd086ad10..cb0c2105c3d 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,11 @@ module go.opentelemetry.io/otel -go 1.13 +go 1.14 require ( - github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 - github.com/benbjohnson/clock v1.0.3 github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.1 - github.com/google/gofuzz v1.0.0 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 github.com/stretchr/testify v1.6.1 diff --git a/go.sum b/go.sum index 23a43ce10f5..6cd150a4012 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= -github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -35,8 +31,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= diff --git a/sdk/go.mod b/sdk/go.mod new file mode 100644 index 00000000000..04b27f1cace --- /dev/null +++ b/sdk/go.mod @@ -0,0 +1,15 @@ +module go.opentelemetry.io/otel/sdk + +go 1.14 + +replace go.opentelemetry.io/otel => ../ + +require ( + github.com/DataDog/sketches-go v0.0.1 + github.com/benbjohnson/clock v1.0.3 + github.com/google/go-cmp v0.5.1 + github.com/google/gofuzz v1.1.0 // indirect + github.com/stretchr/testify v1.6.1 + go.opentelemetry.io/otel v0.9.0 + google.golang.org/grpc v1.30.0 +) diff --git a/sdk/go.sum b/sdk/go.sum new file mode 100644 index 00000000000..d97a0c74e07 --- /dev/null +++ b/sdk/go.sum @@ -0,0 +1,97 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= +github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/tools/go.mod b/tools/go.mod index dc463d6c42b..a95d3926631 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/tools -go 1.13 +go 1.14 require ( github.com/client9/misspell v0.3.4 From 26e85e1830a4b183e83718fced9271b66b71da3b Mon Sep 17 00:00:00 2001 From: Sam Xie Date: Thu, 30 Jul 2020 06:58:34 +0800 Subject: [PATCH 28/60] Add propagator option for gRPC instrumentation (#986) * Add propagator option for gRPC instrumentation * Update CHANGELOG Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + instrumentation/grpctrace/interceptor.go | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c96a2054cbb..cea2d7d1362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) +- Add propagator option for gRPC instrumentation. (#986) ### Changed diff --git a/instrumentation/grpctrace/interceptor.go b/instrumentation/grpctrace/interceptor.go index 1c5092c01d2..b35208a65c6 100644 --- a/instrumentation/grpctrace/interceptor.go +++ b/instrumentation/grpctrace/interceptor.go @@ -63,14 +63,14 @@ var ( // UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable // for use in a grpc.Dial call. -func UnaryClientInterceptor(tracer trace.Tracer) grpc.UnaryClientInterceptor { +func UnaryClientInterceptor(tracer trace.Tracer, opts ...Option) grpc.UnaryClientInterceptor { return func( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, - opts ...grpc.CallOption, + callOpts ...grpc.CallOption, ) error { requestMetadata, _ := metadata.FromOutgoingContext(ctx) metadataCopy := requestMetadata.Copy() @@ -85,12 +85,12 @@ func UnaryClientInterceptor(tracer trace.Tracer) grpc.UnaryClientInterceptor { ) defer span.End() - Inject(ctx, &metadataCopy) + Inject(ctx, &metadataCopy, opts...) ctx = metadata.NewOutgoingContext(ctx, metadataCopy) messageSent.Event(ctx, 1, req) - err := invoker(ctx, method, req, reply, cc, opts...) + err := invoker(ctx, method, req, reply, cc, callOpts...) messageReceived.Event(ctx, 1, reply) @@ -236,14 +236,14 @@ func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) { // StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable // for use in a grpc.Dial call. -func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { +func StreamClientInterceptor(tracer trace.Tracer, opts ...Option) grpc.StreamClientInterceptor { return func( ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, - opts ...grpc.CallOption, + callOpts ...grpc.CallOption, ) (grpc.ClientStream, error) { requestMetadata, _ := metadata.FromOutgoingContext(ctx) metadataCopy := requestMetadata.Copy() @@ -257,10 +257,10 @@ func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { trace.WithAttributes(attr...), ) - Inject(ctx, &metadataCopy) + Inject(ctx, &metadataCopy, opts...) ctx = metadata.NewOutgoingContext(ctx, metadataCopy) - s, err := streamer(ctx, desc, cc, method, opts...) + s, err := streamer(ctx, desc, cc, method, callOpts...) stream := wrapClientStream(s, desc) go func() { @@ -282,7 +282,7 @@ func StreamClientInterceptor(tracer trace.Tracer) grpc.StreamClientInterceptor { // UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable // for use in a grpc.NewServer call. -func UnaryServerInterceptor(tracer trace.Tracer) grpc.UnaryServerInterceptor { +func UnaryServerInterceptor(tracer trace.Tracer, opts ...Option) grpc.UnaryServerInterceptor { return func( ctx context.Context, req interface{}, @@ -292,7 +292,7 @@ func UnaryServerInterceptor(tracer trace.Tracer) grpc.UnaryServerInterceptor { requestMetadata, _ := metadata.FromIncomingContext(ctx) metadataCopy := requestMetadata.Copy() - entries, spanCtx := Extract(ctx, &metadataCopy) + entries, spanCtx := Extract(ctx, &metadataCopy, opts...) ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{ MultiKV: entries, })) @@ -364,7 +364,7 @@ func wrapServerStream(ctx context.Context, ss grpc.ServerStream) *serverStream { // StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable // for use in a grpc.NewServer call. -func StreamServerInterceptor(tracer trace.Tracer) grpc.StreamServerInterceptor { +func StreamServerInterceptor(tracer trace.Tracer, opts ...Option) grpc.StreamServerInterceptor { return func( srv interface{}, ss grpc.ServerStream, @@ -376,7 +376,7 @@ func StreamServerInterceptor(tracer trace.Tracer) grpc.StreamServerInterceptor { requestMetadata, _ := metadata.FromIncomingContext(ctx) metadataCopy := requestMetadata.Copy() - entries, spanCtx := Extract(ctx, &metadataCopy) + entries, spanCtx := Extract(ctx, &metadataCopy, opts...) ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{ MultiKV: entries, })) From fa883d426b122906d4d0e81192d3ac942e2616b4 Mon Sep 17 00:00:00 2001 From: Rey Abolofia Date: Wed, 29 Jul 2020 16:06:20 -0700 Subject: [PATCH 29/60] testtrace.Span tracks and returns its SpanKind. (#987) * Span tracks and returns its SpanKind. * Include SpanKind addition in CHANGELOG. Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + api/trace/testtrace/span.go | 6 ++++++ api/trace/testtrace/span_test.go | 19 +++++++++++++++++++ api/trace/testtrace/tracer.go | 1 + 4 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cea2d7d1362..bb082d487f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) - Add propagator option for gRPC instrumentation. (#986) +- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987) ### Changed diff --git a/api/trace/testtrace/span.go b/api/trace/testtrace/span.go index 38dd84085c1..05a4452af63 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/testtrace/span.go @@ -49,6 +49,7 @@ type Span struct { attributes map[kv.Key]kv.Value events []Event links map[trace.SpanContext][]kv.KeyValue + spanKind trace.SpanKind } func (s *Span) Tracer() trace.Tracer { @@ -262,3 +263,8 @@ func (s *Span) StatusCode() codes.Code { func (s *Span) StatusMessage() string { return s.statusMessage } + +// SpanKind returns the span kind of this span. +func (s *Span) SpanKind() trace.SpanKind { + return s.spanKind +} diff --git a/api/trace/testtrace/span_test.go b/api/trace/testtrace/span_test.go index 33cd23f6f6b..3e9920cb94e 100644 --- a/api/trace/testtrace/span_test.go +++ b/api/trace/testtrace/span_test.go @@ -607,4 +607,23 @@ func TestSpan(t *testing.T) { }) } }) + + t.Run("#SpanKind", func(t *testing.T) { + tp := testtrace.NewProvider() + t.Run("returns the value given at start", func(t *testing.T) { + t.Parallel() + + e := matchers.NewExpecter(t) + + tracer := tp.Tracer(t.Name()) + _, span := tracer.Start(context.Background(), "test", + trace.WithSpanKind(trace.SpanKindConsumer)) + + subject, ok := span.(*testtrace.Span) + e.Expect(ok).ToBeTrue() + subject.End() + + e.Expect(subject.SpanKind()).ToEqual(trace.SpanKindConsumer) + }) + }) } diff --git a/api/trace/testtrace/tracer.go b/api/trace/testtrace/tracer.go index 5408576e206..da4cdd8c875 100644 --- a/api/trace/testtrace/tracer.go +++ b/api/trace/testtrace/tracer.go @@ -50,6 +50,7 @@ func (t *Tracer) Start(ctx context.Context, name string, opts ...trace.StartOpti startTime: startTime, attributes: make(map[kv.Key]kv.Value), links: make(map[trace.SpanContext][]kv.KeyValue), + spanKind: c.SpanKind, } if c.NewRoot { From 12992106de1648c1ec17d4485f3206d57515adde Mon Sep 17 00:00:00 2001 From: MitchellDumovic Date: Wed, 29 Jul 2020 19:10:12 -0700 Subject: [PATCH 30/60] Change default Sampler to ParentOrElse(AlwaysOn) (#989) * Change default Sampler to ParentOrElse(AlwaysOn) * add note to changelog --- CHANGELOG.md | 4 ++++ sdk/trace/provider.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb082d487f1..cbf69169e7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) +### Changed + +- Changed the default Sampler to `ParentOrElse(AlwaysOn)`. (#989) + ### Removed - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) diff --git a/sdk/trace/provider.go b/sdk/trace/provider.go index 52f8a81b65e..2e367a1cdb4 100644 --- a/sdk/trace/provider.go +++ b/sdk/trace/provider.go @@ -67,7 +67,7 @@ func NewProvider(opts ...ProviderOption) (*Provider, error) { namedTracer: make(map[instrumentation.Library]*tracer), } tp.config.Store(&Config{ - DefaultSampler: AlwaysSample(), + DefaultSampler: ParentSample(AlwaysSample()), IDGenerator: defIDGenerator(), MaxAttributesPerSpan: DefaultMaxAttributesPerSpan, MaxEventsPerSpan: DefaultMaxEventsPerSpan, From fd61d2edece005195116e6b9218801a460a3868d Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 30 Jul 2020 08:57:24 -0700 Subject: [PATCH 31/60] Release v0.10.0 (#990) * Prepare for releasing v0.10.0 * Update CHANGELOG * Correct Changelog Co-authored-by: Joshua MacDonald --- CHANGELOG.md | 16 ++++++++++------ example/basic/go.mod | 4 ++-- example/grpc/go.mod | 6 +++--- example/http/go.mod | 6 +++--- example/jaeger/go.mod | 6 +++--- example/namedtracer/go.mod | 6 +++--- example/otel-collector/go.mod | 6 +++--- example/prometheus/go.mod | 4 ++-- example/zipkin/go.mod | 6 +++--- exporters/metric/prometheus/go.mod | 4 ++-- exporters/otlp/go.mod | 4 ++-- exporters/stdout/go.mod | 4 ++-- exporters/trace/jaeger/go.mod | 4 ++-- exporters/trace/zipkin/go.mod | 4 ++-- sdk/go.mod | 2 +- sdk/opentelemetry.go | 2 +- 16 files changed, 44 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbf69169e7e..06812cdf745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [0.10.0] - 2020-07-29 + +This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. + ### Added - The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. @@ -20,7 +24,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) - The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. - This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956) + This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963) +- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962) - The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) - `value.Bool` was replaced with `kv.BoolValue`. - `value.Int64` was replaced with `kv.Int64Value`. @@ -35,6 +40,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `value.Array` was replaced with `kv.ArrayValue`. - Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) - Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) +- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) +- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) ### Removed @@ -64,10 +71,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) -### Changed - -- Changed the default Sampler to `ParentOrElse(AlwaysOn)`. (#989) - ### Removed - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) @@ -726,7 +729,8 @@ It contains api and sdk for trace and meter. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v0.9.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v0.10.0...HEAD +[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0 [0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 [0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 [0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 diff --git a/example/basic/go.mod b/example/basic/go.mod index 0622db54548..71450a7a32b 100644 --- a/example/basic/go.mod +++ b/example/basic/go.mod @@ -9,6 +9,6 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/stdout v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/stdout v0.10.0 ) diff --git a/example/grpc/go.mod b/example/grpc/go.mod index 7270dcd4227..a5120b49197 100644 --- a/example/grpc/go.mod +++ b/example/grpc/go.mod @@ -10,9 +10,9 @@ replace ( require ( github.com/golang/protobuf v1.4.2 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/stdout v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/stdout v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 google.golang.org/grpc v1.30.0 ) diff --git a/example/http/go.mod b/example/http/go.mod index 2c895b1374d..6bbc5353a54 100644 --- a/example/http/go.mod +++ b/example/http/go.mod @@ -9,7 +9,7 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/stdout v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/stdout v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 ) diff --git a/example/jaeger/go.mod b/example/jaeger/go.mod index a2d3e93a6d7..c8497423e32 100644 --- a/example/jaeger/go.mod +++ b/example/jaeger/go.mod @@ -9,7 +9,7 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/trace/jaeger v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/trace/jaeger v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 ) diff --git a/example/namedtracer/go.mod b/example/namedtracer/go.mod index caa1991e514..d6ffe84070c 100644 --- a/example/namedtracer/go.mod +++ b/example/namedtracer/go.mod @@ -9,7 +9,7 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/stdout v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/stdout v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 ) diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 71fe7688635..238c08fbfc5 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -9,9 +9,9 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/otlp v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/otlp v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect google.golang.org/grpc v1.30.0 ) diff --git a/example/prometheus/go.mod b/example/prometheus/go.mod index c50264d0cf4..3edcd6407f1 100644 --- a/example/prometheus/go.mod +++ b/example/prometheus/go.mod @@ -9,6 +9,6 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/metric/prometheus v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/metric/prometheus v0.10.0 ) diff --git a/example/zipkin/go.mod b/example/zipkin/go.mod index 7104b2992b1..a4f80fd92ea 100644 --- a/example/zipkin/go.mod +++ b/example/zipkin/go.mod @@ -9,7 +9,7 @@ replace ( ) require ( - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/exporters/trace/zipkin v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/exporters/trace/zipkin v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 ) diff --git a/exporters/metric/prometheus/go.mod b/exporters/metric/prometheus/go.mod index e0b9a102f18..7e48f023e06 100644 --- a/exporters/metric/prometheus/go.mod +++ b/exporters/metric/prometheus/go.mod @@ -10,6 +10,6 @@ replace ( require ( github.com/prometheus/client_golang v1.7.1 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 ) diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index 71f59cef054..02d8ad9b0bb 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -12,8 +12,8 @@ require ( github.com/google/go-cmp v0.5.1 github.com/kr/pretty v0.2.0 // indirect github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.30.0 diff --git a/exporters/stdout/go.mod b/exporters/stdout/go.mod index 219164cff7f..bf01dda7617 100644 --- a/exporters/stdout/go.mod +++ b/exporters/stdout/go.mod @@ -9,7 +9,7 @@ replace ( require ( github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index 11e6d3c0b75..b791cdf1f95 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -11,8 +11,8 @@ require ( github.com/apache/thrift v0.13.0 github.com/google/go-cmp v0.5.1 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 google.golang.org/api v0.29.0 google.golang.org/grpc v1.30.0 ) diff --git a/exporters/trace/zipkin/go.mod b/exporters/trace/zipkin/go.mod index d7452902308..1f7cff8dbff 100644 --- a/exporters/trace/zipkin/go.mod +++ b/exporters/trace/zipkin/go.mod @@ -10,7 +10,7 @@ replace ( require ( github.com/openzipkin/zipkin-go v0.2.2 github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 - go.opentelemetry.io/otel/sdk v0.9.0 + go.opentelemetry.io/otel v0.10.0 + go.opentelemetry.io/otel/sdk v0.10.0 google.golang.org/grpc v1.30.0 ) diff --git a/sdk/go.mod b/sdk/go.mod index 04b27f1cace..72e57baa4f0 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -10,6 +10,6 @@ require ( github.com/google/go-cmp v0.5.1 github.com/google/gofuzz v1.1.0 // indirect github.com/stretchr/testify v1.6.1 - go.opentelemetry.io/otel v0.9.0 + go.opentelemetry.io/otel v0.10.0 google.golang.org/grpc v1.30.0 ) diff --git a/sdk/opentelemetry.go b/sdk/opentelemetry.go index b749d6666d6..51073760b06 100644 --- a/sdk/opentelemetry.go +++ b/sdk/opentelemetry.go @@ -17,5 +17,5 @@ package opentelemetry // import "go.opentelemetry.io/otel/sdk" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "0.9.0" + return "0.10.0" } From 5438916f6263163f98d80f6dea06350166568ed3 Mon Sep 17 00:00:00 2001 From: Andy Schweig Date: Thu, 30 Jul 2020 10:30:47 -0700 Subject: [PATCH 32/60] Expose optional ResponseWriter interfaces. (#979) http.ResponseWriters may implement additional interfaces (http.CloseNotifier, http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom) that get lost when the ResponseWriter is wrapped in another object. This change uses the httpsnoop package to wrap the ResponseWriter so that the resulting object implements any of the optional interfaces that the original ResponseWriter implements as well as using the replacement ResponseWriter methods that gather information for tracing. --- CHANGELOG.md | 3 ++- example/basic/go.sum | 1 + example/grpc/go.sum | 1 + example/http/go.sum | 1 + example/jaeger/go.sum | 1 + example/namedtracer/go.sum | 1 + example/otel-collector/go.sum | 1 + example/prometheus/go.sum | 1 + example/zipkin/go.sum | 1 + exporters/metric/prometheus/go.sum | 1 + exporters/otlp/go.sum | 1 + exporters/stdout/go.sum | 1 + exporters/trace/jaeger/go.sum | 1 + exporters/trace/zipkin/go.sum | 1 + go.mod | 1 + go.sum | 2 ++ instrumentation/othttp/handler.go | 20 ++++++++++++++++- instrumentation/othttp/handler_test.go | 30 ++++++++++++++++++++++++++ sdk/go.sum | 1 + 19 files changed, 68 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06812cdf745..70259acbd91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ This release migrates the default OpenTelemetry SDK into its own Go module, deco - `value.Uint` was replaced with `kv.UintValue`. - `value.Array` was replaced with `kv.ArrayValue`. - Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) +- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979) - Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) - Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) - Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) @@ -147,7 +148,7 @@ This release implements the v0.5.0 version of the OpenTelemetry specification. ### Added -- The othttp instrumentation now includes default metrics. (#861) +- The othttp instrumentation now includes default metrics. (#861) - This CHANGELOG file to track all changes in the project going forward. - Support for array type attributes. (#798) - Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844) diff --git a/example/basic/go.sum b/example/basic/go.sum index 84808937bf2..3e89b873f8f 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/grpc/go.sum b/example/grpc/go.sum index 2eca30cdf5a..2abf2a3b4d1 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= diff --git a/example/http/go.sum b/example/http/go.sum index 84808937bf2..3e89b873f8f 100644 --- a/example/http/go.sum +++ b/example/http/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 3c79a0209ba..1f78e841e9e 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -41,6 +41,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 84808937bf2..3e89b873f8f 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 43863a3a098..942e9e1f887 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index 4ddd6e6d27a..41e1a8c7798 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -24,6 +24,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 15328cc5d9d..fe7a05030d5 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -18,6 +18,7 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index ffc4ec5244e..f2bf9e5ffd2 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -24,6 +24,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 1dde85e091c..16d7f84032d 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index d97a0c74e07..a725a62e366 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index 4eafaff6896..b789e9e64d7 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -43,6 +43,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 15328cc5d9d..fe7a05030d5 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -18,6 +18,7 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/go.mod b/go.mod index cb0c2105c3d..7c3c64ff9bf 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.14 require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.1 github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.1 github.com/kr/pretty v0.1.0 // indirect diff --git a/go.sum b/go.sum index 6cd150a4012..b4bb52d9376 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= diff --git a/instrumentation/othttp/handler.go b/instrumentation/othttp/handler.go index 3353057b8c9..87463f3d064 100644 --- a/instrumentation/othttp/handler.go +++ b/instrumentation/othttp/handler.go @@ -19,6 +19,8 @@ import ( "net/http" "time" + "github.com/felixge/httpsnoop" + "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" @@ -152,7 +154,23 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { rww := &respWriterWrapper{ResponseWriter: w, record: writeRecordFunc, ctx: ctx, props: h.propagators} - h.handler.ServeHTTP(rww, r.WithContext(ctx)) + // Wrap w to use our ResponseWriter methods while also exposing + // other interfaces that w may implement (http.CloseNotifier, + // http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom). + + w = httpsnoop.Wrap(w, httpsnoop.Hooks{ + Header: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc { + return rww.Header + }, + Write: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc { + return rww.Write + }, + WriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc { + return rww.WriteHeader + }, + }) + + h.handler.ServeHTTP(w, r.WithContext(ctx)) setAfterServeAttributes(span, bw.read, rww.written, rww.statusCode, bw.err, rww.err) diff --git a/instrumentation/othttp/handler_test.go b/instrumentation/othttp/handler_test.go index b4fbab925f8..89d0f111c44 100644 --- a/instrumentation/othttp/handler_test.go +++ b/instrumentation/othttp/handler_test.go @@ -134,3 +134,33 @@ func TestHandlerNoWrite(t *testing.T) { t.Fatalf("Expected *moctrace.MockSpan, got %T", span) } } + +func TestResponseWriterOptionalInterfaces(t *testing.T) { + rr := httptest.NewRecorder() + + var id uint64 + tracer := mocktrace.MockTracer{StartSpanID: &id} + + // ResponseRecorder implements the Flusher interface. Make sure the + // wrapped ResponseWriter passed to the handler still implements + // Flusher. + + var isFlusher bool + h := NewHandler( + http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, isFlusher = w.(http.Flusher) + if _, err := io.WriteString(w, "hello world"); err != nil { + t.Fatal(err) + } + }), "test_handler", + WithTracer(&tracer)) + + r, err := http.NewRequest(http.MethodGet, "http://localhost/", nil) + if err != nil { + t.Fatal(err) + } + h.ServeHTTP(rr, r) + if !isFlusher { + t.Fatal("http.Flusher interface not exposed") + } +} diff --git a/sdk/go.sum b/sdk/go.sum index d97a0c74e07..a725a62e366 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -13,6 +13,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From 5616fc55fc15f956f05f07d23d6febb1b195735e Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 30 Jul 2020 10:36:26 -0700 Subject: [PATCH 33/60] Remove unnecessary schedule from readme (#997) Signed-off-by: Bogdan Drutu Co-authored-by: Tyler Yahn --- README.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/README.md b/README.md index 8c60928dec6..eb4b2a26ddf 100644 --- a/README.md +++ b/README.md @@ -92,25 +92,3 @@ with opentelemetry-go for distributed tracing and monitoring. ## Contributing See the [contributing file](CONTRIBUTING.md). - -## Release Schedule - -OpenTelemetry Go is under active development. Below is the release schedule -for the Go library. The first version of the release isn't guaranteed to conform -to a specific version of the specification, and future releases will not -attempt to maintain backward compatibility with the alpha release. - -| Component | Version | Release Date | -| -------------------------------- | ------------ | ---------------- | -| Tracing API | Alpha v0.1.0 | November 05 2019 | -| Tracing SDK | Alpha v0.1.0 | November 05 2019 | -| Jaeger Trace Exporter | Alpha v0.1.0 | November 05 2019 | -| Trace Context Propagation | Alpha v0.1.0 | November 05 2019 | -| OpenTracing Bridge | Alpha v0.1.0 | November 05 2019 | -| Metrics API | Alpha v0.2.0 | December 03 2019 | -| Metrics SDK | Alpha v0.2.0 | December 03 2019 | -| Prometheus Metrics Exporter | Alpha v0.2.0 | December 03 2019 | -| Context Prop. rename/Baggage | Beta v0.4.0 | March 30 2020 | -| OpenTelemetry Collector Exporter | Beta v0.4.0 | March 30 2020 | -| Zipkin Trace Exporter | Beta v0.4.0 | March 30 2020 | -| OTLP Trace & Metrics Exporter | Beta v0.4.0 | March 30 2020 | From ac3fc6f6fdc953f8bfe9b1c724d76a01ad44a601 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 30 Jul 2020 15:48:19 -0700 Subject: [PATCH 34/60] Add Noop and InMemory SpanBatcher, help with testing integrations (#994) * Add Noop and InMemory SpanBatcher, help with testing integrations Signed-off-by: Bogdan Drutu * Update sdk/export/trace/tracetest/test.go Co-authored-by: Tyler Yahn * More feedback Signed-off-by: Bogdan Drutu Co-authored-by: Tyler Yahn --- sdk/export/trace/tracetest/test.go | 87 +++++++++++++++++++++++++ sdk/export/trace/tracetest/test_test.go | 61 +++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 sdk/export/trace/tracetest/test.go create mode 100644 sdk/export/trace/tracetest/test_test.go diff --git a/sdk/export/trace/tracetest/test.go b/sdk/export/trace/tracetest/test.go new file mode 100644 index 00000000000..a387df587d3 --- /dev/null +++ b/sdk/export/trace/tracetest/test.go @@ -0,0 +1,87 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// tracetest is a testing helper package for the SDK. User can configure no-op or in-memory exporters to verify +// different SDK behaviors or custom instrumentation. +package tracetest // import "go.opentelemetry.io/otel/sdk/export/trace/tracetest" + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/sdk/export/trace" +) + +var _ trace.SpanBatcher = (*NoopExporter)(nil) +var _ trace.SpanSyncer = (*NoopExporter)(nil) + +// NewNoopExporter returns a new no-op exporter. +// It implements both trace.SpanBatcher and trace.SpanSyncer. +func NewNoopExporter() *NoopExporter { + return new(NoopExporter) +} + +// NoopExporter is an exporter that does nothing. +type NoopExporter struct{} + +// ExportSpans implements the trace.SpanBatcher interface. +func (nsb *NoopExporter) ExportSpans(context.Context, []*trace.SpanData) {} + +// ExportSpan implements the trace.SpanSyncer interface. +func (nsb *NoopExporter) ExportSpan(context.Context, *trace.SpanData) {} + +var _ trace.SpanBatcher = (*InMemoryExporter)(nil) +var _ trace.SpanSyncer = (*InMemoryExporter)(nil) + +// NewInMemoryExporter returns a new trace.SpanBatcher that stores in-memory all exported spans. +// It implements both trace.SpanBatcher and trace.SpanSyncer. +func NewInMemoryExporter() *InMemoryExporter { + return new(InMemoryExporter) +} + +// InMemoryExporter is an exporter that stores in-memory all exported spans. +type InMemoryExporter struct { + mu sync.Mutex + sds []*trace.SpanData +} + +// ExportSpans implements the trace.SpanBatcher interface. +func (imsb *InMemoryExporter) ExportSpans(_ context.Context, sds []*trace.SpanData) { + imsb.mu.Lock() + defer imsb.mu.Unlock() + imsb.sds = append(imsb.sds, sds...) +} + +// ExportSpan implements the trace.SpanSyncer interface. +func (imsb *InMemoryExporter) ExportSpan(_ context.Context, sd *trace.SpanData) { + imsb.mu.Lock() + defer imsb.mu.Unlock() + imsb.sds = append(imsb.sds, sd) +} + +// Reset the current in-memory storage. +func (imsb *InMemoryExporter) Reset() { + imsb.mu.Lock() + defer imsb.mu.Unlock() + imsb.sds = nil +} + +// GetSpans returns the current in-memory stored spans. +func (imsb *InMemoryExporter) GetSpans() []*trace.SpanData { + imsb.mu.Lock() + defer imsb.mu.Unlock() + ret := make([]*trace.SpanData, len(imsb.sds)) + copy(ret, imsb.sds) + return ret +} diff --git a/sdk/export/trace/tracetest/test_test.go b/sdk/export/trace/tracetest/test_test.go new file mode 100644 index 00000000000..46a385e33d7 --- /dev/null +++ b/sdk/export/trace/tracetest/test_test.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tracetest + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "go.opentelemetry.io/otel/sdk/export/trace" +) + +// TestNoop tests only that the no-op does not crash in different scenarios. +func TestNoop(t *testing.T) { + nsb := NewNoopExporter() + + nsb.ExportSpans(context.Background(), nil) + nsb.ExportSpans(context.Background(), make([]*trace.SpanData, 10)) + nsb.ExportSpans(context.Background(), make([]*trace.SpanData, 0, 10)) + nsb.ExportSpan(context.Background(), nil) +} + +func TestNewInMemoryExporter(t *testing.T) { + imsb := NewInMemoryExporter() + + imsb.ExportSpans(context.Background(), nil) + assert.Len(t, imsb.GetSpans(), 0) + + input := make([]*trace.SpanData, 10) + for i := 0; i < 10; i++ { + input[i] = new(trace.SpanData) + } + imsb.ExportSpans(context.Background(), input) + sds := imsb.GetSpans() + assert.Len(t, sds, 10) + for i, sd := range sds { + assert.Same(t, input[i], sd) + } + imsb.Reset() + // Ensure that operations on the internal storage does not change the previously returned value. + assert.Len(t, sds, 10) + assert.Len(t, imsb.GetSpans(), 0) + + imsb.ExportSpan(context.Background(), input[0]) + sds = imsb.GetSpans() + assert.Len(t, sds, 1) + assert.Same(t, input[0], sds[0]) +} From 4b96967571b47d583d848ef26af983979a96d8db Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 30 Jul 2020 15:53:07 -0700 Subject: [PATCH 35/60] Remove deadcode, and confusing sampler interface from API (#999) Signed-off-by: Bogdan Drutu Co-authored-by: Tyler Yahn --- api/trace/always_off_sampler.go | 54 ---------------------------- api/trace/always_off_sampler_test.go | 40 --------------------- api/trace/always_on_sampler.go | 54 ---------------------------- api/trace/always_on_sampler_test.go | 40 --------------------- api/trace/sampler.go | 46 ------------------------ 5 files changed, 234 deletions(-) delete mode 100644 api/trace/always_off_sampler.go delete mode 100644 api/trace/always_off_sampler_test.go delete mode 100644 api/trace/always_on_sampler.go delete mode 100644 api/trace/always_on_sampler_test.go delete mode 100644 api/trace/sampler.go diff --git a/api/trace/always_off_sampler.go b/api/trace/always_off_sampler.go deleted file mode 100644 index b8164839820..00000000000 --- a/api/trace/always_off_sampler.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package trace - -import ( - "go.opentelemetry.io/otel/api/kv" -) - -const ( - alwaysOffSamplerDescription = "AlwaysOffSampler" -) - -var alwaysOffSamplerDecision = Decision{Sampled: false} - -type alwaysOffSampler struct{} - -// ShouldSample implements Sampler interface. -// It always returns a Decision with Sampled value set to false -// and with Attributes set to an empty slice. -func (ns alwaysOffSampler) ShouldSample( - _ SpanContext, - _ bool, - _ ID, - _ string, - _ SpanKind, - _ []kv.KeyValue, - _ []Link, -) Decision { - return alwaysOffSamplerDecision -} - -// Description implements Sampler interface. -// It returns the description of this sampler. -func (ns alwaysOffSampler) Description() string { - return alwaysOffSamplerDescription -} - -var _ Sampler = alwaysOffSampler{} - -func AlwaysOffSampler() Sampler { - return alwaysOffSampler{} -} diff --git a/api/trace/always_off_sampler_test.go b/api/trace/always_off_sampler_test.go deleted file mode 100644 index 3ae70f34165..00000000000 --- a/api/trace/always_off_sampler_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package trace - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - - "go.opentelemetry.io/otel/api/kv" -) - -func TestNeverSamperShouldSample(t *testing.T) { - gotD := AlwaysOffSampler().ShouldSample( - SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{}) - wantD := Decision{Sampled: false} - if diff := cmp.Diff(wantD, gotD); diff != "" { - t.Errorf("Decision: +got, -want%v", diff) - } -} - -func TestAlwaysOffSamplerDescription(t *testing.T) { - gotDesc := AlwaysOffSampler().Description() - wantDesc := alwaysOffSamplerDescription - if diff := cmp.Diff(wantDesc, gotDesc); diff != "" { - t.Errorf("Description: +got, -want%v", diff) - } -} diff --git a/api/trace/always_on_sampler.go b/api/trace/always_on_sampler.go deleted file mode 100644 index 99048bacbaa..00000000000 --- a/api/trace/always_on_sampler.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package trace - -import ( - "go.opentelemetry.io/otel/api/kv" -) - -const ( - alwaysOnSamplerDescription = "AlwaysOnSampler" -) - -var alwaysOnSamplerDecision = Decision{Sampled: true} - -type alwaysOnSampler struct{} - -// ShouldSample implements Sampler interface. -// It always returns a Decision with Sampled value set to true -// and with Attributes set to an empty slice. -func (as alwaysOnSampler) ShouldSample( - _ SpanContext, - _ bool, - _ ID, - _ string, - _ SpanKind, - _ []kv.KeyValue, - _ []Link, -) Decision { - return alwaysOnSamplerDecision -} - -// Description implements Sampler interface. -// It returns the description of this sampler. -func (as alwaysOnSampler) Description() string { - return alwaysOnSamplerDescription -} - -var _ Sampler = alwaysOnSampler{} - -func AlwaysOnSampler() Sampler { - return alwaysOnSampler{} -} diff --git a/api/trace/always_on_sampler_test.go b/api/trace/always_on_sampler_test.go deleted file mode 100644 index ac0f85a2afd..00000000000 --- a/api/trace/always_on_sampler_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package trace - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - - "go.opentelemetry.io/otel/api/kv" -) - -func TestAlwaysOnSamplerShouldSample(t *testing.T) { - gotD := AlwaysOnSampler().ShouldSample( - SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{}) - wantD := Decision{Sampled: true} - if diff := cmp.Diff(wantD, gotD); diff != "" { - t.Errorf("Decision: +got, -want%v", diff) - } -} - -func TestAlwaysOnSamplerDescription(t *testing.T) { - gotDesc := AlwaysOnSampler().Description() - wantDesc := alwaysOnSamplerDescription - if diff := cmp.Diff(wantDesc, gotDesc); diff != "" { - t.Errorf("Description: +got, -want%v", diff) - } -} diff --git a/api/trace/sampler.go b/api/trace/sampler.go deleted file mode 100644 index 3777b32fae6..00000000000 --- a/api/trace/sampler.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package trace - -import "go.opentelemetry.io/otel/api/kv" - -type Sampler interface { - // ShouldSample returns a Decision that contains a decision whether to sample - // or not sample the span to be created. Decision is based on a Sampler specific - // algorithm that takes into account one or more input parameters. - ShouldSample( - sc SpanContext, - remote bool, - traceID ID, - spanName string, - spanKind SpanKind, - attributes []kv.KeyValue, - links []Link, - ) Decision - - // Description returns of the sampler. It contains its name or short description - // and its configured properties. - // For example 'ProbabilitySampler:{0.00001}' - Description() string -} - -type Decision struct { - // Sampled is set true if the span should be sampled. - Sampled bool - - // Attributes provides insight into Sample r's decision process. - // It could be empty slice or nil if no attributes are recorded by the sampler. - Attributes []kv.KeyValue -} From b74edd47cae2b19bc3836e4f36dc7c750885b5f6 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 31 Jul 2020 09:59:22 -0700 Subject: [PATCH 36/60] Run go mod tidy in ./tools (#996) --- tools/go.sum | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/go.sum b/tools/go.sum index 645a420c54d..9d7af5c5d42 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -191,6 +191,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e h1:0aewS5NTyxftZHSnFaJmWE5oCCrj4DyEXkAiMa1iZJM= github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -198,6 +199,7 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/itchyny/astgen-go v0.0.0-20200519013840-cf3ea398f645 h1:3gyXljUyTWWTv/NMFPvwgxJSdE9Mamg2r3x8HMBl+Uo= github.com/itchyny/astgen-go v0.0.0-20200519013840-cf3ea398f645/go.mod h1:296z3W7Xsrp2mlIY88ruDKscuvrkL6zXCNRtaYVshzw= +github.com/itchyny/go-flags v1.5.0 h1:Z5q2ist2sfDjDlExVPBrMqlsEDxDR2h4zuOElB0OEYI= github.com/itchyny/go-flags v1.5.0/go.mod h1:lenkYuCobuxLBAd/HGFE4LRoW8D3B6iXRQfWYJ+MNbA= github.com/itchyny/gojq v0.11.0 h1:z7HnaKZ6erVzxPo3BkhJBG7jHmzKdAW8Hcse5N6YAic= github.com/itchyny/gojq v0.11.0/go.mod h1:my6D2qN2Sm6qa+/5GsPDUZlCWGR+U8Qsa9he76sudv0= @@ -261,6 +263,7 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= From 423183e6984e34e0faddc6806d710b3cefecfa3d Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 31 Jul 2020 10:08:50 -0700 Subject: [PATCH 37/60] Update release documentation (#993) * Update release docs Clean up language and include directions to handle the Changelog during a release. * Fix grammar --- RELEASING.md | 55 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index bd8a5592442..94ccfee5cb7 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,12 +1,10 @@ # Release Process ## Pre-Release -Update go.mod for submodules to depend on the new release which will happen -in the next step. This will create build failure for those who depend -on the master branch instead or released version. But they shouldn't be -depending on the master. So it is not a concern. -1. Run the pre-release script. It creates a branch pre_release_ to make the changes. +Update go.mod for submodules to depend on the new release which will happen in the next step. + +1. Run the pre-release script. It creates a branch `pre_release_` that will contain all release changes. ``` ./pre_release.sh -t @@ -18,26 +16,42 @@ depending on the master. So it is not a concern. git diff master ``` -3. Push the changes to upstream. + This should have changed the version for all modules to be ``. - ``` - git push - ``` +3. Update the [Changelog](./CHANGELOG.md). + - Make sure all relevant changes for this release are included and are in language that non-contributors to the project can understand. + To verify this, you can look directly at the commits since the ``. + + ``` + git --no-pager log --pretty=oneline "..HEAD" + ``` + + - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `). + - Update all the appropriate links at the bottom. -4. Create a PR on github and merge the PR once approved. +4. Push the changes to upstream and create a Pull Request on GitHub. + Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. ## Tag -Now create a new Tag on the commit hash of the changes made in pre-release step. -Use the same tag as used in the pre-release step. -1. Run the tag.sh script. +Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit. + +***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! +Failure to do so will leave things in a broken state. + +***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189). +It is critical you make sure the version you push upstream is correct. +[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331). + +1. Run the tag.sh script using the `` of the commit on the master branch for the merged Pull Request. ``` ./tag.sh ``` -2. Push tags upstream. Make sure you run this for all sub-modules as well. +2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`). + Make sure you push all sub-modules as well. ``` git push upstream @@ -46,15 +60,18 @@ Use the same tag as used in the pre-release step. ``` ## Release -Now create a release for the new `` on github. -The release body should include all the release notes in the Changelog for this release. -Additionally, the `tag.sh` script generates commit logs since last release which can be used to suppliment the release notes. + +Finally create a Release for the new `` on GitHub. +The release body should include all the release notes from the Changelog for this release. +Additionally, the `tag.sh` script generates commit logs since last release which can be used to supplement the release notes. ## Verify Examples -After releasing run following script to verify that examples build outside of the otel repo. -The script copies examples into a different directory and builds them. + +After releasing verify that examples build outside of the repository. ``` ./verify_examples.sh ``` +The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. +This ensures they build with the published release, not the local copy. From fc1ce6cb8fa42408dcb35f5126fab1f5e4cfe51b Mon Sep 17 00:00:00 2001 From: Stefan Prisca Date: Fri, 31 Jul 2020 20:34:46 +0200 Subject: [PATCH 38/60] fix otel collector example (#1006) Co-authored-by: Tyler Yahn --- example/otel-collector/k8s/otel-collector.yaml | 7 ++++--- example/otel-collector/main.go | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/example/otel-collector/k8s/otel-collector.yaml b/example/otel-collector/k8s/otel-collector.yaml index d77ebc3d57e..da7f46c6f3c 100644 --- a/example/otel-collector/k8s/otel-collector.yaml +++ b/example/otel-collector/k8s/otel-collector.yaml @@ -36,8 +36,9 @@ data: extensions: health_check: {} exporters: - jaeger_grpc: + jaeger: endpoint: "jaeger-collector.observability.svc.cluster.local:14250" + insecure: true prometheus: endpoint: 0.0.0.0:8889 namespace: "testapp" @@ -49,7 +50,7 @@ data: traces: receivers: [otlp] processors: [] - exporters: [jaeger_grpc] + exporters: [jaeger] metrics: receivers: [otlp] @@ -114,7 +115,7 @@ spec: env: - name: GOGC value: "80" - image: otel/opentelemetry-collector:0.5.0 + image: otel/opentelemetry-collector:0.6.0 name: otel-collector resources: limits: diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index 1318f37dcc1..81b1e724045 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -29,6 +29,7 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/api/standard" + apitrace "go.opentelemetry.io/otel/api/trace" "go.opentelemetry.io/otel/exporters/otlp" "go.opentelemetry.io/otel/sdk/metric/controller/push" "go.opentelemetry.io/otel/sdk/metric/selector/simple" @@ -102,7 +103,10 @@ func main() { defer valuerecorder.Unbind() // work begins - ctx, span := tracer.Start(context.Background(), "CollectorExporter-Example") + ctx, span := tracer.Start( + context.Background(), + "CollectorExporter-Example", + apitrace.WithAttributes(commonLabels...)) for i := 0; i < 10; i++ { _, iSpan := tracer.Start(ctx, fmt.Sprintf("Sample-%d", i)) log.Printf("Doing really hard work (%d / 10)\n", i+1) From 96a5f8ff46632869186135fb18af9f4052cea492 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 4 Aug 2020 07:51:09 -0700 Subject: [PATCH 39/60] Rename api/standard package to semconv (#1016) * Rename api/standard package to semconv * Update `api/standard` package dependencies to `semconv` * Update Changelog * Add PR number to Changelog --- CHANGELOG.md | 4 + example/http/client/client.go | 4 +- example/http/server/server.go | 4 +- example/otel-collector/main.go | 4 +- instrumentation/grpctrace/interceptor.go | 22 +-- instrumentation/grpctrace/interceptor_test.go | 144 +++++++++--------- instrumentation/httptrace/clienttrace.go | 6 +- instrumentation/httptrace/httptrace.go | 6 +- instrumentation/httptrace/httptrace_test.go | 26 ++-- instrumentation/othttp/handler.go | 16 +- instrumentation/othttp/handler_test.go | 12 +- instrumentation/othttp/transport.go | 8 +- {api/standard => semconv}/doc.go | 12 +- {api/standard => semconv}/http.go | 2 +- {api/standard => semconv}/http_test.go | 2 +- {api/standard => semconv}/resource.go | 20 +-- {api/standard => semconv}/trace.go | 20 +-- 17 files changed, 158 insertions(+), 154 deletions(-) rename {api/standard => semconv}/doc.go (51%) rename {api/standard => semconv}/http.go (99%) rename {api/standard => semconv}/http_test.go (99%) rename {api/standard => semconv}/resource.go (90%) rename {api/standard => semconv}/trace.go (95%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70259acbd91..2316885b77b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Changed + +- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) + ## [0.10.0] - 2020-07-29 This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. diff --git a/example/http/client/client.go b/example/http/client/client.go index 2a4529bb38a..3cb4773cf10 100644 --- a/example/http/client/client.go +++ b/example/http/client/client.go @@ -22,8 +22,8 @@ import ( "log" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/semconv" "net/http" "time" @@ -83,7 +83,7 @@ func main() { return err }, - trace.WithAttributes(standard.PeerServiceKey.String("ExampleService"))) + trace.WithAttributes(semconv.PeerServiceKey.String("ExampleService"))) if err != nil { panic(err) diff --git a/example/http/server/server.go b/example/http/server/server.go index d3543818881..bacfd32c023 100644 --- a/example/http/server/server.go +++ b/example/http/server/server.go @@ -21,12 +21,12 @@ import ( "go.opentelemetry.io/otel/api/correlation" "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" "go.opentelemetry.io/otel/exporters/stdout" "go.opentelemetry.io/otel/instrumentation/httptrace" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" + "go.opentelemetry.io/otel/semconv" ) func initTracer() { @@ -41,7 +41,7 @@ func initTracer() { // In a production application, use sdktrace.ProbabilitySampler with a desired probability. tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), sdktrace.WithSyncer(exporter), - sdktrace.WithResource(resource.New(standard.ServiceNameKey.String("ExampleService")))) + sdktrace.WithResource(resource.New(semconv.ServiceNameKey.String("ExampleService")))) if err != nil { log.Fatal(err) } diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index 81b1e724045..23065e5df2c 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -28,13 +28,13 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/api/standard" apitrace "go.opentelemetry.io/otel/api/trace" "go.opentelemetry.io/otel/exporters/otlp" "go.opentelemetry.io/otel/sdk/metric/controller/push" "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" + "go.opentelemetry.io/otel/semconv" ) // Initializes an OTLP exporter, and configures the corresponding trace and @@ -57,7 +57,7 @@ func initProvider() (*otlp.Exporter, *push.Controller) { sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), sdktrace.WithResource(resource.New( // the service name used to display traces in backends - kv.Key(standard.ServiceNameKey).String("test-service"), + kv.Key(semconv.ServiceNameKey).String("test-service"), )), sdktrace.WithSyncer(exp), ) diff --git a/instrumentation/grpctrace/interceptor.go b/instrumentation/grpctrace/interceptor.go index b35208a65c6..7e6df7fbd01 100644 --- a/instrumentation/grpctrace/interceptor.go +++ b/instrumentation/grpctrace/interceptor.go @@ -22,7 +22,7 @@ import ( "net" "strings" - "go.opentelemetry.io/otel/api/standard" + "go.opentelemetry.io/otel/semconv" "github.com/golang/protobuf/proto" //nolint:staticcheck @@ -45,20 +45,20 @@ func (m messageType) Event(ctx context.Context, id int, message interface{}) { if p, ok := message.(proto.Message); ok { span.AddEvent(ctx, "message", kv.KeyValue(m), - standard.RPCMessageIDKey.Int(id), - standard.RPCMessageUncompressedSizeKey.Int(proto.Size(p)), + semconv.RPCMessageIDKey.Int(id), + semconv.RPCMessageUncompressedSizeKey.Int(proto.Size(p)), ) } else { span.AddEvent(ctx, "message", kv.KeyValue(m), - standard.RPCMessageIDKey.Int(id), + semconv.RPCMessageIDKey.Int(id), ) } } var ( - messageSent = messageType(standard.RPCMessageTypeSent) - messageReceived = messageType(standard.RPCMessageTypeReceived) + messageSent = messageType(semconv.RPCMessageTypeSent) + messageReceived = messageType(semconv.RPCMessageTypeReceived) ) // UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable @@ -404,7 +404,7 @@ func StreamServerInterceptor(tracer trace.Tracer, opts ...Option) grpc.StreamSer // spanInfo returns a span name and all appropriate attributes from the gRPC // method and peer address. func spanInfo(fullMethod, peerAddress string) (string, []kv.KeyValue) { - attrs := []kv.KeyValue{standard.RPCSystemGRPC} + attrs := []kv.KeyValue{semconv.RPCSystemGRPC} name, mAttrs := parseFullMethod(fullMethod) attrs = append(attrs, mAttrs...) attrs = append(attrs, peerAttr(peerAddress)...) @@ -423,8 +423,8 @@ func peerAttr(addr string) []kv.KeyValue { } return []kv.KeyValue{ - standard.NetPeerIPKey.String(host), - standard.NetPeerPortKey.String(port), + semconv.NetPeerIPKey.String(host), + semconv.NetPeerPortKey.String(port), } } @@ -450,10 +450,10 @@ func parseFullMethod(fullMethod string) (string, []kv.KeyValue) { var attrs []kv.KeyValue if service := parts[0]; service != "" { - attrs = append(attrs, standard.RPCServiceKey.String(service)) + attrs = append(attrs, semconv.RPCServiceKey.String(service)) } if method := parts[1]; method != "" { - attrs = append(attrs, standard.RPCMethodKey.String(method)) + attrs = append(attrs, semconv.RPCMethodKey.String(method)) } return name, attrs } diff --git a/instrumentation/grpctrace/interceptor_test.go b/instrumentation/grpctrace/interceptor_test.go index d900e926e70..3b5d29fb603 100644 --- a/instrumentation/grpctrace/interceptor_test.go +++ b/instrumentation/grpctrace/interceptor_test.go @@ -19,8 +19,8 @@ import ( "testing" "time" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace/testtrace" + "go.opentelemetry.io/otel/semconv" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -105,22 +105,22 @@ func TestUnaryClientInterceptor(t *testing.T) { method: "/github.com.serviceName/bar", name: "github.com.serviceName/bar", expectedAttr: map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.RPCServiceKey: kv.StringValue("github.com.serviceName"), - standard.RPCMethodKey: kv.StringValue("bar"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.RPCServiceKey: kv.StringValue("github.com.serviceName"), + semconv.RPCMethodKey: kv.StringValue("bar"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), }, eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: kv.StringValue("SENT"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), + semconv.RPCMessageTypeKey: kv.StringValue("SENT"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), + semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -128,22 +128,22 @@ func TestUnaryClientInterceptor(t *testing.T) { method: "/serviceName/bar", name: "serviceName/bar", expectedAttr: map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.RPCServiceKey: kv.StringValue("serviceName"), - standard.RPCMethodKey: kv.StringValue("bar"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.RPCServiceKey: kv.StringValue("serviceName"), + semconv.RPCMethodKey: kv.StringValue("bar"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), }, eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: kv.StringValue("SENT"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), + semconv.RPCMessageTypeKey: kv.StringValue("SENT"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), + semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -151,22 +151,22 @@ func TestUnaryClientInterceptor(t *testing.T) { method: "serviceName/bar", name: "serviceName/bar", expectedAttr: map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.RPCServiceKey: kv.StringValue("serviceName"), - standard.RPCMethodKey: kv.StringValue("bar"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.RPCServiceKey: kv.StringValue("serviceName"), + semconv.RPCMethodKey: kv.StringValue("bar"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), }, eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: kv.StringValue("SENT"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), + semconv.RPCMessageTypeKey: kv.StringValue("SENT"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), + semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -174,20 +174,20 @@ func TestUnaryClientInterceptor(t *testing.T) { method: "invalidName", name: "invalidName", expectedAttr: map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), }, eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: kv.StringValue("SENT"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), + semconv.RPCMessageTypeKey: kv.StringValue("SENT"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), + semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -195,22 +195,22 @@ func TestUnaryClientInterceptor(t *testing.T) { method: "/github.com.foo.serviceName_123/method", name: "github.com.foo.serviceName_123/method", expectedAttr: map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.RPCServiceKey: kv.StringValue("github.com.foo.serviceName_123"), - standard.RPCMethodKey: kv.StringValue("method"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.RPCServiceKey: kv.StringValue("github.com.foo.serviceName_123"), + semconv.RPCMethodKey: kv.StringValue("method"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), }, eventsAttr: []map[kv.Key]kv.Value{ { - standard.RPCMessageTypeKey: kv.StringValue("SENT"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), + semconv.RPCMessageTypeKey: kv.StringValue("SENT"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), }, { - standard.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - standard.RPCMessageIDKey: kv.IntValue(1), - standard.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), + semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), + semconv.RPCMessageIDKey: kv.IntValue(1), + semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), }, }, }, @@ -309,11 +309,11 @@ func TestStreamClientInterceptor(t *testing.T) { require.True(t, ok, "missing span %s", name) expectedAttr := map[kv.Key]kv.Value{ - standard.RPCSystemKey: kv.StringValue("grpc"), - standard.RPCServiceKey: kv.StringValue("github.com.serviceName"), - standard.RPCMethodKey: kv.StringValue("bar"), - standard.NetPeerIPKey: kv.StringValue("fake"), - standard.NetPeerPortKey: kv.StringValue("connection"), + semconv.RPCSystemKey: kv.StringValue("grpc"), + semconv.RPCServiceKey: kv.StringValue("github.com.serviceName"), + semconv.RPCMethodKey: kv.StringValue("bar"), + semconv.NetPeerIPKey: kv.StringValue("fake"), + semconv.NetPeerPortKey: kv.StringValue("connection"), } assert.Equal(t, expectedAttr, span.Attributes()) @@ -323,10 +323,10 @@ func TestStreamClientInterceptor(t *testing.T) { msgID := i/2 + 1 validate := func(eventName string, attrs map[kv.Key]kv.Value) { for k, v := range attrs { - if k == standard.RPCMessageTypeKey && v.AsString() != eventName { + if k == semconv.RPCMessageTypeKey && v.AsString() != eventName { t.Errorf("invalid event on index: %d expecting %s event, receive %s event", i, eventName, v.AsString()) } - if k == standard.RPCMessageIDKey && v != kv.IntValue(msgID) { + if k == semconv.RPCMessageIDKey && v != kv.IntValue(msgID) { t.Errorf("invalid id for message event expected %d received %d", msgID, v.AsInt32()) } } @@ -376,36 +376,36 @@ func TestParseFullMethod(t *testing.T) { fullMethod: "/grpc.test.EchoService/Echo", name: "grpc.test.EchoService/Echo", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("grpc.test.EchoService"), - standard.RPCMethodKey.String("Echo"), + semconv.RPCServiceKey.String("grpc.test.EchoService"), + semconv.RPCMethodKey.String("Echo"), }, }, { fullMethod: "/com.example.ExampleRmiService/exampleMethod", name: "com.example.ExampleRmiService/exampleMethod", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("com.example.ExampleRmiService"), - standard.RPCMethodKey.String("exampleMethod"), + semconv.RPCServiceKey.String("com.example.ExampleRmiService"), + semconv.RPCMethodKey.String("exampleMethod"), }, }, { fullMethod: "/MyCalcService.Calculator/Add", name: "MyCalcService.Calculator/Add", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("MyCalcService.Calculator"), - standard.RPCMethodKey.String("Add"), + semconv.RPCServiceKey.String("MyCalcService.Calculator"), + semconv.RPCMethodKey.String("Add"), }, }, { fullMethod: "/MyServiceReference.ICalculator/Add", name: "MyServiceReference.ICalculator/Add", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("MyServiceReference.ICalculator"), - standard.RPCMethodKey.String("Add"), + semconv.RPCServiceKey.String("MyServiceReference.ICalculator"), + semconv.RPCMethodKey.String("Add"), }, }, { fullMethod: "/MyServiceWithNoPackage/theMethod", name: "MyServiceWithNoPackage/theMethod", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("MyServiceWithNoPackage"), - standard.RPCMethodKey.String("theMethod"), + semconv.RPCServiceKey.String("MyServiceWithNoPackage"), + semconv.RPCMethodKey.String("theMethod"), }, }, { fullMethod: "/pkg.srv", @@ -415,7 +415,7 @@ func TestParseFullMethod(t *testing.T) { fullMethod: "/pkg.srv/", name: "pkg.srv/", attr: []kv.KeyValue{ - standard.RPCServiceKey.String("pkg.srv"), + semconv.RPCServiceKey.String("pkg.srv"), }, }, } diff --git a/instrumentation/httptrace/clienttrace.go b/instrumentation/httptrace/clienttrace.go index 454a3c0b1b7..e77e77c762b 100644 --- a/instrumentation/httptrace/clienttrace.go +++ b/instrumentation/httptrace/clienttrace.go @@ -22,7 +22,7 @@ import ( "strings" "sync" - "go.opentelemetry.io/otel/api/standard" + "go.opentelemetry.io/otel/semconv" "google.golang.org/grpc/codes" @@ -152,7 +152,7 @@ func (ct *clientTracer) span(hook string) trace.Span { } func (ct *clientTracer) getConn(host string) { - ct.start("http.getconn", "http.getconn", standard.HTTPHostKey.String(host)) + ct.start("http.getconn", "http.getconn", semconv.HTTPHostKey.String(host)) } func (ct *clientTracer) gotConn(info httptrace.GotConnInfo) { @@ -172,7 +172,7 @@ func (ct *clientTracer) gotFirstResponseByte() { } func (ct *clientTracer) dnsStart(info httptrace.DNSStartInfo) { - ct.start("http.dns", "http.dns", standard.HTTPHostKey.String(info.Host)) + ct.start("http.dns", "http.dns", semconv.HTTPHostKey.String(info.Host)) } func (ct *clientTracer) dnsDone(info httptrace.DNSDoneInfo) { diff --git a/instrumentation/httptrace/httptrace.go b/instrumentation/httptrace/httptrace.go index 4f382217dc6..ccea090ef86 100644 --- a/instrumentation/httptrace/httptrace.go +++ b/instrumentation/httptrace/httptrace.go @@ -22,8 +22,8 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/semconv" ) // Option is a function that allows configuration of the httptrace Extract() @@ -55,8 +55,8 @@ func Extract(ctx context.Context, req *http.Request, opts ...Option) ([]kv.KeyVa ctx = propagation.ExtractHTTP(ctx, c.propagators, req.Header) attrs := append( - standard.HTTPServerAttributesFromHTTPRequest("", "", req), - standard.NetAttributesFromHTTPRequest("tcp", req)..., + semconv.HTTPServerAttributesFromHTTPRequest("", "", req), + semconv.NetAttributesFromHTTPRequest("tcp", req)..., ) var correlationCtxKVs []kv.KeyValue diff --git a/instrumentation/httptrace/httptrace_test.go b/instrumentation/httptrace/httptrace_test.go index 06aa9782d2f..3b704b0baee 100644 --- a/instrumentation/httptrace/httptrace_test.go +++ b/instrumentation/httptrace/httptrace_test.go @@ -26,9 +26,9 @@ import ( "go.opentelemetry.io/otel/api/correlation" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace/testtrace" "go.opentelemetry.io/otel/instrumentation/httptrace" + "go.opentelemetry.io/otel/semconv" ) func TestRoundtrip(t *testing.T) { @@ -44,7 +44,7 @@ func TestRoundtrip(t *testing.T) { actualAttrs := make(map[kv.Key]string) for _, attr := range attrs { - if attr.Key == standard.NetPeerPortKey { + if attr.Key == semconv.NetPeerPortKey { // Peer port will be non-deterministic continue } @@ -79,17 +79,17 @@ func TestRoundtrip(t *testing.T) { address := ts.Listener.Addr() hp := strings.Split(address.String(), ":") expectedAttrs = map[kv.Key]string{ - standard.HTTPFlavorKey: "1.1", - standard.HTTPHostKey: address.String(), - standard.HTTPMethodKey: "GET", - standard.HTTPSchemeKey: "http", - standard.HTTPTargetKey: "/", - standard.HTTPUserAgentKey: "Go-http-client/1.1", - standard.HTTPRequestContentLengthKey: "3", - standard.NetHostIPKey: hp[0], - standard.NetHostPortKey: hp[1], - standard.NetPeerIPKey: "127.0.0.1", - standard.NetTransportKey: "IP.TCP", + semconv.HTTPFlavorKey: "1.1", + semconv.HTTPHostKey: address.String(), + semconv.HTTPMethodKey: "GET", + semconv.HTTPSchemeKey: "http", + semconv.HTTPTargetKey: "/", + semconv.HTTPUserAgentKey: "Go-http-client/1.1", + semconv.HTTPRequestContentLengthKey: "3", + semconv.NetHostIPKey: hp[0], + semconv.NetHostPortKey: hp[1], + semconv.NetPeerIPKey: "127.0.0.1", + semconv.NetTransportKey: "IP.TCP", } client := ts.Client() diff --git a/instrumentation/othttp/handler.go b/instrumentation/othttp/handler.go index 87463f3d064..20471ffd791 100644 --- a/instrumentation/othttp/handler.go +++ b/instrumentation/othttp/handler.go @@ -25,8 +25,8 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/semconv" ) var _ http.Handler = &Handler{} @@ -127,9 +127,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } opts := append([]trace.StartOption{ - trace.WithAttributes(standard.NetAttributesFromHTTPRequest("tcp", r)...), - trace.WithAttributes(standard.EndUserAttributesFromHTTPRequest(r)...), - trace.WithAttributes(standard.HTTPServerAttributesFromHTTPRequest(h.operation, "", r)...), + trace.WithAttributes(semconv.NetAttributesFromHTTPRequest("tcp", r)...), + trace.WithAttributes(semconv.EndUserAttributesFromHTTPRequest(r)...), + trace.WithAttributes(semconv.HTTPServerAttributesFromHTTPRequest(h.operation, "", r)...), }, h.spanStartOptions...) // start with the configured options ctx := propagation.ExtractHTTP(r.Context(), h.propagators, r.Header) @@ -176,7 +176,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Add request metrics - labels := standard.HTTPServerMetricAttributesFromHTTPRequest(h.operation, r) + labels := semconv.HTTPServerMetricAttributesFromHTTPRequest(h.operation, r) h.counters[RequestContentLength].Add(ctx, bw.read, labels...) h.counters[ResponseContentLength].Add(ctx, rww.written, labels...) @@ -201,8 +201,8 @@ func setAfterServeAttributes(span trace.Span, read, wrote int64, statusCode int, kv = append(kv, WroteBytesKey.Int64(wrote)) } if statusCode > 0 { - kv = append(kv, standard.HTTPAttributesFromHTTPStatusCode(statusCode)...) - span.SetStatus(standard.SpanStatusFromHTTPStatusCode(statusCode)) + kv = append(kv, semconv.HTTPAttributesFromHTTPStatusCode(statusCode)...) + span.SetStatus(semconv.SpanStatusFromHTTPStatusCode(statusCode)) } if werr != nil && werr != io.EOF { kv = append(kv, WriteErrorKey.String(werr.Error())) @@ -215,7 +215,7 @@ func setAfterServeAttributes(span trace.Span, read, wrote int64, statusCode int, func WithRouteTag(route string, h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { span := trace.SpanFromContext(r.Context()) - span.SetAttributes(standard.HTTPRouteKey.String(route)) + span.SetAttributes(semconv.HTTPRouteKey.String(route)) h.ServeHTTP(w, r) }) } diff --git a/instrumentation/othttp/handler_test.go b/instrumentation/othttp/handler_test.go index 89d0f111c44..3d98481c29a 100644 --- a/instrumentation/othttp/handler_test.go +++ b/instrumentation/othttp/handler_test.go @@ -26,10 +26,10 @@ import ( "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" mockmeter "go.opentelemetry.io/otel/internal/metric" mocktrace "go.opentelemetry.io/otel/internal/trace" + "go.opentelemetry.io/otel/semconv" ) func assertMetricLabels(t *testing.T, expectedLabels []kv.KeyValue, measurementBatches []mockmeter.Batch) { @@ -68,11 +68,11 @@ func TestHandlerBasics(t *testing.T) { } labelsToVerify := []kv.KeyValue{ - standard.HTTPServerNameKey.String(operation), - standard.HTTPSchemeHTTP, - standard.HTTPHostKey.String(r.Host), - standard.HTTPFlavorKey.String(fmt.Sprintf("1.%d", r.ProtoMinor)), - standard.HTTPRequestContentLengthKey.Int64(3), + semconv.HTTPServerNameKey.String(operation), + semconv.HTTPSchemeHTTP, + semconv.HTTPHostKey.String(r.Host), + semconv.HTTPFlavorKey.String(fmt.Sprintf("1.%d", r.ProtoMinor)), + semconv.HTTPRequestContentLengthKey.Int64(3), } assertMetricLabels(t, labelsToVerify, meterimpl.MeasurementBatches) diff --git a/instrumentation/othttp/transport.go b/instrumentation/othttp/transport.go index e61e3a42ca8..aa619ea62a5 100644 --- a/instrumentation/othttp/transport.go +++ b/instrumentation/othttp/transport.go @@ -21,8 +21,8 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/standard" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/semconv" "google.golang.org/grpc/codes" ) @@ -89,7 +89,7 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { ctx, span := t.tracer.Start(r.Context(), t.spanNameFormatter("", r), opts...) r = r.WithContext(ctx) - span.SetAttributes(standard.HTTPClientAttributesFromHTTPRequest(r)...) + span.SetAttributes(semconv.HTTPClientAttributesFromHTTPRequest(r)...) propagation.InjectHTTP(ctx, t.propagators, r.Header) res, err := t.rt.RoundTrip(r) @@ -99,8 +99,8 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { return res, err } - span.SetAttributes(standard.HTTPAttributesFromHTTPStatusCode(res.StatusCode)...) - span.SetStatus(standard.SpanStatusFromHTTPStatusCode(res.StatusCode)) + span.SetAttributes(semconv.HTTPAttributesFromHTTPStatusCode(res.StatusCode)...) + span.SetStatus(semconv.SpanStatusFromHTTPStatusCode(res.StatusCode)) res.Body = &wrappedBody{ctx: ctx, span: span, body: res.Body} return res, err diff --git a/api/standard/doc.go b/semconv/doc.go similarity index 51% rename from api/standard/doc.go rename to semconv/doc.go index b20d2f2469b..ec562543a8e 100644 --- a/api/standard/doc.go +++ b/semconv/doc.go @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package standard contains keys and values that have been standardized for -// use in OpenTelemetry. These standardizations are specified in the -// OpenTelemetry specification: +// Package semconv implements OpenTelemetry semantic conventions. // -// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/resource/semantic_conventions -// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/trace/semantic_conventions -// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/metrics/semantic_conventions -package standard +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package aims to be the +// centralized place to interact with these conventions. +package semconv // import "go.opentelemetry.io/otel/semconv" diff --git a/api/standard/http.go b/semconv/http.go similarity index 99% rename from api/standard/http.go rename to semconv/http.go index 040d0a19bbb..785581c6234 100644 --- a/api/standard/http.go +++ b/semconv/http.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package standard +package semconv import ( "fmt" diff --git a/api/standard/http_test.go b/semconv/http_test.go similarity index 99% rename from api/standard/http_test.go rename to semconv/http_test.go index 31d384a4643..700ca1db05e 100644 --- a/api/standard/http_test.go +++ b/semconv/http_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package standard +package semconv import ( "crypto/tls" diff --git a/api/standard/resource.go b/semconv/resource.go similarity index 90% rename from api/standard/resource.go rename to semconv/resource.go index 9d12750d532..fc1e11edfbe 100644 --- a/api/standard/resource.go +++ b/semconv/resource.go @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -package standard // import "go.opentelemetry.io/otel/api/standard" +package semconv import "go.opentelemetry.io/otel/api/kv" -// Standard service resource attribute keys. +// Semantic conventions for service resource attribute keys. const ( // Name of the service. ServiceNameKey = kv.Key("service.name") @@ -35,7 +35,7 @@ const ( ServiceVersionKey = kv.Key("service.version") ) -// Standard telemetry SDK resource attribute keys. +// Semantic conventions for telemetry SDK resource attribute keys. const ( // The name of the telemetry SDK. // @@ -56,12 +56,12 @@ const ( TelemetrySDKVersionKey = kv.Key("telemetry.sdk.version") ) -// Standard telemetry SDK resource attributes. +// Semantic conventions for telemetry SDK resource attributes. var ( TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") ) -// Standard container resource attribute keys. +// Semantic conventions for container resource attribute keys. const ( // A uniquely identifying name for the Container. ContainerNameKey = kv.Key("container.name") @@ -77,7 +77,7 @@ const ( ContainerImageTagKey = kv.Key("container.image.tag") ) -// Standard Function-as-a-Service resource attribute keys. +// Semantic conventions for Function-as-a-Service resource attribute keys. const ( // A uniquely identifying name for the FaaS. FaaSNameKey = kv.Key("faas.name") @@ -92,7 +92,7 @@ const ( FaaSInstanceKey = kv.Key("faas.instance") ) -// Standard operating system process resource attribute keys. +// Semantic conventions for operating system process resource attribute keys. const ( // Process identifier (PID). ProcessPIDKey = kv.Key("process.pid") @@ -120,7 +120,7 @@ const ( ProcessOwnerKey = kv.Key("process.owner") ) -// Standard Kubernetes resource attribute keys. +// Semantic conventions for Kubernetes resource attribute keys. const ( // A uniquely identifying name for the Kubernetes cluster. Kubernetes // does not have cluster names as an internal concept so this may be @@ -138,7 +138,7 @@ const ( K8SDeploymentNameKey = kv.Key("k8s.deployment.name") ) -// Standard host resource attribute keys. +// Semantic conventions for host resource attribute keys. const ( // A uniquely identifying name for the host. HostNameKey = kv.Key("host.name") @@ -162,7 +162,7 @@ const ( HostImageVersionKey = kv.Key("host.image.version") ) -// Standard cloud environment resource attribute keys. +// Semantic conventions for cloud environment resource attribute keys. const ( // Name of the cloud provider. CloudProviderKey = kv.Key("cloud.provider") diff --git a/api/standard/trace.go b/semconv/trace.go similarity index 95% rename from api/standard/trace.go rename to semconv/trace.go index 4c25cd24f8d..991ab9a4397 100644 --- a/api/standard/trace.go +++ b/semconv/trace.go @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package standard +package semconv import "go.opentelemetry.io/otel/api/kv" -// Standard attribute keys used for network related operations. +// Semantic conventions for attribute keys used for network related +// operations. const ( // Transport protocol used. NetTransportKey = kv.Key("net.transport") @@ -57,7 +58,8 @@ const ( PeerServiceKey = kv.Key("peer.service") ) -// Standard attribute keys used to identify an authorized enduser. +// Semantic conventions for attribute keys used to identify an authorized +// user. const ( // Username or the client identifier extracted from the access token or // authorization header in the inbound request from outside the system. @@ -70,7 +72,7 @@ const ( EnduserScopeKey = kv.Key("enduser.scope") ) -// Standard attribute keys for HTTP. +// Semantic conventions for attribute keys for HTTP. const ( // HTTP request method. HTTPMethodKey = kv.Key("http.method") @@ -138,7 +140,7 @@ var ( HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") ) -// Standard attribute keys for database connections. +// Semantic conventions for attribute keys for database connections. const ( // Identifier for the database system (DBMS) being used. DBSystemKey = kv.Key("db.system") @@ -173,7 +175,7 @@ var ( DBSystemRedis = DBSystemKey.String("redis") // Redis ) -// Standard attribute keys for database calls. +// Semantic conventions for attribute keys for database calls. const ( // Database instance name. DBNameKey = kv.Key("db.name") @@ -200,7 +202,7 @@ const ( DBMongoDBCollectionKey = kv.Key("db.mongodb.collection") ) -// Standard attribute keys for RPC. +// Semantic conventions for attribute keys for RPC. const ( // A string identifying the remoting system. RPCSystemKey = kv.Key("rpc.system") @@ -237,7 +239,7 @@ var ( RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") ) -// Standard attribute keys for messaging systems. +// Semantic conventions for attribute keys for messaging systems. const ( // A unique identifier describing the messaging system. For example, // kafka, rabbitmq or activemq. @@ -291,7 +293,7 @@ var ( MessagingOperationProcess = MessagingOperationKey.String("process") ) -// Standard attribute keys for FaaS systems. +// Semantic conventions for attribute keys for FaaS systems. const ( // Type of the trigger on which the function is executed. From f932cf14d62680669a55ade8551d77049e5706c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 07:59:44 -0700 Subject: [PATCH 40/60] Bump github.com/golangci/golangci-lint from 1.29.0 to 1.30.0 in /tools (#1021) * Bump github.com/golangci/golangci-lint from 1.29.0 to 1.30.0 in /tools Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.29.0 to 1.30.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.29.0...v1.30.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- tools/go.mod | 4 ++-- tools/go.sum | 58 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index a95d3926631..fa34adef67f 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,7 +4,7 @@ go 1.14 require ( github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.29.0 + github.com/golangci/golangci-lint v1.30.0 github.com/itchyny/gojq v0.11.0 - golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1 + golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305 ) diff --git a/tools/go.sum b/tools/go.sum index 9d7af5c5d42..ffff5007ea7 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -46,6 +46,8 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/daixiang0/gci v0.0.0-20200727065011-66f1df783cb2 h1:3Lhhps85OdA8ezsEKu+IA1hE+DBTjt/fjd7xNCrHbVA= +github.com/daixiang0/gci v0.0.0-20200727065011-66f1df783cb2/go.mod h1:+AV8KmHTGxxwp/pY84TLQfFKp2vuKXXJVzF3kD/hfR4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -61,6 +63,8 @@ github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-critic/go-critic v0.5.0 h1:Ic2p5UCl5fX/2WX2w8nroPpPhxRNsNTMlJzsu/uqwnM= github.com/go-critic/go-critic v0.5.0/go.mod h1:4jeRh3ZAVnRYhuWdOEvwzVqLUpxMSoAT0xZ74JsTPlo= @@ -114,6 +118,13 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= @@ -128,8 +139,8 @@ github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d h1:pXTK/gkVNs7Zyy github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.29.0 h1:0ufaO3l2R1R712cFC+KT3TtwO/IOcsloKZBavRtzrBk= -github.com/golangci/golangci-lint v1.29.0/go.mod h1:Iq2GFBB9OoolSDWD81m0iJ2MR4MwDVbi4eC93fO7wh0= +github.com/golangci/golangci-lint v1.30.0 h1:UhdK5WbO0GBd7W+k2lOD7BEJH4Wsa7zKfw8m3/aEJGQ= +github.com/golangci/golangci-lint v1.30.0/go.mod h1:5t0i3wHlqQc9deBBvZsP+a/4xz7cfjV+zhp5U0Mzp14= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= @@ -149,6 +160,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -158,7 +171,7 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= +github.com/gookit/color v1.2.5/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -292,13 +305,16 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856 h1:W3KBC2LFyfgd+wNudlfgCCsTo4q97MeNWrfz8/wSdSc= github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pbnjay/strptime v0.0.0-20140226051138-5c05b0d668c9 h1:4lfz0keanz7/gAlvJ7lAe9zmE08HXxifBZJC0AdeGKo= github.com/pbnjay/strptime v0.0.0-20140226051138-5c05b0d668c9/go.mod h1:6Hr+C/olSdkdL3z68MlyXWzwhvwmwN7KuUFXGb3PoOk= @@ -338,9 +354,10 @@ github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUcc github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.3.0 h1:y/9mCF2WPDbSDpL3QDWZD3HHGrSYw0QSHnCqTfs4JPE= -github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= +github.com/securego/gosec/v2 v2.4.0 h1:ivAoWcY5DMs9n04Abc1VkqZBO0FL0h4ShTcVsC53lCE= +github.com/securego/gosec/v2 v2.4.0/go.mod h1:0/Q4cjmlFDfDUj1+Fib61sc+U5IQb2w+Iv9/C3wPVko= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= @@ -377,6 +394,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/ssgreg/nlreturn/v2 v2.0.1 h1:+lm6xFjVuNw/9t/Fh5sIwfNWefiD5bddzc6vwJ1TvRI= +github.com/ssgreg/nlreturn/v2 v2.0.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -395,8 +414,8 @@ github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0K github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tebeka/strftime v0.1.3 h1:5HQXOqWKYRFfNyBMNVc9z5+QzuBtIXy03psIhtdJYto= github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ= -github.com/tetafro/godot v0.4.2 h1:Dib7un+rYJFUi8vN0Bk6EHheKy6fv6ZzFURHw75g6m8= -github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= +github.com/tetafro/godot v0.4.8 h1:h61+hQraWhdI6WYqMwAwZYCE5yxL6a9/Orw4REbabSU= +github.com/tetafro/godot v0.4.8/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -474,6 +493,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -502,12 +522,15 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -548,15 +571,15 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200321224714-0d839f3cf2ed/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e h1:3Dzrrxi54Io7Aoyb0PYLsI47K2TxkRQg+cqUn+m04do= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1 h1:rD1FcWVsRaMY+l8biE9jbWP5MS/CJJ/90a9TMkMgNrM= -golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200701041122-1837592efa10/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305 h1:yaM5S0KcY0lIoZo7Fl+oi91b/DdlU2zuWpfHrpWbCS0= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -584,6 +607,13 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From db2faf3b30b647e07e0f8eaf9c1bb6576fbcb87f Mon Sep 17 00:00:00 2001 From: Stefan Prisca Date: Tue, 4 Aug 2020 18:44:02 +0200 Subject: [PATCH 41/60] #869 - export array attributes to OTLP (#992) * Add int array attribute support * Export int32, int64 and bool arrays * Export all other array attributes * Remove array test case from simple attr test * Addressed feedback Co-authored-by: Tyler Yahn --- .../otlp/internal/transform/attribute.go | 164 ++++++++++++++++++ .../otlp/internal/transform/attribute_test.go | 154 +++++++++++++++- 2 files changed, 314 insertions(+), 4 deletions(-) diff --git a/exporters/otlp/internal/transform/attribute.go b/exporters/otlp/internal/transform/attribute.go index 51ba32f9307..7b43462f862 100644 --- a/exporters/otlp/internal/transform/attribute.go +++ b/exporters/otlp/internal/transform/attribute.go @@ -74,6 +74,8 @@ func toAttribute(v kv.KeyValue) *commonpb.KeyValue { result.Value.Value = &commonpb.AnyValue_StringValue{ StringValue: v.Value.AsString(), } + case kv.ARRAY: + result.Value.Value = toArrayAttribute(v) default: result.Value.Value = &commonpb.AnyValue_StringValue{ StringValue: "INVALID", @@ -81,3 +83,165 @@ func toAttribute(v kv.KeyValue) *commonpb.KeyValue { } return result } + +func toArrayAttribute(v kv.KeyValue) *commonpb.AnyValue_ArrayValue { + array := v.Value.AsArray() + var resultValues []*commonpb.AnyValue + + switch typedArray := array.(type) { + case []bool: + resultValues = getValuesFromBoolArray(typedArray) + case []int: + resultValues = getValuesFromIntArray(typedArray) + case []int32: + resultValues = getValuesFromInt32Array(typedArray) + case []int64: + resultValues = getValuesFromInt64Array(typedArray) + case []uint: + resultValues = getValuesFromUIntArray(typedArray) + case []uint32: + resultValues = getValuesFromUInt32Array(typedArray) + case []uint64: + resultValues = getValuesFromUInt64Array(typedArray) + case []float32: + resultValues = getValuesFromFloat32Array(typedArray) + case []float64: + resultValues = getValuesFromFloat64Array(typedArray) + case []string: + resultValues = getValuesFromStringArray(typedArray) + default: + resultValues = []*commonpb.AnyValue{ + { + Value: &commonpb.AnyValue_StringValue{ + StringValue: "INVALID", + }, + }, + } + } + + return &commonpb.AnyValue_ArrayValue{ + ArrayValue: &commonpb.ArrayValue{ + Values: resultValues, + }, + } +} + +func getValuesFromBoolArray(boolArray []bool) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, b := range boolArray { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_BoolValue{ + BoolValue: b, + }, + }) + } + return result +} + +func getValuesFromIntArray(intArray []int) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range intArray { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: int64(i), + }, + }) + } + return result +} + +func getValuesFromInt32Array(int32Array []int32) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range int32Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: int64(i), + }, + }) + } + return result +} + +func getValuesFromInt64Array(int64Array []int64) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range int64Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: i, + }, + }) + } + return result +} + +func getValuesFromUIntArray(uintArray []uint) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range uintArray { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: int64(i), + }, + }) + } + return result +} + +func getValuesFromUInt32Array(uint32Array []uint32) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range uint32Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: int64(i), + }, + }) + } + return result +} + +func getValuesFromUInt64Array(uint64Array []uint64) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, i := range uint64Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: int64(i), + }, + }) + } + return result +} + +func getValuesFromFloat32Array(float32Array []float32) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, f := range float32Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_DoubleValue{ + DoubleValue: float64(f), + }, + }) + } + return result +} + +func getValuesFromFloat64Array(float64Array []float64) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, f := range float64Array { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_DoubleValue{ + DoubleValue: f, + }, + }) + } + return result +} + +func getValuesFromStringArray(stringArray []string) []*commonpb.AnyValue { + result := []*commonpb.AnyValue{} + for _, s := range stringArray { + result = append(result, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_StringValue{ + StringValue: s, + }, + }) + } + return result +} diff --git a/exporters/otlp/internal/transform/attribute_test.go b/exporters/otlp/internal/transform/attribute_test.go index 8e9808a9057..c5fa2dc87ff 100644 --- a/exporters/otlp/internal/transform/attribute_test.go +++ b/exporters/otlp/internal/transform/attribute_test.go @@ -23,11 +23,13 @@ import ( commonpb "go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1" ) +type attributeTest struct { + attrs []kv.KeyValue + expected []*commonpb.KeyValue +} + func TestAttributes(t *testing.T) { - for _, test := range []struct { - attrs []kv.KeyValue - expected []*commonpb.KeyValue - }{ + for _, test := range []attributeTest{ {nil, nil}, { []kv.KeyValue{ @@ -146,3 +148,147 @@ func TestAttributes(t *testing.T) { } } } + +func TestArrayAttributes(t *testing.T) { + // Array KeyValue supports only arrays of primitive types: + // "bool", "int", "int32", "int64", + // "float32", "float64", "string", + // "uint", "uint32", "uint64" + for _, test := range []attributeTest{ + {nil, nil}, + { + []kv.KeyValue{ + kv.Array("bool array to bool array", []bool{true, false}), + kv.Array("int array to int64 array", []int{1, 2, 3}), + kv.Array("uint array to int64 array", []uint{1, 2, 3}), + kv.Array("int32 array to int64 array", []int32{1, 2, 3}), + kv.Array("uint32 array to int64 array", []uint32{1, 2, 3}), + kv.Array("int64 array to int64 array", []int64{1, 2, 3}), + kv.Array("uint64 array to int64 array", []uint64{1, 2, 3}), + kv.Array("float32 array to double array", []float32{1.11, 2.22, 3.33}), + kv.Array("float64 array to double array", []float64{1.11, 2.22, 3.33}), + kv.Array("string array to string array", []string{"foo", "bar", "baz"}), + }, + []*commonpb.KeyValue{ + newOTelBoolArray("bool array to bool array", []bool{true, false}), + newOTelIntArray("int array to int64 array", []int64{1, 2, 3}), + newOTelIntArray("uint array to int64 array", []int64{1, 2, 3}), + newOTelIntArray("int32 array to int64 array", []int64{1, 2, 3}), + newOTelIntArray("uint32 array to int64 array", []int64{1, 2, 3}), + newOTelIntArray("int64 array to int64 array", []int64{1, 2, 3}), + newOTelIntArray("uint64 array to int64 array", []int64{1, 2, 3}), + newOTelDoubleArray("float32 array to double array", []float64{1.11, 2.22, 3.33}), + newOTelDoubleArray("float64 array to double array", []float64{1.11, 2.22, 3.33}), + newOTelStringArray("string array to string array", []string{"foo", "bar", "baz"}), + }, + }, + } { + actualArrayAttributes := Attributes(test.attrs) + expectedArrayAttributes := test.expected + if !assert.Len(t, actualArrayAttributes, len(expectedArrayAttributes)) { + continue + } + + for i, actualArrayAttr := range actualArrayAttributes { + expectedArrayAttr := expectedArrayAttributes[i] + if !assert.Equal(t, expectedArrayAttr.Key, actualArrayAttr.Key) { + continue + } + + expectedArrayValue := expectedArrayAttr.Value.GetArrayValue() + assert.NotNil(t, expectedArrayValue) + + actualArrayValue := actualArrayAttr.Value.GetArrayValue() + assert.NotNil(t, actualArrayValue) + + assertExpectedArrayValues(t, expectedArrayValue.Values, actualArrayValue.Values) + } + + } +} + +func assertExpectedArrayValues(t *testing.T, expectedValues, actualValues []*commonpb.AnyValue) { + for i, actual := range actualValues { + expected := expectedValues[i] + if a, ok := actual.Value.(*commonpb.AnyValue_DoubleValue); ok { + e, ok := expected.Value.(*commonpb.AnyValue_DoubleValue) + if !ok { + t.Errorf("expected AnyValue_DoubleValue, got %T", expected.Value) + continue + } + if !assert.InDelta(t, e.DoubleValue, a.DoubleValue, 0.01) { + continue + } + e.DoubleValue = a.DoubleValue + } + assert.Equal(t, expected, actual) + } +} + +func newOTelBoolArray(key string, values []bool) *commonpb.KeyValue { + arrayValues := []*commonpb.AnyValue{} + for _, b := range values { + arrayValues = append(arrayValues, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_BoolValue{ + BoolValue: b, + }, + }) + } + + return newOTelArray(key, arrayValues) +} + +func newOTelIntArray(key string, values []int64) *commonpb.KeyValue { + arrayValues := []*commonpb.AnyValue{} + + for _, i := range values { + arrayValues = append(arrayValues, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_IntValue{ + IntValue: i, + }, + }) + } + + return newOTelArray(key, arrayValues) +} + +func newOTelDoubleArray(key string, values []float64) *commonpb.KeyValue { + arrayValues := []*commonpb.AnyValue{} + + for _, d := range values { + arrayValues = append(arrayValues, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_DoubleValue{ + DoubleValue: d, + }, + }) + } + + return newOTelArray(key, arrayValues) +} + +func newOTelStringArray(key string, values []string) *commonpb.KeyValue { + arrayValues := []*commonpb.AnyValue{} + + for _, s := range values { + arrayValues = append(arrayValues, &commonpb.AnyValue{ + Value: &commonpb.AnyValue_StringValue{ + StringValue: s, + }, + }) + } + + return newOTelArray(key, arrayValues) +} + +func newOTelArray(key string, arrayValues []*commonpb.AnyValue) *commonpb.KeyValue { + return &commonpb.KeyValue{ + Key: key, + Value: &commonpb.AnyValue{ + Value: &commonpb.AnyValue_ArrayValue{ + ArrayValue: &commonpb.ArrayValue{ + Values: arrayValues, + }, + }, + }, + } +} From 6b2c16ec99df5f49529b61f076b9d9865dfad608 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 12:55:30 -0700 Subject: [PATCH 42/60] Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/trace/zipkin (#1001) * Bump google.golang.org/grpc in /exporters/trace/zipkin Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- example/zipkin/go.sum | 2 ++ exporters/trace/zipkin/go.mod | 2 +- exporters/trace/zipkin/go.sum | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index fe7a05030d5..239a6c67f9c 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -108,6 +108,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporters/trace/zipkin/go.mod b/exporters/trace/zipkin/go.mod index 1f7cff8dbff..0967869e4e0 100644 --- a/exporters/trace/zipkin/go.mod +++ b/exporters/trace/zipkin/go.mod @@ -12,5 +12,5 @@ require ( github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index fe7a05030d5..958950b0f57 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -79,6 +79,7 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -87,8 +88,10 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -99,6 +102,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -108,6 +112,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 03e2d939baf9a8fce98bac2a0af1b3ceeef9e1a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:22:52 -0700 Subject: [PATCH 43/60] Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/trace/jaeger (#1002) * Bump google.golang.org/grpc in /exporters/trace/jaeger Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- example/jaeger/go.sum | 2 ++ exporters/trace/jaeger/go.mod | 2 +- exporters/trace/jaeger/go.sum | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 1f78e841e9e..3d2ef45bb34 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -293,6 +293,8 @@ google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index b791cdf1f95..a472784b32f 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -14,5 +14,5 @@ require ( go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 google.golang.org/api v0.29.0 - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index b789e9e64d7..a2bae48f0cc 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -304,6 +304,8 @@ google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 2f79fb8e8d6fce11d4375293b7190b27e80fdbeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:27:26 -0700 Subject: [PATCH 44/60] Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/otlp (#1003) * Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/otlp Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- example/otel-collector/go.mod | 2 +- example/otel-collector/go.sum | 2 ++ exporters/otlp/go.mod | 2 +- exporters/otlp/go.sum | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 238c08fbfc5..213145dc43b 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -13,5 +13,5 @@ require ( go.opentelemetry.io/otel/exporters/otlp v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 942e9e1f887..6d678927a8e 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -95,6 +95,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index 02d8ad9b0bb..d36ce64af31 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -16,5 +16,5 @@ require ( go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect golang.org/x/text v0.3.2 // indirect - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 16d7f84032d..a1648df5e86 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -20,6 +20,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -87,6 +88,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -95,6 +97,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From cfe2b09c312497be6ce0256705ad8f509f35a846 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:33:32 -0700 Subject: [PATCH 45/60] Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/stdout (#1005) * Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/stdout Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- example/basic/go.sum | 2 ++ example/grpc/go.mod | 2 +- example/grpc/go.sum | 2 ++ example/http/go.sum | 2 ++ example/namedtracer/go.sum | 2 ++ exporters/stdout/go.mod | 2 +- exporters/stdout/go.sum | 7 +++++++ 7 files changed, 17 insertions(+), 2 deletions(-) diff --git a/example/basic/go.sum b/example/basic/go.sum index 3e89b873f8f..0aba62fc311 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -84,6 +84,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/example/grpc/go.mod b/example/grpc/go.mod index a5120b49197..b57d90ea3aa 100644 --- a/example/grpc/go.mod +++ b/example/grpc/go.mod @@ -14,5 +14,5 @@ require ( go.opentelemetry.io/otel/exporters/stdout v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/example/grpc/go.sum b/example/grpc/go.sum index 2abf2a3b4d1..574deb66500 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -89,6 +89,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/example/http/go.sum b/example/http/go.sum index 3e89b873f8f..0aba62fc311 100644 --- a/example/http/go.sum +++ b/example/http/go.sum @@ -84,6 +84,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 3e89b873f8f..0aba62fc311 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -84,6 +84,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporters/stdout/go.mod b/exporters/stdout/go.mod index bf01dda7617..ac147979827 100644 --- a/exporters/stdout/go.mod +++ b/exporters/stdout/go.mod @@ -11,5 +11,5 @@ require ( github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index a725a62e366..c9f3eae9c4b 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -18,6 +18,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -55,6 +56,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -62,8 +64,10 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -74,6 +78,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -82,6 +87,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From ea0720c05e1630edfa5b7bed6abc989c0a7cdfa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 14:08:36 -0700 Subject: [PATCH 46/60] Bump google.golang.org/grpc from 1.30.0 to 1.31.0 (#1004) * Bump google.golang.org/grpc from 1.30.0 to 1.31.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: MrAlias --- example/basic/go.sum | 2 -- example/grpc/go.sum | 2 -- example/http/go.sum | 2 -- example/jaeger/go.sum | 2 -- example/namedtracer/go.sum | 2 -- example/otel-collector/go.sum | 2 -- example/prometheus/go.sum | 4 ++-- example/zipkin/go.sum | 2 -- exporters/metric/prometheus/go.sum | 4 ++-- exporters/otlp/go.sum | 2 -- exporters/stdout/go.sum | 2 -- exporters/trace/jaeger/go.sum | 2 -- exporters/trace/zipkin/go.sum | 2 -- go.mod | 2 +- go.sum | 4 ++-- sdk/go.mod | 2 +- sdk/go.sum | 4 ++-- 17 files changed, 10 insertions(+), 32 deletions(-) diff --git a/example/basic/go.sum b/example/basic/go.sum index 0aba62fc311..cc3ccc8b96f 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -82,8 +82,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/grpc/go.sum b/example/grpc/go.sum index 574deb66500..e4f46d18497 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -87,8 +87,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/http/go.sum b/example/http/go.sum index 0aba62fc311..cc3ccc8b96f 100644 --- a/example/http/go.sum +++ b/example/http/go.sum @@ -82,8 +82,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 3d2ef45bb34..861f403fa57 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -291,8 +291,6 @@ google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index 0aba62fc311..cc3ccc8b96f 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -82,8 +82,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 6d678927a8e..4ff93cd71e0 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -93,8 +93,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index 41e1a8c7798..dfbbddc340c 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -152,8 +152,8 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 239a6c67f9c..1c497554612 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -106,8 +106,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index f2bf9e5ffd2..e7e3a406aa5 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -151,8 +151,8 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index a1648df5e86..beedf3ba29c 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -95,8 +95,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index c9f3eae9c4b..de7c170efba 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -85,8 +85,6 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index a2bae48f0cc..a4b139d6e4e 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -302,8 +302,6 @@ google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 958950b0f57..e7bd8312139 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -110,8 +110,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/go.mod b/go.mod index 7c3c64ff9bf..7f489c2d08b 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,6 @@ require ( golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/go.sum b/go.sum index b4bb52d9376..46ef008fe80 100644 --- a/go.sum +++ b/go.sum @@ -86,8 +86,8 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/sdk/go.mod b/sdk/go.mod index 72e57baa4f0..100c33f95a2 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -11,5 +11,5 @@ require ( github.com/google/gofuzz v1.1.0 // indirect github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.10.0 - google.golang.org/grpc v1.30.0 + google.golang.org/grpc v1.31.0 ) diff --git a/sdk/go.sum b/sdk/go.sum index a725a62e366..6744f1bcad1 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -80,8 +80,8 @@ google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvx google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From ae278e91861d6d81a9abfd8a850187674aff895e Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Wed, 5 Aug 2020 02:30:23 -0400 Subject: [PATCH 47/60] Remove othttp and httptrace instrumentations that have moved to contrib (#1032) --- example/basic/go.sum | 1 - example/grpc/go.sum | 1 - example/http/Dockerfile | 24 -- example/http/README.md | 24 -- example/http/client/client.go | 96 ------- example/http/docker-compose.yml | 34 --- example/http/go.mod | 15 - example/http/go.sum | 100 ------- example/http/server/modd.conf | 21 -- example/http/server/server.go | 79 ------ example/jaeger/go.sum | 1 - example/namedtracer/go.sum | 1 - example/otel-collector/go.sum | 1 - example/prometheus/go.sum | 1 - example/zipkin/go.sum | 1 - exporters/metric/prometheus/go.sum | 1 - exporters/otlp/go.sum | 1 - exporters/stdout/go.sum | 1 - exporters/trace/jaeger/go.sum | 1 - exporters/trace/zipkin/go.sum | 1 - go.mod | 1 - go.sum | 2 - instrumentation/httptrace/api.go | 28 -- instrumentation/httptrace/clienttrace.go | 253 ----------------- instrumentation/httptrace/clienttrace_test.go | 238 ---------------- instrumentation/httptrace/httptrace.go | 74 ----- instrumentation/httptrace/httptrace_test.go | 164 ----------- instrumentation/othttp/common.go | 41 --- instrumentation/othttp/config.go | 150 ---------- instrumentation/othttp/config_test.go | 131 --------- instrumentation/othttp/doc.go | 18 -- instrumentation/othttp/filters/filters.go | 128 --------- .../othttp/filters/filters_test.go | 266 ------------------ instrumentation/othttp/filters/header_go14.go | 50 ---- .../othttp/filters/header_nongo14.go | 51 ---- instrumentation/othttp/handler.go | 221 --------------- .../othttp/handler_example_test.go | 98 ------- instrumentation/othttp/handler_test.go | 166 ----------- instrumentation/othttp/transport.go | 134 --------- .../othttp/transport_example_test.go | 27 -- instrumentation/othttp/transport_test.go | 76 ----- instrumentation/othttp/wrap.go | 96 ------- sdk/go.sum | 1 - 43 files changed, 2819 deletions(-) delete mode 100644 example/http/Dockerfile delete mode 100644 example/http/README.md delete mode 100644 example/http/client/client.go delete mode 100644 example/http/docker-compose.yml delete mode 100644 example/http/go.mod delete mode 100644 example/http/go.sum delete mode 100644 example/http/server/modd.conf delete mode 100644 example/http/server/server.go delete mode 100644 instrumentation/httptrace/api.go delete mode 100644 instrumentation/httptrace/clienttrace.go delete mode 100644 instrumentation/httptrace/clienttrace_test.go delete mode 100644 instrumentation/httptrace/httptrace.go delete mode 100644 instrumentation/httptrace/httptrace_test.go delete mode 100644 instrumentation/othttp/common.go delete mode 100644 instrumentation/othttp/config.go delete mode 100644 instrumentation/othttp/config_test.go delete mode 100644 instrumentation/othttp/doc.go delete mode 100644 instrumentation/othttp/filters/filters.go delete mode 100644 instrumentation/othttp/filters/filters_test.go delete mode 100644 instrumentation/othttp/filters/header_go14.go delete mode 100644 instrumentation/othttp/filters/header_nongo14.go delete mode 100644 instrumentation/othttp/handler.go delete mode 100644 instrumentation/othttp/handler_example_test.go delete mode 100644 instrumentation/othttp/handler_test.go delete mode 100644 instrumentation/othttp/transport.go delete mode 100644 instrumentation/othttp/transport_example_test.go delete mode 100644 instrumentation/othttp/transport_test.go delete mode 100644 instrumentation/othttp/wrap.go diff --git a/example/basic/go.sum b/example/basic/go.sum index cc3ccc8b96f..fa2e4687b09 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/grpc/go.sum b/example/grpc/go.sum index e4f46d18497..66c206c15ec 100644 --- a/example/grpc/go.sum +++ b/example/grpc/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= diff --git a/example/http/Dockerfile b/example/http/Dockerfile deleted file mode 100644 index 23f88befd73..00000000000 --- a/example/http/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FROM golang:1.14-alpine AS base -COPY . /go/src/github.com/open-telemetry/opentelemetry-go/ -WORKDIR /go/src/github.com/open-telemetry/opentelemetry-go/example/http/ - -FROM base AS example-http-server -RUN go install ./server/server.go -CMD ["/go/bin/server"] - -FROM base AS example-http-client -RUN go install ./client/client.go -CMD ["/go/bin/client"] diff --git a/example/http/README.md b/example/http/README.md deleted file mode 100644 index 9da9e2dc813..00000000000 --- a/example/http/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# HTTP Client-Server Example - -An HTTP client connects to an HTTP server. They both generate span information to `stdout`. -These instructions expect you have [docker-compose](https://docs.docker.com/compose/) installed. - -Bring up the `http-server` and `http-client` services to run the example: -```sh -docker-compose up --detach http-server http-client -``` - -The `http-client` service sends just one HTTP request to `http-server` and then exits. View the span generated to `stdout` in the logs: -```sh -docker-compose logs http-client -``` - -View the span generated by `http-server` in the logs: -```sh -docker-compose logs http-server -``` - -Shut down the services when you are finished with the example: -```sh -docker-compose down -``` diff --git a/example/http/client/client.go b/example/http/client/client.go deleted file mode 100644 index 3cb4773cf10..00000000000 --- a/example/http/client/client.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "flag" - "fmt" - "io/ioutil" - "log" - - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/semconv" - - "net/http" - "time" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporters/stdout" - "go.opentelemetry.io/otel/instrumentation/httptrace" - sdktrace "go.opentelemetry.io/otel/sdk/trace" -) - -func initTracer() { - // Create stdout exporter to be able to retrieve - // the collected spans. - exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) - if err != nil { - log.Fatal(err) - } - - // For the demonstration, use sdktrace.AlwaysSample sampler to sample all traces. - // In a production application, use sdktrace.ProbabilitySampler with a desired probability. - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithSyncer(exporter)) - if err != nil { - log.Fatal(err) - } - global.SetTraceProvider(tp) -} - -func main() { - initTracer() - url := flag.String("server", "http://localhost:7777/hello", "server url") - flag.Parse() - - client := http.DefaultClient - ctx := correlation.NewContext(context.Background(), - kv.String("username", "donuts"), - ) - - var body []byte - - tr := global.Tracer("example/client") - err := tr.WithSpan(ctx, "say hello", - func(ctx context.Context) error { - req, _ := http.NewRequest("GET", *url, nil) - - ctx, req = httptrace.W3C(ctx, req) - httptrace.Inject(ctx, req) - - fmt.Printf("Sending request...\n") - res, err := client.Do(req) - if err != nil { - panic(err) - } - body, err = ioutil.ReadAll(res.Body) - _ = res.Body.Close() - - return err - }, - trace.WithAttributes(semconv.PeerServiceKey.String("ExampleService"))) - - if err != nil { - panic(err) - } - - fmt.Printf("Response Received: %s\n\n\n", body) - fmt.Printf("Waiting for few seconds to export spans ...\n\n") - time.Sleep(10 * time.Second) - fmt.Printf("Inspect traces on stdout\n") -} diff --git a/example/http/docker-compose.yml b/example/http/docker-compose.yml deleted file mode 100644 index 83f06635551..00000000000 --- a/example/http/docker-compose.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -version: "3.7" -services: - http-server: - build: - dockerfile: $PWD/Dockerfile - context: ../.. - target: example-http-server - networks: - - example - http-client: - build: - dockerfile: $PWD/Dockerfile - context: ../.. - target: example-http-client - command: ["/go/bin/client", "-server", "http://http-server:7777/hello"] - networks: - - example - depends_on: - - http-server -networks: - example: diff --git a/example/http/go.mod b/example/http/go.mod deleted file mode 100644 index 6bbc5353a54..00000000000 --- a/example/http/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module go.opentelemetry.io/otel/example/http - -go 1.14 - -replace ( - go.opentelemetry.io/otel => ../.. - go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout - go.opentelemetry.io/otel/sdk => ../../sdk -) - -require ( - go.opentelemetry.io/otel v0.10.0 - go.opentelemetry.io/otel/exporters/stdout v0.10.0 - go.opentelemetry.io/otel/sdk v0.10.0 -) diff --git a/example/http/go.sum b/example/http/go.sum deleted file mode 100644 index cc3ccc8b96f..00000000000 --- a/example/http/go.sum +++ /dev/null @@ -1,100 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= -github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/http/server/modd.conf b/example/http/server/modd.conf deleted file mode 100644 index 22ec99d907d..00000000000 --- a/example/http/server/modd.conf +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# A basic modd.conf file for Go development. - -# Run go test on ALL modules on startup, and subsequently only on modules -# containing changes. -server.go { - daemon +sigterm: go run server.go -} \ No newline at end of file diff --git a/example/http/server/server.go b/example/http/server/server.go deleted file mode 100644 index bacfd32c023..00000000000 --- a/example/http/server/server.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "io" - "log" - "net/http" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/exporters/stdout" - "go.opentelemetry.io/otel/instrumentation/httptrace" - "go.opentelemetry.io/otel/sdk/resource" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/semconv" -) - -func initTracer() { - // Create stdout exporter to be able to retrieve - // the collected spans. - exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) - if err != nil { - log.Fatal(err) - } - - // For the demonstration, use sdktrace.AlwaysSample sampler to sample all traces. - // In a production application, use sdktrace.ProbabilitySampler with a desired probability. - tp, err := sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithSyncer(exporter), - sdktrace.WithResource(resource.New(semconv.ServiceNameKey.String("ExampleService")))) - if err != nil { - log.Fatal(err) - } - global.SetTraceProvider(tp) -} - -func main() { - initTracer() - tr := global.Tracer("example/server") - - helloHandler := func(w http.ResponseWriter, req *http.Request) { - attrs, entries, spanCtx := httptrace.Extract(req.Context(), req) - - req = req.WithContext(correlation.ContextWithMap(req.Context(), correlation.NewMap(correlation.MapUpdate{ - MultiKV: entries, - }))) - - ctx, span := tr.Start( - trace.ContextWithRemoteSpanContext(req.Context(), spanCtx), - "hello", - trace.WithAttributes(attrs...), - ) - defer span.End() - - span.AddEvent(ctx, "handling this...") - - _, _ = io.WriteString(w, "Hello, world!\n") - } - - http.HandleFunc("/hello", helloHandler) - err := http.ListenAndServe(":7777", nil) - if err != nil { - panic(err) - } -} diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 861f403fa57..bd1dd0ab212 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -41,7 +41,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index cc3ccc8b96f..fa2e4687b09 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 4ff93cd71e0..1e0182d2add 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index dfbbddc340c..9f3a9861b29 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -24,7 +24,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 1c497554612..bc7daac3e5c 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -18,7 +18,6 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index e7e3a406aa5..545e209f85c 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -24,7 +24,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index beedf3ba29c..cc0b46ff711 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index de7c170efba..dd02ef06e31 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index a4b139d6e4e..b3d65368447 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -43,7 +43,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index e7bd8312139..5b518c11c43 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -18,7 +18,6 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/go.mod b/go.mod index 7f489c2d08b..fefb4bf10d8 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.14 require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.1 github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.1 github.com/kr/pretty v0.1.0 // indirect diff --git a/go.sum b/go.sum index 46ef008fe80..69af8e80963 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= diff --git a/instrumentation/httptrace/api.go b/instrumentation/httptrace/api.go deleted file mode 100644 index 9f733aa6672..00000000000 --- a/instrumentation/httptrace/api.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package httptrace - -import ( - "context" - "net/http" - "net/http/httptrace" -) - -// Client -func W3C(ctx context.Context, req *http.Request) (context.Context, *http.Request) { - ctx = httptrace.WithClientTrace(ctx, NewClientTrace(ctx)) - req = req.WithContext(ctx) - return ctx, req -} diff --git a/instrumentation/httptrace/clienttrace.go b/instrumentation/httptrace/clienttrace.go deleted file mode 100644 index e77e77c762b..00000000000 --- a/instrumentation/httptrace/clienttrace.go +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package httptrace - -import ( - "context" - "crypto/tls" - "net/http/httptrace" - "net/textproto" - "strings" - "sync" - - "go.opentelemetry.io/otel/semconv" - - "google.golang.org/grpc/codes" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/trace" -) - -var ( - HTTPStatus = kv.Key("http.status") - HTTPHeaderMIME = kv.Key("http.mime") - HTTPRemoteAddr = kv.Key("http.remote") - HTTPLocalAddr = kv.Key("http.local") -) - -var ( - hookMap = map[string]string{ - "http.dns": "http.getconn", - "http.connect": "http.getconn", - "http.tls": "http.getconn", - } -) - -func parentHook(hook string) string { - if strings.HasPrefix(hook, "http.connect") { - return hookMap["http.connect"] - } - return hookMap[hook] -} - -type clientTracer struct { - context.Context - - tr trace.Tracer - - activeHooks map[string]context.Context - root trace.Span - mtx sync.Mutex -} - -func NewClientTrace(ctx context.Context) *httptrace.ClientTrace { - ct := &clientTracer{ - Context: ctx, - activeHooks: make(map[string]context.Context), - } - - ct.tr = global.Tracer("go.opentelemetry.io/otel/instrumentation/httptrace") - - return &httptrace.ClientTrace{ - GetConn: ct.getConn, - GotConn: ct.gotConn, - PutIdleConn: ct.putIdleConn, - GotFirstResponseByte: ct.gotFirstResponseByte, - Got100Continue: ct.got100Continue, - Got1xxResponse: ct.got1xxResponse, - DNSStart: ct.dnsStart, - DNSDone: ct.dnsDone, - ConnectStart: ct.connectStart, - ConnectDone: ct.connectDone, - TLSHandshakeStart: ct.tlsHandshakeStart, - TLSHandshakeDone: ct.tlsHandshakeDone, - WroteHeaderField: ct.wroteHeaderField, - WroteHeaders: ct.wroteHeaders, - Wait100Continue: ct.wait100Continue, - WroteRequest: ct.wroteRequest, - } -} - -func (ct *clientTracer) start(hook, spanName string, attrs ...kv.KeyValue) { - ct.mtx.Lock() - defer ct.mtx.Unlock() - - if hookCtx, found := ct.activeHooks[hook]; !found { - var sp trace.Span - ct.activeHooks[hook], sp = ct.tr.Start(ct.getParentContext(hook), spanName, trace.WithAttributes(attrs...), trace.WithSpanKind(trace.SpanKindClient)) - if ct.root == nil { - ct.root = sp - } - } else { - // end was called before start finished, add the start attributes and end the span here - span := trace.SpanFromContext(hookCtx) - span.SetAttributes(attrs...) - span.End() - - delete(ct.activeHooks, hook) - } -} - -func (ct *clientTracer) end(hook string, err error, attrs ...kv.KeyValue) { - ct.mtx.Lock() - defer ct.mtx.Unlock() - if ctx, ok := ct.activeHooks[hook]; ok { - span := trace.SpanFromContext(ctx) - if err != nil { - span.SetStatus(codes.Unknown, err.Error()) - } - span.SetAttributes(attrs...) - span.End() - delete(ct.activeHooks, hook) - } else { - // start is not finished before end is called. - // Start a span here with the ending attributes that will be finished when start finishes. - // Yes, it's backwards. v0v - ctx, span := ct.tr.Start(ct.getParentContext(hook), hook, trace.WithAttributes(attrs...), trace.WithSpanKind(trace.SpanKindClient)) - if err != nil { - span.SetStatus(codes.Unknown, err.Error()) - } - ct.activeHooks[hook] = ctx - } -} - -func (ct *clientTracer) getParentContext(hook string) context.Context { - ctx, ok := ct.activeHooks[parentHook(hook)] - if !ok { - return ct.Context - } - return ctx -} - -func (ct *clientTracer) span(hook string) trace.Span { - ct.mtx.Lock() - defer ct.mtx.Unlock() - if ctx, ok := ct.activeHooks[hook]; ok { - return trace.SpanFromContext(ctx) - } - return nil -} - -func (ct *clientTracer) getConn(host string) { - ct.start("http.getconn", "http.getconn", semconv.HTTPHostKey.String(host)) -} - -func (ct *clientTracer) gotConn(info httptrace.GotConnInfo) { - ct.end("http.getconn", - nil, - HTTPRemoteAddr.String(info.Conn.RemoteAddr().String()), - HTTPLocalAddr.String(info.Conn.LocalAddr().String()), - ) -} - -func (ct *clientTracer) putIdleConn(err error) { - ct.end("http.receive", err) -} - -func (ct *clientTracer) gotFirstResponseByte() { - ct.start("http.receive", "http.receive") -} - -func (ct *clientTracer) dnsStart(info httptrace.DNSStartInfo) { - ct.start("http.dns", "http.dns", semconv.HTTPHostKey.String(info.Host)) -} - -func (ct *clientTracer) dnsDone(info httptrace.DNSDoneInfo) { - ct.end("http.dns", info.Err) -} - -func (ct *clientTracer) connectStart(network, addr string) { - ct.start("http.connect."+addr, "http.connect", HTTPRemoteAddr.String(addr)) -} - -func (ct *clientTracer) connectDone(network, addr string, err error) { - ct.end("http.connect."+addr, err) -} - -func (ct *clientTracer) tlsHandshakeStart() { - ct.start("http.tls", "http.tls") -} - -func (ct *clientTracer) tlsHandshakeDone(_ tls.ConnectionState, err error) { - ct.end("http.tls", err) -} - -func (ct *clientTracer) wroteHeaderField(k string, v []string) { - if ct.span("http.headers") == nil { - ct.start("http.headers", "http.headers") - } - ct.root.SetAttributes(kv.String("http."+strings.ToLower(k), sliceToString(v))) -} - -func (ct *clientTracer) wroteHeaders() { - if ct.span("http.headers") != nil { - ct.end("http.headers", nil) - } - ct.start("http.send", "http.send") -} - -func (ct *clientTracer) wroteRequest(info httptrace.WroteRequestInfo) { - if info.Err != nil { - ct.root.SetStatus(codes.Unknown, info.Err.Error()) - } - ct.end("http.send", info.Err) -} - -func (ct *clientTracer) got100Continue() { - ct.span("http.receive").AddEvent(ct.Context, "GOT 100 - Continue") -} - -func (ct *clientTracer) wait100Continue() { - ct.span("http.receive").AddEvent(ct.Context, "GOT 100 - Wait") -} - -func (ct *clientTracer) got1xxResponse(code int, header textproto.MIMEHeader) error { - ct.span("http.receive").AddEvent(ct.Context, "GOT 1xx", - HTTPStatus.Int(code), - HTTPHeaderMIME.String(sm2s(header)), - ) - return nil -} - -func sliceToString(value []string) string { - if len(value) == 0 { - return "undefined" - } - return strings.Join(value, ",") -} - -func sm2s(value map[string][]string) string { - var buf strings.Builder - for k, v := range value { - if buf.Len() != 0 { - buf.WriteString(",") - } - buf.WriteString(k) - buf.WriteString("=") - buf.WriteString(sliceToString(v)) - } - return buf.String() -} diff --git a/instrumentation/httptrace/clienttrace_test.go b/instrumentation/httptrace/clienttrace_test.go deleted file mode 100644 index db213a6f040..00000000000 --- a/instrumentation/httptrace/clienttrace_test.go +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package httptrace_test - -import ( - "context" - "net/http" - "net/http/httptest" - nhtrace "net/http/httptrace" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/trace/testtrace" - "go.opentelemetry.io/otel/instrumentation/httptrace" -) - -type SpanRecorder map[string]*testtrace.Span - -func (sr *SpanRecorder) OnStart(span *testtrace.Span) {} -func (sr *SpanRecorder) OnEnd(span *testtrace.Span) { (*sr)[span.Name()] = span } - -func TestHTTPRequestWithClientTrace(t *testing.T) { - sr := SpanRecorder{} - tp := testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)) - global.SetTraceProvider(tp) - tr := tp.Tracer("httptrace/client") - - // Mock http server - ts := httptest.NewServer( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - }), - ) - defer ts.Close() - address := ts.Listener.Addr() - - client := ts.Client() - err := tr.WithSpan(context.Background(), "test", - func(ctx context.Context) error { - req, _ := http.NewRequest("GET", ts.URL, nil) - _, req = httptrace.W3C(ctx, req) - - res, err := client.Do(req) - if err != nil { - t.Fatalf("Request failed: %s", err.Error()) - } - _ = res.Body.Close() - - return nil - }) - if err != nil { - panic("unexpected error in http request: " + err.Error()) - } - - testLen := []struct { - name string - attributes map[kv.Key]kv.Value - parent string - }{ - { - name: "http.connect", - attributes: map[kv.Key]kv.Value{ - kv.Key("http.remote"): kv.StringValue(address.String()), - }, - parent: "http.getconn", - }, - { - name: "http.getconn", - attributes: map[kv.Key]kv.Value{ - kv.Key("http.remote"): kv.StringValue(address.String()), - kv.Key("http.host"): kv.StringValue(address.String()), - }, - parent: "test", - }, - { - name: "http.receive", - parent: "test", - }, - { - name: "http.headers", - parent: "test", - }, - { - name: "http.send", - parent: "test", - }, - { - name: "test", - }, - } - for _, tl := range testLen { - if !assert.Contains(t, sr, tl.name) { - continue - } - span := sr[tl.name] - if tl.parent != "" { - if assert.Contains(t, sr, tl.parent) { - assert.Equal(t, span.ParentSpanID(), sr[tl.parent].SpanContext().SpanID) - } - } - if len(tl.attributes) > 0 { - attrs := span.Attributes() - if tl.name == "http.getconn" { - // http.local attribute uses a non-deterministic port. - local := kv.Key("http.local") - assert.Contains(t, attrs, local) - delete(attrs, local) - } - assert.Equal(t, tl.attributes, attrs) - } - } -} - -type MultiSpanRecorder map[string][]*testtrace.Span - -func (sr *MultiSpanRecorder) Reset() { (*sr) = MultiSpanRecorder{} } -func (sr *MultiSpanRecorder) OnStart(span *testtrace.Span) {} -func (sr *MultiSpanRecorder) OnEnd(span *testtrace.Span) { - (*sr)[span.Name()] = append((*sr)[span.Name()], span) -} - -func TestConcurrentConnectionStart(t *testing.T) { - sr := MultiSpanRecorder{} - global.SetTraceProvider( - testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)), - ) - ct := httptrace.NewClientTrace(context.Background()) - tts := []struct { - name string - run func() - }{ - { - name: "Open1Close1Open2Close2", - run: func() { - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectDone("tcp", "[::1]:3000", nil) - }, - }, - { - name: "Open2Close2Open1Close1", - run: func() { - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectDone("tcp", "[::1]:3000", nil) - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - }, - }, - { - name: "Open1Open2Close1Close2", - run: func() { - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - ct.ConnectDone("tcp", "[::1]:3000", nil) - }, - }, - { - name: "Open1Open2Close2Close1", - run: func() { - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectDone("tcp", "[::1]:3000", nil) - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - }, - }, - { - name: "Open2Open1Close1Close2", - run: func() { - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - ct.ConnectDone("tcp", "[::1]:3000", nil) - }, - }, - { - name: "Open2Open1Close2Close1", - run: func() { - ct.ConnectStart("tcp", "[::1]:3000") - ct.ConnectStart("tcp", "127.0.0.1:3000") - ct.ConnectDone("tcp", "[::1]:3000", nil) - ct.ConnectDone("tcp", "127.0.0.1:3000", nil) - }, - }, - } - - expectedRemotes := []kv.KeyValue{ - kv.String("http.remote", "127.0.0.1:3000"), - kv.String("http.remote", "[::1]:3000"), - } - for _, tt := range tts { - t.Run(tt.name, func(t *testing.T) { - sr.Reset() - tt.run() - spans := sr["http.connect"] - require.Len(t, spans, 2) - - var gotRemotes []kv.KeyValue - for _, span := range spans { - for k, v := range span.Attributes() { - gotRemotes = append(gotRemotes, kv.Any(string(k), v.AsInterface())) - } - } - assert.ElementsMatch(t, expectedRemotes, gotRemotes) - }) - } -} - -func TestEndBeforeStartCreatesSpan(t *testing.T) { - sr := MultiSpanRecorder{} - global.SetTraceProvider( - testtrace.NewProvider(testtrace.WithSpanRecorder(&sr)), - ) - - ct := httptrace.NewClientTrace(context.Background()) - ct.DNSDone(nhtrace.DNSDoneInfo{}) - ct.DNSStart(nhtrace.DNSStartInfo{Host: "example.com"}) - - name := "http.dns" - require.Contains(t, sr, name) - spans := sr[name] - require.Len(t, spans, 1) -} diff --git a/instrumentation/httptrace/httptrace.go b/instrumentation/httptrace/httptrace.go deleted file mode 100644 index ccea090ef86..00000000000 --- a/instrumentation/httptrace/httptrace.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package httptrace - -import ( - "context" - "net/http" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/semconv" -) - -// Option is a function that allows configuration of the httptrace Extract() -// and Inject() functions -type Option func(*config) - -type config struct { - propagators propagation.Propagators -} - -func newConfig(opts []Option) *config { - c := &config{propagators: global.Propagators()} - for _, o := range opts { - o(c) - } - return c -} - -// WithPropagators sets the propagators to use for Extraction and Injection -func WithPropagators(props propagation.Propagators) Option { - return func(c *config) { - c.propagators = props - } -} - -// Returns the Attributes, Context Entries, and SpanContext that were encoded by Inject. -func Extract(ctx context.Context, req *http.Request, opts ...Option) ([]kv.KeyValue, []kv.KeyValue, trace.SpanContext) { - c := newConfig(opts) - ctx = propagation.ExtractHTTP(ctx, c.propagators, req.Header) - - attrs := append( - semconv.HTTPServerAttributesFromHTTPRequest("", "", req), - semconv.NetAttributesFromHTTPRequest("tcp", req)..., - ) - - var correlationCtxKVs []kv.KeyValue - correlation.MapFromContext(ctx).Foreach(func(kv kv.KeyValue) bool { - correlationCtxKVs = append(correlationCtxKVs, kv) - return true - }) - - return attrs, correlationCtxKVs, trace.RemoteSpanContextFromContext(ctx) -} - -func Inject(ctx context.Context, req *http.Request, opts ...Option) { - c := newConfig(opts) - propagation.InjectHTTP(ctx, c.propagators, req.Header) -} diff --git a/instrumentation/httptrace/httptrace_test.go b/instrumentation/httptrace/httptrace_test.go deleted file mode 100644 index 3b704b0baee..00000000000 --- a/instrumentation/httptrace/httptrace_test.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package httptrace_test - -import ( - "context" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/google/go-cmp/cmp" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace/testtrace" - "go.opentelemetry.io/otel/instrumentation/httptrace" - "go.opentelemetry.io/otel/semconv" -) - -func TestRoundtrip(t *testing.T) { - tr := testtrace.NewProvider().Tracer("httptrace/client") - - var expectedAttrs map[kv.Key]string - expectedCorrs := map[kv.Key]string{kv.Key("foo"): "bar"} - - // Mock http server - ts := httptest.NewServer( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - attrs, corrs, span := httptrace.Extract(r.Context(), r) - - actualAttrs := make(map[kv.Key]string) - for _, attr := range attrs { - if attr.Key == semconv.NetPeerPortKey { - // Peer port will be non-deterministic - continue - } - actualAttrs[attr.Key] = attr.Value.Emit() - } - - if diff := cmp.Diff(actualAttrs, expectedAttrs); diff != "" { - t.Fatalf("[TestRoundtrip] Attributes are different: %v", diff) - } - - actualCorrs := make(map[kv.Key]string) - for _, corr := range corrs { - actualCorrs[corr.Key] = corr.Value.Emit() - } - - if diff := cmp.Diff(actualCorrs, expectedCorrs); diff != "" { - t.Fatalf("[TestRoundtrip] Correlations are different: %v", diff) - } - - if !span.IsValid() { - t.Fatalf("[TestRoundtrip] Invalid span extracted: %v", span) - } - - _, err := w.Write([]byte("OK")) - if err != nil { - t.Fatal(err) - } - }), - ) - defer ts.Close() - - address := ts.Listener.Addr() - hp := strings.Split(address.String(), ":") - expectedAttrs = map[kv.Key]string{ - semconv.HTTPFlavorKey: "1.1", - semconv.HTTPHostKey: address.String(), - semconv.HTTPMethodKey: "GET", - semconv.HTTPSchemeKey: "http", - semconv.HTTPTargetKey: "/", - semconv.HTTPUserAgentKey: "Go-http-client/1.1", - semconv.HTTPRequestContentLengthKey: "3", - semconv.NetHostIPKey: hp[0], - semconv.NetHostPortKey: hp[1], - semconv.NetPeerIPKey: "127.0.0.1", - semconv.NetTransportKey: "IP.TCP", - } - - client := ts.Client() - err := tr.WithSpan(context.Background(), "test", - func(ctx context.Context) error { - ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{SingleKV: kv.Key("foo").String("bar")})) - req, _ := http.NewRequest("GET", ts.URL, strings.NewReader("foo")) - httptrace.Inject(ctx, req) - - res, err := client.Do(req) - if err != nil { - t.Fatalf("Request failed: %s", err.Error()) - } - _ = res.Body.Close() - - return nil - }) - if err != nil { - panic("unexpected error in http request: " + err.Error()) - } -} - -func TestSpecifyPropagators(t *testing.T) { - tr := testtrace.NewProvider().Tracer("httptrace/client") - - expectedCorrs := map[kv.Key]string{kv.Key("foo"): "bar"} - - // Mock http server - ts := httptest.NewServer( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - _, corrs, span := httptrace.Extract(r.Context(), r, httptrace.WithPropagators(propagation.New(propagation.WithExtractors(correlation.DefaultHTTPPropagator())))) - - actualCorrs := make(map[kv.Key]string) - for _, corr := range corrs { - actualCorrs[corr.Key] = corr.Value.Emit() - } - - if diff := cmp.Diff(actualCorrs, expectedCorrs); diff != "" { - t.Fatalf("[TestRoundtrip] Correlations are different: %v", diff) - } - - if span.IsValid() { - t.Fatalf("[TestRoundtrip] valid span extracted, expected none: %v", span) - } - - _, err := w.Write([]byte("OK")) - if err != nil { - t.Fatal(err) - } - }), - ) - defer ts.Close() - - client := ts.Client() - err := tr.WithSpan(context.Background(), "test", - func(ctx context.Context) error { - ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{SingleKV: kv.Key("foo").String("bar")})) - req, _ := http.NewRequest("GET", ts.URL, nil) - httptrace.Inject(ctx, req, httptrace.WithPropagators(propagation.New(propagation.WithInjectors(correlation.DefaultHTTPPropagator())))) - - res, err := client.Do(req) - if err != nil { - t.Fatalf("Request failed: %s", err.Error()) - } - _ = res.Body.Close() - - return nil - }) - if err != nil { - panic("unexpected error in http request: " + err.Error()) - } -} diff --git a/instrumentation/othttp/common.go b/instrumentation/othttp/common.go deleted file mode 100644 index d885d9e70a8..00000000000 --- a/instrumentation/othttp/common.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "net/http" - - "go.opentelemetry.io/otel/api/kv" -) - -// Attribute keys that can be added to a span. -const ( - ReadBytesKey = kv.Key("http.read_bytes") // if anything was read from the request body, the total number of bytes read - ReadErrorKey = kv.Key("http.read_error") // If an error occurred while reading a request, the string of the error (io.EOF is not recorded) - WroteBytesKey = kv.Key("http.wrote_bytes") // if anything was written to the response writer, the total number of bytes written - WriteErrorKey = kv.Key("http.write_error") // if an error occurred while writing a reply, the string of the error (io.EOF is not recorded) -) - -// Server HTTP metrics -const ( - RequestCount = "http.server.request_count" // Incoming request count total - RequestContentLength = "http.server.request_content_length" // Incoming request bytes total - ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total - ServerLatency = "http.server.duration" // Incoming end to end duration, microseconds -) - -// Filter is a predicate used to determine whether a given http.request should -// be traced. A Filter must return true if the request should be traced. -type Filter func(*http.Request) bool diff --git a/instrumentation/othttp/config.go b/instrumentation/othttp/config.go deleted file mode 100644 index 4b0ec68437a..00000000000 --- a/instrumentation/othttp/config.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "net/http" - - "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" -) - -// Config represents the configuration options available for the othttp.Handler -// and othttp.Transport types. -type Config struct { - Tracer trace.Tracer - Meter metric.Meter - Propagators propagation.Propagators - SpanStartOptions []trace.StartOption - ReadEvent bool - WriteEvent bool - Filters []Filter - SpanNameFormatter func(string, *http.Request) string -} - -// Option Interface used for setting *optional* Config properties -type Option interface { - Apply(*Config) -} - -// OptionFunc provides a convenience wrapper for simple Options -// that can be represented as functions. -type OptionFunc func(*Config) - -func (o OptionFunc) Apply(c *Config) { - o(c) -} - -// NewConfig creates a new Config struct and applies opts to it. -func NewConfig(opts ...Option) *Config { - c := &Config{} - for _, opt := range opts { - opt.Apply(c) - } - return c -} - -// WithTracer configures a specific tracer. If this option -// isn't specified then the global tracer is used. -func WithTracer(tracer trace.Tracer) Option { - return OptionFunc(func(c *Config) { - c.Tracer = tracer - }) -} - -// WithMeter configures a specific meter. If this option -// isn't specified then the global meter is used. -func WithMeter(meter metric.Meter) Option { - return OptionFunc(func(c *Config) { - c.Meter = meter - }) -} - -// WithPublicEndpoint configures the Handler to link the span with an incoming -// span context. If this option is not provided, then the association is a child -// association instead of a link. -func WithPublicEndpoint() Option { - return OptionFunc(func(c *Config) { - c.SpanStartOptions = append(c.SpanStartOptions, trace.WithNewRoot()) - }) -} - -// WithPropagators configures specific propagators. If this -// option isn't specified then -// go.opentelemetry.io/otel/api/global.Propagators are used. -func WithPropagators(ps propagation.Propagators) Option { - return OptionFunc(func(c *Config) { - c.Propagators = ps - }) -} - -// WithSpanOptions configures an additional set of -// trace.StartOptions, which are applied to each new span. -func WithSpanOptions(opts ...trace.StartOption) Option { - return OptionFunc(func(c *Config) { - c.SpanStartOptions = append(c.SpanStartOptions, opts...) - }) -} - -// WithFilter adds a filter to the list of filters used by the handler. -// If any filter indicates to exclude a request then the request will not be -// traced. All filters must allow a request to be traced for a Span to be created. -// If no filters are provided then all requests are traced. -// Filters will be invoked for each processed request, it is advised to make them -// simple and fast. -func WithFilter(f Filter) Option { - return OptionFunc(func(c *Config) { - c.Filters = append(c.Filters, f) - }) -} - -type event int - -// Different types of events that can be recorded, see WithMessageEvents -const ( - ReadEvents event = iota - WriteEvents -) - -// WithMessageEvents configures the Handler to record the specified events -// (span.AddEvent) on spans. By default only summary attributes are added at the -// end of the request. -// -// Valid events are: -// * ReadEvents: Record the number of bytes read after every http.Request.Body.Read -// using the ReadBytesKey -// * WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write -// using the WriteBytesKey -func WithMessageEvents(events ...event) Option { - return OptionFunc(func(c *Config) { - for _, e := range events { - switch e { - case ReadEvents: - c.ReadEvent = true - case WriteEvents: - c.WriteEvent = true - } - } - }) -} - -// WithSpanNameFormatter takes a function that will be called on every -// request and the returned string will become the Span Name -func WithSpanNameFormatter(f func(operation string, r *http.Request) string) Option { - return OptionFunc(func(c *Config) { - c.SpanNameFormatter = f - }) -} diff --git a/instrumentation/othttp/config_test.go b/instrumentation/othttp/config_test.go deleted file mode 100644 index dec4d2b658e..00000000000 --- a/instrumentation/othttp/config_test.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - - mocktrace "go.opentelemetry.io/otel/internal/trace" -) - -func TestBasicFilter(t *testing.T) { - rr := httptest.NewRecorder() - - var id uint64 - tracer := mocktrace.MockTracer{StartSpanID: &id} - - h := NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if _, err := io.WriteString(w, "hello world"); err != nil { - t.Fatal(err) - } - }), "test_handler", - WithTracer(&tracer), - WithFilter(func(r *http.Request) bool { - return false - }), - ) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/", nil) - if err != nil { - t.Fatal(err) - } - h.ServeHTTP(rr, r) - if got, expected := rr.Result().StatusCode, http.StatusOK; got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - if got := rr.Header().Get("Traceparent"); got != "" { - t.Fatal("expected empty trace header") - } - if got, expected := id, uint64(0); got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - d, err := ioutil.ReadAll(rr.Result().Body) - if err != nil { - t.Fatal(err) - } - if got, expected := string(d), "hello world"; got != expected { - t.Fatalf("got %q, expected %q", got, expected) - } -} - -func TestSpanNameFormatter(t *testing.T) { - var testCases = []struct { - name string - formatter func(s string, r *http.Request) string - operation string - expected string - }{ - { - name: "default handler formatter", - formatter: defaultHandlerFormatter, - operation: "test_operation", - expected: "test_operation", - }, - { - name: "default transport formatter", - formatter: defaultTransportFormatter, - expected: http.MethodGet, - }, - { - name: "custom formatter", - formatter: func(s string, r *http.Request) string { - return r.URL.Path - }, - operation: "", - expected: "/hello", - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - rr := httptest.NewRecorder() - var id uint64 - var spanName string - tracer := mocktrace.MockTracer{ - StartSpanID: &id, - OnSpanStarted: func(span *mocktrace.MockSpan) { - spanName = span.Name - }, - } - handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if _, err := io.WriteString(w, "hello world"); err != nil { - t.Fatal(err) - } - }) - h := NewHandler( - handler, - tc.operation, - WithTracer(&tracer), - WithSpanNameFormatter(tc.formatter), - ) - r, err := http.NewRequest(http.MethodGet, "http://localhost/hello", nil) - if err != nil { - t.Fatal(err) - } - h.ServeHTTP(rr, r) - if got, expected := rr.Result().StatusCode, http.StatusOK; got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - if got, expected := spanName, tc.expected; got != expected { - t.Fatalf("got %q, expected %q", got, expected) - } - }) - } -} diff --git a/instrumentation/othttp/doc.go b/instrumentation/othttp/doc.go deleted file mode 100644 index 80dae5d77b3..00000000000 --- a/instrumentation/othttp/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package othttp provides a http.Handler and functions that are -// intended to be used to add tracing by wrapping -// existing handlers (with Handler) and routes WithRouteTag. -package othttp diff --git a/instrumentation/othttp/filters/filters.go b/instrumentation/othttp/filters/filters.go deleted file mode 100644 index e5192ef7ccf..00000000000 --- a/instrumentation/othttp/filters/filters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package filters provides a set of filters useful with the -// othttp.WithFilter() option to control which inbound requests are traced. -package filters - -import ( - "net/http" - "strings" - - "go.opentelemetry.io/otel/instrumentation/othttp" -) - -// Any takes a list of Filters and returns a Filter that -// returns true if any Filter in the list returns true. -func Any(fs ...othttp.Filter) othttp.Filter { - return func(r *http.Request) bool { - for _, f := range fs { - if f(r) { - return true - } - } - return false - } -} - -// All takes a list of Filters and returns a Filter that -// returns true only if all Filters in the list return true. -func All(fs ...othttp.Filter) othttp.Filter { - return func(r *http.Request) bool { - for _, f := range fs { - if !f(r) { - return false - } - } - return true - } -} - -// None takes a list of Filters and returns a Filter that returns -// true only if none of the Filters in the list return true. -func None(fs ...othttp.Filter) othttp.Filter { - return func(r *http.Request) bool { - for _, f := range fs { - if f(r) { - return false - } - } - return true - } -} - -// Not provides a convenience mechanism for inverting a Filter -func Not(f othttp.Filter) othttp.Filter { - return func(r *http.Request) bool { - return !f(r) - } -} - -// Hostname returns a Filter that returns true if the request's -// hostname matches the provided string. -func Hostname(h string) othttp.Filter { - return func(r *http.Request) bool { - return r.URL.Hostname() == h - } -} - -// Path returns a Filter that returns true if the request's -// path matches the provided string. -func Path(p string) othttp.Filter { - return func(r *http.Request) bool { - return r.URL.Path == p - } -} - -// PathPrefix returns a Filter that returns true if the request's -// path starts with the provided string. -func PathPrefix(p string) othttp.Filter { - return func(r *http.Request) bool { - return strings.HasPrefix(r.URL.Path, p) - } -} - -// Query returns a Filter that returns true if the request -// includes a query parameter k with a value equal to v. -func Query(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, qv := range r.URL.Query()[k] { - if v == qv { - return true - } - } - return false - } -} - -// QueryContains returns a Filter that returns true if the request -// includes a query parameter k with a value that contains v. -func QueryContains(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, qv := range r.URL.Query()[k] { - if strings.Contains(qv, v) { - return true - } - } - return false - } -} - -// Method returns a Filter that returns true if the request -// method is equal to the provided value. -func Method(m string) othttp.Filter { - return func(r *http.Request) bool { - return m == r.Method - } -} diff --git a/instrumentation/othttp/filters/filters_test.go b/instrumentation/othttp/filters/filters_test.go deleted file mode 100644 index 7e184363ddf..00000000000 --- a/instrumentation/othttp/filters/filters_test.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package filters - -import ( - "net/http" - "net/url" - "testing" - - "go.opentelemetry.io/otel/instrumentation/othttp" -) - -type scenario struct { - name string - filter othttp.Filter - req *http.Request - exp bool -} - -func TestAny(t *testing.T) { - for _, s := range []scenario{ - { - name: "no matching filters", - filter: Any(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/boo", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "one matching filter", - filter: Any(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "baz.bar:8080"}}, - exp: true, - }, - { - name: "all matching filters", - filter: Any(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "bar.baz:8080"}}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestAll(t *testing.T) { - for _, s := range []scenario{ - { - name: "no matching filters", - filter: All(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/boo", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "one matching filter", - filter: All(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "all matching filters", - filter: All(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "bar.baz:8080"}}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestNone(t *testing.T) { - for _, s := range []scenario{ - { - name: "no matching filters", - filter: None(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/boo", Host: "baz.bar:8080"}}, - exp: true, - }, - { - name: "one matching filter", - filter: None(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "all matching filters", - filter: None(Path("/foo"), Hostname("bar.baz")), - req: &http.Request{URL: &url.URL{Path: "/foo", Host: "bar.baz:8080"}}, - exp: false, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestNot(t *testing.T) { - req := &http.Request{URL: &url.URL{Path: "/foo", Host: "bar.baz:8080"}} - filter := Path("/foo") - if filter(req) == Not(filter)(req) { - t.Error("Not filter should invert the result of the supplied filter") - } -} - -func TestPathPrefix(t *testing.T) { - for _, s := range []scenario{ - { - name: "non-matching prefix", - filter: PathPrefix("/foo"), - req: &http.Request{URL: &url.URL{Path: "/boo/far", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "matching prefix", - filter: PathPrefix("/foo"), - req: &http.Request{URL: &url.URL{Path: "/foo/bar", Host: "bar.baz:8080"}}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestMethod(t *testing.T) { - for _, s := range []scenario{ - { - name: "non-matching method", - filter: Method(http.MethodGet), - req: &http.Request{Method: http.MethodHead, URL: &url.URL{Path: "/boo/far", Host: "baz.bar:8080"}}, - exp: false, - }, - { - name: "matching method", - filter: Method(http.MethodGet), - req: &http.Request{Method: http.MethodGet, URL: &url.URL{Path: "/boo/far", Host: "baz.bar:8080"}}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestQuery(t *testing.T) { - matching, _ := url.Parse("http://bar.baz:8080/foo/bar?key=value") - nonMatching, _ := url.Parse("http://bar.baz:8080/foo/bar?key=other") - for _, s := range []scenario{ - { - name: "non-matching query parameter", - filter: Query("key", "value"), - req: &http.Request{Method: http.MethodHead, URL: nonMatching}, - exp: false, - }, - { - name: "matching query parameter", - filter: Query("key", "value"), - req: &http.Request{Method: http.MethodGet, URL: matching}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestQueryContains(t *testing.T) { - matching, _ := url.Parse("http://bar.baz:8080/foo/bar?key=value") - nonMatching, _ := url.Parse("http://bar.baz:8080/foo/bar?key=other") - for _, s := range []scenario{ - { - name: "non-matching query parameter", - filter: QueryContains("key", "alu"), - req: &http.Request{Method: http.MethodHead, URL: nonMatching}, - exp: false, - }, - { - name: "matching query parameter", - filter: QueryContains("key", "alu"), - req: &http.Request{Method: http.MethodGet, URL: matching}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestHeader(t *testing.T) { - matching := http.Header{} - matching.Add("key", "value") - nonMatching := http.Header{} - nonMatching.Add("key", "other") - for _, s := range []scenario{ - { - name: "non-matching query parameter", - filter: Header("key", "value"), - req: &http.Request{Method: http.MethodHead, Header: nonMatching}, - exp: false, - }, - { - name: "matching query parameter", - filter: Header("key", "value"), - req: &http.Request{Method: http.MethodGet, Header: matching}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} - -func TestHeaderContains(t *testing.T) { - matching := http.Header{} - matching.Add("key", "value") - nonMatching := http.Header{} - nonMatching.Add("key", "other") - for _, s := range []scenario{ - { - name: "non-matching query parameter", - filter: HeaderContains("key", "alu"), - req: &http.Request{Method: http.MethodHead, Header: nonMatching}, - exp: false, - }, - { - name: "matching query parameter", - filter: HeaderContains("key", "alu"), - req: &http.Request{Method: http.MethodGet, Header: matching}, - exp: true, - }, - } { - res := s.filter(s.req) - if s.exp != res { - t.Errorf("Failed testing %q. Expected %t, got %t", s.name, s.exp, res) - } - } -} diff --git a/instrumentation/othttp/filters/header_go14.go b/instrumentation/othttp/filters/header_go14.go deleted file mode 100644 index e4091f1656b..00000000000 --- a/instrumentation/othttp/filters/header_go14.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.14 - -package filters - -import ( - "net/http" - "strings" - - "go.opentelemetry.io/otel/instrumentation/othttp" -) - -// Header returns a Filter that returns true if the request -// includes a header k with a value equal to v. -func Header(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, hv := range r.Header.Values(k) { - if v == hv { - return true - } - } - return false - } -} - -// HeaderContains returns a Filter that returns true if the request -// includes a header k with a value that contains v. -func HeaderContains(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, hv := range r.Header.Values(k) { - if strings.Contains(hv, v) { - return true - } - } - return false - } -} diff --git a/instrumentation/othttp/filters/header_nongo14.go b/instrumentation/othttp/filters/header_nongo14.go deleted file mode 100644 index 9e512443956..00000000000 --- a/instrumentation/othttp/filters/header_nongo14.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build !go1.14 - -package filters - -import ( - "net/http" - "net/textproto" - "strings" - - "go.opentelemetry.io/otel/instrumentation/othttp" -) - -// Header returns a Filter that returns true if the request -// includes a header k with a value equal to v. -func Header(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, hv := range r.Header[textproto.CanonicalMIMEHeaderKey(k)] { - if v == hv { - return true - } - } - return false - } -} - -// HeaderContains returns a Filter that returns true if the request -// includes a header k with a value that contains v. -func HeaderContains(k, v string) othttp.Filter { - return func(r *http.Request) bool { - for _, hv := range r.Header[textproto.CanonicalMIMEHeaderKey(k)] { - if strings.Contains(hv, v) { - return true - } - } - return false - } -} diff --git a/instrumentation/othttp/handler.go b/instrumentation/othttp/handler.go deleted file mode 100644 index 20471ffd791..00000000000 --- a/instrumentation/othttp/handler.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "io" - "net/http" - "time" - - "github.com/felixge/httpsnoop" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/semconv" -) - -var _ http.Handler = &Handler{} - -// Handler is http middleware that corresponds to the http.Handler interface and -// is designed to wrap a http.Mux (or equivalent), while individual routes on -// the mux are wrapped with WithRouteTag. A Handler will add various attributes -// to the span using the kv.Keys defined in this package. -type Handler struct { - operation string - handler http.Handler - - tracer trace.Tracer - meter metric.Meter - propagators propagation.Propagators - spanStartOptions []trace.StartOption - readEvent bool - writeEvent bool - filters []Filter - spanNameFormatter func(string, *http.Request) string - counters map[string]metric.Int64Counter - valueRecorders map[string]metric.Int64ValueRecorder -} - -func defaultHandlerFormatter(operation string, _ *http.Request) string { - return operation -} - -// NewHandler wraps the passed handler, functioning like middleware, in a span -// named after the operation and with any provided Options. -func NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler { - h := Handler{ - handler: handler, - operation: operation, - } - - const domain = "go.opentelemetry.io/otel/instrumentation/othttp" - - defaultOpts := []Option{ - WithTracer(global.Tracer(domain)), - WithMeter(global.Meter(domain)), - WithPropagators(global.Propagators()), - WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)), - WithSpanNameFormatter(defaultHandlerFormatter), - } - - c := NewConfig(append(defaultOpts, opts...)...) - h.configure(c) - h.createMeasures() - - return &h -} - -func (h *Handler) configure(c *Config) { - h.tracer = c.Tracer - h.meter = c.Meter - h.propagators = c.Propagators - h.spanStartOptions = c.SpanStartOptions - h.readEvent = c.ReadEvent - h.writeEvent = c.WriteEvent - h.filters = c.Filters - h.spanNameFormatter = c.SpanNameFormatter -} - -func handleErr(err error) { - if err != nil { - global.Handle(err) - } -} - -func (h *Handler) createMeasures() { - h.counters = make(map[string]metric.Int64Counter) - h.valueRecorders = make(map[string]metric.Int64ValueRecorder) - - requestBytesCounter, err := h.meter.NewInt64Counter(RequestContentLength) - handleErr(err) - - responseBytesCounter, err := h.meter.NewInt64Counter(ResponseContentLength) - handleErr(err) - - serverLatencyMeasure, err := h.meter.NewInt64ValueRecorder(ServerLatency) - handleErr(err) - - h.counters[RequestContentLength] = requestBytesCounter - h.counters[ResponseContentLength] = responseBytesCounter - h.valueRecorders[ServerLatency] = serverLatencyMeasure -} - -// ServeHTTP serves HTTP requests (http.Handler) -func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - requestStartTime := time.Now() - for _, f := range h.filters { - if !f(r) { - // Simply pass through to the handler if a filter rejects the request - h.handler.ServeHTTP(w, r) - return - } - } - - opts := append([]trace.StartOption{ - trace.WithAttributes(semconv.NetAttributesFromHTTPRequest("tcp", r)...), - trace.WithAttributes(semconv.EndUserAttributesFromHTTPRequest(r)...), - trace.WithAttributes(semconv.HTTPServerAttributesFromHTTPRequest(h.operation, "", r)...), - }, h.spanStartOptions...) // start with the configured options - - ctx := propagation.ExtractHTTP(r.Context(), h.propagators, r.Header) - ctx, span := h.tracer.Start(ctx, h.spanNameFormatter(h.operation, r), opts...) - defer span.End() - - readRecordFunc := func(int64) {} - if h.readEvent { - readRecordFunc = func(n int64) { - span.AddEvent(ctx, "read", ReadBytesKey.Int64(n)) - } - } - bw := bodyWrapper{ReadCloser: r.Body, record: readRecordFunc} - r.Body = &bw - - writeRecordFunc := func(int64) {} - if h.writeEvent { - writeRecordFunc = func(n int64) { - span.AddEvent(ctx, "write", WroteBytesKey.Int64(n)) - } - } - - rww := &respWriterWrapper{ResponseWriter: w, record: writeRecordFunc, ctx: ctx, props: h.propagators} - - // Wrap w to use our ResponseWriter methods while also exposing - // other interfaces that w may implement (http.CloseNotifier, - // http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom). - - w = httpsnoop.Wrap(w, httpsnoop.Hooks{ - Header: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc { - return rww.Header - }, - Write: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc { - return rww.Write - }, - WriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc { - return rww.WriteHeader - }, - }) - - h.handler.ServeHTTP(w, r.WithContext(ctx)) - - setAfterServeAttributes(span, bw.read, rww.written, rww.statusCode, bw.err, rww.err) - - // Add request metrics - - labels := semconv.HTTPServerMetricAttributesFromHTTPRequest(h.operation, r) - - h.counters[RequestContentLength].Add(ctx, bw.read, labels...) - h.counters[ResponseContentLength].Add(ctx, rww.written, labels...) - - elapsedTime := time.Since(requestStartTime).Microseconds() - - h.valueRecorders[ServerLatency].Record(ctx, elapsedTime, labels...) -} - -func setAfterServeAttributes(span trace.Span, read, wrote int64, statusCode int, rerr, werr error) { - kv := []kv.KeyValue{} - - // TODO: Consider adding an event after each read and write, possibly as an - // option (defaulting to off), so as to not create needlessly verbose spans. - if read > 0 { - kv = append(kv, ReadBytesKey.Int64(read)) - } - if rerr != nil && rerr != io.EOF { - kv = append(kv, ReadErrorKey.String(rerr.Error())) - } - if wrote > 0 { - kv = append(kv, WroteBytesKey.Int64(wrote)) - } - if statusCode > 0 { - kv = append(kv, semconv.HTTPAttributesFromHTTPStatusCode(statusCode)...) - span.SetStatus(semconv.SpanStatusFromHTTPStatusCode(statusCode)) - } - if werr != nil && werr != io.EOF { - kv = append(kv, WriteErrorKey.String(werr.Error())) - } - span.SetAttributes(kv...) -} - -// WithRouteTag annotates a span with the provided route name using the -// RouteKey Tag. -func WithRouteTag(route string, h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - span := trace.SpanFromContext(r.Context()) - span.SetAttributes(semconv.HTTPRouteKey.String(route)) - h.ServeHTTP(w, r) - }) -} diff --git a/instrumentation/othttp/handler_example_test.go b/instrumentation/othttp/handler_example_test.go deleted file mode 100644 index 080022d0b7e..00000000000 --- a/instrumentation/othttp/handler_example_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package othttp_test - -import ( - "context" - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "strings" - - "go.opentelemetry.io/otel/api/kv" - - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/instrumentation/othttp" -) - -func ExampleNewHandler() { - /* curl -v -d "a painting" http://localhost:7777/hello/bob/ross - ... - * upload completely sent off: 10 out of 10 bytes - < HTTP/1.1 200 OK - < Traceparent: 00-76ae040ee5753f38edf1c2bd9bd128bd-dd394138cfd7a3dc-01 - < Date: Fri, 04 Oct 2019 02:33:08 GMT - < Content-Length: 45 - < Content-Type: text/plain; charset=utf-8 - < - Hello, bob/ross! - You sent me this: - a painting - */ - - figureOutName := func(ctx context.Context, s string) (string, error) { - pp := strings.SplitN(s, "/", 2) - var err error - switch pp[1] { - case "": - err = fmt.Errorf("expected /hello/:name in %q", s) - default: - trace.SpanFromContext(ctx).SetAttributes(kv.String("name", pp[1])) - } - return pp[1], err - } - - var mux http.ServeMux - mux.Handle("/hello/", - othttp.WithRouteTag("/hello/:name", http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() - var name string - // Wrap another function in its own span - if err := trace.SpanFromContext(ctx).Tracer().WithSpan(ctx, "figureOutName", - func(ctx context.Context) error { - var err error - name, err = figureOutName(ctx, r.URL.Path[1:]) - return err - }); err != nil { - log.Println("error figuring out name: ", err) - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - d, err := ioutil.ReadAll(r.Body) - if err != nil { - log.Println("error reading body: ", err) - w.WriteHeader(http.StatusBadRequest) - return - } - - n, err := io.WriteString(w, "Hello, "+name+"!\nYou sent me this:\n"+string(d)) - if err != nil { - log.Printf("error writing reply after %d bytes: %s", n, err) - } - }), - ), - ) - - if err := http.ListenAndServe(":7777", - othttp.NewHandler(&mux, "server", - othttp.WithMessageEvents(othttp.ReadEvents, othttp.WriteEvents), - ), - ); err != nil { - log.Fatal(err) - } -} diff --git a/instrumentation/othttp/handler_test.go b/instrumentation/othttp/handler_test.go deleted file mode 100644 index 3d98481c29a..00000000000 --- a/instrumentation/othttp/handler_test.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package othttp - -import ( - "fmt" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" - - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/trace" - mockmeter "go.opentelemetry.io/otel/internal/metric" - mocktrace "go.opentelemetry.io/otel/internal/trace" - "go.opentelemetry.io/otel/semconv" -) - -func assertMetricLabels(t *testing.T, expectedLabels []kv.KeyValue, measurementBatches []mockmeter.Batch) { - for _, batch := range measurementBatches { - assert.ElementsMatch(t, expectedLabels, batch.Labels) - } -} - -func TestHandlerBasics(t *testing.T) { - rr := httptest.NewRecorder() - - var id uint64 - tracer := mocktrace.MockTracer{StartSpanID: &id} - meterimpl, meter := mockmeter.NewMeter() - - operation := "test_handler" - - h := NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if _, err := io.WriteString(w, "hello world"); err != nil { - t.Fatal(err) - } - }), operation, - WithTracer(&tracer), - WithMeter(meter), - ) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/", strings.NewReader("foo")) - if err != nil { - t.Fatal(err) - } - h.ServeHTTP(rr, r) - - if len(meterimpl.MeasurementBatches) == 0 { - t.Fatalf("got 0 recorded measurements, expected 1 or more") - } - - labelsToVerify := []kv.KeyValue{ - semconv.HTTPServerNameKey.String(operation), - semconv.HTTPSchemeHTTP, - semconv.HTTPHostKey.String(r.Host), - semconv.HTTPFlavorKey.String(fmt.Sprintf("1.%d", r.ProtoMinor)), - semconv.HTTPRequestContentLengthKey.Int64(3), - } - - assertMetricLabels(t, labelsToVerify, meterimpl.MeasurementBatches) - - if got, expected := rr.Result().StatusCode, http.StatusOK; got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - if got := rr.Header().Get("Traceparent"); got == "" { - t.Fatal("expected non empty trace header") - } - if got, expected := id, uint64(1); got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - d, err := ioutil.ReadAll(rr.Result().Body) - if err != nil { - t.Fatal(err) - } - if got, expected := string(d), "hello world"; got != expected { - t.Fatalf("got %q, expected %q", got, expected) - } -} - -func TestHandlerNoWrite(t *testing.T) { - rr := httptest.NewRecorder() - - var id uint64 - tracer := mocktrace.MockTracer{StartSpanID: &id} - - operation := "test_handler" - var span trace.Span - - h := NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - span = trace.SpanFromContext(r.Context()) - }), operation, - WithTracer(&tracer), - ) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/", nil) - if err != nil { - t.Fatal(err) - } - h.ServeHTTP(rr, r) - - if got, expected := rr.Result().StatusCode, http.StatusOK; got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - if got := rr.Header().Get("Traceparent"); got != "" { - t.Fatal("expected empty trace header") - } - if got, expected := id, uint64(1); got != expected { - t.Fatalf("got %d, expected %d", got, expected) - } - if mockSpan, ok := span.(*mocktrace.MockSpan); ok { - if got, expected := mockSpan.Status, codes.OK; got != expected { - t.Fatalf("got %q, expected %q", got, expected) - } - } else { - t.Fatalf("Expected *moctrace.MockSpan, got %T", span) - } -} - -func TestResponseWriterOptionalInterfaces(t *testing.T) { - rr := httptest.NewRecorder() - - var id uint64 - tracer := mocktrace.MockTracer{StartSpanID: &id} - - // ResponseRecorder implements the Flusher interface. Make sure the - // wrapped ResponseWriter passed to the handler still implements - // Flusher. - - var isFlusher bool - h := NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - _, isFlusher = w.(http.Flusher) - if _, err := io.WriteString(w, "hello world"); err != nil { - t.Fatal(err) - } - }), "test_handler", - WithTracer(&tracer)) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/", nil) - if err != nil { - t.Fatal(err) - } - h.ServeHTTP(rr, r) - if !isFlusher { - t.Fatal("http.Flusher interface not exposed") - } -} diff --git a/instrumentation/othttp/transport.go b/instrumentation/othttp/transport.go deleted file mode 100644 index aa619ea62a5..00000000000 --- a/instrumentation/othttp/transport.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "context" - "io" - "net/http" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/semconv" - - "google.golang.org/grpc/codes" -) - -// Transport implements the http.RoundTripper interface and wraps -// outbound HTTP(S) requests with a span. -type Transport struct { - rt http.RoundTripper - - tracer trace.Tracer - propagators propagation.Propagators - spanStartOptions []trace.StartOption - filters []Filter - spanNameFormatter func(string, *http.Request) string -} - -var _ http.RoundTripper = &Transport{} - -// NewTransport wraps the provided http.RoundTripper with one that -// starts a span and injects the span context into the outbound request headers. -func NewTransport(base http.RoundTripper, opts ...Option) *Transport { - t := Transport{ - rt: base, - } - - defaultOpts := []Option{ - WithTracer(global.Tracer("go.opentelemetry.io/otel/instrumentation/othttp")), - WithPropagators(global.Propagators()), - WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), - WithSpanNameFormatter(defaultTransportFormatter), - } - - c := NewConfig(append(defaultOpts, opts...)...) - t.configure(c) - - return &t -} - -func (t *Transport) configure(c *Config) { - t.tracer = c.Tracer - t.propagators = c.Propagators - t.spanStartOptions = c.SpanStartOptions - t.filters = c.Filters - t.spanNameFormatter = c.SpanNameFormatter -} - -func defaultTransportFormatter(_ string, r *http.Request) string { - return r.Method -} - -// RoundTrip creates a Span and propagates its context via the provided request's headers -// before handing the request to the configured base RoundTripper. The created span will -// end when the response body is closed or when a read from the body returns io.EOF. -func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { - for _, f := range t.filters { - if !f(r) { - // Simply pass through to the base RoundTripper if a filter rejects the request - return t.rt.RoundTrip(r) - } - } - - opts := append([]trace.StartOption{}, t.spanStartOptions...) // start with the configured options - - ctx, span := t.tracer.Start(r.Context(), t.spanNameFormatter("", r), opts...) - - r = r.WithContext(ctx) - span.SetAttributes(semconv.HTTPClientAttributesFromHTTPRequest(r)...) - propagation.InjectHTTP(ctx, t.propagators, r.Header) - - res, err := t.rt.RoundTrip(r) - if err != nil { - span.RecordError(ctx, err, trace.WithErrorStatus(codes.Internal)) - span.End() - return res, err - } - - span.SetAttributes(semconv.HTTPAttributesFromHTTPStatusCode(res.StatusCode)...) - span.SetStatus(semconv.SpanStatusFromHTTPStatusCode(res.StatusCode)) - res.Body = &wrappedBody{ctx: ctx, span: span, body: res.Body} - - return res, err -} - -type wrappedBody struct { - ctx context.Context - span trace.Span - body io.ReadCloser -} - -var _ io.ReadCloser = &wrappedBody{} - -func (wb *wrappedBody) Read(b []byte) (int, error) { - n, err := wb.body.Read(b) - - switch err { - case nil: - // nothing to do here but fall through to the return - case io.EOF: - wb.span.End() - default: - wb.span.RecordError(wb.ctx, err, trace.WithErrorStatus(codes.Internal)) - } - return n, err -} - -func (wb *wrappedBody) Close() error { - wb.span.End() - return wb.body.Close() -} diff --git a/instrumentation/othttp/transport_example_test.go b/instrumentation/othttp/transport_example_test.go deleted file mode 100644 index 9254bd19024..00000000000 --- a/instrumentation/othttp/transport_example_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "net/http" -) - -func ExampleNewTransport() { - // Create an http.Client that uses the othttp.Transport - // wrapped around the http.DefaultTransport - _ = http.Client{ - Transport: NewTransport(http.DefaultTransport), - } -} diff --git a/instrumentation/othttp/transport_test.go b/instrumentation/othttp/transport_test.go deleted file mode 100644 index 86e29adcbae..00000000000 --- a/instrumentation/othttp/transport_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" - mocktrace "go.opentelemetry.io/otel/internal/trace" -) - -func TestTransportBasics(t *testing.T) { - var id uint64 - tracer := mocktrace.MockTracer{StartSpanID: &id} - content := []byte("Hello, world!") - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - ctx := propagation.ExtractHTTP(r.Context(), global.Propagators(), r.Header) - span := trace.RemoteSpanContextFromContext(ctx) - tgtID, err := trace.SpanIDFromHex(fmt.Sprintf("%016x", id)) - if err != nil { - t.Fatalf("Error converting id to SpanID: %s", err.Error()) - } - if span.SpanID != tgtID { - t.Fatalf("testing remote SpanID: got %s, expected %s", span.SpanID, tgtID) - } - if _, err := w.Write(content); err != nil { - t.Fatal(err) - } - })) - defer ts.Close() - - r, err := http.NewRequest(http.MethodGet, ts.URL, nil) - if err != nil { - t.Fatal(err) - } - - tr := NewTransport( - http.DefaultTransport, - WithTracer(&tracer), - ) - - c := http.Client{Transport: tr} - res, err := c.Do(r) - if err != nil { - t.Fatal(err) - } - - body, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(body, content) { - t.Fatalf("unexpected content: got %s, expected %s", body, content) - } -} diff --git a/instrumentation/othttp/wrap.go b/instrumentation/othttp/wrap.go deleted file mode 100644 index e1575457b29..00000000000 --- a/instrumentation/othttp/wrap.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package othttp - -import ( - "context" - "io" - "net/http" - - "go.opentelemetry.io/otel/api/propagation" -) - -var _ io.ReadCloser = &bodyWrapper{} - -// bodyWrapper wraps a http.Request.Body (an io.ReadCloser) to track the number -// of bytes read and the last error -type bodyWrapper struct { - io.ReadCloser - record func(n int64) // must not be nil - - read int64 - err error -} - -func (w *bodyWrapper) Read(b []byte) (int, error) { - n, err := w.ReadCloser.Read(b) - n1 := int64(n) - w.read += n1 - w.err = err - w.record(n1) - return n, err -} - -func (w *bodyWrapper) Close() error { - return w.ReadCloser.Close() -} - -var _ http.ResponseWriter = &respWriterWrapper{} - -// respWriterWrapper wraps a http.ResponseWriter in order to track the number of -// bytes written, the last error, and to catch the returned statusCode -// TODO: The wrapped http.ResponseWriter doesn't implement any of the optional -// types (http.Hijacker, http.Pusher, http.CloseNotifier, http.Flusher, etc) -// that may be useful when using it in real life situations. -type respWriterWrapper struct { - http.ResponseWriter - record func(n int64) // must not be nil - - // used to inject the header - ctx context.Context - - props propagation.Propagators - - written int64 - statusCode int - err error - wroteHeader bool -} - -func (w *respWriterWrapper) Header() http.Header { - return w.ResponseWriter.Header() -} - -func (w *respWriterWrapper) Write(p []byte) (int, error) { - if !w.wroteHeader { - w.WriteHeader(http.StatusOK) - } - n, err := w.ResponseWriter.Write(p) - n1 := int64(n) - w.record(n1) - w.written += n1 - w.err = err - return n, err -} - -func (w *respWriterWrapper) WriteHeader(statusCode int) { - if w.wroteHeader { - return - } - w.wroteHeader = true - w.statusCode = statusCode - propagation.InjectHTTP(w.ctx, w.props, w.Header()) - w.ResponseWriter.WriteHeader(statusCode) -} diff --git a/sdk/go.sum b/sdk/go.sum index 6744f1bcad1..f294616bae7 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -13,7 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From 7316e34dd038eb8712f114bb7908ae3ec9df1ce7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2020 08:55:16 -0700 Subject: [PATCH 48/60] Bump google.golang.org/api from 0.29.0 to 0.30.0 in /exporters/trace/jaeger (#1034) * Bump google.golang.org/api in /exporters/trace/jaeger Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.29.0 to 0.30.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.29.0...v0.30.0) Signed-off-by: dependabot[bot] * Auto-fix go.sum changes in dependent modules Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Tyler Yahn --- example/jaeger/go.sum | 74 ++++++++++++++++++++++++++++++++++ exporters/trace/jaeger/go.mod | 2 +- exporters/trace/jaeger/go.sum | 76 +++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 1 deletion(-) diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index bd1dd0ab212..07f20d7b295 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -8,18 +8,27 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -52,12 +61,14 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -65,6 +76,7 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -74,15 +86,20 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -109,14 +126,18 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -146,6 +167,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -157,13 +179,21 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -179,6 +209,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -196,13 +228,20 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -235,7 +274,16 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -249,15 +297,22 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -277,8 +332,19 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c h1:Lq4llNryJoaVFRmvrIwC/ZHH7tNt4tUYIu8+se2aayY= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -290,6 +356,8 @@ google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -297,8 +365,13 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= @@ -313,6 +386,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporters/trace/jaeger/go.mod b/exporters/trace/jaeger/go.mod index a472784b32f..303766f7f85 100644 --- a/exporters/trace/jaeger/go.mod +++ b/exporters/trace/jaeger/go.mod @@ -13,6 +13,6 @@ require ( github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 - google.golang.org/api v0.29.0 + google.golang.org/api v0.30.0 google.golang.org/grpc v1.31.0 ) diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index b3d65368447..d0d00726dba 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -8,18 +8,27 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -55,12 +64,14 @@ github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -68,6 +79,7 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -78,15 +90,20 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -114,14 +131,18 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -153,6 +174,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -164,14 +187,22 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -187,6 +218,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -204,15 +237,22 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -245,8 +285,18 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d h1:szSOL78iTCl0LF1AMjhSWJj8tIM0KixlUUnBtYXsmd8= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -260,15 +310,22 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -288,8 +345,19 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c h1:Lq4llNryJoaVFRmvrIwC/ZHH7tNt4tUYIu8+se2aayY= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -301,6 +369,8 @@ google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -308,8 +378,13 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= @@ -324,6 +399,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 67408889d4cb775a4d4e0b778e44be884cdd035a Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 5 Aug 2020 09:01:00 -0700 Subject: [PATCH 49/60] Add reminder to release contrib after this repo (#1030) --- RELEASING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASING.md b/RELEASING.md index 94ccfee5cb7..0fba7f1756a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -75,3 +75,7 @@ After releasing verify that examples build outside of the repository. The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. This ensures they build with the published release, not the local copy. + +## Contrib Repository + +Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/master/RELEASING.md) that uses this release. From 3780b80214caadae00b28933b88a53e6d31e0803 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 5 Aug 2020 10:31:42 -0700 Subject: [PATCH 50/60] Remove the oterror package (#1026) * Break up the oterror package * Update use of ErrorHandler in project * Update handler naming and comments --- api/global/handler.go | 61 +++++++++++----------- api/global/handler_test.go | 14 ++--- api/metric/api_test.go | 3 +- api/metric/sync.go | 9 ++-- api/oterror/doc.go | 26 --------- api/oterror/errors.go | 22 -------- api/oterror/handler.go => error_handler.go | 6 +-- sdk/metric/controller/push/push_test.go | 2 +- sdk/metric/correct_test.go | 2 +- sdk/trace/trace_test.go | 2 +- 10 files changed, 50 insertions(+), 97 deletions(-) delete mode 100644 api/oterror/doc.go delete mode 100644 api/oterror/errors.go rename api/oterror/handler.go => error_handler.go (88%) diff --git a/api/global/handler.go b/api/global/handler.go index b40eb732046..83f3e523a9a 100644 --- a/api/global/handler.go +++ b/api/global/handler.go @@ -20,35 +20,35 @@ import ( "sync" "sync/atomic" - "go.opentelemetry.io/otel/api/oterror" + "go.opentelemetry.io/otel" ) var ( - // globalHandler provides an oterror.Handler that can be used throughout - // an OpenTelemetry instrumented project. When a user specified Handler - // is registered (`SetHandler`) all calls to `Handle` will be delegated - // to the registered Handler. - globalHandler = &handler{ + // globalErrorHandler provides an ErrorHandler that can be used + // throughout an OpenTelemetry instrumented project. When a user + // specified ErrorHandler is registered (`SetErrorHandler`) all calls to + // `Handle` and will be delegated to the registered ErrorHandler. + globalErrorHandler = &loggingErrorHandler{ l: log.New(os.Stderr, "", log.LstdFlags), } - // delegateHanderOnce ensures that a user provided Handler is only ever - // registered once. - delegateHanderOnce sync.Once + // delegateErrorHandlerOnce ensures that a user provided ErrorHandler is + // only ever registered once. + delegateErrorHandlerOnce sync.Once - // Ensure the handler implements oterror.Handle at build time. - _ oterror.Handler = (*handler)(nil) + // Comiple time check that loggingErrorHandler implements ErrorHandler. + _ otel.ErrorHandler = (*loggingErrorHandler)(nil) ) -// handler logs all errors to STDERR. -type handler struct { +// loggingErrorHandler logs all errors to STDERR. +type loggingErrorHandler struct { delegate atomic.Value l *log.Logger } -// setDelegate sets the handler delegate if one is not already set. -func (h *handler) setDelegate(d oterror.Handler) { +// setDelegate sets the ErrorHandler delegate if one is not already set. +func (h *loggingErrorHandler) setDelegate(d otel.ErrorHandler) { if h.delegate.Load() != nil { // Delegate already registered return @@ -56,37 +56,36 @@ func (h *handler) setDelegate(d oterror.Handler) { h.delegate.Store(d) } -// Handle implements oterror.Handler. -func (h *handler) Handle(err error) { +// Handle implements otel.ErrorHandler. +func (h *loggingErrorHandler) Handle(err error) { if d := h.delegate.Load(); d != nil { - d.(oterror.Handler).Handle(err) + d.(otel.ErrorHandler).Handle(err) return } h.l.Print(err) } -// Handler returns the global Handler instance. If no Handler instance has -// be explicitly set yet, a default Handler is returned that logs to STDERR -// until an Handler is set (all functionality is delegated to the set -// Handler once it is set). -func Handler() oterror.Handler { - return globalHandler +// ErrorHandler returns the global ErrorHandler instance. If no ErrorHandler +// instance has been set (`SetErrorHandler`), the default ErrorHandler which +// logs errors to STDERR is returned. +func ErrorHandler() otel.ErrorHandler { + return globalErrorHandler } -// SetHandler sets the global Handler to be h. -func SetHandler(h oterror.Handler) { - delegateHanderOnce.Do(func() { - current := Handler() +// SetErrorHandler sets the global ErrorHandler to be h. +func SetErrorHandler(h otel.ErrorHandler) { + delegateErrorHandlerOnce.Do(func() { + current := ErrorHandler() if current == h { return } - if internalHandler, ok := current.(*handler); ok { + if internalHandler, ok := current.(*loggingErrorHandler); ok { internalHandler.setDelegate(h) } }) } -// Handle is a convience function for Handler().Handle(err) +// Handle is a convience function for ErrorHandler().Handle(err) func Handle(err error) { - globalHandler.Handle(err) + ErrorHandler().Handle(err) } diff --git a/api/global/handler_test.go b/api/global/handler_test.go index 6e953dd8768..5713e0b8d36 100644 --- a/api/global/handler_test.go +++ b/api/global/handler_test.go @@ -44,20 +44,20 @@ func (l *errLogger) Got() []string { type HandlerTestSuite struct { suite.Suite - origHandler *handler + origHandler *loggingErrorHandler errLogger *errLogger } func (s *HandlerTestSuite) SetupSuite() { s.errLogger = new(errLogger) - s.origHandler = globalHandler - globalHandler = &handler{ + s.origHandler = globalErrorHandler + globalErrorHandler = &loggingErrorHandler{ l: log.New(s.errLogger, "", 0), } } func (s *HandlerTestSuite) TearDownSuite() { - globalHandler = s.origHandler + globalErrorHandler = s.origHandler } func (s *HandlerTestSuite) SetupTest() { @@ -66,7 +66,7 @@ func (s *HandlerTestSuite) SetupTest() { func (s *HandlerTestSuite) TestGlobalHandler() { errs := []string{"one", "two"} - Handler().Handle(errors.New(errs[0])) + ErrorHandler().Handle(errors.New(errs[0])) Handle(errors.New(errs[1])) s.Assert().Equal(errs, s.errLogger.Got()) } @@ -122,10 +122,10 @@ func (s *HandlerTestSuite) TestNoDropsOnDelegate() { // Change to another Handler. We are testing this is loss-less. newErrLogger := new(errLogger) - secondary := &handler{ + secondary := &loggingErrorHandler{ l: log.New(newErrLogger, "", 0), } - SetHandler(secondary) + SetErrorHandler(secondary) s.Require().NoError(wait(pause), "switched to new Handler") // Testing done, stop sending errors. diff --git a/api/metric/api_test.go b/api/metric/api_test.go index 4375a2b3197..66c6758eedd 100644 --- a/api/metric/api_test.go +++ b/api/metric/api_test.go @@ -22,7 +22,6 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/metric" - "go.opentelemetry.io/otel/api/oterror" "go.opentelemetry.io/otel/api/unit" mockTest "go.opentelemetry.io/otel/internal/metric" @@ -392,7 +391,7 @@ func TestWrappedInstrumentError(t *testing.T) { valuerecorder, err := meter.NewInt64ValueRecorder("test.valuerecorder") - require.Equal(t, err, oterror.ErrSDKReturnedNilImpl) + require.Equal(t, err, metric.ErrSDKReturnedNilImpl) require.NotNil(t, valuerecorder.SyncImpl()) observer, err := meter.NewInt64ValueObserver("test.observer", func(_ context.Context, result metric.Int64ObserverResult) {}) diff --git a/api/metric/sync.go b/api/metric/sync.go index 46d8fa02c72..e98def2d2b4 100644 --- a/api/metric/sync.go +++ b/api/metric/sync.go @@ -16,11 +16,14 @@ package metric import ( "context" + "errors" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/oterror" ) +// ErrSDKReturnedNilImpl is returned when a new `MeterImpl` returns nil. +var ErrSDKReturnedNilImpl = errors.New("SDK returned a nil implementation") + // Measurement is used for reporting a synchronous batch of metric // values. Instances of this type should be created by synchronous // instruments (e.g., Int64Counter.Measurement()). @@ -110,7 +113,7 @@ func (h syncBoundInstrument) Unbind() { func checkNewAsync(instrument AsyncImpl, err error) (asyncInstrument, error) { if instrument == nil { if err == nil { - err = oterror.ErrSDKReturnedNilImpl + err = ErrSDKReturnedNilImpl } instrument = NoopAsync{} } @@ -125,7 +128,7 @@ func checkNewAsync(instrument AsyncImpl, err error) (asyncInstrument, error) { func checkNewSync(instrument SyncImpl, err error) (syncInstrument, error) { if instrument == nil { if err == nil { - err = oterror.ErrSDKReturnedNilImpl + err = ErrSDKReturnedNilImpl } // Note: an alternate behavior would be to synthesize a new name // or group all duplicately-named instruments of a certain type diff --git a/api/oterror/doc.go b/api/oterror/doc.go deleted file mode 100644 index 9d4b5f7756f..00000000000 --- a/api/oterror/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/* -* The oterror package provides unified error interactions in OpenTelemetry. -* This includes providing standardized errors common to OpenTelemetry (APIs, -* SDKs, and exporters). Additionally it provides an API for unified error -* handling in OpenTelemetry. -* -* The unified error handling interface is used for any error that -* OpenTelemetry component are not able to remediate on their own, instead -* handling them in a uniform and user-defined way. - */ - -package oterror diff --git a/api/oterror/errors.go b/api/oterror/errors.go deleted file mode 100644 index 06889425352..00000000000 --- a/api/oterror/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package oterror - -import "errors" - -var ( - // ErrSDKReturnedNilImpl is returned when a new `MeterImpl` returns nil. - ErrSDKReturnedNilImpl = errors.New("SDK returned a nil implementation") -) diff --git a/api/oterror/handler.go b/error_handler.go similarity index 88% rename from api/oterror/handler.go rename to error_handler.go index 7f3e54e6462..3c5604917a2 100644 --- a/api/oterror/handler.go +++ b/error_handler.go @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package oterror +package otel -// Handler handles irremediable events. -type Handler interface { +// ErrorHandler handles irremediable events. +type ErrorHandler interface { // Handle handles any error deemed irremediable by an OpenTelemetry // component. Handle(error) diff --git a/sdk/metric/controller/push/push_test.go b/sdk/metric/controller/push/push_test.go index 6749f6f0ed3..ab9f4f55cbf 100644 --- a/sdk/metric/controller/push/push_test.go +++ b/sdk/metric/controller/push/push_test.go @@ -63,7 +63,7 @@ var testHandler *handler func init() { testHandler = new(handler) - global.SetHandler(testHandler) + global.SetErrorHandler(testHandler) } type testExporter struct { diff --git a/sdk/metric/correct_test.go b/sdk/metric/correct_test.go index 9c5292498dc..4809ee5fa44 100644 --- a/sdk/metric/correct_test.go +++ b/sdk/metric/correct_test.go @@ -67,7 +67,7 @@ var testHandler *handler func init() { testHandler = new(handler) - global.SetHandler(testHandler) + global.SetErrorHandler(testHandler) } type correctnessProcessor struct { diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 752c80a6707..41fd30a5bcd 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -52,7 +52,7 @@ func init() { tid, _ = apitrace.IDFromHex("01020304050607080102040810203040") sid, _ = apitrace.SpanIDFromHex("0102040810203040") - global.SetHandler(new(discardHandler)) + global.SetErrorHandler(new(discardHandler)) } func TestTracerFollowsExpectedAPIBehaviour(t *testing.T) { From b40fdf174b96ff4e9baed1964352a5c7c36c320d Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Wed, 5 Aug 2020 16:24:28 -0400 Subject: [PATCH 51/60] Move content length out of basic attributes (#1031) * Move content length out of basic attributes semconv.httpBasicAttributesFromHTTPRequest() was including the request's content length, which is a high-cardinality label. It ended up in metric labels through the use of that function by semconv.HTTPServerMetricAttributesFromHTTPRequest(). * Add CHANGELOG entry Co-authored-by: Tyler Yahn --- CHANGELOG.md | 4 ++++ semconv/http.go | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2316885b77b..0f6b193aa1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) +### Fixed + +- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) + ## [0.10.0] - 2020-07-29 This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. diff --git a/semconv/http.go b/semconv/http.go index 785581c6234..b82fef93f65 100644 --- a/semconv/http.go +++ b/semconv/http.go @@ -151,11 +151,15 @@ func httpCommonAttributesFromHTTPRequest(request *http.Request) []kv.KeyValue { if ua := request.UserAgent(); ua != "" { attrs = append(attrs, HTTPUserAgentKey.String(ua)) } + if request.ContentLength > 0 { + attrs = append(attrs, HTTPRequestContentLengthKey.Int64(request.ContentLength)) + } return append(attrs, httpBasicAttributesFromHTTPRequest(request)...) } func httpBasicAttributesFromHTTPRequest(request *http.Request) []kv.KeyValue { + // as these attributes are used by HTTPServerMetricAttributesFromHTTPRequest, they should be low-cardinality attrs := []kv.KeyValue{} if request.TLS != nil { @@ -177,9 +181,6 @@ func httpBasicAttributesFromHTTPRequest(request *http.Request) []kv.KeyValue { if flavor != "" { attrs = append(attrs, HTTPFlavorKey.String(flavor)) } - if request.ContentLength > 0 { - attrs = append(attrs, HTTPRequestContentLengthKey.Int64(request.ContentLength)) - } return attrs } From ccfa2e7bdf7b784b9377de4e61058efac9f5a04c Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Thu, 6 Aug 2020 00:42:00 +0200 Subject: [PATCH 52/60] Fix instrumentation lib version in spanDataToThrift (#1037) * Fix instrumentation lib version in spanDataToThrift * Update CHANGELOG.md * Use test value for lib version in accordance with the spec Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + exporters/trace/jaeger/jaeger.go | 2 +- exporters/trace/jaeger/jaeger_test.go | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6b193aa1a..7d820ccf850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Fixed - The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) +- Correct instrumentation version tag in Jaeger exporter. (#1037) ## [0.10.0] - 2020-07-29 diff --git a/exporters/trace/jaeger/jaeger.go b/exporters/trace/jaeger/jaeger.go index 281adc884d0..13ecafe80c6 100644 --- a/exporters/trace/jaeger/jaeger.go +++ b/exporters/trace/jaeger/jaeger.go @@ -232,7 +232,7 @@ func spanDataToThrift(data *export.SpanData) *gen.Span { if il := data.InstrumentationLibrary; il.Name != "" { tags = append(tags, getStringTag("instrumentation.name", il.Name)) if il.Version != "" { - tags = append(tags, getStringTag("instrumentation.version", il.Name)) + tags = append(tags, getStringTag("instrumentation.version", il.Version)) } } diff --git a/exporters/trace/jaeger/jaeger_test.go b/exporters/trace/jaeger/jaeger_test.go index df94e457444..944bf540fc5 100644 --- a/exporters/trace/jaeger/jaeger_test.go +++ b/exporters/trace/jaeger/jaeger_test.go @@ -36,6 +36,7 @@ import ( gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger" ottest "go.opentelemetry.io/otel/internal/testing" export "go.opentelemetry.io/otel/sdk/export/trace" + "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" ) @@ -373,6 +374,8 @@ func Test_spanDataToThrift(t *testing.T) { spanKind := "client" rv1 := "rv11" rv2 := int64(5) + instrLibName := "instrumentation-library" + instrLibVersion := "semver:1.0.0" tests := []struct { name string @@ -410,6 +413,10 @@ func Test_spanDataToThrift(t *testing.T) { StatusMessage: statusMessage, SpanKind: apitrace.SpanKindClient, Resource: resource.New(kv.String("rk1", rv1), kv.Int64("rk2", rv2)), + InstrumentationLibrary: instrumentation.Library{ + Name: instrLibName, + Version: instrLibVersion, + }, }, want: &gen.Span{ TraceIdLow: 651345242494996240, @@ -423,6 +430,8 @@ func Test_spanDataToThrift(t *testing.T) { {Key: "key", VType: gen.TagType_STRING, VStr: &keyValue}, {Key: "uint", VType: gen.TagType_LONG, VLong: &uintValue}, {Key: "error", VType: gen.TagType_BOOL, VBool: &boolTrue}, + {Key: "instrumentation.name", VType: gen.TagType_STRING, VStr: &instrLibName}, + {Key: "instrumentation.version", VType: gen.TagType_STRING, VStr: &instrLibVersion}, {Key: "status.code", VType: gen.TagType_LONG, VLong: &statusCodeValue}, {Key: "status.message", VType: gen.TagType_STRING, VStr: &statusMessage}, {Key: "span.kind", VType: gen.TagType_STRING, VStr: &spanKind}, From f0620dc0ad50f7f6e8cba754fdb2a433139a813b Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 5 Aug 2020 20:24:39 -0700 Subject: [PATCH 53/60] Move grpctrace to contrib repo (#1027) * Remove grpctrace package This is being moved to the contrib repo with https://github.com/open-telemetry/opentelemetry-go-contrib/pull/189 as part of #976. * Update Changelog * Remove the grpc example Moved to contrib repo * Fix spelling error * Update Changelog --- CHANGELOG.md | 5 + example/grpc/README.md | 28 -- example/grpc/api/hello-service.pb.go | 354 -------------- example/grpc/api/hello-service.proto | 34 -- example/grpc/client/main.go | 182 ------- example/grpc/config/config.go | 39 -- example/grpc/go.mod | 18 - example/grpc/go.sum | 104 ---- example/grpc/server/main.go | 128 ----- .../grpctrace/example_interceptor_test.go | 51 -- instrumentation/grpctrace/grpctrace.go | 95 ---- instrumentation/grpctrace/interceptor.go | 459 ------------------ instrumentation/grpctrace/interceptor_test.go | 428 ---------------- 13 files changed, 5 insertions(+), 1920 deletions(-) delete mode 100644 example/grpc/README.md delete mode 100644 example/grpc/api/hello-service.pb.go delete mode 100644 example/grpc/api/hello-service.proto delete mode 100644 example/grpc/client/main.go delete mode 100644 example/grpc/config/config.go delete mode 100644 example/grpc/go.mod delete mode 100644 example/grpc/go.sum delete mode 100644 example/grpc/server/main.go delete mode 100644 instrumentation/grpctrace/example_interceptor_test.go delete mode 100644 instrumentation/grpctrace/grpctrace.go delete mode 100644 instrumentation/grpctrace/interceptor.go delete mode 100644 instrumentation/grpctrace/interceptor_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d820ccf850..a3bb4759ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) +### Removed + +- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. + This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) + ### Fixed - The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) diff --git a/example/grpc/README.md b/example/grpc/README.md deleted file mode 100644 index ff53b6cc7bc..00000000000 --- a/example/grpc/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# gRPC Tracing Example - -Traces client and server calls via interceptors. - -### Compile .proto - -Only required if the service definition (.proto) changes. - -```sh -cd ./example/grpc - -# protobuf v1.3.2 -protoc -I api --go_out=plugins=grpc,paths=source_relative:./api api/hello-service.proto -``` - -### Run server - -```sh -cd ./example/grpc - -go run ./server -``` - -### Run client - -```sh -go run ./client -``` \ No newline at end of file diff --git a/example/grpc/api/hello-service.pb.go b/example/grpc/api/hello-service.pb.go deleted file mode 100644 index e6ec648f829..00000000000 --- a/example/grpc/api/hello-service.pb.go +++ /dev/null @@ -1,354 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hello-service.proto - -/* -Package api is a generated protocol buffer package. - -It is generated from these files: - hello-service.proto - -It has these top-level messages: - HelloRequest - HelloResponse -*/ -package api - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type HelloRequest struct { - Greeting string `protobuf:"bytes,1,opt,name=greeting" json:"greeting,omitempty"` -} - -func (m *HelloRequest) Reset() { *m = HelloRequest{} } -func (m *HelloRequest) String() string { return proto.CompactTextString(m) } -func (*HelloRequest) ProtoMessage() {} -func (*HelloRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *HelloRequest) GetGreeting() string { - if m != nil { - return m.Greeting - } - return "" -} - -type HelloResponse struct { - Reply string `protobuf:"bytes,1,opt,name=reply" json:"reply,omitempty"` -} - -func (m *HelloResponse) Reset() { *m = HelloResponse{} } -func (m *HelloResponse) String() string { return proto.CompactTextString(m) } -func (*HelloResponse) ProtoMessage() {} -func (*HelloResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *HelloResponse) GetReply() string { - if m != nil { - return m.Reply - } - return "" -} - -func init() { - proto.RegisterType((*HelloRequest)(nil), "api.HelloRequest") - proto.RegisterType((*HelloResponse)(nil), "api.HelloResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for HelloService service - -type HelloServiceClient interface { - SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) - SayHelloServerStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (HelloService_SayHelloServerStreamClient, error) - SayHelloClientStream(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloClientStreamClient, error) - SayHelloBidiStream(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloBidiStreamClient, error) -} - -type helloServiceClient struct { - cc *grpc.ClientConn -} - -func NewHelloServiceClient(cc *grpc.ClientConn) HelloServiceClient { - return &helloServiceClient{cc} -} - -func (c *helloServiceClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { - out := new(HelloResponse) - err := grpc.Invoke(ctx, "/api.HelloService/SayHello", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *helloServiceClient) SayHelloServerStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (HelloService_SayHelloServerStreamClient, error) { - stream, err := grpc.NewClientStream(ctx, &_HelloService_serviceDesc.Streams[0], c.cc, "/api.HelloService/SayHelloServerStream", opts...) - if err != nil { - return nil, err - } - x := &helloServiceSayHelloServerStreamClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type HelloService_SayHelloServerStreamClient interface { - Recv() (*HelloResponse, error) - grpc.ClientStream -} - -type helloServiceSayHelloServerStreamClient struct { - grpc.ClientStream -} - -func (x *helloServiceSayHelloServerStreamClient) Recv() (*HelloResponse, error) { - m := new(HelloResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *helloServiceClient) SayHelloClientStream(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloClientStreamClient, error) { - stream, err := grpc.NewClientStream(ctx, &_HelloService_serviceDesc.Streams[1], c.cc, "/api.HelloService/SayHelloClientStream", opts...) - if err != nil { - return nil, err - } - x := &helloServiceSayHelloClientStreamClient{stream} - return x, nil -} - -type HelloService_SayHelloClientStreamClient interface { - Send(*HelloRequest) error - CloseAndRecv() (*HelloResponse, error) - grpc.ClientStream -} - -type helloServiceSayHelloClientStreamClient struct { - grpc.ClientStream -} - -func (x *helloServiceSayHelloClientStreamClient) Send(m *HelloRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *helloServiceSayHelloClientStreamClient) CloseAndRecv() (*HelloResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(HelloResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *helloServiceClient) SayHelloBidiStream(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloBidiStreamClient, error) { - stream, err := grpc.NewClientStream(ctx, &_HelloService_serviceDesc.Streams[2], c.cc, "/api.HelloService/SayHelloBidiStream", opts...) - if err != nil { - return nil, err - } - x := &helloServiceSayHelloBidiStreamClient{stream} - return x, nil -} - -type HelloService_SayHelloBidiStreamClient interface { - Send(*HelloRequest) error - Recv() (*HelloResponse, error) - grpc.ClientStream -} - -type helloServiceSayHelloBidiStreamClient struct { - grpc.ClientStream -} - -func (x *helloServiceSayHelloBidiStreamClient) Send(m *HelloRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *helloServiceSayHelloBidiStreamClient) Recv() (*HelloResponse, error) { - m := new(HelloResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// Server API for HelloService service - -type HelloServiceServer interface { - SayHello(context.Context, *HelloRequest) (*HelloResponse, error) - SayHelloServerStream(*HelloRequest, HelloService_SayHelloServerStreamServer) error - SayHelloClientStream(HelloService_SayHelloClientStreamServer) error - SayHelloBidiStream(HelloService_SayHelloBidiStreamServer) error -} - -func RegisterHelloServiceServer(s *grpc.Server, srv HelloServiceServer) { - s.RegisterService(&_HelloService_serviceDesc, srv) -} - -func _HelloService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HelloRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HelloServiceServer).SayHello(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.HelloService/SayHello", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HelloServiceServer).SayHello(ctx, req.(*HelloRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HelloService_SayHelloServerStream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(HelloRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(HelloServiceServer).SayHelloServerStream(m, &helloServiceSayHelloServerStreamServer{stream}) -} - -type HelloService_SayHelloServerStreamServer interface { - Send(*HelloResponse) error - grpc.ServerStream -} - -type helloServiceSayHelloServerStreamServer struct { - grpc.ServerStream -} - -func (x *helloServiceSayHelloServerStreamServer) Send(m *HelloResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _HelloService_SayHelloClientStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(HelloServiceServer).SayHelloClientStream(&helloServiceSayHelloClientStreamServer{stream}) -} - -type HelloService_SayHelloClientStreamServer interface { - SendAndClose(*HelloResponse) error - Recv() (*HelloRequest, error) - grpc.ServerStream -} - -type helloServiceSayHelloClientStreamServer struct { - grpc.ServerStream -} - -func (x *helloServiceSayHelloClientStreamServer) SendAndClose(m *HelloResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *helloServiceSayHelloClientStreamServer) Recv() (*HelloRequest, error) { - m := new(HelloRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _HelloService_SayHelloBidiStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(HelloServiceServer).SayHelloBidiStream(&helloServiceSayHelloBidiStreamServer{stream}) -} - -type HelloService_SayHelloBidiStreamServer interface { - Send(*HelloResponse) error - Recv() (*HelloRequest, error) - grpc.ServerStream -} - -type helloServiceSayHelloBidiStreamServer struct { - grpc.ServerStream -} - -func (x *helloServiceSayHelloBidiStreamServer) Send(m *HelloResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *helloServiceSayHelloBidiStreamServer) Recv() (*HelloRequest, error) { - m := new(HelloRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _HelloService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.HelloService", - HandlerType: (*HelloServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SayHello", - Handler: _HelloService_SayHello_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "SayHelloServerStream", - Handler: _HelloService_SayHelloServerStream_Handler, - ServerStreams: true, - }, - { - StreamName: "SayHelloClientStream", - Handler: _HelloService_SayHelloClientStream_Handler, - ClientStreams: true, - }, - { - StreamName: "SayHelloBidiStream", - Handler: _HelloService_SayHelloBidiStream_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "hello-service.proto", -} - -func init() { proto.RegisterFile("hello-service.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 192 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0x48, 0xcd, 0xc9, - 0xc9, 0xd7, 0x2d, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0x62, 0x4e, 0x2c, 0xc8, 0x54, 0xd2, 0xe2, 0xe2, 0xf1, 0x00, 0xc9, 0x05, 0xa5, 0x16, 0x96, 0xa6, - 0x16, 0x97, 0x08, 0x49, 0x71, 0x71, 0xa4, 0x17, 0xa5, 0xa6, 0x96, 0x64, 0xe6, 0xa5, 0x4b, 0x30, - 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xf9, 0x4a, 0xaa, 0x5c, 0xbc, 0x50, 0xb5, 0xc5, 0x05, 0xf9, - 0x79, 0xc5, 0xa9, 0x42, 0x22, 0x5c, 0xac, 0x45, 0xa9, 0x05, 0x39, 0x95, 0x50, 0x95, 0x10, 0x8e, - 0x51, 0x0b, 0x13, 0xd4, 0xcc, 0x60, 0x88, 0x75, 0x42, 0x86, 0x5c, 0x1c, 0xc1, 0x89, 0x95, 0x60, - 0x21, 0x21, 0x41, 0xbd, 0xc4, 0x82, 0x4c, 0x3d, 0x64, 0x2b, 0xa5, 0x84, 0x90, 0x85, 0xa0, 0x26, - 0xdb, 0x73, 0x89, 0xc0, 0xb4, 0x80, 0x4c, 0x49, 0x2d, 0x0a, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0x25, - 0x52, 0xbb, 0x01, 0x23, 0xb2, 0x01, 0xce, 0x39, 0x99, 0xa9, 0x79, 0x25, 0x24, 0x19, 0xa0, 0x01, - 0x32, 0x40, 0x08, 0x66, 0x80, 0x53, 0x66, 0x4a, 0x26, 0x89, 0xda, 0x0d, 0x18, 0x93, 0xd8, 0xc0, - 0xa1, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xd5, 0x1c, 0xd2, 0x7c, 0x01, 0x00, 0x00, -} diff --git a/example/grpc/api/hello-service.proto b/example/grpc/api/hello-service.proto deleted file mode 100644 index 699645127e7..00000000000 --- a/example/grpc/api/hello-service.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package api; - -service HelloService { - rpc SayHello (HelloRequest) returns (HelloResponse); - - rpc SayHelloServerStream (HelloRequest) returns (stream HelloResponse); - - rpc SayHelloClientStream (stream HelloRequest) returns (HelloResponse); - - rpc SayHelloBidiStream (stream HelloRequest) returns (stream HelloResponse); -} - -message HelloRequest { - string greeting = 1; -} - -message HelloResponse { - string reply = 1; -} diff --git a/example/grpc/client/main.go b/example/grpc/client/main.go deleted file mode 100644 index 12d07e60ed6..00000000000 --- a/example/grpc/client/main.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "io" - "log" - "time" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/example/grpc/api" - "go.opentelemetry.io/otel/example/grpc/config" - "go.opentelemetry.io/otel/instrumentation/grpctrace" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -func main() { - config.Init() - - var conn *grpc.ClientConn - conn, err := grpc.Dial(":7777", grpc.WithInsecure(), - grpc.WithUnaryInterceptor(grpctrace.UnaryClientInterceptor(global.Tracer(""))), - grpc.WithStreamInterceptor(grpctrace.StreamClientInterceptor(global.Tracer(""))), - ) - - if err != nil { - log.Fatalf("did not connect: %s", err) - } - defer func() { _ = conn.Close() }() - - c := api.NewHelloServiceClient(conn) - - callSayHello(c) - callSayHelloClientStream(c) - callSayHelloServerStream(c) - callSayHelloBidiStream(c) - - time.Sleep(10 * time.Millisecond) -} - -func callSayHello(c api.HelloServiceClient) { - md := metadata.Pairs( - "timestamp", time.Now().Format(time.StampNano), - "client-id", "web-api-client-us-east-1", - "user-id", "some-test-user-id", - ) - - ctx := metadata.NewOutgoingContext(context.Background(), md) - response, err := c.SayHello(ctx, &api.HelloRequest{Greeting: "World"}) - if err != nil { - log.Fatalf("Error when calling SayHello: %s", err) - } - log.Printf("Response from server: %s", response.Reply) -} - -func callSayHelloClientStream(c api.HelloServiceClient) { - md := metadata.Pairs( - "timestamp", time.Now().Format(time.StampNano), - "client-id", "web-api-client-us-east-1", - "user-id", "some-test-user-id", - ) - - ctx := metadata.NewOutgoingContext(context.Background(), md) - stream, err := c.SayHelloClientStream(ctx) - if err != nil { - log.Fatalf("Error when opening SayHelloClientStream: %s", err) - } - - for i := 0; i < 5; i++ { - err := stream.Send(&api.HelloRequest{Greeting: "World"}) - - time.Sleep(time.Duration(i*50) * time.Millisecond) - - if err != nil { - log.Fatalf("Error when sending to SayHelloClientStream: %s", err) - } - } - - response, err := stream.CloseAndRecv() - if err != nil { - log.Fatalf("Error when closing SayHelloClientStream: %s", err) - } - - log.Printf("Response from server: %s", response.Reply) -} - -func callSayHelloServerStream(c api.HelloServiceClient) { - md := metadata.Pairs( - "timestamp", time.Now().Format(time.StampNano), - "client-id", "web-api-client-us-east-1", - "user-id", "some-test-user-id", - ) - - ctx := metadata.NewOutgoingContext(context.Background(), md) - stream, err := c.SayHelloServerStream(ctx, &api.HelloRequest{Greeting: "World"}) - if err != nil { - log.Fatalf("Error when opening SayHelloServerStream: %s", err) - } - - for { - response, err := stream.Recv() - if err == io.EOF { - break - } else if err != nil { - log.Fatalf("Error when receiving from SayHelloServerStream: %s", err) - } - - log.Printf("Response from server: %s", response.Reply) - time.Sleep(50 * time.Millisecond) - } -} - -func callSayHelloBidiStream(c api.HelloServiceClient) { - md := metadata.Pairs( - "timestamp", time.Now().Format(time.StampNano), - "client-id", "web-api-client-us-east-1", - "user-id", "some-test-user-id", - ) - - ctx := metadata.NewOutgoingContext(context.Background(), md) - stream, err := c.SayHelloBidiStream(ctx) - if err != nil { - log.Fatalf("Error when opening SayHelloBidiStream: %s", err) - } - - serverClosed := make(chan struct{}) - clientClosed := make(chan struct{}) - - go func() { - for i := 0; i < 5; i++ { - err := stream.Send(&api.HelloRequest{Greeting: "World"}) - - if err != nil { - log.Fatalf("Error when sending to SayHelloBidiStream: %s", err) - } - - time.Sleep(50 * time.Millisecond) - } - - err := stream.CloseSend() - if err != nil { - log.Fatalf("Error when closing SayHelloBidiStream: %s", err) - } - - clientClosed <- struct{}{} - }() - - go func() { - for { - response, err := stream.Recv() - if err == io.EOF { - break - } else if err != nil { - log.Fatalf("Error when receiving from SayHelloBidiStream: %s", err) - } - - log.Printf("Response from server: %s", response.Reply) - time.Sleep(50 * time.Millisecond) - } - - serverClosed <- struct{}{} - }() - - // Wait until client and server both closed the connection. - <-clientClosed - <-serverClosed -} diff --git a/example/grpc/config/config.go b/example/grpc/config/config.go deleted file mode 100644 index 9c1034e7ebf..00000000000 --- a/example/grpc/config/config.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "log" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporters/stdout" - sdktrace "go.opentelemetry.io/otel/sdk/trace" -) - -// Init configures an OpenTelemetry exporter and trace provider -func Init() { - exporter, err := stdout.NewExporter(stdout.WithPrettyPrint()) - if err != nil { - log.Fatal(err) - } - tp, err := sdktrace.NewProvider( - sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}), - sdktrace.WithSyncer(exporter), - ) - if err != nil { - log.Fatal(err) - } - global.SetTraceProvider(tp) -} diff --git a/example/grpc/go.mod b/example/grpc/go.mod deleted file mode 100644 index b57d90ea3aa..00000000000 --- a/example/grpc/go.mod +++ /dev/null @@ -1,18 +0,0 @@ -module go.opentelemetry.io/otel/example/grpc - -go 1.14 - -replace ( - go.opentelemetry.io/otel => ../.. - go.opentelemetry.io/otel/exporters/stdout => ../../exporters/stdout - go.opentelemetry.io/otel/sdk => ../../sdk -) - -require ( - github.com/golang/protobuf v1.4.2 - go.opentelemetry.io/otel v0.10.0 - go.opentelemetry.io/otel/exporters/stdout v0.10.0 - go.opentelemetry.io/otel/sdk v0.10.0 - golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 - google.golang.org/grpc v1.31.0 -) diff --git a/example/grpc/go.sum b/example/grpc/go.sum deleted file mode 100644 index 66c206c15ec..00000000000 --- a/example/grpc/go.sum +++ /dev/null @@ -1,104 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/sketches-go v0.0.1 h1:RtG+76WKgZuz6FIaGsjoPePmadDBkuD/KC6+ZWu78b8= -github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/grpc/server/main.go b/example/grpc/server/main.go deleted file mode 100644 index 04e8a00efff..00000000000 --- a/example/grpc/server/main.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "io" - "log" - "net" - "time" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/example/grpc/api" - "go.opentelemetry.io/otel/example/grpc/config" - "go.opentelemetry.io/otel/instrumentation/grpctrace" - - "google.golang.org/grpc" -) - -const ( - port = ":7777" -) - -// server is used to implement api.HelloServiceServer -type server struct { - api.HelloServiceServer -} - -// SayHello implements api.HelloServiceServer -func (s *server) SayHello(ctx context.Context, in *api.HelloRequest) (*api.HelloResponse, error) { - log.Printf("Received: %v\n", in.GetGreeting()) - time.Sleep(50 * time.Millisecond) - - return &api.HelloResponse{Reply: "Hello " + in.Greeting}, nil -} - -func (s *server) SayHelloServerStream(in *api.HelloRequest, out api.HelloService_SayHelloServerStreamServer) error { - log.Printf("Received: %v\n", in.GetGreeting()) - - for i := 0; i < 5; i++ { - err := out.Send(&api.HelloResponse{Reply: "Hello " + in.Greeting}) - if err != nil { - return err - } - - time.Sleep(time.Duration(i*50) * time.Millisecond) - } - - return nil -} - -func (s *server) SayHelloClientStream(stream api.HelloService_SayHelloClientStreamServer) error { - i := 0 - - for { - in, err := stream.Recv() - - if err == io.EOF { - break - } else if err != nil { - log.Printf("Non EOF error: %v\n", err) - return err - } - - log.Printf("Received: %v\n", in.GetGreeting()) - i++ - } - - time.Sleep(50 * time.Millisecond) - - return stream.SendAndClose(&api.HelloResponse{Reply: fmt.Sprintf("Hello (%v times)", i)}) -} - -func (s *server) SayHelloBidiStream(stream api.HelloService_SayHelloBidiStreamServer) error { - for { - in, err := stream.Recv() - - if err == io.EOF { - break - } else if err != nil { - log.Printf("Non EOF error: %v\n", err) - return err - } - - time.Sleep(50 * time.Millisecond) - - log.Printf("Received: %v\n", in.GetGreeting()) - err = stream.Send(&api.HelloResponse{Reply: "Hello " + in.Greeting}) - - if err != nil { - return err - } - } - - return nil -} - -func main() { - config.Init() - - lis, err := net.Listen("tcp", port) - if err != nil { - log.Fatalf("failed to listen: %v", err) - } - - s := grpc.NewServer( - grpc.UnaryInterceptor(grpctrace.UnaryServerInterceptor(global.Tracer(""))), - grpc.StreamInterceptor(grpctrace.StreamServerInterceptor(global.Tracer(""))), - ) - - api.RegisterHelloServiceServer(s, &server{}) - if err := s.Serve(lis); err != nil { - log.Fatalf("failed to serve: %v", err) - } -} diff --git a/instrumentation/grpctrace/example_interceptor_test.go b/instrumentation/grpctrace/example_interceptor_test.go deleted file mode 100644 index 7310483df0e..00000000000 --- a/instrumentation/grpctrace/example_interceptor_test.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package grpctrace - -import ( - "google.golang.org/grpc" - - "go.opentelemetry.io/otel/api/global" -) - -func ExampleStreamClientInterceptor() { - tracer := global.Tracer("client-instrumentation") - _, _ = grpc.Dial( - "localhost", - grpc.WithStreamInterceptor(StreamClientInterceptor(tracer)), - ) -} - -func ExampleUnaryClientInterceptor() { - tracer := global.Tracer("client-instrumentation") - _, _ = grpc.Dial( - "localhost", - grpc.WithUnaryInterceptor(UnaryClientInterceptor(tracer)), - ) -} - -func ExampleStreamServerInterceptor() { - tracer := global.Tracer("server-instrumentation") - _ = grpc.NewServer( - grpc.StreamInterceptor(StreamServerInterceptor(tracer)), - ) -} - -func ExampleUnaryServerInterceptor() { - tracer := global.Tracer("server-instrumentation") - _ = grpc.NewServer( - grpc.UnaryInterceptor(UnaryServerInterceptor(tracer)), - ) -} diff --git a/instrumentation/grpctrace/grpctrace.go b/instrumentation/grpctrace/grpctrace.go deleted file mode 100644 index 3b536fad939..00000000000 --- a/instrumentation/grpctrace/grpctrace.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package grpctrace - -import ( - "context" - - "google.golang.org/grpc/metadata" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/propagation" - "go.opentelemetry.io/otel/api/trace" -) - -// Option is a function that allows configuration of the grpctrace Extract() -// and Inject() functions -type Option func(*config) - -type config struct { - propagators propagation.Propagators -} - -func newConfig(opts []Option) *config { - c := &config{propagators: global.Propagators()} - for _, o := range opts { - o(c) - } - return c -} - -// WithPropagators sets the propagators to use for Extraction and Injection -func WithPropagators(props propagation.Propagators) Option { - return func(c *config) { - c.propagators = props - } -} - -type metadataSupplier struct { - metadata *metadata.MD -} - -func (s *metadataSupplier) Get(key string) string { - values := s.metadata.Get(key) - if len(values) == 0 { - return "" - } - return values[0] -} - -func (s *metadataSupplier) Set(key string, value string) { - s.metadata.Set(key, value) -} - -// Inject injects correlation context and span context into the gRPC -// metadata object. This function is meant to be used on outgoing -// requests. -func Inject(ctx context.Context, metadata *metadata.MD, opts ...Option) { - c := newConfig(opts) - propagation.InjectHTTP(ctx, c.propagators, &metadataSupplier{ - metadata: metadata, - }) -} - -// Extract returns the correlation context and span context that -// another service encoded in the gRPC metadata object with Inject. -// This function is meant to be used on incoming requests. -func Extract(ctx context.Context, metadata *metadata.MD, opts ...Option) ([]kv.KeyValue, trace.SpanContext) { - c := newConfig(opts) - ctx = propagation.ExtractHTTP(ctx, c.propagators, &metadataSupplier{ - metadata: metadata, - }) - - spanContext := trace.RemoteSpanContextFromContext(ctx) - var correlationCtxKVs []kv.KeyValue - correlation.MapFromContext(ctx).Foreach(func(kv kv.KeyValue) bool { - correlationCtxKVs = append(correlationCtxKVs, kv) - return true - }) - - return correlationCtxKVs, spanContext -} diff --git a/instrumentation/grpctrace/interceptor.go b/instrumentation/grpctrace/interceptor.go deleted file mode 100644 index 7e6df7fbd01..00000000000 --- a/instrumentation/grpctrace/interceptor.go +++ /dev/null @@ -1,459 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package grpctrace - -// gRPC tracing middleware -// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/rpc.md -import ( - "context" - "io" - "net" - "strings" - - "go.opentelemetry.io/otel/semconv" - - "github.com/golang/protobuf/proto" //nolint:staticcheck - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/peer" - "google.golang.org/grpc/status" - - "go.opentelemetry.io/otel/api/correlation" - "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/trace" -) - -type messageType kv.KeyValue - -// Event adds an event of the messageType to the span associated with the -// passed context with id and size (if message is a proto message). -func (m messageType) Event(ctx context.Context, id int, message interface{}) { - span := trace.SpanFromContext(ctx) - if p, ok := message.(proto.Message); ok { - span.AddEvent(ctx, "message", - kv.KeyValue(m), - semconv.RPCMessageIDKey.Int(id), - semconv.RPCMessageUncompressedSizeKey.Int(proto.Size(p)), - ) - } else { - span.AddEvent(ctx, "message", - kv.KeyValue(m), - semconv.RPCMessageIDKey.Int(id), - ) - } -} - -var ( - messageSent = messageType(semconv.RPCMessageTypeSent) - messageReceived = messageType(semconv.RPCMessageTypeReceived) -) - -// UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable -// for use in a grpc.Dial call. -func UnaryClientInterceptor(tracer trace.Tracer, opts ...Option) grpc.UnaryClientInterceptor { - return func( - ctx context.Context, - method string, - req, reply interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - callOpts ...grpc.CallOption, - ) error { - requestMetadata, _ := metadata.FromOutgoingContext(ctx) - metadataCopy := requestMetadata.Copy() - - name, attr := spanInfo(method, cc.Target()) - var span trace.Span - ctx, span = tracer.Start( - ctx, - name, - trace.WithSpanKind(trace.SpanKindClient), - trace.WithAttributes(attr...), - ) - defer span.End() - - Inject(ctx, &metadataCopy, opts...) - ctx = metadata.NewOutgoingContext(ctx, metadataCopy) - - messageSent.Event(ctx, 1, req) - - err := invoker(ctx, method, req, reply, cc, callOpts...) - - messageReceived.Event(ctx, 1, reply) - - if err != nil { - s, _ := status.FromError(err) - span.SetStatus(s.Code(), s.Message()) - } - - return err - } -} - -type streamEventType int - -type streamEvent struct { - Type streamEventType - Err error -} - -const ( - closeEvent streamEventType = iota - receiveEndEvent - errorEvent -) - -// clientStream wraps around the embedded grpc.ClientStream, and intercepts the RecvMsg and -// SendMsg method call. -type clientStream struct { - grpc.ClientStream - - desc *grpc.StreamDesc - events chan streamEvent - eventsDone chan struct{} - finished chan error - - receivedMessageID int - sentMessageID int -} - -var _ = proto.Marshal - -func (w *clientStream) RecvMsg(m interface{}) error { - err := w.ClientStream.RecvMsg(m) - - if err == nil && !w.desc.ServerStreams { - w.sendStreamEvent(receiveEndEvent, nil) - } else if err == io.EOF { - w.sendStreamEvent(receiveEndEvent, nil) - } else if err != nil { - w.sendStreamEvent(errorEvent, err) - } else { - w.receivedMessageID++ - messageReceived.Event(w.Context(), w.receivedMessageID, m) - } - - return err -} - -func (w *clientStream) SendMsg(m interface{}) error { - err := w.ClientStream.SendMsg(m) - - w.sentMessageID++ - messageSent.Event(w.Context(), w.sentMessageID, m) - - if err != nil { - w.sendStreamEvent(errorEvent, err) - } - - return err -} - -func (w *clientStream) Header() (metadata.MD, error) { - md, err := w.ClientStream.Header() - - if err != nil { - w.sendStreamEvent(errorEvent, err) - } - - return md, err -} - -func (w *clientStream) CloseSend() error { - err := w.ClientStream.CloseSend() - - if err != nil { - w.sendStreamEvent(errorEvent, err) - } else { - w.sendStreamEvent(closeEvent, nil) - } - - return err -} - -const ( - clientClosedState byte = 1 << iota - receiveEndedState -) - -func wrapClientStream(s grpc.ClientStream, desc *grpc.StreamDesc) *clientStream { - events := make(chan streamEvent) - eventsDone := make(chan struct{}) - finished := make(chan error) - - go func() { - defer close(eventsDone) - - // Both streams have to be closed - state := byte(0) - - for event := range events { - switch event.Type { - case closeEvent: - state |= clientClosedState - case receiveEndEvent: - state |= receiveEndedState - case errorEvent: - finished <- event.Err - return - } - - if state == clientClosedState|receiveEndedState { - finished <- nil - return - } - } - }() - - return &clientStream{ - ClientStream: s, - desc: desc, - events: events, - eventsDone: eventsDone, - finished: finished, - } -} - -func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) { - select { - case <-w.eventsDone: - case w.events <- streamEvent{Type: eventType, Err: err}: - } -} - -// StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable -// for use in a grpc.Dial call. -func StreamClientInterceptor(tracer trace.Tracer, opts ...Option) grpc.StreamClientInterceptor { - return func( - ctx context.Context, - desc *grpc.StreamDesc, - cc *grpc.ClientConn, - method string, - streamer grpc.Streamer, - callOpts ...grpc.CallOption, - ) (grpc.ClientStream, error) { - requestMetadata, _ := metadata.FromOutgoingContext(ctx) - metadataCopy := requestMetadata.Copy() - - name, attr := spanInfo(method, cc.Target()) - var span trace.Span - ctx, span = tracer.Start( - ctx, - name, - trace.WithSpanKind(trace.SpanKindClient), - trace.WithAttributes(attr...), - ) - - Inject(ctx, &metadataCopy, opts...) - ctx = metadata.NewOutgoingContext(ctx, metadataCopy) - - s, err := streamer(ctx, desc, cc, method, callOpts...) - stream := wrapClientStream(s, desc) - - go func() { - if err == nil { - err = <-stream.finished - } - - if err != nil { - s, _ := status.FromError(err) - span.SetStatus(s.Code(), s.Message()) - } - - span.End() - }() - - return stream, err - } -} - -// UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable -// for use in a grpc.NewServer call. -func UnaryServerInterceptor(tracer trace.Tracer, opts ...Option) grpc.UnaryServerInterceptor { - return func( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, - ) (interface{}, error) { - requestMetadata, _ := metadata.FromIncomingContext(ctx) - metadataCopy := requestMetadata.Copy() - - entries, spanCtx := Extract(ctx, &metadataCopy, opts...) - ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{ - MultiKV: entries, - })) - - name, attr := spanInfo(info.FullMethod, peerFromCtx(ctx)) - ctx, span := tracer.Start( - trace.ContextWithRemoteSpanContext(ctx, spanCtx), - name, - trace.WithSpanKind(trace.SpanKindServer), - trace.WithAttributes(attr...), - ) - defer span.End() - - messageReceived.Event(ctx, 1, req) - - resp, err := handler(ctx, req) - if err != nil { - s, _ := status.FromError(err) - span.SetStatus(s.Code(), s.Message()) - messageSent.Event(ctx, 1, s.Proto()) - } else { - messageSent.Event(ctx, 1, resp) - } - - return resp, err - } -} - -// serverStream wraps around the embedded grpc.ServerStream, and intercepts the RecvMsg and -// SendMsg method call. -type serverStream struct { - grpc.ServerStream - ctx context.Context - - receivedMessageID int - sentMessageID int -} - -func (w *serverStream) Context() context.Context { - return w.ctx -} - -func (w *serverStream) RecvMsg(m interface{}) error { - err := w.ServerStream.RecvMsg(m) - - if err == nil { - w.receivedMessageID++ - messageReceived.Event(w.Context(), w.receivedMessageID, m) - } - - return err -} - -func (w *serverStream) SendMsg(m interface{}) error { - err := w.ServerStream.SendMsg(m) - - w.sentMessageID++ - messageSent.Event(w.Context(), w.sentMessageID, m) - - return err -} - -func wrapServerStream(ctx context.Context, ss grpc.ServerStream) *serverStream { - return &serverStream{ - ServerStream: ss, - ctx: ctx, - } -} - -// StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable -// for use in a grpc.NewServer call. -func StreamServerInterceptor(tracer trace.Tracer, opts ...Option) grpc.StreamServerInterceptor { - return func( - srv interface{}, - ss grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, - ) error { - ctx := ss.Context() - - requestMetadata, _ := metadata.FromIncomingContext(ctx) - metadataCopy := requestMetadata.Copy() - - entries, spanCtx := Extract(ctx, &metadataCopy, opts...) - ctx = correlation.ContextWithMap(ctx, correlation.NewMap(correlation.MapUpdate{ - MultiKV: entries, - })) - - name, attr := spanInfo(info.FullMethod, peerFromCtx(ctx)) - ctx, span := tracer.Start( - trace.ContextWithRemoteSpanContext(ctx, spanCtx), - name, - trace.WithSpanKind(trace.SpanKindServer), - trace.WithAttributes(attr...), - ) - defer span.End() - - err := handler(srv, wrapServerStream(ctx, ss)) - - if err != nil { - s, _ := status.FromError(err) - span.SetStatus(s.Code(), s.Message()) - } - - return err - } -} - -// spanInfo returns a span name and all appropriate attributes from the gRPC -// method and peer address. -func spanInfo(fullMethod, peerAddress string) (string, []kv.KeyValue) { - attrs := []kv.KeyValue{semconv.RPCSystemGRPC} - name, mAttrs := parseFullMethod(fullMethod) - attrs = append(attrs, mAttrs...) - attrs = append(attrs, peerAttr(peerAddress)...) - return name, attrs -} - -// peerAttr returns attributes about the peer address. -func peerAttr(addr string) []kv.KeyValue { - host, port, err := net.SplitHostPort(addr) - if err != nil { - return []kv.KeyValue(nil) - } - - if host == "" { - host = "127.0.0.1" - } - - return []kv.KeyValue{ - semconv.NetPeerIPKey.String(host), - semconv.NetPeerPortKey.String(port), - } -} - -// peerFromCtx returns a peer address from a context, if one exists. -func peerFromCtx(ctx context.Context) string { - p, ok := peer.FromContext(ctx) - if !ok { - return "" - } - return p.Addr.String() -} - -// parseFullMethod returns a span name following the OpenTelemetry semantic -// conventions as well as all applicable span kv.KeyValue attributes based -// on a gRPC's FullMethod. -func parseFullMethod(fullMethod string) (string, []kv.KeyValue) { - name := strings.TrimLeft(fullMethod, "/") - parts := strings.SplitN(name, "/", 2) - if len(parts) != 2 { - // Invalid format, does not follow `/package.service/method`. - return name, []kv.KeyValue(nil) - } - - var attrs []kv.KeyValue - if service := parts[0]; service != "" { - attrs = append(attrs, semconv.RPCServiceKey.String(service)) - } - if method := parts[1]; method != "" { - attrs = append(attrs, semconv.RPCMethodKey.String(method)) - } - return name, attrs -} diff --git a/instrumentation/grpctrace/interceptor_test.go b/instrumentation/grpctrace/interceptor_test.go deleted file mode 100644 index 3b5d29fb603..00000000000 --- a/instrumentation/grpctrace/interceptor_test.go +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package grpctrace - -import ( - "context" - "sync" - "testing" - "time" - - "go.opentelemetry.io/otel/api/trace/testtrace" - "go.opentelemetry.io/otel/semconv" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/golang/protobuf/proto" //nolint:staticcheck - - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - - "go.opentelemetry.io/otel/api/kv" -) - -type SpanRecorder struct { - mu sync.RWMutex - spans map[string]*testtrace.Span -} - -func NewSpanRecorder() *SpanRecorder { - return &SpanRecorder{spans: make(map[string]*testtrace.Span)} -} - -func (sr *SpanRecorder) OnStart(span *testtrace.Span) {} - -func (sr *SpanRecorder) OnEnd(span *testtrace.Span) { - sr.mu.Lock() - defer sr.mu.Unlock() - sr.spans[span.Name()] = span -} - -func (sr *SpanRecorder) Get(name string) (*testtrace.Span, bool) { - sr.mu.RLock() - defer sr.mu.RUnlock() - s, ok := sr.spans[name] - return s, ok -} - -type mockUICInvoker struct { - ctx context.Context -} - -func (mcuici *mockUICInvoker) invoker(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error { - mcuici.ctx = ctx - return nil -} - -type mockProtoMessage struct{} - -func (mm *mockProtoMessage) Reset() { -} - -func (mm *mockProtoMessage) String() string { - return "mock" -} - -func (mm *mockProtoMessage) ProtoMessage() { -} - -func TestUnaryClientInterceptor(t *testing.T) { - clientConn, err := grpc.Dial("fake:connection", grpc.WithInsecure()) - if err != nil { - t.Fatalf("failed to create client connection: %v", err) - } - - sr := NewSpanRecorder() - tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) - tracer := tp.Tracer("grpctrace/client") - unaryInterceptor := UnaryClientInterceptor(tracer) - - req := &mockProtoMessage{} - reply := &mockProtoMessage{} - uniInterceptorInvoker := &mockUICInvoker{} - - checks := []struct { - method string - name string - expectedAttr map[kv.Key]kv.Value - eventsAttr []map[kv.Key]kv.Value - }{ - { - method: "/github.com.serviceName/bar", - name: "github.com.serviceName/bar", - expectedAttr: map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.RPCServiceKey: kv.StringValue("github.com.serviceName"), - semconv.RPCMethodKey: kv.StringValue("bar"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - }, - eventsAttr: []map[kv.Key]kv.Value{ - { - semconv.RPCMessageTypeKey: kv.StringValue("SENT"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), - }, - { - semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), - }, - }, - }, - { - method: "/serviceName/bar", - name: "serviceName/bar", - expectedAttr: map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.RPCServiceKey: kv.StringValue("serviceName"), - semconv.RPCMethodKey: kv.StringValue("bar"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - }, - eventsAttr: []map[kv.Key]kv.Value{ - { - semconv.RPCMessageTypeKey: kv.StringValue("SENT"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), - }, - { - semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), - }, - }, - }, - { - method: "serviceName/bar", - name: "serviceName/bar", - expectedAttr: map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.RPCServiceKey: kv.StringValue("serviceName"), - semconv.RPCMethodKey: kv.StringValue("bar"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - }, - eventsAttr: []map[kv.Key]kv.Value{ - { - semconv.RPCMessageTypeKey: kv.StringValue("SENT"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), - }, - { - semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), - }, - }, - }, - { - method: "invalidName", - name: "invalidName", - expectedAttr: map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - }, - eventsAttr: []map[kv.Key]kv.Value{ - { - semconv.RPCMessageTypeKey: kv.StringValue("SENT"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), - }, - { - semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), - }, - }, - }, - { - method: "/github.com.foo.serviceName_123/method", - name: "github.com.foo.serviceName_123/method", - expectedAttr: map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.RPCServiceKey: kv.StringValue("github.com.foo.serviceName_123"), - semconv.RPCMethodKey: kv.StringValue("method"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - }, - eventsAttr: []map[kv.Key]kv.Value{ - { - semconv.RPCMessageTypeKey: kv.StringValue("SENT"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(req))), - }, - { - semconv.RPCMessageTypeKey: kv.StringValue("RECEIVED"), - semconv.RPCMessageIDKey: kv.IntValue(1), - semconv.RPCMessageUncompressedSizeKey: kv.IntValue(proto.Size(proto.Message(reply))), - }, - }, - }, - } - - for _, check := range checks { - if !assert.NoError(t, unaryInterceptor(context.Background(), check.method, req, reply, clientConn, uniInterceptorInvoker.invoker)) { - continue - } - span, ok := sr.Get(check.name) - if !assert.True(t, ok, "missing span %q", check.name) { - continue - } - assert.Equal(t, check.expectedAttr, span.Attributes()) - assert.Equal(t, check.eventsAttr, eventAttrMap(span.Events())) - } -} - -func eventAttrMap(events []testtrace.Event) []map[kv.Key]kv.Value { - maps := make([]map[kv.Key]kv.Value, len(events)) - for i, event := range events { - maps[i] = event.Attributes - } - return maps -} - -type mockClientStream struct { - Desc *grpc.StreamDesc - Ctx context.Context -} - -func (mockClientStream) SendMsg(m interface{}) error { return nil } -func (mockClientStream) RecvMsg(m interface{}) error { return nil } -func (mockClientStream) CloseSend() error { return nil } -func (c mockClientStream) Context() context.Context { return c.Ctx } -func (mockClientStream) Header() (metadata.MD, error) { return nil, nil } -func (mockClientStream) Trailer() metadata.MD { return nil } - -func TestStreamClientInterceptor(t *testing.T) { - clientConn, err := grpc.Dial("fake:connection", grpc.WithInsecure()) - if err != nil { - t.Fatalf("failed to create client connection: %v", err) - } - - // tracer - sr := NewSpanRecorder() - tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) - tracer := tp.Tracer("grpctrace/Server") - streamCI := StreamClientInterceptor(tracer) - - var mockClStr mockClientStream - method := "/github.com.serviceName/bar" - name := "github.com.serviceName/bar" - - streamClient, err := streamCI( - context.Background(), - &grpc.StreamDesc{ServerStreams: true}, - clientConn, - method, - func(ctx context.Context, - desc *grpc.StreamDesc, - cc *grpc.ClientConn, - method string, - opts ...grpc.CallOption) (grpc.ClientStream, error) { - mockClStr = mockClientStream{Desc: desc, Ctx: ctx} - return mockClStr, nil - }, - ) - require.NoError(t, err, "initialize grpc stream client") - _, ok := sr.Get(name) - require.False(t, ok, "span should ended while stream is open") - - req := &mockProtoMessage{} - reply := &mockProtoMessage{} - - // send and receive fake data - for i := 0; i < 10; i++ { - _ = streamClient.SendMsg(req) - _ = streamClient.RecvMsg(reply) - } - - // close client and server stream - _ = streamClient.CloseSend() - mockClStr.Desc.ServerStreams = false - _ = streamClient.RecvMsg(reply) - - // added retry because span end is called in separate go routine - var span *testtrace.Span - for retry := 0; retry < 5; retry++ { - span, ok = sr.Get(name) - if ok { - break - } - time.Sleep(time.Second * 1) - } - require.True(t, ok, "missing span %s", name) - - expectedAttr := map[kv.Key]kv.Value{ - semconv.RPCSystemKey: kv.StringValue("grpc"), - semconv.RPCServiceKey: kv.StringValue("github.com.serviceName"), - semconv.RPCMethodKey: kv.StringValue("bar"), - semconv.NetPeerIPKey: kv.StringValue("fake"), - semconv.NetPeerPortKey: kv.StringValue("connection"), - } - assert.Equal(t, expectedAttr, span.Attributes()) - - events := span.Events() - require.Len(t, events, 20) - for i := 0; i < 20; i += 2 { - msgID := i/2 + 1 - validate := func(eventName string, attrs map[kv.Key]kv.Value) { - for k, v := range attrs { - if k == semconv.RPCMessageTypeKey && v.AsString() != eventName { - t.Errorf("invalid event on index: %d expecting %s event, receive %s event", i, eventName, v.AsString()) - } - if k == semconv.RPCMessageIDKey && v != kv.IntValue(msgID) { - t.Errorf("invalid id for message event expected %d received %d", msgID, v.AsInt32()) - } - } - } - validate("SENT", events[i].Attributes) - validate("RECEIVED", events[i+1].Attributes) - } - - // ensure CloseSend can be subsequently called - _ = streamClient.CloseSend() -} - -func TestServerInterceptorError(t *testing.T) { - sr := NewSpanRecorder() - tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) - tracer := tp.Tracer("grpctrace/Server") - usi := UnaryServerInterceptor(tracer) - deniedErr := status.Error(codes.PermissionDenied, "PERMISSION_DENIED_TEXT") - handler := func(_ context.Context, _ interface{}) (interface{}, error) { - return nil, deniedErr - } - _, err := usi(context.Background(), &mockProtoMessage{}, &grpc.UnaryServerInfo{}, handler) - require.Error(t, err) - assert.Equal(t, err, deniedErr) - - span, ok := sr.Get("") - if !ok { - t.Fatalf("failed to export error span") - } - assert.Equal(t, span.StatusCode(), codes.PermissionDenied) - assert.Contains(t, deniedErr.Error(), span.StatusMessage()) - assert.Len(t, span.Events(), 2) - assert.Equal(t, map[kv.Key]kv.Value{ - kv.Key("message.type"): kv.StringValue("SENT"), - kv.Key("message.id"): kv.IntValue(1), - kv.Key("message.uncompressed_size"): kv.IntValue(26), - }, span.Events()[1].Attributes) -} - -func TestParseFullMethod(t *testing.T) { - tests := []struct { - fullMethod string - name string - attr []kv.KeyValue - }{ - { - fullMethod: "/grpc.test.EchoService/Echo", - name: "grpc.test.EchoService/Echo", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("grpc.test.EchoService"), - semconv.RPCMethodKey.String("Echo"), - }, - }, { - fullMethod: "/com.example.ExampleRmiService/exampleMethod", - name: "com.example.ExampleRmiService/exampleMethod", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("com.example.ExampleRmiService"), - semconv.RPCMethodKey.String("exampleMethod"), - }, - }, { - fullMethod: "/MyCalcService.Calculator/Add", - name: "MyCalcService.Calculator/Add", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("MyCalcService.Calculator"), - semconv.RPCMethodKey.String("Add"), - }, - }, { - fullMethod: "/MyServiceReference.ICalculator/Add", - name: "MyServiceReference.ICalculator/Add", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("MyServiceReference.ICalculator"), - semconv.RPCMethodKey.String("Add"), - }, - }, { - fullMethod: "/MyServiceWithNoPackage/theMethod", - name: "MyServiceWithNoPackage/theMethod", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("MyServiceWithNoPackage"), - semconv.RPCMethodKey.String("theMethod"), - }, - }, { - fullMethod: "/pkg.srv", - name: "pkg.srv", - attr: []kv.KeyValue(nil), - }, { - fullMethod: "/pkg.srv/", - name: "pkg.srv/", - attr: []kv.KeyValue{ - semconv.RPCServiceKey.String("pkg.srv"), - }, - }, - } - - for _, test := range tests { - n, a := parseFullMethod(test.fullMethod) - assert.Equal(t, test.name, n) - assert.Equal(t, test.attr, a) - } -} From 799c178925e8a8a933edfcdcd559f805bacad8c9 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 6 Aug 2020 07:59:41 -0700 Subject: [PATCH 54/60] Make opentracing bridge into own Go module (#1038) * Make opentracing bridge into own Go module * Update dependabot config * Clean dependencies of project Now the bridge is a module, clean all upstream modules that no longer implicitly depend on it. * Update Changelog * go mod tidy --- .github/dependabot.yml | 4 ++ CHANGELOG.md | 2 + bridge/opentracing/go.mod | 11 ++++ bridge/opentracing/go.sum | 92 ++++++++++++++++++++++++++++++ example/basic/go.sum | 2 - example/jaeger/go.sum | 2 - example/namedtracer/go.sum | 2 - example/otel-collector/go.sum | 2 - example/prometheus/go.sum | 1 - example/zipkin/go.sum | 2 - exporters/metric/prometheus/go.sum | 1 - exporters/otlp/go.sum | 2 - exporters/stdout/go.sum | 2 - exporters/trace/jaeger/go.sum | 2 - exporters/trace/zipkin/go.sum | 2 - go.mod | 1 - go.sum | 3 - sdk/go.sum | 2 - 18 files changed, 109 insertions(+), 26 deletions(-) create mode 100644 bridge/opentracing/go.mod create mode 100644 bridge/opentracing/go.sum diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4f5154d410a..1c50a92f799 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,6 +13,10 @@ updates: directory: "/tools" # Location of package manifests schedule: interval: "daily" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/bridge/opentracing" # Location of package manifests + schedule: + interval: "daily" - package-ecosystem: "gomod" # See documentation for possible values directory: "/exporters/otlp" # Location of package manifests schedule: diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bb4759ea1..4ba051cce77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. + This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) ### Removed diff --git a/bridge/opentracing/go.mod b/bridge/opentracing/go.mod new file mode 100644 index 00000000000..f5c2067845c --- /dev/null +++ b/bridge/opentracing/go.mod @@ -0,0 +1,11 @@ +module go.opentelemetry.io/otel/bridge/opentracing + +go 1.14 + +replace go.opentelemetry.io/otel => ../.. + +require ( + github.com/opentracing/opentracing-go v1.2.0 + go.opentelemetry.io/otel v0.10.0 + google.golang.org/grpc v1.31.0 +) diff --git a/bridge/opentracing/go.sum b/bridge/opentracing/go.sum new file mode 100644 index 00000000000..2af214dccf4 --- /dev/null +++ b/bridge/opentracing/go.sum @@ -0,0 +1,92 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/basic/go.sum b/example/basic/go.sum index fa2e4687b09..c145e71fdf5 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -40,12 +40,10 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 07f20d7b295..779f61b8658 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -114,13 +114,11 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index fa2e4687b09..c145e71fdf5 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -40,12 +40,10 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 1e0182d2add..20f65981e3a 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -43,12 +43,10 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index 9f3a9861b29..34da2d070f3 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -75,7 +75,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index bc7daac3e5c..4987c18c7fa 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -55,7 +55,6 @@ github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0Q github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -66,7 +65,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index 545e209f85c..cec965b1ed1 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -73,7 +73,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index cc0b46ff711..2f6050450a0 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -44,12 +44,10 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index dd02ef06e31..1f3c4926b59 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -39,12 +39,10 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index d0d00726dba..cb58ff1d37a 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -118,14 +118,12 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index 5b518c11c43..de66b8e74f4 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -55,7 +55,6 @@ github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0Q github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -66,7 +65,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/go.mod b/go.mod index fefb4bf10d8..c97cc5a8472 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.1 github.com/kr/pretty v0.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 github.com/stretchr/testify v1.6.1 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect diff --git a/go.sum b/go.sum index 69af8e80963..52d267d2a2b 100644 --- a/go.sum +++ b/go.sum @@ -36,14 +36,11 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/sdk/go.sum b/sdk/go.sum index f294616bae7..e6c868ab29f 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -38,12 +38,10 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From f88f5e4a1a5a19e7efa8cada025f5892636531d6 Mon Sep 17 00:00:00 2001 From: alrex Date: Thu, 6 Aug 2020 17:05:11 -0700 Subject: [PATCH 55/60] Renaming OTEL_RESOURCE_LABELS env var (#1042) * Renaming OTEL_RESOURCE_LABELS env var As per the specification here https://github.com/open-telemetry/opentelemetry-specification/pull/758 * update changelog --- CHANGELOG.md | 1 + sdk/resource/doc.go | 2 +- sdk/resource/env.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ba051cce77..2ae7211c3ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) +- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) ### Removed diff --git a/sdk/resource/doc.go b/sdk/resource/doc.go index c3a43c7886f..e35839b75de 100644 --- a/sdk/resource/doc.go +++ b/sdk/resource/doc.go @@ -22,7 +22,7 @@ // the Detect function to generate a Resource from the merged information. // // To load a user defined Resource from the environment variable -// OTEL_RESOURCE_LABELS the FromEnv Detector can be used. It will interpret +// OTEL_RESOURCE_ATTRIBUTES the FromEnv Detector can be used. It will interpret // the value as a list of comma delimited key/value pairs // (e.g. `=,=,...`). package resource diff --git a/sdk/resource/env.go b/sdk/resource/env.go index a03e387ba5b..51adba53427 100644 --- a/sdk/resource/env.go +++ b/sdk/resource/env.go @@ -24,7 +24,7 @@ import ( ) // envVar is the environment variable name OpenTelemetry Resource information can be assigned to. -const envVar = "OTEL_RESOURCE_LABELS" +const envVar = "OTEL_RESOURCE_ATTRIBUTES" var ( //errMissingValue is returned when a resource value is missing. From 1dbc75bc2fc614d140fad2ad36053440aa5b0f45 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 7 Aug 2020 09:05:22 -0700 Subject: [PATCH 56/60] Clean stale indirect dependency requirements (#1041) * Clean stale indirect dependency requirements In the recent changes to isolate the main `otel` package there were many indirect dependencies of the package that were removed, however, the go.mod was not automatically cleaned of these. This removes those (and similar ones in the otel-collector example and otel exporter) and prunes the go.sum files accordingly. * Run in a clean system to reproduce build --- bridge/opentracing/go.sum | 16 +++----------- example/basic/go.sum | 18 +++------------ example/jaeger/go.sum | 24 ++------------------ example/namedtracer/go.sum | 18 +++------------ example/otel-collector/go.mod | 1 - example/otel-collector/go.sum | 27 +++++------------------ example/prometheus/go.sum | 14 +----------- example/zipkin/go.sum | 16 ++------------ exporters/metric/prometheus/go.sum | 13 +---------- exporters/otlp/go.mod | 3 --- exporters/otlp/go.sum | 25 ++++----------------- exporters/stdout/go.sum | 19 ++-------------- exporters/trace/jaeger/go.sum | 35 +----------------------------- exporters/trace/zipkin/go.sum | 18 +-------------- go.mod | 6 ----- go.sum | 23 +++----------------- sdk/go.sum | 16 +++----------- 17 files changed, 35 insertions(+), 257 deletions(-) diff --git a/bridge/opentracing/go.sum b/bridge/opentracing/go.sum index 2af214dccf4..7a6b4ca21b2 100644 --- a/bridge/opentracing/go.sum +++ b/bridge/opentracing/go.sum @@ -3,9 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -27,11 +26,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -50,14 +44,12 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -68,9 +60,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -83,9 +74,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/basic/go.sum b/example/basic/go.sum index c145e71fdf5..d79ef3a177f 100644 --- a/example/basic/go.sum +++ b/example/basic/go.sum @@ -7,17 +7,14 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -35,11 +32,6 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -55,14 +47,12 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -73,9 +63,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -88,9 +77,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/jaeger/go.sum b/example/jaeger/go.sum index 779f61b8658..df8328dc800 100644 --- a/example/jaeger/go.sum +++ b/example/jaeger/go.sum @@ -35,7 +35,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -43,9 +42,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -65,11 +63,9 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -84,7 +80,6 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -119,7 +114,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -175,7 +169,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -201,11 +194,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -233,7 +223,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -296,12 +285,10 @@ google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= @@ -319,8 +306,6 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -333,7 +318,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -350,9 +334,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -364,16 +346,14 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/example/namedtracer/go.sum b/example/namedtracer/go.sum index c145e71fdf5..d79ef3a177f 100644 --- a/example/namedtracer/go.sum +++ b/example/namedtracer/go.sum @@ -7,17 +7,14 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -35,11 +32,6 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -55,14 +47,12 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -73,9 +63,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -88,9 +77,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 213145dc43b..b88968d1721 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -12,6 +12,5 @@ require ( go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/exporters/otlp v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 - golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect google.golang.org/grpc v1.31.0 ) diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 20f65981e3a..58ba96a4fac 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -7,9 +7,8 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -37,12 +36,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -57,23 +50,17 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -84,9 +71,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -99,9 +85,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/example/prometheus/go.sum b/example/prometheus/go.sum index 34da2d070f3..cea04cb5bc0 100644 --- a/example/prometheus/go.sum +++ b/example/prometheus/go.sum @@ -9,7 +9,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -32,11 +31,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -48,13 +44,10 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -84,7 +77,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= @@ -102,7 +94,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -122,7 +113,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -142,11 +132,9 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/example/zipkin/go.sum b/example/zipkin/go.sum index 4987c18c7fa..7389916a8a0 100644 --- a/example/zipkin/go.sum +++ b/example/zipkin/go.sum @@ -3,7 +3,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -24,9 +23,7 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -46,11 +43,6 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -77,7 +69,6 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -85,7 +76,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -96,9 +86,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -112,9 +101,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/exporters/metric/prometheus/go.sum b/exporters/metric/prometheus/go.sum index cec965b1ed1..cea04cb5bc0 100644 --- a/exporters/metric/prometheus/go.sum +++ b/exporters/metric/prometheus/go.sum @@ -9,7 +9,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -34,7 +33,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -46,13 +44,10 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -82,9 +77,7 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -98,11 +91,9 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -123,7 +114,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -143,9 +133,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index d36ce64af31..81ab095302e 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -10,11 +10,8 @@ replace ( require ( github.com/gogo/protobuf v1.3.1 github.com/google/go-cmp v0.5.1 - github.com/kr/pretty v0.2.0 // indirect github.com/stretchr/testify v1.6.1 go.opentelemetry.io/otel v0.10.0 go.opentelemetry.io/otel/sdk v0.10.0 - golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 // indirect - golang.org/x/text v0.3.2 // indirect google.golang.org/grpc v1.31.0 ) diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 2f6050450a0..58ba96a4fac 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -7,9 +7,8 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -19,7 +18,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -38,12 +36,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -58,10 +50,8 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -69,12 +59,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -87,8 +73,6 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -101,9 +85,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporters/stdout/go.sum b/exporters/stdout/go.sum index 1f3c4926b59..d79ef3a177f 100644 --- a/exporters/stdout/go.sum +++ b/exporters/stdout/go.sum @@ -7,9 +7,8 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -17,7 +16,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -34,11 +32,6 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -53,18 +46,13 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -77,8 +65,6 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -91,9 +77,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/exporters/trace/jaeger/go.sum b/exporters/trace/jaeger/go.sum index cb58ff1d37a..df8328dc800 100644 --- a/exporters/trace/jaeger/go.sum +++ b/exporters/trace/jaeger/go.sum @@ -30,13 +30,11 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -46,8 +44,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -60,7 +56,6 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -68,11 +63,9 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -85,10 +78,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -122,9 +113,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -162,7 +151,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -170,9 +158,7 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -183,7 +169,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -193,7 +178,6 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -210,11 +194,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -237,18 +218,15 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -286,14 +264,12 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d h1:szSOL78iTCl0LF1AMjhSWJj8tIM0KixlUUnBtYXsmd8= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -309,12 +285,10 @@ google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= @@ -332,8 +306,6 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -346,7 +318,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -363,9 +334,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -377,16 +346,14 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/exporters/trace/zipkin/go.sum b/exporters/trace/zipkin/go.sum index de66b8e74f4..7389916a8a0 100644 --- a/exporters/trace/zipkin/go.sum +++ b/exporters/trace/zipkin/go.sum @@ -3,7 +3,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/DataDog/sketches-go v0.0.1/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -24,9 +23,7 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -46,11 +43,6 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -76,19 +68,14 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -101,8 +88,6 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -116,9 +101,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/go.mod b/go.mod index c97cc5a8472..1936e111408 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,8 @@ module go.opentelemetry.io/otel go 1.14 require ( - github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.1 - github.com/kr/pretty v0.1.0 // indirect github.com/stretchr/testify v1.6.1 - golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect - golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect - google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect google.golang.org/grpc v1.31.0 - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/go.sum b/go.sum index 52d267d2a2b..eb46e54854a 100644 --- a/go.sum +++ b/go.sum @@ -1,21 +1,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -31,15 +26,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -53,8 +42,6 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -62,8 +49,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -75,9 +60,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -90,9 +74,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/sdk/go.sum b/sdk/go.sum index e6c868ab29f..d79ef3a177f 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -7,9 +7,8 @@ github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiU github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -33,11 +32,6 @@ github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -53,14 +47,12 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -71,9 +63,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -86,9 +77,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From f9ba15f2d1003f8b79ca4a15a999d334bf397ccd Mon Sep 17 00:00:00 2001 From: Sam Xie Date: Sat, 8 Aug 2020 00:16:43 +0800 Subject: [PATCH 57/60] Replace `WithSyncer` with `WithBatcher` in examples (#1044) * Replace `WithSyncer` with `WithBatcher` in examples * update CHANGELOG Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + example/namedtracer/main.go | 2 +- example/otel-collector/main.go | 2 +- exporters/otlp/README.md | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae7211c3ba..4ebd9afa2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) - The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) +- Replace `WithSyncer` with `WithBatcher` in examples. (#1044) ### Removed diff --git a/example/namedtracer/main.go b/example/namedtracer/main.go index a98abefc04b..21bd9c296bc 100644 --- a/example/namedtracer/main.go +++ b/example/namedtracer/main.go @@ -44,7 +44,7 @@ func initTracer() { log.Panicf("failed to initialize stdout exporter %v\n", err) return } - tp, err = sdktrace.NewProvider(sdktrace.WithSyncer(exp), + tp, err = sdktrace.NewProvider(sdktrace.WithBatcher(exp), sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) if err != nil { log.Panicf("failed to initialize trace provider %v\n", err) diff --git a/example/otel-collector/main.go b/example/otel-collector/main.go index 23065e5df2c..a68f414ced9 100644 --- a/example/otel-collector/main.go +++ b/example/otel-collector/main.go @@ -59,7 +59,7 @@ func initProvider() (*otlp.Exporter, *push.Controller) { // the service name used to display traces in backends kv.Key(semconv.ServiceNameKey).String("test-service"), )), - sdktrace.WithSyncer(exp), + sdktrace.WithBatcher(exp), ) handleErr(err, "failed to create trace provider") diff --git a/exporters/otlp/README.md b/exporters/otlp/README.md index 8f88a0b8d00..dfb9697ea5c 100644 --- a/exporters/otlp/README.md +++ b/exporters/otlp/README.md @@ -47,7 +47,7 @@ func main() { // sdktrace.WithMaxExportBatchSize(100), // ), // ) - traceProvider, err := sdktrace.NewProvider(sdktrace.WithSyncer(exporter)) + traceProvider, err := sdktrace.NewProvider(sdktrace.WithBatcher(exporter)) if err != nil { log.Fatal("failed to create trace provider: %v", err) } From 2dfa5e4fe13d2e10e5f881d8e2d7c78a244e0479 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Sat, 8 Aug 2020 12:10:36 -0700 Subject: [PATCH 58/60] Remove WithSpan method from Tracer interface (#1043) * Remove WithSpan method from Tracer interface Also remove implementation in SDK. * Add panic event reporting to span End * Update Changelog with changes * Update CHANGELOG.md * Update README.md Fix code tabs * Refactor span End * Fix un-ended span from feedback. --- CHANGELOG.md | 4 + README.md | 19 +--- api/global/internal/trace.go | 9 -- api/global/internal/trace_test.go | 14 +-- api/testharness/harness.go | 146 ---------------------------- api/trace/api.go | 10 -- api/trace/noop_trace.go | 5 - api/trace/testtrace/tracer.go | 7 -- api/trace/testtrace/tracer_test.go | 40 -------- bridge/opentracing/internal/mock.go | 6 -- bridge/opentracing/wrapper.go | 14 --- example/basic/main.go | 32 +++--- example/namedtracer/foo/foo.go | 16 ++- example/namedtracer/main.go | 15 ++- exporters/stdout/example_test.go | 57 +++++------ internal/trace/mock_tracer.go | 8 -- sdk/trace/span.go | 30 ++++-- sdk/trace/trace_test.go | 25 +++++ sdk/trace/tracer.go | 11 --- 19 files changed, 113 insertions(+), 355 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebd9afa2d7..db861616328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) +- The `WithSpan` method of the `Tracer` interface. + The functionality this method provided was limited compared to what a user can provide themselves. + It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043) ### Fixed - The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) - Correct instrumentation version tag in Jaeger exporter. (#1037) +- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043) ## [0.10.0] - 2020-07-29 diff --git a/README.md b/README.md index eb4b2a26ddf..1866cecc8f9 100644 --- a/README.md +++ b/README.md @@ -50,22 +50,9 @@ func main() { defer pusher.Stop() tracer := global.Tracer("ex.com/basic") - - tracer.WithSpan(context.Background(), "foo", - func(ctx context.Context) error { - tracer.WithSpan(ctx, "bar", - func(ctx context.Context) error { - tracer.WithSpan(ctx, "baz", - func(ctx context.Context) error { - return nil - }, - ) - return nil - }, - ) - return nil - }, - ) + ctx, span := tracer.Start(context.Background(), "main") + defer span.End() + /* … */ } ``` diff --git a/api/global/internal/trace.go b/api/global/internal/trace.go index 23d09f342df..69024b66769 100644 --- a/api/global/internal/trace.go +++ b/api/global/internal/trace.go @@ -114,15 +114,6 @@ func (t *tracer) setDelegate(provider trace.Provider) { t.once.Do(func() { t.delegate = provider.Tracer(t.name, t.opts...) }) } -// WithSpan implements trace.Tracer by forwarding the call to t.delegate if -// set, otherwise it forwards the call to a NoopTracer. -func (t *tracer) WithSpan(ctx context.Context, name string, body func(context.Context) error, opts ...trace.StartOption) error { - if t.delegate != nil { - return t.delegate.WithSpan(ctx, name, body, opts...) - } - return trace.NoopTracer{}.WithSpan(ctx, name, body, opts...) -} - // Start implements trace.Tracer by forwarding the call to t.delegate if // set, otherwise it forwards the call to a NoopTracer. func (t *tracer) Start(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, trace.Span) { diff --git a/api/global/internal/trace_test.go b/api/global/internal/trace_test.go index 58d73aa5eb0..d391c3073ec 100644 --- a/api/global/internal/trace_test.go +++ b/api/global/internal/trace_test.go @@ -31,13 +31,9 @@ func TestTraceWithSDK(t *testing.T) { ctx := context.Background() gtp := global.TraceProvider() tracer1 := gtp.Tracer("pre") + // This is started before an SDK was registered and should be dropped. _, span1 := tracer1.Start(ctx, "span1") - // This should be dropped. - if err := tracer1.WithSpan(ctx, "withSpan1", func(context.Context) error { return nil }); err != nil { - t.Errorf("failed to wrap function with span prior to initialization: %v", err) - } - sr := new(testtrace.StandardSpanRecorder) tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) global.SetTraceProvider(tp) @@ -48,17 +44,11 @@ func TestTraceWithSDK(t *testing.T) { // The existing Tracer should have been configured to now use the configured SDK. _, span2 := tracer1.Start(ctx, "span2") span2.End() - if err := tracer1.WithSpan(ctx, "withSpan2", func(context.Context) error { return nil }); err != nil { - t.Errorf("failed to wrap function with span post initialization: %v", err) - } // The global trace Provider should now create Tracers that also use the newly configured SDK. tracer2 := gtp.Tracer("post") _, span3 := tracer2.Start(ctx, "span3") span3.End() - if err := tracer2.WithSpan(ctx, "withSpan3", func(context.Context) error { return nil }); err != nil { - t.Errorf("failed to wrap function with span post initialization with new tracer: %v", err) - } filterNames := func(spans []*testtrace.Span) []string { names := make([]string, len(spans)) @@ -67,7 +57,7 @@ func TestTraceWithSDK(t *testing.T) { } return names } - expected := []string{"span2", "withSpan2", "span3", "withSpan3"} + expected := []string{"span2", "span3"} assert.ElementsMatch(t, expected, filterNames(sr.Started())) assert.ElementsMatch(t, expected, filterNames(sr.Completed())) } diff --git a/api/testharness/harness.go b/api/testharness/harness.go index f2192145692..e84c9807b9c 100644 --- a/api/testharness/harness.go +++ b/api/testharness/harness.go @@ -16,7 +16,6 @@ package testharness import ( "context" - "errors" "sync" "testing" "time" @@ -177,138 +176,6 @@ func (h *Harness) TestTracer(subjectFactory func() trace.Tracer) { }) }) - h.t.Run("#WithSpan", func(t *testing.T) { - t.Run("returns nil if the body does not return an error", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - err := subject.WithSpan(context.Background(), "test", func(ctx context.Context) error { - return nil - }) - - e.Expect(err).ToBeNil() - }) - - t.Run("propagates the error from the body if the body errors", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - expectedErr := errors.New("test error") - - err := subject.WithSpan(context.Background(), "test", func(ctx context.Context) error { - return expectedErr - }) - - e.Expect(err).ToMatchError(expectedErr) - }) - - t.Run("propagates the original context to the body", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - ctxKey := testCtxKey{} - ctxValue := "ctx value" - ctx := context.WithValue(context.Background(), ctxKey, ctxValue) - - var actualCtx context.Context - - err := subject.WithSpan(ctx, "test", func(ctx context.Context) error { - actualCtx = ctx - - return nil - }) - - e.Expect(err).ToBeNil() - - e.Expect(actualCtx.Value(ctxKey)).ToEqual(ctxValue) - }) - - t.Run("stores a span containing the expected properties on the context provided to the body function", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - var span trace.Span - - err := subject.WithSpan(context.Background(), "test", func(ctx context.Context) error { - span = trace.SpanFromContext(ctx) - - return nil - }) - - e.Expect(err).ToBeNil() - - e.Expect(span).NotToBeNil() - - e.Expect(span.Tracer()).ToEqual(subject) - e.Expect(span.SpanContext().IsValid()).ToBeTrue() - }) - - t.Run("starts spans with unique trace and span IDs", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - var span1 trace.Span - var span2 trace.Span - - err := subject.WithSpan(context.Background(), "span1", func(ctx context.Context) error { - span1 = trace.SpanFromContext(ctx) - - return nil - }) - - e.Expect(err).ToBeNil() - - err = subject.WithSpan(context.Background(), "span2", func(ctx context.Context) error { - span2 = trace.SpanFromContext(ctx) - - return nil - }) - - e.Expect(err).ToBeNil() - - sc1 := span1.SpanContext() - sc2 := span2.SpanContext() - - e.Expect(sc1.TraceID).NotToEqual(sc2.TraceID) - e.Expect(sc1.SpanID).NotToEqual(sc2.SpanID) - }) - - t.Run("propagates a parent's trace ID through the context", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - subject := subjectFactory() - - ctx, parent := subject.Start(context.Background(), "parent") - - var child trace.Span - - err := subject.WithSpan(ctx, "child", func(ctx context.Context) error { - child = trace.SpanFromContext(ctx) - - return nil - }) - - e.Expect(err).ToBeNil() - - psc := parent.SpanContext() - csc := child.SpanContext() - - e.Expect(csc.TraceID).ToEqual(psc.TraceID) - e.Expect(csc.SpanID).NotToEqual(psc.SpanID) - }) - }) - h.testSpan(subjectFactory) } @@ -340,19 +207,6 @@ func (h *Harness) testSpan(tracerFactory func() trace.Tracer) { return subject }, - "Span created via Tracer#WithSpan": func() trace.Span { - tracer := tracerFactory() - - var actualCtx context.Context - - _ = tracer.WithSpan(context.Background(), "test", func(ctx context.Context) error { - actualCtx = ctx - - return nil - }) - - return trace.SpanFromContext(actualCtx) - }, } for mechanismName, mechanism := range mechanisms { diff --git a/api/trace/api.go b/api/trace/api.go index feb6d2ef1db..517284b6e3a 100644 --- a/api/trace/api.go +++ b/api/trace/api.go @@ -54,16 +54,6 @@ func WithInstrumentationVersion(version string) TracerOption { type Tracer interface { // Start a span. Start(ctx context.Context, spanName string, opts ...StartOption) (context.Context, Span) - - // WithSpan wraps the execution of the fn function with a span. - // It starts a new span, sets it as an active span in the context, - // executes the fn function and closes the span before returning the result of fn. - WithSpan( - ctx context.Context, - spanName string, - fn func(ctx context.Context) error, - opts ...StartOption, - ) error } // EndConfig provides options to set properties of span at the time of ending diff --git a/api/trace/noop_trace.go b/api/trace/noop_trace.go index 63efdeaf5ea..ffdb913185e 100644 --- a/api/trace/noop_trace.go +++ b/api/trace/noop_trace.go @@ -22,11 +22,6 @@ type NoopTracer struct{} var _ Tracer = NoopTracer{} -// WithSpan wraps around execution of func with noop span. -func (t NoopTracer) WithSpan(ctx context.Context, name string, body func(context.Context) error, opts ...StartOption) error { - return body(ctx) -} - // Start starts a noop span. func (NoopTracer) Start(ctx context.Context, name string, opts ...StartOption) (context.Context, Span) { span := NoopSpan{} diff --git a/api/trace/testtrace/tracer.go b/api/trace/testtrace/tracer.go index da4cdd8c875..6fd2598b774 100644 --- a/api/trace/testtrace/tracer.go +++ b/api/trace/testtrace/tracer.go @@ -86,10 +86,3 @@ func (t *Tracer) Start(ctx context.Context, name string, opts ...trace.StartOpti } return trace.ContextWithSpan(ctx, span), span } - -func (t *Tracer) WithSpan(ctx context.Context, name string, body func(ctx context.Context) error, opts ...trace.StartOption) error { - ctx, span := t.Start(ctx, name, opts...) - defer span.End() - - return body(ctx) -} diff --git a/api/trace/testtrace/tracer_test.go b/api/trace/testtrace/tracer_test.go index 13b2fbe89d0..f62a33755b5 100644 --- a/api/trace/testtrace/tracer_test.go +++ b/api/trace/testtrace/tracer_test.go @@ -256,46 +256,6 @@ func TestTracer(t *testing.T) { e.Expect(links[link2.SpanContext]).ToEqual(link2.Attributes) }) }) - - t.Run("#WithSpan", func(t *testing.T) { - testTracedSpan(t, func(tracer trace.Tracer, name string) (trace.Span, error) { - var span trace.Span - - err := tracer.WithSpan(context.Background(), name, func(ctx context.Context) error { - span = trace.SpanFromContext(ctx) - - return nil - }) - - return span, err - }) - - t.Run("honors StartOptions", func(t *testing.T) { - t.Parallel() - - e := matchers.NewExpecter(t) - - attr1 := kv.String("a", "1") - attr2 := kv.String("b", "2") - - subject := tp.Tracer(t.Name()) - var span trace.Span - err := subject.WithSpan(context.Background(), "test", func(ctx context.Context) error { - span = trace.SpanFromContext(ctx) - - return nil - }, trace.WithAttributes(attr1, attr2)) - e.Expect(err).ToBeNil() - - testSpan, ok := span.(*testtrace.Span) - e.Expect(ok).ToBeTrue() - - attributes := testSpan.Attributes() - e.Expect(attributes[attr1.Key]).ToEqual(attr1.Value) - e.Expect(attributes[attr2.Key]).ToEqual(attr2.Value) - }) - - }) } func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (trace.Span, error)) { diff --git a/bridge/opentracing/internal/mock.go b/bridge/opentracing/internal/mock.go index ea763731b94..81121ea3e72 100644 --- a/bridge/opentracing/internal/mock.go +++ b/bridge/opentracing/internal/mock.go @@ -71,12 +71,6 @@ func NewMockTracer() *MockTracer { } } -func (t *MockTracer) WithSpan(ctx context.Context, name string, body func(context.Context) error, opts ...oteltrace.StartOption) error { - ctx, span := t.Start(ctx, name, opts...) - defer span.End() - return body(ctx) -} - func (t *MockTracer) Start(ctx context.Context, name string, opts ...oteltrace.StartOption) (context.Context, oteltrace.Span) { spanOpts := oteltrace.StartConfig{} for _, opt := range opts { diff --git a/bridge/opentracing/wrapper.go b/bridge/opentracing/wrapper.go index e8a8f560d0e..f133c116edc 100644 --- a/bridge/opentracing/wrapper.go +++ b/bridge/opentracing/wrapper.go @@ -71,20 +71,6 @@ func (t *WrapperTracer) otelTracer() oteltrace.Tracer { return t.tracer } -// WithSpan forwards the call to the wrapped tracer with a modified -// body callback, which sets the active OpenTracing span before -// calling the original callback. -func (t *WrapperTracer) WithSpan(ctx context.Context, name string, body func(context.Context) error, opts ...oteltrace.StartOption) error { - return t.otelTracer().WithSpan(ctx, name, func(ctx context.Context) error { - span := oteltrace.SpanFromContext(ctx) - if spanWithExtension, ok := span.(migration.OverrideTracerSpanExtension); ok { - spanWithExtension.OverrideTracer(t) - } - ctx = t.bridge.ContextWithBridgeSpan(ctx, span) - return body(ctx) - }, opts...) -} - // Start forwards the call to the wrapped tracer. It also tries to // override the tracer of the returned span if the span implements the // OverrideTracerSpanExtension interface. diff --git a/example/basic/main.go b/example/basic/main.go index 90dc59466cd..f00c4c015d8 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -67,11 +67,13 @@ func main() { valuerecorder := valuerecorderTwo.Bind(commonLabels...) defer valuerecorder.Unbind() - err = tracer.WithSpan(ctx, "operation", func(ctx context.Context) error { + err = func(ctx context.Context) error { + var span trace.Span + ctx, span = tracer.Start(ctx, "operation") + defer span.End() - trace.SpanFromContext(ctx).AddEvent(ctx, "Nice operation!", kv.Key("bogons").Int(100)) - - trace.SpanFromContext(ctx).SetAttributes(anotherKey.String("yes")) + span.AddEvent(ctx, "Nice operation!", kv.Key("bogons").Int(100)) + span.SetAttributes(anotherKey.String("yes")) meter.RecordBatch( // Note: call-site variables added as context Entries: @@ -81,20 +83,18 @@ func main() { valuerecorderTwo.Measurement(2.0), ) - return tracer.WithSpan( - ctx, - "Sub operation...", - func(ctx context.Context) error { - trace.SpanFromContext(ctx).SetAttributes(lemonsKey.String("five")) - - trace.SpanFromContext(ctx).AddEvent(ctx, "Sub span event") + return func(ctx context.Context) error { + var span trace.Span + ctx, span = tracer.Start(ctx, "Sub operation...") + defer span.End() - valuerecorder.Record(ctx, 1.3) + span.SetAttributes(lemonsKey.String("five")) + span.AddEvent(ctx, "Sub span event") + valuerecorder.Record(ctx, 1.3) - return nil - }, - ) - }) + return nil + }(ctx) + }(ctx) if err != nil { panic(err) } diff --git a/example/namedtracer/foo/foo.go b/example/namedtracer/foo/foo.go index 160aa274030..88dd709f70e 100644 --- a/example/namedtracer/foo/foo.go +++ b/example/namedtracer/foo/foo.go @@ -29,19 +29,15 @@ var ( // SubOperation is an example to demonstrate the use of named tracer. // It creates a named tracer with its package path. func SubOperation(ctx context.Context) error { - // Using global provider. Alternative is to have application provide a getter // for its component to get the instance of the provider. tr := global.Tracer("example/namedtracer/foo") - return tr.WithSpan( - ctx, - "Sub operation...", - func(ctx context.Context) error { - trace.SpanFromContext(ctx).SetAttributes(lemonsKey.String("five")) - trace.SpanFromContext(ctx).AddEvent(ctx, "Sub span event") + var span trace.Span + ctx, span = tr.Start(ctx, "Sub operation...") + defer span.End() + span.SetAttributes(lemonsKey.String("five")) + span.AddEvent(ctx, "Sub span event") - return nil - }, - ) + return nil } diff --git a/example/namedtracer/main.go b/example/namedtracer/main.go index 21bd9c296bc..961275de639 100644 --- a/example/namedtracer/main.go +++ b/example/namedtracer/main.go @@ -65,15 +65,12 @@ func main() { barKey.String("bar1"), ) - err := tracer.WithSpan(ctx, "operation", func(ctx context.Context) error { - - trace.SpanFromContext(ctx).AddEvent(ctx, "Nice operation!", kv.Key("bogons").Int(100)) - - trace.SpanFromContext(ctx).SetAttributes(anotherKey.String("yes")) - - return foo.SubOperation(ctx) - }) - if err != nil { + var span trace.Span + ctx, span = tracer.Start(ctx, "operation") + defer span.End() + span.AddEvent(ctx, "Nice operation!", kv.Key("bogons").Int(100)) + span.SetAttributes(anotherKey.String("yes")) + if err := foo.SubOperation(ctx); err != nil { panic(err) } } diff --git a/exporters/stdout/example_test.go b/exporters/stdout/example_test.go index 9ad8df6fab8..fa4a3015e7c 100644 --- a/exporters/stdout/example_test.go +++ b/exporters/stdout/example_test.go @@ -42,20 +42,37 @@ var ( ) loopCounter = metric.Must(meter).NewInt64Counter("function.loops") - paramValue = metric.Must(meter).NewFloat64ValueRecorder("function.param") + paramValue = metric.Must(meter).NewInt64ValueRecorder("function.param") nameKey = kv.Key("function.name") ) -func myFunction(ctx context.Context, values ...float64) error { - nameKV := nameKey.String("myFunction") - boundCount := loopCounter.Bind(nameKV) - boundValue := paramValue.Bind(nameKV) - for _, value := range values { - boundCount.Add(ctx, 1) - boundValue.Record(ctx, value) - } - return nil +func add(ctx context.Context, x, y int64) int64 { + nameKV := nameKey.String("add") + + var span trace.Span + ctx, span = tracer.Start(ctx, "Addition") + defer span.End() + + loopCounter.Add(ctx, 1, nameKV) + paramValue.Record(ctx, x, nameKV) + paramValue.Record(ctx, y, nameKV) + + return x + y +} + +func multiply(ctx context.Context, x, y int64) int64 { + nameKV := nameKey.String("multiply") + + var span trace.Span + ctx, span = tracer.Start(ctx, "Multiplication") + defer span.End() + + loopCounter.Add(ctx, 1, nameKV) + paramValue.Record(ctx, x, nameKV) + paramValue.Record(ctx, y, nameKV) + + return x * y } func Example() { @@ -70,22 +87,6 @@ func Example() { } defer pusher.Stop() - err = tracer.WithSpan( - context.Background(), - "myFunction/call", - func(ctx context.Context) error { - err := tracer.WithSpan( - ctx, - "internal/call", - func(ctx context.Context) error { return myFunction(ctx, 200, 100, 5000, 600) }, - ) - if err != nil { - return err - } - return myFunction(ctx, 100, 200, 500, 800) - }, - ) - if err != nil { - log.Fatal("Failed to call myFunction", err) - } + ctx := context.Background() + log.Println("the answer is", add(ctx, multiply(ctx, multiply(ctx, 2, 2), 10), 2)) } diff --git a/internal/trace/mock_tracer.go b/internal/trace/mock_tracer.go index 6c58dff0166..312516ebb1e 100644 --- a/internal/trace/mock_tracer.go +++ b/internal/trace/mock_tracer.go @@ -43,14 +43,6 @@ type MockTracer struct { var _ apitrace.Tracer = (*MockTracer)(nil) -// WithSpan does nothing except executing the body. -func (mt *MockTracer) WithSpan(ctx context.Context, name string, body func(context.Context) error, opts ...apitrace.StartOption) error { - ctx, span := mt.Start(ctx, name, opts...) - defer span.End() - - return body(ctx) -} - // Start starts a MockSpan. It creates a new Span based on Parent SpanContext option. // TracdID is used from Parent Span Context and SpanID is assigned. // If Parent SpanContext option is not specified then random TraceID is used. diff --git a/sdk/trace/span.go b/sdk/trace/span.go index a312f68d1be..16abb7afb40 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -109,11 +109,23 @@ func (s *span) SetAttribute(k string, v interface{}) { } } +// End ends the span adding an error event if it was called while panicking. func (s *span) End(options ...apitrace.EndOption) { if s == nil { return } + if recovered := recover(); recovered != nil { + // Record but don't stop the panic. + defer panic(recovered) + s.addEventWithTimestamp( + time.Now(), + errorEventName, + errorTypeKey.String(typeStr(recovered)), + errorMessageKey.String(fmt.Sprint(recovered)), + ) + } + if s.executionTracerTaskEnd != nil { s.executionTracerTaskEnd() } @@ -164,19 +176,21 @@ func (s *span) RecordError(ctx context.Context, err error, opts ...apitrace.Erro s.SetStatus(cfg.StatusCode, "") } - errType := reflect.TypeOf(err) - errTypeString := fmt.Sprintf("%s.%s", errType.PkgPath(), errType.Name()) - if errTypeString == "." { - // PkgPath() and Name() may be empty for builtin Types - errTypeString = errType.String() - } - s.AddEventWithTimestamp(ctx, cfg.Timestamp, errorEventName, - errorTypeKey.String(errTypeString), + errorTypeKey.String(typeStr(err)), errorMessageKey.String(err.Error()), ) } +func typeStr(i interface{}) string { + t := reflect.TypeOf(i) + if t.PkgPath() == "" && t.Name() == "" { + // Likely a builtin type. + return t.String() + } + return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) +} + func (s *span) Tracer() apitrace.Tracer { return s.tracer } diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 41fd30a5bcd..33a22aebd40 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -27,6 +27,8 @@ import ( "go.opentelemetry.io/otel/api/global" "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/kv" @@ -1146,3 +1148,26 @@ func TestWithInstrumentationVersion(t *testing.T) { t.Errorf("WithResource:\n -got +want %s", diff) } } + +func TestSpanCapturesPanic(t *testing.T) { + var te testExporter + tp, _ := NewProvider(WithSyncer(&te)) + _, span := tp.Tracer("CatchPanic").Start( + context.Background(), + "span", + apitrace.WithRecord(), + ) + + f := func() { + defer span.End() + panic(errors.New("error message")) + } + require.PanicsWithError(t, "error message", f) + require.Len(t, te.spans, 1) + require.Len(t, te.spans[0].MessageEvents, 1) + assert.Equal(t, te.spans[0].MessageEvents[0].Name, errorEventName) + assert.Equal(t, te.spans[0].MessageEvents[0].Attributes, []kv.KeyValue{ + errorTypeKey.String("*errors.errorString"), + errorMessageKey.String("error message"), + }) +} diff --git a/sdk/trace/tracer.go b/sdk/trace/tracer.go index 1b6dc4df0dc..8d395c58efb 100644 --- a/sdk/trace/tracer.go +++ b/sdk/trace/tracer.go @@ -66,14 +66,3 @@ func (tr *tracer) Start(ctx context.Context, name string, o ...apitrace.StartOpt span.executionTracerTaskEnd = end return apitrace.ContextWithSpan(ctx, span), span } - -func (tr *tracer) WithSpan(ctx context.Context, name string, body func(ctx context.Context) error, opts ...apitrace.StartOption) error { - ctx, span := tr.Start(ctx, name, opts...) - defer span.End() - - if err := body(ctx); err != nil { - // TODO: set event with boolean attribute for error. - return err - } - return nil -} From efd4e3a3838dc6e7c8428db677b15693c2274623 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Mon, 10 Aug 2020 09:17:09 -0700 Subject: [PATCH 59/60] Remove google.golang.org/grpc/codes dependency from API by adding an equivalent codes package (#1046) * Add otel/codes package to replace google.golang.org/grpc/codes * Replace google.golang.org/grpc/codes with otel/codes * Update opentracing bridge to use OTel codes * Update semconv to use OTel codes * Update SDK to convert from OTel codes to gRPC * go mod tidy * Add change to CHANGELOG * Fix word from feedback --- CHANGELOG.md | 1 + api/testharness/harness.go | 4 +- api/trace/api.go | 3 +- api/trace/context_test.go | 3 +- api/trace/noop_span.go | 3 +- api/trace/testtrace/span.go | 3 +- api/trace/testtrace/span_test.go | 3 +- bridge/opentracing/bridge.go | 3 +- bridge/opentracing/go.mod | 1 - bridge/opentracing/internal/mock.go | 3 +- codes/codes.go | 89 +++++++++++++++++++++++++++++ internal/trace/mock_span.go | 3 +- sdk/internal/codes.go | 49 ++++++++++++++++ sdk/trace/span.go | 5 +- sdk/trace/trace_test.go | 13 +++-- semconv/http.go | 3 +- semconv/http_test.go | 3 +- 17 files changed, 159 insertions(+), 33 deletions(-) create mode 100644 codes/codes.go create mode 100644 sdk/internal/codes.go diff --git a/CHANGELOG.md b/CHANGELOG.md index db861616328..46aa3b6cc5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) - The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) - Replace `WithSyncer` with `WithBatcher` in examples. (#1044) +- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046) ### Removed diff --git a/api/testharness/harness.go b/api/testharness/harness.go index e84c9807b9c..046325b272f 100644 --- a/api/testharness/harness.go +++ b/api/testharness/harness.go @@ -21,10 +21,8 @@ import ( "time" "go.opentelemetry.io/otel/api/kv" - - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/internal/matchers" ) diff --git a/api/trace/api.go b/api/trace/api.go index 517284b6e3a..a0e11e5fcff 100644 --- a/api/trace/api.go +++ b/api/trace/api.go @@ -18,9 +18,8 @@ import ( "context" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/codes" ) type Provider interface { diff --git a/api/trace/context_test.go b/api/trace/context_test.go index fd03d146a85..7e4891e66d5 100644 --- a/api/trace/context_test.go +++ b/api/trace/context_test.go @@ -19,10 +19,9 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" ) func TestSetCurrentSpanOverridesPreviouslySetSpan(t *testing.T) { diff --git a/api/trace/noop_span.go b/api/trace/noop_span.go index e222ad7f579..b35e9ce6439 100644 --- a/api/trace/noop_span.go +++ b/api/trace/noop_span.go @@ -18,9 +18,8 @@ import ( "context" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/codes" ) type NoopSpan struct { diff --git a/api/trace/testtrace/span.go b/api/trace/testtrace/span.go index 05a4452af63..4df34756a53 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/testtrace/span.go @@ -21,10 +21,9 @@ import ( "sync" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" ) const ( diff --git a/api/trace/testtrace/span_test.go b/api/trace/testtrace/span_test.go index 3e9920cb94e..6697f04e282 100644 --- a/api/trace/testtrace/span_test.go +++ b/api/trace/testtrace/span_test.go @@ -22,11 +22,10 @@ import ( "testing" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" "go.opentelemetry.io/otel/api/trace/testtrace" + "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/internal/matchers" ottest "go.opentelemetry.io/otel/internal/testing" ) diff --git a/bridge/opentracing/bridge.go b/bridge/opentracing/bridge.go index dd8ee6190db..7f5866c5cda 100644 --- a/bridge/opentracing/bridge.go +++ b/bridge/opentracing/bridge.go @@ -21,8 +21,6 @@ import ( "strings" "sync" - "google.golang.org/grpc/codes" - ot "github.com/opentracing/opentracing-go" otext "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" @@ -32,6 +30,7 @@ import ( otelcore "go.opentelemetry.io/otel/api/kv" otelpropagation "go.opentelemetry.io/otel/api/propagation" oteltrace "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" otelparent "go.opentelemetry.io/otel/internal/trace/parent" "go.opentelemetry.io/otel/bridge/opentracing/migration" diff --git a/bridge/opentracing/go.mod b/bridge/opentracing/go.mod index f5c2067845c..23644facd3d 100644 --- a/bridge/opentracing/go.mod +++ b/bridge/opentracing/go.mod @@ -7,5 +7,4 @@ replace go.opentelemetry.io/otel => ../.. require ( github.com/opentracing/opentracing-go v1.2.0 go.opentelemetry.io/otel v0.10.0 - google.golang.org/grpc v1.31.0 ) diff --git a/bridge/opentracing/internal/mock.go b/bridge/opentracing/internal/mock.go index 81121ea3e72..cdd6568fe14 100644 --- a/bridge/opentracing/internal/mock.go +++ b/bridge/opentracing/internal/mock.go @@ -21,11 +21,10 @@ import ( "sync" "time" - "google.golang.org/grpc/codes" - otelcorrelation "go.opentelemetry.io/otel/api/correlation" otelcore "go.opentelemetry.io/otel/api/kv" oteltrace "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" otelparent "go.opentelemetry.io/otel/internal/trace/parent" "go.opentelemetry.io/otel/bridge/opentracing/migration" diff --git a/codes/codes.go b/codes/codes.go new file mode 100644 index 00000000000..7d4aaee22c9 --- /dev/null +++ b/codes/codes.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package codes defines the canonical error codes used by OpenTelemetry. +// +// It conforms to [the OpenTelemetry +// specification](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#statuscanonicalcode). +// This also means that it follows gRPC codes and is based on +// [google.golang.org/grpc/codes](https://godoc.org/google.golang.org/grpc/codes). +// +// This package was added to this project, instead of using that existing +// package, to avoid the large package size it includes and not impose that +// burden on projects using this package. +package codes + +// Code is an 32-bit representation of a status state. +type Code uint32 + +// WARNING: any changes here must be propagated to the +// otel/sdk/internal/codes.go file. +const ( + // OK means success. + OK Code = 0 + // Canceled indicates the operation was canceled (typically by the + // caller). + Canceled Code = 1 + // Unknown error. An example of where this error may be returned is if an + // error is raised by a dependant API that does not contain enough + // information to convert it into a more appropriate error. + Unknown Code = 2 + // InvalidArgument indicates a client specified an invalid argument. Note + // that this differs from FailedPrecondition. InvalidArgument indicates + // arguments that are problematic regardless of the state of the system. + InvalidArgument Code = 3 + // DeadlineExceeded means a deadline expired before the operation could + // complete. For operations that change the state of the system, this error + // may be returned even if the operation has completed successfully. + DeadlineExceeded Code = 4 + // NotFound means some requested entity (e.g., file or directory) was not + // found. + NotFound Code = 5 + // AlreadyExists means some entity that we attempted to create (e.g., file + // or directory) already exists. + AlreadyExists Code = 6 + // PermissionDenied means the caller does not have permission to execute + // the specified operation. PermissionDenied must not be used if the caller + // cannot be identified (use Unauthenticated instead for those errors). + PermissionDenied Code = 7 + // ResourceExhausted means some resource has been exhausted, perhaps a + // per-user quota, or perhaps the entire file system is out of space. + ResourceExhausted Code = 8 + // FailedPrecondition means the operation was rejected because the system + // is not in a state required for the operation's execution. + FailedPrecondition Code = 9 + // Aborted means the operation was aborted, typically due to a concurrency + // issue like sequencer check failures, transaction aborts, etc. + Aborted Code = 10 + // OutOfRange means the operation was attempted past the valid range. + // E.g., seeking or reading past end of file. Unlike InvalidArgument, this + // error indicates a problem that may be fixed if the system state + // changes. + OutOfRange Code = 11 + // Unimplemented means the operation is not implemented or not + // supported/enabled in this service. + Unimplemented Code = 12 + // Internal means an internal errors. It means some invariants expected by + // underlying system has been broken. + Internal Code = 13 + // Unavailable means the service is currently unavailable. This is most + // likely a transient condition and may be corrected by retrying with a + // backoff. + Unavailable Code = 14 + // DataLoss means unrecoverable data loss or corruption has occurred. + DataLoss Code = 15 + // Unauthenticated means the request does not have valid authentication + // credentials for the operation. + Unauthenticated Code = 16 +) diff --git a/internal/trace/mock_span.go b/internal/trace/mock_span.go index 7a7addba563..c00f1ec34b2 100644 --- a/internal/trace/mock_span.go +++ b/internal/trace/mock_span.go @@ -18,10 +18,9 @@ import ( "context" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" apitrace "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" ) // MockSpan is a mock span used in association with MockTracer for testing purpose only. diff --git a/sdk/internal/codes.go b/sdk/internal/codes.go new file mode 100644 index 00000000000..d99990f6788 --- /dev/null +++ b/sdk/internal/codes.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + grpccodes "google.golang.org/grpc/codes" + + otelcodes "go.opentelemetry.io/otel/codes" +) + +// conversions are the equivalence mapping from OpenTelemetry to gRPC codes. +// Even though the underlying value should be the same all mappings are +// explicit here to avoid any error. +var conversions = map[otelcodes.Code]grpccodes.Code{ + otelcodes.OK: grpccodes.OK, + otelcodes.Canceled: grpccodes.Canceled, + otelcodes.Unknown: grpccodes.Unknown, + otelcodes.InvalidArgument: grpccodes.InvalidArgument, + otelcodes.DeadlineExceeded: grpccodes.DeadlineExceeded, + otelcodes.NotFound: grpccodes.NotFound, + otelcodes.AlreadyExists: grpccodes.AlreadyExists, + otelcodes.PermissionDenied: grpccodes.PermissionDenied, + otelcodes.ResourceExhausted: grpccodes.ResourceExhausted, + otelcodes.FailedPrecondition: grpccodes.FailedPrecondition, + otelcodes.Aborted: grpccodes.Aborted, + otelcodes.OutOfRange: grpccodes.OutOfRange, + otelcodes.Unimplemented: grpccodes.Unimplemented, + otelcodes.Internal: grpccodes.Internal, + otelcodes.Unavailable: grpccodes.Unavailable, + otelcodes.DataLoss: grpccodes.DataLoss, + otelcodes.Unauthenticated: grpccodes.Unauthenticated, +} + +// ConvertCode converts an OpenTelemetry Code into the equivalent gRPC code. +func ConvertCode(code otelcodes.Code) grpccodes.Code { + return conversions[code] +} diff --git a/sdk/trace/span.go b/sdk/trace/span.go index 16abb7afb40..489085e7b4f 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -22,11 +22,10 @@ import ( "sync" "time" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/kv" apitrace "go.opentelemetry.io/otel/api/trace" + "go.opentelemetry.io/otel/codes" export "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/internal" ) @@ -90,7 +89,7 @@ func (s *span) SetStatus(code codes.Code, msg string) { return } s.mu.Lock() - s.data.StatusCode = code + s.data.StatusCode = internal.ConvertCode(code) s.data.StatusMessage = msg s.mu.Unlock() } diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 33a22aebd40..69d27ac5182 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -29,12 +29,13 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" + grpccodes "google.golang.org/grpc/codes" "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/testharness" "go.opentelemetry.io/otel/api/trace" apitrace "go.opentelemetry.io/otel/api/trace" + otelcodes "go.opentelemetry.io/otel/codes" ottest "go.opentelemetry.io/otel/internal/testing" export "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/instrumentation" @@ -592,7 +593,7 @@ func TestSetSpanStatus(t *testing.T) { tp, _ := NewProvider(WithSyncer(te)) span := startSpan(tp, "SpanStatus") - span.SetStatus(codes.Canceled, "canceled") + span.SetStatus(otelcodes.Canceled, "canceled") got, err := endSpan(te, span) if err != nil { t.Fatal(err) @@ -606,7 +607,7 @@ func TestSetSpanStatus(t *testing.T) { ParentSpanID: sid, Name: "span0", SpanKind: apitrace.SpanKindInternal, - StatusCode: codes.Canceled, + StatusCode: grpccodes.Canceled, StatusMessage: "canceled", HasRemoteParent: true, InstrumentationLibrary: instrumentation.Library{Name: "SpanStatus"}, @@ -976,7 +977,7 @@ func TestRecordErrorWithStatus(t *testing.T) { testErr := ottest.NewTestError("test error") errTime := time.Now() - testStatus := codes.Unknown + testStatus := otelcodes.Unknown span.RecordError(context.Background(), testErr, apitrace.WithErrorTime(errTime), apitrace.WithErrorStatus(testStatus), @@ -995,7 +996,7 @@ func TestRecordErrorWithStatus(t *testing.T) { ParentSpanID: sid, Name: "span0", SpanKind: apitrace.SpanKindInternal, - StatusCode: codes.Unknown, + StatusCode: grpccodes.Unknown, StatusMessage: "", HasRemoteParent: true, MessageEvents: []export.Event{ @@ -1036,7 +1037,7 @@ func TestRecordErrorNil(t *testing.T) { Name: "span0", SpanKind: apitrace.SpanKindInternal, HasRemoteParent: true, - StatusCode: codes.OK, + StatusCode: grpccodes.OK, StatusMessage: "", InstrumentationLibrary: instrumentation.Library{Name: "RecordErrorNil"}, } diff --git a/semconv/http.go b/semconv/http.go index b82fef93f65..748dde0c080 100644 --- a/semconv/http.go +++ b/semconv/http.go @@ -21,9 +21,8 @@ import ( "strconv" "strings" - "google.golang.org/grpc/codes" - "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/codes" ) // NetAttributesFromHTTPRequest generates attributes of the net diff --git a/semconv/http_test.go b/semconv/http_test.go index 700ca1db05e..cfc26014ecd 100644 --- a/semconv/http_test.go +++ b/semconv/http_test.go @@ -1,5 +1,4 @@ // Copyright The OpenTelemetry Authors -// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -22,9 +21,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "google.golang.org/grpc/codes" otelkv "go.opentelemetry.io/otel/api/kv" + "go.opentelemetry.io/otel/codes" ) type tlsOption int From 4d0101ae12db2ccd818806d487d9eea7f1317867 Mon Sep 17 00:00:00 2001 From: Eundoo Song Date: Tue, 11 Aug 2020 05:35:15 +0900 Subject: [PATCH 60/60] Rename test packages (#1049) * Rename processor/test to processortest * Rename controller/test to controllertest * Rename testharness to apitest * Rename testtrace to tracetest --- CHANGELOG.md | 4 ++ api/{testharness => apitest}/harness.go | 2 +- api/{testharness => apitest}/package.go | 2 +- api/global/internal/trace_test.go | 8 +-- .../b3_propagator_benchmark_test.go | 2 +- .../b3_propagator_data_test.go | 2 +- .../b3_propagator_test.go | 2 +- api/trace/{testtrace => tracetest}/config.go | 2 +- api/trace/{testtrace => tracetest}/event.go | 2 +- api/trace/{testtrace => tracetest}/package.go | 2 +- .../propagator_test.go | 2 +- .../{testtrace => tracetest}/provider.go | 2 +- api/trace/{testtrace => tracetest}/span.go | 2 +- .../{testtrace => tracetest}/span_test.go | 72 +++++++++---------- ...trace_context_propagator_benchmark_test.go | 2 +- .../trace_context_propagator_test.go | 2 +- api/trace/{testtrace => tracetest}/tracer.go | 2 +- .../{testtrace => tracetest}/tracer_test.go | 42 +++++------ sdk/metric/benchmark_test.go | 4 +- .../{test => controllertest}/test.go | 2 +- sdk/metric/controller/pull/pull_test.go | 16 ++--- sdk/metric/controller/push/push_test.go | 17 +++-- sdk/metric/correct_test.go | 15 ++-- sdk/metric/processor/basic/basic_test.go | 24 +++---- .../processor/{test => processortest}/test.go | 2 +- sdk/metric/stress_test.go | 4 +- sdk/trace/trace_test.go | 4 +- 27 files changed, 122 insertions(+), 120 deletions(-) rename api/{testharness => apitest}/harness.go (99%) rename api/{testharness => apitest}/package.go (89%) rename api/trace/{testtrace => tracetest}/b3_propagator_benchmark_test.go (99%) rename api/trace/{testtrace => tracetest}/b3_propagator_data_test.go (99%) rename api/trace/{testtrace => tracetest}/b3_propagator_test.go (99%) rename api/trace/{testtrace => tracetest}/config.go (99%) rename api/trace/{testtrace => tracetest}/event.go (97%) rename api/trace/{testtrace => tracetest}/package.go (88%) rename api/trace/{testtrace => tracetest}/propagator_test.go (99%) rename api/trace/{testtrace => tracetest}/provider.go (98%) rename api/trace/{testtrace => tracetest}/span.go (99%) rename api/trace/{testtrace => tracetest}/span_test.go (91%) rename api/trace/{testtrace => tracetest}/trace_context_propagator_benchmark_test.go (99%) rename api/trace/{testtrace => tracetest}/trace_context_propagator_test.go (99%) rename api/trace/{testtrace => tracetest}/tracer.go (99%) rename api/trace/{testtrace => tracetest}/tracer_test.go (91%) rename sdk/metric/controller/{test => controllertest}/test.go (98%) rename sdk/metric/processor/{test => processortest}/test.go (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46aa3b6cc5e..17e71f08402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest` +- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest` +- Rename `api/testharness` to `api/apitest` +- Rename `api/trace/testtrace` to `api/trace/tracetest` - The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) diff --git a/api/testharness/harness.go b/api/apitest/harness.go similarity index 99% rename from api/testharness/harness.go rename to api/apitest/harness.go index 046325b272f..6237264ee7b 100644 --- a/api/testharness/harness.go +++ b/api/apitest/harness.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testharness +package apitest import ( "context" diff --git a/api/testharness/package.go b/api/apitest/package.go similarity index 89% rename from api/testharness/package.go rename to api/apitest/package.go index da4a89cefde..5e8ff5422de 100644 --- a/api/testharness/package.go +++ b/api/apitest/package.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testharness // import "go.opentelemetry.io/otel/api/testharness" +package apitest // import "go.opentelemetry.io/otel/api/apitest" diff --git a/api/global/internal/trace_test.go b/api/global/internal/trace_test.go index d391c3073ec..53781843151 100644 --- a/api/global/internal/trace_test.go +++ b/api/global/internal/trace_test.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/otel/api/global" "go.opentelemetry.io/otel/api/global/internal" - "go.opentelemetry.io/otel/api/trace/testtrace" + "go.opentelemetry.io/otel/api/trace/tracetest" ) func TestTraceWithSDK(t *testing.T) { @@ -34,8 +34,8 @@ func TestTraceWithSDK(t *testing.T) { // This is started before an SDK was registered and should be dropped. _, span1 := tracer1.Start(ctx, "span1") - sr := new(testtrace.StandardSpanRecorder) - tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)) + sr := new(tracetest.StandardSpanRecorder) + tp := tracetest.NewProvider(tracetest.WithSpanRecorder(sr)) global.SetTraceProvider(tp) // This span was started before initialization, it is expected to be dropped. @@ -50,7 +50,7 @@ func TestTraceWithSDK(t *testing.T) { _, span3 := tracer2.Start(ctx, "span3") span3.End() - filterNames := func(spans []*testtrace.Span) []string { + filterNames := func(spans []*tracetest.Span) []string { names := make([]string, len(spans)) for i := range spans { names[i] = spans[i].Name() diff --git a/api/trace/testtrace/b3_propagator_benchmark_test.go b/api/trace/tracetest/b3_propagator_benchmark_test.go similarity index 99% rename from api/trace/testtrace/b3_propagator_benchmark_test.go rename to api/trace/tracetest/b3_propagator_benchmark_test.go index 42870dc8d90..8d41ca38a45 100644 --- a/api/trace/testtrace/b3_propagator_benchmark_test.go +++ b/api/trace/tracetest/b3_propagator_benchmark_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" diff --git a/api/trace/testtrace/b3_propagator_data_test.go b/api/trace/tracetest/b3_propagator_data_test.go similarity index 99% rename from api/trace/testtrace/b3_propagator_data_test.go rename to api/trace/tracetest/b3_propagator_data_test.go index 262bbe8be6e..ba170e3f45e 100644 --- a/api/trace/testtrace/b3_propagator_data_test.go +++ b/api/trace/tracetest/b3_propagator_data_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "fmt" diff --git a/api/trace/testtrace/b3_propagator_test.go b/api/trace/tracetest/b3_propagator_test.go similarity index 99% rename from api/trace/testtrace/b3_propagator_test.go rename to api/trace/tracetest/b3_propagator_test.go index 5384a145557..56e2a8177a7 100644 --- a/api/trace/testtrace/b3_propagator_test.go +++ b/api/trace/tracetest/b3_propagator_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" diff --git a/api/trace/testtrace/config.go b/api/trace/tracetest/config.go similarity index 99% rename from api/trace/testtrace/config.go rename to api/trace/tracetest/config.go index b4557676c18..8cd93d77935 100644 --- a/api/trace/testtrace/config.go +++ b/api/trace/tracetest/config.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace +package tracetest import ( "context" diff --git a/api/trace/testtrace/event.go b/api/trace/tracetest/event.go similarity index 97% rename from api/trace/testtrace/event.go rename to api/trace/tracetest/event.go index 84598df4252..4e58d33cb4a 100644 --- a/api/trace/testtrace/event.go +++ b/api/trace/tracetest/event.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace +package tracetest import ( "time" diff --git a/api/trace/testtrace/package.go b/api/trace/tracetest/package.go similarity index 88% rename from api/trace/testtrace/package.go rename to api/trace/tracetest/package.go index 5401ed7efd8..7bc9078a0bf 100644 --- a/api/trace/testtrace/package.go +++ b/api/trace/tracetest/package.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace // import "go.opentelemetry.io/otel/api/trace/testtrace" +package tracetest // import "go.opentelemetry.io/otel/api/trace/tracetest" diff --git a/api/trace/testtrace/propagator_test.go b/api/trace/tracetest/propagator_test.go similarity index 99% rename from api/trace/testtrace/propagator_test.go rename to api/trace/tracetest/propagator_test.go index 4cbab89fc9f..4d35e70a64e 100644 --- a/api/trace/testtrace/propagator_test.go +++ b/api/trace/tracetest/propagator_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" diff --git a/api/trace/testtrace/provider.go b/api/trace/tracetest/provider.go similarity index 98% rename from api/trace/testtrace/provider.go rename to api/trace/tracetest/provider.go index 9bd58daf226..8388fc87e75 100644 --- a/api/trace/testtrace/provider.go +++ b/api/trace/tracetest/provider.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace +package tracetest import ( "sync" diff --git a/api/trace/testtrace/span.go b/api/trace/tracetest/span.go similarity index 99% rename from api/trace/testtrace/span.go rename to api/trace/tracetest/span.go index 4df34756a53..c161f5951e4 100644 --- a/api/trace/testtrace/span.go +++ b/api/trace/tracetest/span.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace +package tracetest import ( "context" diff --git a/api/trace/testtrace/span_test.go b/api/trace/tracetest/span_test.go similarity index 91% rename from api/trace/testtrace/span_test.go rename to api/trace/tracetest/span_test.go index 6697f04e282..433e5a71219 100644 --- a/api/trace/testtrace/span_test.go +++ b/api/trace/tracetest/span_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/api/kv" "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/api/trace/testtrace" + "go.opentelemetry.io/otel/api/trace/tracetest" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/internal/matchers" ottest "go.opentelemetry.io/otel/internal/testing" @@ -32,7 +32,7 @@ import ( func TestSpan(t *testing.T) { t.Run("#Tracer", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns the tracer used to start the span", func(t *testing.T) { t.Parallel() @@ -46,7 +46,7 @@ func TestSpan(t *testing.T) { }) t.Run("#End", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("ends the span", func(t *testing.T) { t.Parallel() @@ -55,7 +55,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(subject.Ended()).ToBeFalse() @@ -86,7 +86,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.End() @@ -109,7 +109,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() expectedEndTime := time.Now().AddDate(5, 0, 0) @@ -125,7 +125,7 @@ func TestSpan(t *testing.T) { }) t.Run("#RecordError", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("records an error", func(t *testing.T) { t.Parallel() @@ -152,13 +152,13 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() testTime := time.Now() subject.RecordError(ctx, s.err, trace.WithErrorTime(testTime)) - expectedEvents := []testtrace.Event{{ + expectedEvents := []tracetest.Event{{ Timestamp: testTime, Name: "error", Attributes: map[kv.Key]kv.Value{ @@ -180,7 +180,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() errMsg := "test error message" @@ -189,7 +189,7 @@ func TestSpan(t *testing.T) { expStatusCode := codes.Unknown subject.RecordError(ctx, testErr, trace.WithErrorTime(testTime), trace.WithErrorStatus(expStatusCode)) - expectedEvents := []testtrace.Event{{ + expectedEvents := []tracetest.Event{{ Timestamp: testTime, Name: "error", Attributes: map[kv.Key]kv.Value{ @@ -209,7 +209,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.End() @@ -226,7 +226,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) ctx, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.RecordError(ctx, nil) @@ -236,7 +236,7 @@ func TestSpan(t *testing.T) { }) t.Run("#IsRecording", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns true", func(t *testing.T) { t.Parallel() @@ -250,7 +250,7 @@ func TestSpan(t *testing.T) { }) t.Run("#SpanContext", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns a valid SpanContext", func(t *testing.T) { t.Parallel() @@ -275,7 +275,7 @@ func TestSpan(t *testing.T) { }) t.Run("#Name", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns the most recently set name on the span", func(t *testing.T) { t.Parallel() @@ -285,7 +285,7 @@ func TestSpan(t *testing.T) { originalName := "test" _, span := tracer.Start(context.Background(), originalName) - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(subject.Name()).ToEqual(originalName) @@ -308,7 +308,7 @@ func TestSpan(t *testing.T) { originalName := "test" _, span := tracer.Start(context.Background(), originalName) - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.End() @@ -319,7 +319,7 @@ func TestSpan(t *testing.T) { }) t.Run("#Attributes", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns an empty map by default", func(t *testing.T) { t.Parallel() @@ -328,7 +328,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(subject.Attributes()).ToEqual(map[kv.Key]kv.Value{}) @@ -342,7 +342,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() attr1 := kv.String("key1", "value1") @@ -368,7 +368,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() expectedAttr := kv.String("key", "value") @@ -391,7 +391,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() var wg sync.WaitGroup @@ -415,7 +415,7 @@ func TestSpan(t *testing.T) { }) t.Run("#Links", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns an empty map by default", func(t *testing.T) { t.Parallel() @@ -424,7 +424,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(len(subject.Links())).ToEqual(0) @@ -432,7 +432,7 @@ func TestSpan(t *testing.T) { }) t.Run("#Events", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns an empty slice by default", func(t *testing.T) { t.Parallel() @@ -441,7 +441,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(len(subject.Events())).ToEqual(0) @@ -455,7 +455,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() event1Name := "event1" @@ -508,7 +508,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.AddEvent(context.Background(), "test") @@ -526,7 +526,7 @@ func TestSpan(t *testing.T) { }) t.Run("#Status", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("defaults to OK", func(t *testing.T) { t.Parallel() @@ -535,7 +535,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(subject.StatusCode()).ToEqual(codes.OK) @@ -574,7 +574,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.SetStatus(codes.OK, "OK") @@ -592,7 +592,7 @@ func TestSpan(t *testing.T) { tracer := tp.Tracer(t.Name()) _, span := tracer.Start(context.Background(), "test") - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() originalStatus := codes.OK @@ -608,7 +608,7 @@ func TestSpan(t *testing.T) { }) t.Run("#SpanKind", func(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("returns the value given at start", func(t *testing.T) { t.Parallel() @@ -618,7 +618,7 @@ func TestSpan(t *testing.T) { _, span := tracer.Start(context.Background(), "test", trace.WithSpanKind(trace.SpanKindConsumer)) - subject, ok := span.(*testtrace.Span) + subject, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() subject.End() diff --git a/api/trace/testtrace/trace_context_propagator_benchmark_test.go b/api/trace/tracetest/trace_context_propagator_benchmark_test.go similarity index 99% rename from api/trace/testtrace/trace_context_propagator_benchmark_test.go rename to api/trace/tracetest/trace_context_propagator_benchmark_test.go index f6ebc4d8567..33d583a699d 100644 --- a/api/trace/testtrace/trace_context_propagator_benchmark_test.go +++ b/api/trace/tracetest/trace_context_propagator_benchmark_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" diff --git a/api/trace/testtrace/trace_context_propagator_test.go b/api/trace/tracetest/trace_context_propagator_test.go similarity index 99% rename from api/trace/testtrace/trace_context_propagator_test.go rename to api/trace/tracetest/trace_context_propagator_test.go index 10a7434e920..5125fb328b5 100644 --- a/api/trace/testtrace/trace_context_propagator_test.go +++ b/api/trace/tracetest/trace_context_propagator_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" diff --git a/api/trace/testtrace/tracer.go b/api/trace/tracetest/tracer.go similarity index 99% rename from api/trace/testtrace/tracer.go rename to api/trace/tracetest/tracer.go index 6fd2598b774..c8d06adebdf 100644 --- a/api/trace/testtrace/tracer.go +++ b/api/trace/tracetest/tracer.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace +package tracetest import ( "context" diff --git a/api/trace/testtrace/tracer_test.go b/api/trace/tracetest/tracer_test.go similarity index 91% rename from api/trace/testtrace/tracer_test.go rename to api/trace/tracetest/tracer_test.go index f62a33755b5..4af442b3972 100644 --- a/api/trace/testtrace/tracer_test.go +++ b/api/trace/tracetest/tracer_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testtrace_test +package tracetest_test import ( "context" @@ -22,18 +22,18 @@ import ( "testing" "time" + "go.opentelemetry.io/otel/api/apitest" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/testharness" "go.opentelemetry.io/otel/api/trace" - "go.opentelemetry.io/otel/api/trace/testtrace" + "go.opentelemetry.io/otel/api/trace/tracetest" "go.opentelemetry.io/otel/internal/matchers" ) func TestTracer(t *testing.T) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() - testharness.NewHarness(t).TestTracer(func() func() trace.Tracer { - tp := testtrace.NewProvider() + apitest.NewHarness(t).TestTracer(func() func() trace.Tracer { + tp := tracetest.NewProvider() var i uint64 return func() trace.Tracer { return tp.Tracer(fmt.Sprintf("tracer %d", atomic.AddUint64(&i, 1))) @@ -57,7 +57,7 @@ func TestTracer(t *testing.T) { subject := tp.Tracer(t.Name()) _, span := subject.Start(context.Background(), "test", trace.WithStartTime(expectedStartTime)) - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(testSpan.StartTime()).ToEqual(expectedStartTime) @@ -74,7 +74,7 @@ func TestTracer(t *testing.T) { subject := tp.Tracer(t.Name()) _, span := subject.Start(context.Background(), "test", trace.WithAttributes(attr1, attr2)) - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() attributes := testSpan.Attributes() @@ -94,7 +94,7 @@ func TestTracer(t *testing.T) { _, span := subject.Start(parent, "child") - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() childSpanContext := testSpan.SpanContext() @@ -117,7 +117,7 @@ func TestTracer(t *testing.T) { _, span := subject.Start(parent, "child") - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() childSpanContext := testSpan.SpanContext() @@ -139,7 +139,7 @@ func TestTracer(t *testing.T) { _, span := subject.Start(parent, "child") - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() childSpanContext := testSpan.SpanContext() @@ -162,7 +162,7 @@ func TestTracer(t *testing.T) { _, span := subject.Start(context.Background(), "child") - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() childSpanContext := testSpan.SpanContext() @@ -188,7 +188,7 @@ func TestTracer(t *testing.T) { _, span := subject.Start(parentCtx, "child", trace.WithNewRoot()) - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() childSpanContext := testSpan.SpanContext() @@ -248,7 +248,7 @@ func TestTracer(t *testing.T) { _, span = subject.Start(context.Background(), "test", trace.LinkedTo(link1.SpanContext, link1.Attributes...), trace.LinkedTo(link2.SpanContext, link2.Attributes...)) - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() links := testSpan.Links() @@ -259,7 +259,7 @@ func TestTracer(t *testing.T) { } func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (trace.Span, error)) { - tp := testtrace.NewProvider() + tp := tracetest.NewProvider() t.Run("starts a span with the expected name", func(t *testing.T) { t.Parallel() @@ -272,7 +272,7 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e.Expect(err).ToBeNil() - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(testSpan.Name()).ToEqual(expectedName) @@ -291,7 +291,7 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e.Expect(err).ToBeNil() - testSpan, ok := span.(*testtrace.Span) + testSpan, ok := span.(*tracetest.Span) e.Expect(ok).ToBeTrue() e.Expect(testSpan.StartTime()).ToBeTemporally(matchers.AfterOrSameTime, start) @@ -303,8 +303,8 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e := matchers.NewExpecter(t) - sr := new(testtrace.StandardSpanRecorder) - subject := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)).Tracer(t.Name()) + sr := new(tracetest.StandardSpanRecorder) + subject := tracetest.NewProvider(tracetest.WithSpanRecorder(sr)).Tracer(t.Name()) subject.Start(context.Background(), "span1") e.Expect(len(sr.Started())).ToEqual(1) @@ -323,8 +323,8 @@ func testTracedSpan(t *testing.T, fn func(tracer trace.Tracer, name string) (tra e := matchers.NewExpecter(t) - sr := new(testtrace.StandardSpanRecorder) - subject := testtrace.NewProvider(testtrace.WithSpanRecorder(sr)).Tracer(t.Name()) + sr := new(tracetest.StandardSpanRecorder) + subject := tracetest.NewProvider(tracetest.WithSpanRecorder(sr)).Tracer(t.Name()) numSpans := 2 diff --git a/sdk/metric/benchmark_test.go b/sdk/metric/benchmark_test.go index 204dbdfbca9..6331084b4c0 100644 --- a/sdk/metric/benchmark_test.go +++ b/sdk/metric/benchmark_test.go @@ -26,7 +26,7 @@ import ( "go.opentelemetry.io/otel/api/metric" export "go.opentelemetry.io/otel/sdk/export/metric" sdk "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" ) type benchFixture struct { @@ -40,7 +40,7 @@ func newFixture(b *testing.B) *benchFixture { b.ReportAllocs() bf := &benchFixture{ B: b, - AggregatorSelector: test.AggregatorSelector(), + AggregatorSelector: processortest.AggregatorSelector(), } bf.accumulator = sdk.NewAccumulator(bf) diff --git a/sdk/metric/controller/test/test.go b/sdk/metric/controller/controllertest/test.go similarity index 98% rename from sdk/metric/controller/test/test.go rename to sdk/metric/controller/controllertest/test.go index f2c2e744762..94f38fbe6bd 100644 --- a/sdk/metric/controller/test/test.go +++ b/sdk/metric/controller/controllertest/test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package controllertest import ( "time" diff --git a/sdk/metric/controller/pull/pull_test.go b/sdk/metric/controller/pull/pull_test.go index c2dde5de438..8a129caf85e 100644 --- a/sdk/metric/controller/pull/pull_test.go +++ b/sdk/metric/controller/pull/pull_test.go @@ -26,9 +26,9 @@ import ( "go.opentelemetry.io/otel/api/label" "go.opentelemetry.io/otel/api/metric" export "go.opentelemetry.io/otel/sdk/export/metric" + "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" "go.opentelemetry.io/otel/sdk/metric/controller/pull" - controllerTest "go.opentelemetry.io/otel/sdk/metric/controller/test" - "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" selector "go.opentelemetry.io/otel/sdk/metric/selector/simple" ) @@ -46,7 +46,7 @@ func TestPullNoCache(t *testing.T) { counter.Add(ctx, 10, kv.String("A", "B")) require.NoError(t, puller.Collect(ctx)) - records := test.NewOutput(label.DefaultEncoder()) + records := processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, puller.ForEach(export.CumulativeExporter, records.AddRecord)) require.EqualValues(t, map[string]float64{ @@ -56,7 +56,7 @@ func TestPullNoCache(t *testing.T) { counter.Add(ctx, 10, kv.String("A", "B")) require.NoError(t, puller.Collect(ctx)) - records = test.NewOutput(label.DefaultEncoder()) + records = processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, puller.ForEach(export.CumulativeExporter, records.AddRecord)) require.EqualValues(t, map[string]float64{ @@ -70,7 +70,7 @@ func TestPullWithCache(t *testing.T) { export.CumulativeExporter, pull.WithCachePeriod(time.Second), ) - mock := controllerTest.NewMockClock() + mock := controllertest.NewMockClock() puller.SetClock(mock) ctx := context.Background() @@ -80,7 +80,7 @@ func TestPullWithCache(t *testing.T) { counter.Add(ctx, 10, kv.String("A", "B")) require.NoError(t, puller.Collect(ctx)) - records := test.NewOutput(label.DefaultEncoder()) + records := processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, puller.ForEach(export.CumulativeExporter, records.AddRecord)) require.EqualValues(t, map[string]float64{ @@ -91,7 +91,7 @@ func TestPullWithCache(t *testing.T) { // Cached value! require.NoError(t, puller.Collect(ctx)) - records = test.NewOutput(label.DefaultEncoder()) + records = processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, puller.ForEach(export.CumulativeExporter, records.AddRecord)) require.EqualValues(t, map[string]float64{ @@ -103,7 +103,7 @@ func TestPullWithCache(t *testing.T) { // Re-computed value! require.NoError(t, puller.Collect(ctx)) - records = test.NewOutput(label.DefaultEncoder()) + records = processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, puller.ForEach(export.CumulativeExporter, records.AddRecord)) require.EqualValues(t, map[string]float64{ diff --git a/sdk/metric/controller/push/push_test.go b/sdk/metric/controller/push/push_test.go index ab9f4f55cbf..46fc5116e62 100644 --- a/sdk/metric/controller/push/push_test.go +++ b/sdk/metric/controller/push/push_test.go @@ -31,10 +31,9 @@ import ( export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" "go.opentelemetry.io/otel/sdk/export/metric/metrictest" + "go.opentelemetry.io/otel/sdk/metric/controller/controllertest" "go.opentelemetry.io/otel/sdk/metric/controller/push" - controllerTest "go.opentelemetry.io/otel/sdk/metric/controller/test" - "go.opentelemetry.io/otel/sdk/metric/processor/test" - processorTest "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -125,7 +124,7 @@ func (e *testExporter) resetRecords() ([]export.Record, int) { func TestPushDoubleStop(t *testing.T) { fix := newFixture(t) - p := push.New(processorTest.AggregatorSelector(), fix.exporter) + p := push.New(processortest.AggregatorSelector(), fix.exporter) p.Start() p.Stop() p.Stop() @@ -133,7 +132,7 @@ func TestPushDoubleStop(t *testing.T) { func TestPushDoubleStart(t *testing.T) { fix := newFixture(t) - p := push.New(test.AggregatorSelector(), fix.exporter) + p := push.New(processortest.AggregatorSelector(), fix.exporter) p.Start() p.Start() p.Stop() @@ -143,14 +142,14 @@ func TestPushTicker(t *testing.T) { fix := newFixture(t) p := push.New( - test.AggregatorSelector(), + processortest.AggregatorSelector(), fix.exporter, push.WithPeriod(time.Second), push.WithResource(testResource), ) meter := p.Provider().Meter("name") - mock := controllerTest.NewMockClock() + mock := controllertest.NewMockClock() p.SetClock(mock) ctx := context.Background() @@ -224,13 +223,13 @@ func TestPushExportError(t *testing.T) { fix.exporter.injectErr = injector("counter1.sum", tt.injectedError) p := push.New( - test.AggregatorSelector(), + processortest.AggregatorSelector(), fix.exporter, push.WithPeriod(time.Second), push.WithResource(testResource), ) - mock := controllerTest.NewMockClock() + mock := controllertest.NewMockClock() p.SetClock(mock) ctx := context.Background() diff --git a/sdk/metric/correct_test.go b/sdk/metric/correct_test.go index 4809ee5fa44..8f69a439a9a 100644 --- a/sdk/metric/correct_test.go +++ b/sdk/metric/correct_test.go @@ -30,8 +30,7 @@ import ( export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" metricsdk "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/processor/test" - batchTest "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -84,14 +83,14 @@ type testSelector struct { func (ts *testSelector) AggregatorFor(desc *metric.Descriptor, aggPtrs ...*export.Aggregator) { ts.newAggCount += len(aggPtrs) - test.AggregatorSelector().AggregatorFor(desc, aggPtrs...) + processortest.AggregatorSelector().AggregatorFor(desc, aggPtrs...) } func newSDK(t *testing.T) (metric.Meter, *metricsdk.Accumulator, *correctnessProcessor) { testHandler.Reset() processor := &correctnessProcessor{ t: t, - testSelector: &testSelector{selector: test.AggregatorSelector()}, + testSelector: &testSelector{selector: processortest.AggregatorSelector()}, } accum := metricsdk.NewAccumulator( processor, @@ -346,7 +345,7 @@ func TestObserverCollection(t *testing.T) { require.Equal(t, collected, len(processor.accumulations)) - out := batchTest.NewOutput(label.DefaultEncoder()) + out := processortest.NewOutput(label.DefaultEncoder()) for _, rec := range processor.accumulations { require.NoError(t, out.AddAccumulation(rec)) } @@ -449,7 +448,7 @@ func TestObserverBatch(t *testing.T) { require.Equal(t, collected, len(processor.accumulations)) - out := batchTest.NewOutput(label.DefaultEncoder()) + out := processortest.NewOutput(label.DefaultEncoder()) for _, rec := range processor.accumulations { require.NoError(t, out.AddAccumulation(rec)) } @@ -494,7 +493,7 @@ func TestRecordBatch(t *testing.T) { sdk.Collect(ctx) - out := batchTest.NewOutput(label.DefaultEncoder()) + out := processortest.NewOutput(label.DefaultEncoder()) for _, rec := range processor.accumulations { require.NoError(t, out.AddAccumulation(rec)) } @@ -576,7 +575,7 @@ func TestSyncInAsync(t *testing.T) { sdk.Collect(ctx) - out := batchTest.NewOutput(label.DefaultEncoder()) + out := processortest.NewOutput(label.DefaultEncoder()) for _, rec := range processor.accumulations { require.NoError(t, out.AddAccumulation(rec)) } diff --git a/sdk/metric/processor/basic/basic_test.go b/sdk/metric/processor/basic/basic_test.go index 4d3f6392be1..1dcab1b7b16 100644 --- a/sdk/metric/processor/basic/basic_test.go +++ b/sdk/metric/processor/basic/basic_test.go @@ -36,7 +36,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount" "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" "go.opentelemetry.io/otel/sdk/metric/processor/basic" - "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" "go.opentelemetry.io/otel/sdk/resource" ) @@ -207,7 +207,7 @@ func testProcessor( } // Test the final checkpoint state. - records1 := test.NewOutput(label.DefaultEncoder()) + records1 := processortest.NewOutput(label.DefaultEncoder()) err = checkpointSet.ForEach(ekind, records1.AddRecord) // Test for an allowed error: @@ -287,19 +287,19 @@ func (bogusExporter) Export(context.Context, export.CheckpointSet) error { func TestBasicInconsistent(t *testing.T) { // Test double-start - b := basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b := basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) b.StartCollection() b.StartCollection() require.Equal(t, basic.ErrInconsistentState, b.FinishCollection()) // Test finish without start - b = basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b = basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) require.Equal(t, basic.ErrInconsistentState, b.FinishCollection()) // Test no finish - b = basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b = basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) b.StartCollection() require.Equal( @@ -312,14 +312,14 @@ func TestBasicInconsistent(t *testing.T) { ) // Test no start - b = basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b = basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) desc := metric.NewDescriptor("inst", metric.CounterKind, metric.Int64NumberKind) accum := export.NewAccumulation(&desc, label.EmptySet(), resource.Empty(), metrictest.NoopAggregator{}) require.Equal(t, basic.ErrInconsistentState, b.Process(accum)) // Test invalid kind: - b = basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b = basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) b.StartCollection() require.NoError(t, b.Process(accum)) require.NoError(t, b.FinishCollection()) @@ -334,7 +334,7 @@ func TestBasicInconsistent(t *testing.T) { func TestBasicTimestamps(t *testing.T) { beforeNew := time.Now() - b := basic.New(test.AggregatorSelector(), export.PassThroughExporter) + b := basic.New(processortest.AggregatorSelector(), export.PassThroughExporter) afterNew := time.Now() desc := metric.NewDescriptor("inst", metric.CounterKind, metric.Int64NumberKind) @@ -395,7 +395,7 @@ func TestStatefulNoMemoryCumulative(t *testing.T) { require.NoError(t, processor.FinishCollection()) // Verify zero elements - records := test.NewOutput(label.DefaultEncoder()) + records := processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, checkpointSet.ForEach(ekind, records.AddRecord)) require.EqualValues(t, map[string]float64{}, records.Map) @@ -405,7 +405,7 @@ func TestStatefulNoMemoryCumulative(t *testing.T) { require.NoError(t, processor.FinishCollection()) // Verify one element - records = test.NewOutput(label.DefaultEncoder()) + records = processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, checkpointSet.ForEach(ekind, records.AddRecord)) require.EqualValues(t, map[string]float64{ "inst/A=B/R=V": float64(i * 10), @@ -429,7 +429,7 @@ func TestStatefulNoMemoryDelta(t *testing.T) { require.NoError(t, processor.FinishCollection()) // Verify zero elements - records := test.NewOutput(label.DefaultEncoder()) + records := processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, checkpointSet.ForEach(ekind, records.AddRecord)) require.EqualValues(t, map[string]float64{}, records.Map) @@ -439,7 +439,7 @@ func TestStatefulNoMemoryDelta(t *testing.T) { require.NoError(t, processor.FinishCollection()) // Verify one element - records = test.NewOutput(label.DefaultEncoder()) + records = processortest.NewOutput(label.DefaultEncoder()) require.NoError(t, checkpointSet.ForEach(ekind, records.AddRecord)) require.EqualValues(t, map[string]float64{ "inst/A=B/R=V": 10, diff --git a/sdk/metric/processor/test/test.go b/sdk/metric/processor/processortest/test.go similarity index 99% rename from sdk/metric/processor/test/test.go rename to sdk/metric/processor/processortest/test.go index fe2d4eec28e..422db8cbf27 100644 --- a/sdk/metric/processor/test/test.go +++ b/sdk/metric/processor/processortest/test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package processortest import ( "fmt" diff --git a/sdk/metric/stress_test.go b/sdk/metric/stress_test.go index e0245ae9a6d..c1368869250 100644 --- a/sdk/metric/stress_test.go +++ b/sdk/metric/stress_test.go @@ -36,7 +36,7 @@ import ( api "go.opentelemetry.io/otel/api/metric" export "go.opentelemetry.io/otel/sdk/export/metric" "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/processor/test" + "go.opentelemetry.io/otel/sdk/metric/processor/processortest" ) const ( @@ -290,7 +290,7 @@ func stressTest(t *testing.T, impl testImpl) { T: t, impl: impl, lused: map[string]bool{}, - AggregatorSelector: test.AggregatorSelector(), + AggregatorSelector: processortest.AggregatorSelector(), } cc := concurrency() sdk := NewAccumulator(fixture) diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 69d27ac5182..3e8838b2664 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -31,8 +31,8 @@ import ( "github.com/stretchr/testify/require" grpccodes "google.golang.org/grpc/codes" + "go.opentelemetry.io/otel/api/apitest" "go.opentelemetry.io/otel/api/kv" - "go.opentelemetry.io/otel/api/testharness" "go.opentelemetry.io/otel/api/trace" apitrace "go.opentelemetry.io/otel/api/trace" otelcodes "go.opentelemetry.io/otel/codes" @@ -63,7 +63,7 @@ func TestTracerFollowsExpectedAPIBehaviour(t *testing.T) { if err != nil { t.Fatalf("failed to create provider, err: %v\n", err) } - harness := testharness.NewHarness(t) + harness := apitest.NewHarness(t) subjectFactory := func() trace.Tracer { return tp.Tracer("") }