diff --git a/.github/workflows/protogen.yml b/.github/workflows/protogen.yml deleted file mode 100644 index 857b8bbceec..00000000000 --- a/.github/workflows/protogen.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Proto-go-generator -on: - pull_request: - paths: - - 'exporters/otlp/internal/opentelemetry-proto' - -jobs: - protogen: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: actions/setup-go@v2 - with: - go-version: '^1.14.0' - - run: sudo apt-get -y install rsync wget unzip - - run: make -f Makefile.protos protobuf clean - - 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 9019b9e6143..42c118657b9 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 + +- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713) +- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713) + ## [0.19.0] - 2021-03-18 ### Added diff --git a/Makefile.protos b/Makefile.protos deleted file mode 100644 index 16edc57ee82..00000000000 --- a/Makefile.protos +++ /dev/null @@ -1,129 +0,0 @@ -# -*- 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.protos has rules to generate go code for otlp -# exporter. It does it by copying the proto files from -# `exporters/otlp/internal/opentelemetry-proto` (which is a -# submodule that needs to be checked out) into `gen/proto`, changing -# the go_package option to a valid string, generating the go files and -# finally copying the files into the module. The files are not -# generated in place, because protoc generates a too-deep directory -# structure. -# -# Currently, all the generated code is in -# `exporters/otlp/internal/opentelemetry-proto-gen`. -# -# Prereqs: wget (for downloading the zip file with protoc binary), -# unzip (for unpacking the archive), rsync (for copying back the -# generated files). - -PROTOC_VERSION := 3.14.0 - -TOOLS_DIR := $(abspath ./.tools) -TOOLS_MOD_DIR := ./internal/tools -PROTOBUF_VERSION := v1 -OTEL_PROTO_SUBMODULE := exporters/otlp/internal/opentelemetry-proto -GEN_TEMP_DIR := gen -SUBMODULE_PROTO_FILES := $(wildcard $(OTEL_PROTO_SUBMODULE)/opentelemetry/proto/*/$(PROTOBUF_VERSION)/*.proto) $(wildcard $(OTEL_PROTO_SUBMODULE)/opentelemetry/proto/collector/*/$(PROTOBUF_VERSION)/*.proto) - -ifeq ($(strip $(SUBMODULE_PROTO_FILES)),) -$(error Submodule at $(OTEL_PROTO_SUBMODULE) is not checked out, use "git submodule update --init") -endif - -PROTOBUF_GEN_DIR := exporters/otlp/internal/opentelemetry-proto-gen -PROTOBUF_TEMP_DIR := $(GEN_TEMP_DIR)/pb-go -PROTO_SOURCE_DIR := $(GEN_TEMP_DIR)/proto -SOURCE_PROTO_FILES := $(subst $(OTEL_PROTO_SUBMODULE),$(PROTO_SOURCE_DIR),$(SUBMODULE_PROTO_FILES)) - -.DEFAULT_GOAL := protobuf - -UNAME_S := $(shell uname -s) -UNAME_M := $(shell uname -m) - -ifeq ($(UNAME_S),Linux) - -PROTOC_OS := linux -PROTOC_ARCH := $(UNAME_M) - -else ifeq ($(UNAME_S),Darwin) - -PROTOC_OS := osx -PROTOC_ARCH := x86_64 - -endif - -PROTOC_ZIP_URL := https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-$(PROTOC_OS)-$(PROTOC_ARCH).zip - -$(TOOLS_DIR)/PROTOC_$(PROTOC_VERSION): - @rm -f "$(TOOLS_DIR)"/PROTOC_* && \ - touch "$@" - -# Depend on a versioned file (like PROTOC_3.14.0), so when version -# gets bumped, we will depend on a nonexistent file and thus download -# a newer version. -$(TOOLS_DIR)/protoc/bin/protoc: $(TOOLS_DIR)/PROTOC_$(PROTOC_VERSION) - echo "Fetching protoc $(PROTOC_VERSION)" && \ - rm -rf $(TOOLS_DIR)/protoc && \ - wget -O $(TOOLS_DIR)/protoc.zip $(PROTOC_ZIP_URL) && \ - unzip $(TOOLS_DIR)/protoc.zip -d $(TOOLS_DIR)/protoc-tmp && \ - rm $(TOOLS_DIR)/protoc.zip && \ - touch $(TOOLS_DIR)/protoc-tmp/bin/protoc && \ - mv $(TOOLS_DIR)/protoc-tmp $(TOOLS_DIR)/protoc - -$(TOOLS_DIR)/protoc-gen-gogofast: $(TOOLS_MOD_DIR)/go.mod $(TOOLS_MOD_DIR)/go.sum $(TOOLS_MOD_DIR)/tools.go - cd $(TOOLS_MOD_DIR) && \ - go build -o $(TOOLS_DIR)/protoc-gen-gogofast github.com/gogo/protobuf/protoc-gen-gogofast && \ - go mod tidy - -# Return a sed expression for replacing the go_package option in proto -# file with a one that's valid for us. -# -# Example: $(call get-sed-expr,$(PROTOBUF_GEN_DIR)) -define get-sed-expr -'s,go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go,go_package = "go.opentelemetry.io/otel/$(1),' -endef - -.PHONY: protobuf -protobuf: protobuf-source gen-protobuf copy-protobufs - -.PHONY: protobuf-source -protobuf-source: $(SOURCE_PROTO_FILES) - -# This copies proto files from submodule into $(PROTO_SOURCE_DIR), -# thus satisfying the $(SOURCE_PROTO_FILES) prerequisite. The copies -# have their package name replaced by go.opentelemetry.io/otel. -$(PROTO_SOURCE_DIR)/%.proto: $(OTEL_PROTO_SUBMODULE)/%.proto - @ \ - mkdir -p $(@D); \ - sed -e $(call get-sed-expr,$(PROTOBUF_GEN_DIR)) "$<" >"$@.tmp"; \ - mv "$@.tmp" "$@" - -.PHONY: gen-protobuf -gen-protobuf: $(SOURCE_PROTO_FILES) $(TOOLS_DIR)/protoc-gen-gogofast $(TOOLS_DIR)/protoc/bin/protoc - @ \ - mkdir -p "$(PROTOBUF_TEMP_DIR)"; \ - set -e; for f in $^; do \ - if [[ "$${f}" == $(TOOLS_DIR)/* ]]; then continue; fi; \ - echo "protoc $${f#"$(PROTO_SOURCE_DIR)/"}"; \ - PATH="$(TOOLS_DIR):$${PATH}" $(TOOLS_DIR)/protoc/bin/protoc --proto_path="$(PROTO_SOURCE_DIR)" --gogofast_out="plugins=grpc:$(PROTOBUF_TEMP_DIR)" "$${f}"; \ - done - -.PHONY: copy-protobufs -copy-protobufs: - @rsync -a $(PROTOBUF_TEMP_DIR)/go.opentelemetry.io/otel/exporters . - -.PHONY: clean -clean: - rm -rf $(GEN_TEMP_DIR) diff --git a/example/otel-collector/go.sum b/example/otel-collector/go.sum index 34b8d04ff95..140ed246fa0 100644 --- a/example/otel-collector/go.sum +++ b/example/otel-collector/go.sum @@ -1,30 +1,35 @@ 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= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 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/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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.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/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/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= @@ -33,59 +38,49 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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/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/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= 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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20200107190931-bf48bf16ab8d/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-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-20201020160332-67f06af15bc9/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/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.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/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= 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/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -93,12 +88,14 @@ 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-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 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.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -114,6 +111,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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/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.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/prom-collector/go.sum b/example/prom-collector/go.sum index 32af3027753..75cdaffd9da 100644 --- a/example/prom-collector/go.sum +++ b/example/prom-collector/go.sum @@ -11,6 +11,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy 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/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -34,6 +35,7 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -54,6 +56,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -73,8 +76,6 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG 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.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 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-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -82,6 +83,7 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb 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.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= @@ -113,6 +115,8 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/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.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -148,7 +152,6 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -245,6 +248,7 @@ github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULU github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= 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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 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= @@ -275,13 +279,13 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -304,8 +308,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -322,19 +324,18 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR 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-20190813141303-74dc4d7220e7/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20200107190931-bf48bf16ab8d/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/sync v0.0.0-20201020160332-67f06af15bc9/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= @@ -354,13 +355,11 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -375,10 +374,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -393,6 +389,7 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -406,6 +403,7 @@ google.golang.org/grpc v1.23.1/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.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -433,6 +431,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN 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.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/exporters/otlp/go.mod b/exporters/otlp/go.mod index a33dfa704c6..1b9c4189b62 100644 --- a/exporters/otlp/go.mod +++ b/exporters/otlp/go.mod @@ -8,7 +8,6 @@ replace ( ) require ( - github.com/gogo/protobuf v1.3.2 github.com/google/go-cmp v0.5.5 github.com/stretchr/testify v1.7.0 go.opentelemetry.io/otel v0.19.0 @@ -17,7 +16,9 @@ require ( go.opentelemetry.io/otel/sdk/export/metric v0.19.0 go.opentelemetry.io/otel/sdk/metric v0.19.0 go.opentelemetry.io/otel/trace v0.19.0 + go.opentelemetry.io/proto/otlp v0.7.0 google.golang.org/grpc v1.36.0 + google.golang.org/protobuf v1.25.0 ) replace go.opentelemetry.io/otel/bridge/opencensus => ../../bridge/opencensus diff --git a/exporters/otlp/go.sum b/exporters/otlp/go.sum index 34b8d04ff95..140ed246fa0 100644 --- a/exporters/otlp/go.sum +++ b/exporters/otlp/go.sum @@ -1,30 +1,35 @@ 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= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 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/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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.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/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/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= @@ -33,59 +38,49 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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/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/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= 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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20200107190931-bf48bf16ab8d/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-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-20201020160332-67f06af15bc9/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/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.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/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= 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/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -93,12 +88,14 @@ 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-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 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.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -114,6 +111,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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/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.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/opentelemetry-proto b/exporters/otlp/internal/opentelemetry-proto deleted file mode 160000 index 59c488bfb8f..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 59c488bfb8fb6d0458ad6425758b70259ff4a2bd diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/collector/logs/v1/logs_service.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/collector/logs/v1/logs_service.pb.go deleted file mode 100644 index 9d9b8d67d91..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/collector/logs/v1/logs_service.pb.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/logs/v1/logs_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/logs/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportLogsServiceRequest struct { - // An array of ResourceLogs. - // 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. - ResourceLogs []*v1.ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ExportLogsServiceRequest) Reset() { *m = ExportLogsServiceRequest{} } -func (m *ExportLogsServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceRequest) ProtoMessage() {} -func (*ExportLogsServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{0} -} -func (m *ExportLogsServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceRequest.Merge(m, src) -} -func (m *ExportLogsServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceRequest proto.InternalMessageInfo - -func (m *ExportLogsServiceRequest) GetResourceLogs() []*v1.ResourceLogs { - if m != nil { - return m.ResourceLogs - } - return nil -} - -type ExportLogsServiceResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ExportLogsServiceResponse) Reset() { *m = ExportLogsServiceResponse{} } -func (m *ExportLogsServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceResponse) ProtoMessage() {} -func (*ExportLogsServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{1} -} -func (m *ExportLogsServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceResponse.Merge(m, src) -} -func (m *ExportLogsServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExportLogsServiceRequest)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest") - proto.RegisterType((*ExportLogsServiceResponse)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/logs/v1/logs_service.proto", fileDescriptor_8e3bf87aaa43acd4) -} - -var fileDescriptor_8e3bf87aaa43acd4 = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x4a, 0x03, 0x31, - 0x14, 0x86, 0x0d, 0x42, 0x17, 0xa9, 0x82, 0xcc, 0xaa, 0x56, 0x18, 0x64, 0x40, 0xa9, 0x8b, 0x26, - 0xb4, 0x6e, 0xdc, 0x29, 0x05, 0x77, 0x22, 0x65, 0xdc, 0x75, 0x53, 0x74, 0x78, 0x0c, 0x23, 0x31, - 0x2f, 0xbe, 0xa4, 0x83, 0x1e, 0xc2, 0x23, 0xb8, 0xf5, 0x2c, 0x2e, 0x3d, 0x82, 0xcc, 0x49, 0x64, - 0x92, 0x22, 0x53, 0x1d, 0x61, 0x70, 0x15, 0xf2, 0xf2, 0x7f, 0xff, 0xff, 0x3f, 0x08, 0x3f, 0x43, - 0x03, 0xda, 0x81, 0x82, 0x07, 0x70, 0xf4, 0x2c, 0x0d, 0xa1, 0x43, 0x99, 0xa1, 0x52, 0x90, 0x39, - 0x24, 0xa9, 0x30, 0xb7, 0xb2, 0x9c, 0xf8, 0x73, 0x69, 0x81, 0xca, 0x22, 0x03, 0xe1, 0x45, 0xd1, - 0xd1, 0x06, 0x19, 0x86, 0xe2, 0x9b, 0x14, 0x35, 0x21, 0xca, 0xc9, 0xf0, 0xb8, 0x2d, 0xa0, 0x69, - 0x1b, 0xc8, 0xe4, 0x9e, 0x0f, 0x2e, 0x9f, 0x0c, 0x92, 0xbb, 0xc2, 0xdc, 0xde, 0x84, 0xa4, 0x14, - 0x1e, 0x57, 0x60, 0x5d, 0x74, 0xcd, 0x77, 0x09, 0x2c, 0xae, 0x28, 0x83, 0x65, 0x8d, 0x0c, 0xd8, - 0xe1, 0xf6, 0xa8, 0x3f, 0x3d, 0x11, 0x6d, 0x15, 0xd6, 0xc1, 0x22, 0x5d, 0x13, 0xb5, 0x5f, 0xba, - 0x43, 0x8d, 0x5b, 0x72, 0xc0, 0xf7, 0x5b, 0xb2, 0xac, 0x41, 0x6d, 0x61, 0xfa, 0xca, 0x78, 0xbf, - 0x31, 0x8f, 0x5e, 0x18, 0xef, 0x05, 0x75, 0x74, 0x2e, 0x3a, 0xed, 0x2c, 0xfe, 0x5a, 0x64, 0x78, - 0xf1, 0x7f, 0x83, 0xd0, 0x2e, 0xd9, 0x9a, 0xbd, 0xb1, 0xf7, 0x2a, 0x66, 0x1f, 0x55, 0xcc, 0x3e, - 0xab, 0x98, 0xf1, 0x51, 0x81, 0xdd, 0x4c, 0x67, 0x7b, 0x0d, 0xbf, 0x79, 0xad, 0x99, 0xb3, 0xc5, - 0x22, 0xff, 0x49, 0x17, 0x28, 0xd1, 0x81, 0x92, 0xe0, 0x2b, 0x00, 0x59, 0x89, 0x4e, 0x19, 0x59, - 0x68, 0x07, 0xa4, 0x6f, 0x95, 0xdc, 0x50, 0x8f, 0x7d, 0xd6, 0x38, 0x07, 0xfd, 0xfb, 0xcf, 0xdc, - 0xf5, 0xfc, 0xe3, 0xe9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x1c, 0xa2, 0x18, 0x63, 0x02, - 0x00, 0x00, -} - -// 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 - -// LogsServiceClient is the client API for LogsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LogsServiceClient interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) -} - -type logsServiceClient struct { - cc *grpc.ClientConn -} - -func NewLogsServiceClient(cc *grpc.ClientConn) LogsServiceClient { - return &logsServiceClient{cc} -} - -func (c *logsServiceClient) Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) { - out := new(ExportLogsServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.logs.v1.LogsService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LogsServiceServer is the server API for LogsService service. -type LogsServiceServer interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) -} - -// UnimplementedLogsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLogsServiceServer struct { -} - -func (*UnimplementedLogsServiceServer) Export(ctx context.Context, req *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterLogsServiceServer(s *grpc.Server, srv LogsServiceServer) { - s.RegisterService(&_LogsService_serviceDesc, srv) -} - -func _LogsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportLogsServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LogsServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.logs.v1.LogsService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LogsServiceServer).Export(ctx, req.(*ExportLogsServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LogsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.logs.v1.LogsService", - HandlerType: (*LogsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _LogsService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/logs/v1/logs_service.proto", -} - -func (m *ExportLogsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ResourceLogs) > 0 { - for iNdEx := len(m.ResourceLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportLogsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintLogsService(dAtA []byte, offset int, v uint64) int { - offset -= sovLogsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportLogsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for _, e := range m.ResourceLogs { - l = e.Size() - n += 1 + l + sovLogsService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ExportLogsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLogsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogsService(x uint64) (n int) { - return sovLogsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportLogsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceLogs = append(m.ResourceLogs, &v1.ResourceLogs{}) - if err := m.ResourceLogs[len(m.ResourceLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportLogsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go deleted file mode 100644 index cf72374585e..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1/metrics_service.pb.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 m.Unmarshal(b) -} -func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceRequest.Merge(m, src) -} -func (m *ExportMetricsServiceRequest) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceResponse.Merge(m, src) -} -func (m *ExportMetricsServiceResponse) XXX_Size() int { - return m.Size() -} -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{ - // 289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xc1, 0x4a, 0x03, 0x31, - 0x10, 0x86, 0x0d, 0x42, 0x0f, 0x11, 0x54, 0xd6, 0x8b, 0x54, 0x59, 0xa4, 0xa7, 0x82, 0x36, 0x43, - 0xeb, 0xdd, 0x43, 0xa1, 0xde, 0x84, 0xb2, 0xde, 0x0a, 0x52, 0x74, 0x19, 0xca, 0x42, 0xcc, 0xc4, - 0x49, 0xba, 0xd8, 0x47, 0xf1, 0x1d, 0x04, 0x5f, 0xc3, 0xa3, 0x8f, 0x20, 0xfb, 0x24, 0xd2, 0xcd, - 0xaa, 0x44, 0x17, 0x29, 0x78, 0x0b, 0xff, 0xcc, 0xff, 0xfd, 0x7f, 0x42, 0xe4, 0x05, 0x59, 0x34, - 0x1e, 0x35, 0xde, 0xa3, 0xe7, 0x15, 0x58, 0x26, 0x4f, 0x90, 0x93, 0xd6, 0x98, 0x7b, 0x62, 0x58, - 0xab, 0x45, 0xee, 0xa0, 0x1c, 0x7e, 0x1e, 0xe7, 0x0e, 0xb9, 0x2c, 0x72, 0x54, 0xf5, 0x6a, 0xd2, - 0x8f, 0xfc, 0x41, 0x54, 0x5f, 0x7e, 0xd5, 0x98, 0x54, 0x39, 0xec, 0x9e, 0xb5, 0x25, 0xfd, 0xe6, - 0x07, 0x44, 0x6f, 0x25, 0x8f, 0x26, 0x8f, 0x96, 0xd8, 0x5f, 0x05, 0xf9, 0x3a, 0xa4, 0x66, 0xf8, - 0xb0, 0x44, 0xe7, 0x93, 0x99, 0xdc, 0x67, 0x74, 0xb4, 0xe4, 0x1c, 0xe7, 0x8d, 0xf1, 0x50, 0x9c, - 0x6c, 0xf7, 0x77, 0x46, 0xa0, 0xda, 0x1a, 0x7d, 0xf7, 0x50, 0x59, 0xe3, 0x6b, 0xc0, 0xd9, 0x1e, - 0xc7, 0x42, 0x2f, 0x95, 0xc7, 0xed, 0xd1, 0xce, 0x92, 0x71, 0x38, 0x7a, 0x16, 0x72, 0x37, 0x1e, - 0x25, 0x4f, 0x42, 0x76, 0x82, 0x27, 0x99, 0xa8, 0x4d, 0x5f, 0x44, 0xfd, 0x71, 0xc1, 0xee, 0xe5, - 0x7f, 0x31, 0xa1, 0x6c, 0x6f, 0x6b, 0xfc, 0x22, 0x5e, 0xab, 0x54, 0xbc, 0x55, 0xa9, 0x78, 0xaf, - 0x52, 0x21, 0x4f, 0x0b, 0xda, 0x18, 0x3d, 0x3e, 0x88, 0xa9, 0xd3, 0xf5, 0xe6, 0x54, 0xcc, 0x6e, - 0x16, 0x3f, 0x19, 0x05, 0x01, 0x79, 0xd4, 0x80, 0x75, 0x17, 0x64, 0x07, 0xe4, 0xb5, 0x85, 0xc2, - 0x78, 0x64, 0x73, 0xab, 0x21, 0xda, 0x1e, 0xd4, 0x89, 0x83, 0x05, 0x9a, 0xd6, 0x9f, 0x76, 0xd7, - 0xa9, 0xe7, 0xe7, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x25, 0x50, 0x26, 0x9c, 0x02, 0x00, - 0x00, -} - -// 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 - -// 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.ClientConn -} - -func NewMetricsServiceClient(cc *grpc.ClientConn) 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", -} - -func (m *ExportMetricsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ResourceMetrics) > 0 { - for iNdEx := len(m.ResourceMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportMetricsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintMetricsService(dAtA []byte, offset int, v uint64) int { - offset -= sovMetricsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportMetricsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for _, e := range m.ResourceMetrics { - l = e.Size() - n += 1 + l + sovMetricsService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ExportMetricsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetricsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetricsService(x uint64) (n int) { - return sovMetricsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportMetricsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceMetrics = append(m.ResourceMetrics, &v1.ResourceMetrics{}) - if err := m.ResourceMetrics[len(m.ResourceMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportMetricsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetricsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetricsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetricsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetricsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetricsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetricsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetricsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go deleted file mode 100644 index 4b88106bf6e..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_config.pb.go +++ /dev/null @@ -1,1303 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/trace/v1/trace_config.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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_TraceIdRatioBased - // *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 m.Unmarshal(b) -} -func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TraceConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_TraceConfig.Merge(m, src) -} -func (m *TraceConfig) XXX_Size() int { - return m.Size() -} -func (m *TraceConfig) XXX_DiscardUnknown() { - xxx_messageInfo_TraceConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_TraceConfig proto.InternalMessageInfo - -type isTraceConfig_Sampler interface { - isTraceConfig_Sampler() - MarshalTo([]byte) (int, error) - Size() int -} - -type TraceConfig_ConstantSampler struct { - ConstantSampler *ConstantSampler `protobuf:"bytes,1,opt,name=constant_sampler,json=constantSampler,proto3,oneof" json:"constant_sampler,omitempty"` -} -type TraceConfig_TraceIdRatioBased struct { - TraceIdRatioBased *TraceIdRatioBased `protobuf:"bytes,2,opt,name=trace_id_ratio_based,json=traceIdRatioBased,proto3,oneof" json:"trace_id_ratio_based,omitempty"` -} -type TraceConfig_RateLimitingSampler struct { - RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof" json:"rate_limiting_sampler,omitempty"` -} - -func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {} -func (*TraceConfig_TraceIdRatioBased) 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) GetTraceIdRatioBased() *TraceIdRatioBased { - if x, ok := m.GetSampler().(*TraceConfig_TraceIdRatioBased); ok { - return x.TraceIdRatioBased - } - 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_TraceIdRatioBased)(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 m.Unmarshal(b) -} -func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConstantSampler) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConstantSampler.Merge(m, src) -} -func (m *ConstantSampler) XXX_Size() int { - return m.Size() -} -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 ratio. -// The ratio of sampling a trace is equal to that of the specified ratio. -type TraceIdRatioBased struct { - // The desired ratio of sampling. Must be within [0.0, 1.0]. - SamplingRatio float64 `protobuf:"fixed64,1,opt,name=samplingRatio,proto3" json:"samplingRatio,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TraceIdRatioBased) Reset() { *m = TraceIdRatioBased{} } -func (m *TraceIdRatioBased) String() string { return proto.CompactTextString(m) } -func (*TraceIdRatioBased) ProtoMessage() {} -func (*TraceIdRatioBased) Descriptor() ([]byte, []int) { - return fileDescriptor_5936aa8fa6443e6f, []int{2} -} -func (m *TraceIdRatioBased) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TraceIdRatioBased) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TraceIdRatioBased.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TraceIdRatioBased) XXX_Merge(src proto.Message) { - xxx_messageInfo_TraceIdRatioBased.Merge(m, src) -} -func (m *TraceIdRatioBased) XXX_Size() int { - return m.Size() -} -func (m *TraceIdRatioBased) XXX_DiscardUnknown() { - xxx_messageInfo_TraceIdRatioBased.DiscardUnknown(m) -} - -var xxx_messageInfo_TraceIdRatioBased proto.InternalMessageInfo - -func (m *TraceIdRatioBased) GetSamplingRatio() float64 { - if m != nil { - return m.SamplingRatio - } - 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 m.Unmarshal(b) -} -func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RateLimitingSampler) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimitingSampler.Merge(m, src) -} -func (m *RateLimitingSampler) XXX_Size() int { - return m.Size() -} -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((*TraceIdRatioBased)(nil), "opentelemetry.proto.trace.v1.TraceIdRatioBased") - 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{ - // 548 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdf, 0x6e, 0x12, 0x41, - 0x14, 0xc6, 0xbb, 0xc5, 0xfe, 0x3b, 0x4d, 0xdb, 0x65, 0xb0, 0x66, 0x63, 0x1a, 0xac, 0x1b, 0x13, - 0xb9, 0x81, 0x0d, 0xf5, 0xc2, 0xe8, 0x85, 0x09, 0xf4, 0x8f, 0x35, 0x21, 0x94, 0x6c, 0x49, 0x8c, - 0x78, 0x31, 0x19, 0x96, 0xc3, 0x66, 0xe2, 0xee, 0xcc, 0x3a, 0x3b, 0x25, 0x78, 0xef, 0x73, 0xf8, - 0x12, 0xbe, 0x84, 0x97, 0x3e, 0x82, 0xe1, 0x49, 0xcc, 0x0e, 0x48, 0x59, 0xda, 0x92, 0x78, 0x37, - 0xe7, 0xfb, 0xf8, 0x7d, 0xe7, 0x0c, 0x1c, 0x06, 0x3c, 0x99, 0xa0, 0xd0, 0x18, 0x61, 0x8c, 0x5a, - 0x7d, 0xf3, 0x12, 0x25, 0xb5, 0xf4, 0xb4, 0x62, 0x01, 0x7a, 0xa3, 0xfa, 0xf4, 0x40, 0x03, 0x29, - 0x86, 0x3c, 0xac, 0x19, 0x8f, 0x1c, 0xe5, 0x80, 0xa9, 0x58, 0x33, 0x9f, 0xab, 0x8d, 0xea, 0xee, - 0xf7, 0x0d, 0xd8, 0xed, 0x66, 0xc5, 0xa9, 0x61, 0x48, 0x0f, 0xec, 0x40, 0x8a, 0x54, 0x33, 0xa1, - 0x69, 0xca, 0xe2, 0x24, 0x42, 0xe5, 0x58, 0xc7, 0x56, 0x65, 0xf7, 0xa4, 0x5a, 0x5b, 0x15, 0x54, - 0x3b, 0x9d, 0x51, 0xd7, 0x53, 0xe8, 0x72, 0xcd, 0x3f, 0x08, 0xf2, 0x12, 0xe9, 0xc3, 0xe3, 0xe9, - 0x7c, 0x7c, 0x40, 0x15, 0xd3, 0x5c, 0xd2, 0x3e, 0x4b, 0x71, 0xe0, 0xac, 0x9b, 0x7c, 0x6f, 0x75, - 0xbe, 0x19, 0xf2, 0xc3, 0xc0, 0xcf, 0xb8, 0x66, 0x86, 0x5d, 0xae, 0xf9, 0x45, 0xbd, 0x2c, 0x92, - 0x10, 0x0e, 0x15, 0xd3, 0x48, 0x23, 0x1e, 0x73, 0xcd, 0x45, 0x38, 0xbf, 0x44, 0xc1, 0x34, 0xa9, - 0xaf, 0x6e, 0xe2, 0x33, 0x8d, 0xad, 0x19, 0x79, 0x7b, 0x91, 0x92, 0xba, 0x2b, 0x93, 0xd7, 0xe0, - 0xc4, 0x6c, 0x4c, 0xc5, 0x4d, 0xdc, 0x47, 0x45, 0xe5, 0x90, 0x32, 0xad, 0x15, 0xef, 0xdf, 0x68, - 0x4c, 0x9d, 0x47, 0xc7, 0x56, 0xa5, 0xe0, 0x1f, 0xc6, 0x6c, 0xdc, 0x36, 0xf6, 0xd5, 0xb0, 0x31, - 0x37, 0xc9, 0x5b, 0x78, 0x9a, 0x07, 0x35, 0x8f, 0x71, 0x40, 0x71, 0x84, 0x42, 0xa7, 0xce, 0x86, - 0x41, 0x9f, 0x2c, 0xa0, 0xdd, 0xcc, 0x3e, 0x37, 0x2e, 0xe9, 0x42, 0xe5, 0xa1, 0xa6, 0x34, 0x41, - 0xb5, 0x18, 0xe5, 0x6c, 0x9a, 0x24, 0xf7, 0xde, 0x21, 0x3a, 0xa8, 0x6e, 0x63, 0x49, 0x15, 0x4a, - 0xf9, 0xd4, 0x88, 0x8b, 0x2f, 0xa9, 0xb3, 0x65, 0x02, 0xec, 0x85, 0x80, 0x56, 0xa6, 0x93, 0xf7, - 0xf0, 0x7c, 0xe5, 0x10, 0x19, 0xed, 0x6c, 0x1b, 0xf8, 0xe8, 0xa1, 0xee, 0x59, 0x52, 0x73, 0x07, - 0xb6, 0x66, 0xbf, 0x8e, 0xfb, 0xd3, 0x82, 0x83, 0xa5, 0x0d, 0x22, 0x3d, 0xd8, 0x1e, 0x60, 0xc0, - 0x53, 0x2e, 0x85, 0x59, 0xc1, 0xfd, 0x93, 0x77, 0xff, 0xb5, 0x82, 0xf3, 0xfa, 0x6c, 0x96, 0xe2, - 0xcf, 0xf3, 0xdc, 0x33, 0xb0, 0x97, 0x5d, 0xb2, 0x0f, 0xd0, 0x68, 0x7d, 0x6c, 0x7c, 0xba, 0xa6, - 0x57, 0x17, 0x17, 0xf6, 0x1a, 0xd9, 0x83, 0x9d, 0x7f, 0x75, 0xdb, 0xb6, 0x48, 0x11, 0xf6, 0x66, - 0x65, 0xa7, 0xe1, 0x9f, 0xb7, 0xbb, 0xf6, 0xba, 0xfb, 0x06, 0x8a, 0x77, 0xd6, 0x92, 0xbc, 0x80, - 0x3d, 0x73, 0x2b, 0x2e, 0x42, 0xa3, 0x9a, 0xd9, 0x2d, 0x3f, 0x2f, 0xba, 0x2f, 0xa1, 0x74, 0xcf, - 0xb2, 0x11, 0x1b, 0x0a, 0x5f, 0x93, 0xd4, 0x20, 0x05, 0x3f, 0x3b, 0x36, 0x7f, 0x58, 0xbf, 0x26, - 0x65, 0xeb, 0xf7, 0xa4, 0x6c, 0xfd, 0x99, 0x94, 0x2d, 0x78, 0xc6, 0xe5, 0xca, 0x2f, 0xa1, 0x69, - 0x2f, 0xfc, 0x9b, 0x3b, 0x99, 0xd5, 0xb1, 0x7a, 0x9f, 0xc3, 0x65, 0x88, 0x4b, 0x4f, 0x6a, 0x8c, - 0x3c, 0x1c, 0x27, 0x52, 0x69, 0x54, 0xa9, 0x27, 0x75, 0x94, 0x78, 0x5c, 0x68, 0x54, 0x82, 0x45, - 0xf9, 0x47, 0xa6, 0x6a, 0x5a, 0x54, 0x43, 0x14, 0x5e, 0x20, 0xa3, 0x08, 0x03, 0x2d, 0xd5, 0xfc, - 0xc9, 0xe9, 0x6f, 0x1a, 0xf7, 0xd5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x02, 0x09, 0x0c, - 0x99, 0x04, 0x00, 0x00, -} - -func (m *TraceConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MaxNumberOfAttributesPerLink != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.MaxNumberOfAttributesPerLink)) - i-- - dAtA[i] = 0x40 - } - if m.MaxNumberOfLinks != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.MaxNumberOfLinks)) - i-- - dAtA[i] = 0x38 - } - if m.MaxNumberOfAttributesPerTimedEvent != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.MaxNumberOfAttributesPerTimedEvent)) - i-- - dAtA[i] = 0x30 - } - if m.MaxNumberOfTimedEvents != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.MaxNumberOfTimedEvents)) - i-- - dAtA[i] = 0x28 - } - if m.MaxNumberOfAttributes != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.MaxNumberOfAttributes)) - i-- - dAtA[i] = 0x20 - } - if m.Sampler != nil { - { - size := m.Sampler.Size() - i -= size - if _, err := m.Sampler.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *TraceConfig_ConstantSampler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceConfig_ConstantSampler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ConstantSampler != nil { - { - size, err := m.ConstantSampler.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *TraceConfig_TraceIdRatioBased) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceConfig_TraceIdRatioBased) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.TraceIdRatioBased != nil { - { - size, err := m.TraceIdRatioBased.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *TraceConfig_RateLimitingSampler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceConfig_RateLimitingSampler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RateLimitingSampler != nil { - { - size, err := m.RateLimitingSampler.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ConstantSampler) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConstantSampler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConstantSampler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Decision != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.Decision)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TraceIdRatioBased) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceIdRatioBased) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceIdRatioBased) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SamplingRatio != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SamplingRatio)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *RateLimitingSampler) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitingSampler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RateLimitingSampler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Qps != 0 { - i = encodeVarintTraceConfig(dAtA, i, uint64(m.Qps)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTraceConfig(dAtA []byte, offset int, v uint64) int { - offset -= sovTraceConfig(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TraceConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sampler != nil { - n += m.Sampler.Size() - } - if m.MaxNumberOfAttributes != 0 { - n += 1 + sovTraceConfig(uint64(m.MaxNumberOfAttributes)) - } - if m.MaxNumberOfTimedEvents != 0 { - n += 1 + sovTraceConfig(uint64(m.MaxNumberOfTimedEvents)) - } - if m.MaxNumberOfAttributesPerTimedEvent != 0 { - n += 1 + sovTraceConfig(uint64(m.MaxNumberOfAttributesPerTimedEvent)) - } - if m.MaxNumberOfLinks != 0 { - n += 1 + sovTraceConfig(uint64(m.MaxNumberOfLinks)) - } - if m.MaxNumberOfAttributesPerLink != 0 { - n += 1 + sovTraceConfig(uint64(m.MaxNumberOfAttributesPerLink)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TraceConfig_ConstantSampler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConstantSampler != nil { - l = m.ConstantSampler.Size() - n += 1 + l + sovTraceConfig(uint64(l)) - } - return n -} -func (m *TraceConfig_TraceIdRatioBased) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TraceIdRatioBased != nil { - l = m.TraceIdRatioBased.Size() - n += 1 + l + sovTraceConfig(uint64(l)) - } - return n -} -func (m *TraceConfig_RateLimitingSampler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RateLimitingSampler != nil { - l = m.RateLimitingSampler.Size() - n += 1 + l + sovTraceConfig(uint64(l)) - } - return n -} -func (m *ConstantSampler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Decision != 0 { - n += 1 + sovTraceConfig(uint64(m.Decision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TraceIdRatioBased) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SamplingRatio != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimitingSampler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Qps != 0 { - n += 1 + sovTraceConfig(uint64(m.Qps)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTraceConfig(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTraceConfig(x uint64) (n int) { - return sovTraceConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TraceConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstantSampler", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ConstantSampler{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sampler = &TraceConfig_ConstantSampler{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceIdRatioBased", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TraceIdRatioBased{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sampler = &TraceConfig_TraceIdRatioBased{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimitingSampler", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimitingSampler{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sampler = &TraceConfig_RateLimitingSampler{v} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfAttributes", wireType) - } - m.MaxNumberOfAttributes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxNumberOfAttributes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfTimedEvents", wireType) - } - m.MaxNumberOfTimedEvents = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxNumberOfTimedEvents |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfAttributesPerTimedEvent", wireType) - } - m.MaxNumberOfAttributesPerTimedEvent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxNumberOfAttributesPerTimedEvent |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfLinks", wireType) - } - m.MaxNumberOfLinks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxNumberOfLinks |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNumberOfAttributesPerLink", wireType) - } - m.MaxNumberOfAttributesPerLink = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxNumberOfAttributesPerLink |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConstantSampler) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConstantSampler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConstantSampler: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decision", wireType) - } - m.Decision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decision |= ConstantSampler_ConstantDecision(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TraceIdRatioBased) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceIdRatioBased: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceIdRatioBased: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field SamplingRatio", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.SamplingRatio = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RateLimitingSampler) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RateLimitingSampler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RateLimitingSampler: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Qps", wireType) - } - m.Qps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Qps |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTraceConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTraceConfig(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTraceConfig - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTraceConfig - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTraceConfig - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTraceConfig = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTraceConfig = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTraceConfig = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go deleted file mode 100644 index 7e74f1deafe..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1/trace_service.pb.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/trace/v1/trace_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 m.Unmarshal(b) -} -func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceRequest.Merge(m, src) -} -func (m *ExportTraceServiceRequest) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceResponse.Merge(m, src) -} -func (m *ExportTraceServiceResponse) XXX_Size() int { - return m.Size() -} -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{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xcf, 0x4a, 0xc4, 0x30, - 0x10, 0xc6, 0x0d, 0xc2, 0x1e, 0xe2, 0x1f, 0xb0, 0x27, 0x2d, 0x52, 0xa4, 0x07, 0x59, 0x91, 0x4d, - 0xd8, 0xf5, 0xe6, 0xcd, 0x82, 0xf7, 0xa5, 0xeb, 0x49, 0x0f, 0x52, 0xcb, 0xb0, 0x14, 0x62, 0x26, - 0x4e, 0xb2, 0x45, 0x1f, 0xc3, 0x57, 0xf0, 0xe6, 0x9b, 0x78, 0xf4, 0x11, 0xa4, 0x4f, 0x22, 0x4d, - 0x54, 0x5a, 0xa9, 0xb0, 0xe0, 0xad, 0x9d, 0xf9, 0x7e, 0xdf, 0xf7, 0x0d, 0x84, 0x9f, 0xa3, 0x01, - 0xed, 0x40, 0xc1, 0x3d, 0x38, 0x7a, 0x92, 0x86, 0xd0, 0xa1, 0x2c, 0x51, 0x29, 0x28, 0x1d, 0x92, - 0x74, 0x54, 0x94, 0x20, 0xeb, 0x69, 0xf8, 0xb8, 0xb5, 0x40, 0x75, 0x55, 0x82, 0xf0, 0xb2, 0xe8, - 0xb8, 0xc7, 0x86, 0xa1, 0xf8, 0x61, 0x85, 0x47, 0x44, 0x3d, 0x8d, 0xc7, 0x43, 0x19, 0x7d, 0xe7, - 0x00, 0xa7, 0xc8, 0x0f, 0x2e, 0x1f, 0x0d, 0x92, 0xbb, 0x6a, 0x87, 0x8b, 0x90, 0x96, 0xc3, 0xc3, - 0x0a, 0xac, 0x8b, 0x72, 0xbe, 0x4b, 0x60, 0x71, 0x45, 0x6d, 0x11, 0x53, 0x68, 0xbb, 0xcf, 0x8e, - 0x36, 0xc7, 0x5b, 0xb3, 0x53, 0x31, 0xd4, 0xe3, 0x3b, 0x5d, 0xe4, 0x5f, 0xcc, 0xa2, 0x45, 0xf2, - 0x1d, 0xea, 0xfe, 0xa6, 0x87, 0x3c, 0x1e, 0x0a, 0xb4, 0x06, 0xb5, 0x85, 0xd9, 0x0b, 0xe3, 0xdb, - 0xdd, 0x45, 0xf4, 0xcc, 0xf8, 0x28, 0xe8, 0xa3, 0x0b, 0xb1, 0xde, 0xf5, 0xe2, 0xcf, 0x83, 0xe2, - 0xec, 0x3f, 0x16, 0xa1, 0x62, 0xba, 0x91, 0xbd, 0xb2, 0xb7, 0x26, 0x61, 0xef, 0x4d, 0xc2, 0x3e, - 0x9a, 0x84, 0xf1, 0x93, 0x0a, 0xd7, 0xb4, 0xcd, 0xf6, 0xba, 0x8e, 0xf3, 0x56, 0x35, 0x67, 0xd7, - 0x37, 0xcb, 0xdf, 0x7c, 0x85, 0x12, 0x1d, 0x28, 0x09, 0xbe, 0x05, 0x90, 0x95, 0xe8, 0x94, 0x91, - 0x95, 0x76, 0x40, 0xba, 0x50, 0xb2, 0xa7, 0x9e, 0xf8, 0xb4, 0xc9, 0x12, 0xf4, 0xc0, 0x2b, 0xba, - 0x1b, 0xf9, 0xed, 0xd9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xba, 0x8a, 0x6d, 0x76, 0x02, - 0x00, 0x00, -} - -// 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 - -// 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.ClientConn -} - -func NewTraceServiceClient(cc *grpc.ClientConn) 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", -} - -func (m *ExportTraceServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ResourceSpans) > 0 { - for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportTraceServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintTraceService(dAtA []byte, offset int, v uint64) int { - offset -= sovTraceService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportTraceServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for _, e := range m.ResourceSpans { - l = e.Size() - n += 1 + l + sovTraceService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ExportTraceServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTraceService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTraceService(x uint64) (n int) { - return sovTraceService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportTraceServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceSpans = append(m.ResourceSpans, &v1.ResourceSpans{}) - if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportTraceServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTraceService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTraceService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTraceService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTraceService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTraceService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTraceService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTraceService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/common/v1/common.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/common/v1/common.pb.go deleted file mode 100644 index f8dfa17f966..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/common/v1/common.pb.go +++ /dev/null @@ -1,1850 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/common/v1/common.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 m.Unmarshal(b) -} -func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AnyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnyValue.Merge(m, src) -} -func (m *AnyValue) XXX_Size() int { - return m.Size() -} -func (m *AnyValue) XXX_DiscardUnknown() { - xxx_messageInfo_AnyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_AnyValue proto.InternalMessageInfo - -type isAnyValue_Value interface { - isAnyValue_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type AnyValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` -} -type AnyValue_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` -} -type AnyValue_IntValue struct { - IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof" json:"int_value,omitempty"` -} -type AnyValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof" json:"double_value,omitempty"` -} -type AnyValue_ArrayValue struct { - ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof" json:"array_value,omitempty"` -} -type AnyValue_KvlistValue struct { - KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof" json:"kvlist_value,omitempty"` -} - -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 m.Unmarshal(b) -} -func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArrayValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArrayValue.Merge(m, src) -} -func (m *ArrayValue) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValueList.Merge(m, src) -} -func (m *KeyValueList) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValue.Merge(m, src) -} -func (m *KeyValue) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *StringKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StringKeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StringKeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringKeyValue.Merge(m, src) -} -func (m *StringKeyValue) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *InstrumentationLibrary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationLibrary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationLibrary) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationLibrary.Merge(m, src) -} -func (m *InstrumentationLibrary) XXX_Size() int { - return m.Size() -} -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{ - // 443 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x8b, 0x13, 0x31, - 0x14, 0x6f, 0xb6, 0xbb, 0xdd, 0xf6, 0x4d, 0x11, 0x09, 0x22, 0xbd, 0x6c, 0x1d, 0xea, 0xc1, 0x51, - 0xd9, 0x09, 0xbb, 0x5e, 0xbc, 0x88, 0x6c, 0x05, 0x19, 0xb1, 0x62, 0x89, 0xe0, 0x41, 0x0f, 0x92, - 0xd1, 0x50, 0xc2, 0x66, 0x92, 0x21, 0x93, 0x0e, 0xce, 0xc7, 0xf0, 0x03, 0x79, 0xf7, 0xe8, 0x47, - 0x90, 0x7e, 0x12, 0x99, 0x24, 0xd3, 0xfd, 0x73, 0xe8, 0xd2, 0xdb, 0x7b, 0xbf, 0xf9, 0xfd, 0x79, - 0x6f, 0x92, 0xc0, 0x33, 0x5d, 0x72, 0x65, 0xb9, 0xe4, 0x05, 0xb7, 0xa6, 0x21, 0xa5, 0xd1, 0x56, - 0x93, 0xef, 0xba, 0x28, 0xb4, 0x22, 0xf5, 0x59, 0xa8, 0x52, 0x07, 0xe3, 0x93, 0x1b, 0x5c, 0x0f, - 0xa6, 0x81, 0x51, 0x9f, 0xcd, 0x7e, 0x1f, 0xc0, 0xf0, 0x42, 0x35, 0x9f, 0x99, 0x5c, 0x73, 0xfc, - 0x18, 0xc6, 0x95, 0x35, 0x42, 0xad, 0xbe, 0xd5, 0x6d, 0x3f, 0x41, 0x31, 0x4a, 0x46, 0x59, 0x8f, - 0x46, 0x1e, 0xf5, 0xa4, 0x47, 0x00, 0xb9, 0xd6, 0x32, 0x50, 0x0e, 0x62, 0x94, 0x0c, 0xb3, 0x1e, - 0x1d, 0xb5, 0x98, 0x27, 0x9c, 0xc0, 0x48, 0x28, 0x1b, 0xbe, 0xf7, 0x63, 0x94, 0xf4, 0xb3, 0x1e, - 0x1d, 0x0a, 0x65, 0xb7, 0x21, 0x3f, 0xf4, 0x3a, 0x97, 0x3c, 0x30, 0x0e, 0x63, 0x94, 0xa0, 0x36, - 0xc4, 0xa3, 0x9e, 0xb4, 0x80, 0x88, 0x19, 0xc3, 0x9a, 0xc0, 0x39, 0x8a, 0x51, 0x12, 0x9d, 0x3f, - 0x4d, 0x77, 0xee, 0x92, 0x5e, 0xb4, 0x0a, 0xa7, 0xcf, 0x7a, 0x14, 0xd8, 0xb6, 0xc3, 0x4b, 0x18, - 0x5f, 0xd6, 0x52, 0x54, 0xdd, 0x50, 0x03, 0x67, 0xf7, 0xfc, 0x0e, 0xbb, 0xf7, 0xdc, 0xcb, 0x17, - 0xa2, 0xb2, 0xed, 0x7c, 0xde, 0xc2, 0x41, 0xf3, 0x63, 0x38, 0x72, 0x56, 0xb3, 0x0f, 0x00, 0x57, - 0xb1, 0xf8, 0x35, 0x0c, 0x1c, 0x5c, 0x4d, 0x50, 0xdc, 0x4f, 0xa2, 0xf3, 0x27, 0x77, 0x4d, 0x1c, - 0xfe, 0x3c, 0x0d, 0xb2, 0xd9, 0x47, 0x18, 0x5f, 0x8f, 0xdd, 0xdb, 0xb0, 0x13, 0x6f, 0x0d, 0xbf, - 0xc2, 0xb0, 0xc3, 0xf0, 0x7d, 0xe8, 0x5f, 0xf2, 0xc6, 0x9f, 0x2a, 0x6d, 0x4b, 0xfc, 0x2a, 0xac, - 0xe1, 0x8e, 0x71, 0x8f, 0x71, 0xc3, 0xf2, 0x2f, 0xe1, 0xde, 0x27, 0x77, 0x33, 0x76, 0x44, 0x3c, - 0xb8, 0x1e, 0x31, 0xea, 0x94, 0x6f, 0xe1, 0xe1, 0x3b, 0x55, 0x59, 0xb3, 0x2e, 0xb8, 0xb2, 0xcc, - 0x0a, 0xad, 0x16, 0x22, 0x37, 0xcc, 0x34, 0x18, 0xc3, 0xa1, 0x62, 0x45, 0xb8, 0x7b, 0xd4, 0xd5, - 0x78, 0x02, 0xc7, 0x35, 0x37, 0x95, 0xd0, 0x2a, 0xb8, 0x74, 0xed, 0xfc, 0x17, 0xfa, 0xb3, 0x99, - 0xa2, 0xbf, 0x9b, 0x29, 0xfa, 0xb7, 0x99, 0x22, 0x88, 0x85, 0xde, 0xbd, 0xc2, 0x3c, 0x7a, 0xe3, - 0xca, 0x65, 0x0b, 0x2f, 0xd1, 0x17, 0xba, 0xba, 0x2d, 0x10, 0x9a, 0x68, 0xcb, 0x25, 0xe1, 0x3f, - 0x4b, 0x6d, 0x2c, 0x37, 0x15, 0xd1, 0x56, 0x96, 0x44, 0x28, 0xcb, 0x8d, 0x62, 0x92, 0xdc, 0x60, - 0x9f, 0x3a, 0xfb, 0xd3, 0x15, 0x57, 0x57, 0xcf, 0x2f, 0x1f, 0x38, 0xf0, 0xc5, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x0e, 0x09, 0x81, 0x21, 0xa6, 0x03, 0x00, 0x00, -} - -func (m *AnyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AnyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AnyValue_StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarintCommon(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *AnyValue_BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *AnyValue_IntValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_IntValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintCommon(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} -func (m *AnyValue_DoubleValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x21 - return len(dAtA) - i, nil -} -func (m *AnyValue_ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ArrayValue != nil { - { - size, err := m.ArrayValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *AnyValue_KvlistValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_KvlistValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.KvlistValue != nil { - { - size, err := m.KvlistValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *ArrayValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValueList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValueList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StringKeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StringKeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationLibrary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationLibrary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationLibrary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { - offset -= sovCommon(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AnyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AnyValue_StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StringValue) - n += 1 + l + sovCommon(uint64(l)) - return n -} -func (m *AnyValue_BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *AnyValue_IntValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovCommon(uint64(m.IntValue)) - return n -} -func (m *AnyValue_DoubleValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *AnyValue_ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ArrayValue != nil { - l = m.ArrayValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *AnyValue_KvlistValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KvlistValue != nil { - l = m.KvlistValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *KeyValueList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovCommon(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringKeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InstrumentationLibrary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCommon(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommon(x uint64) (n int) { - return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AnyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = &AnyValue_StringValue{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Value = &AnyValue_BoolValue{b} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = &AnyValue_IntValue{v} - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &AnyValue_DoubleValue{float64(math.Float64frombits(v))} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ArrayValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_ArrayValue{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KvlistValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &KeyValueList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_KvlistValue{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArrayValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArrayValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArrayValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, &AnyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValueList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValueList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, &KeyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &AnyValue{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StringKeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StringKeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StringKeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationLibrary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationLibrary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationLibrary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommon(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommon - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommon - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommon - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/logs/v1/logs.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/logs/v1/logs.pb.go deleted file mode 100644 index 06e62e6a63e..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/logs/v1/logs.pb.go +++ /dev/null @@ -1,1447 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/logs/v1/logs.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v11 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Possible values for LogRecord.SeverityNumber. -type SeverityNumber int32 - -const ( - // UNSPECIFIED is the default SeverityNumber, it MUST not be used. - SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED SeverityNumber = 0 - SeverityNumber_SEVERITY_NUMBER_TRACE SeverityNumber = 1 - SeverityNumber_SEVERITY_NUMBER_TRACE2 SeverityNumber = 2 - SeverityNumber_SEVERITY_NUMBER_TRACE3 SeverityNumber = 3 - SeverityNumber_SEVERITY_NUMBER_TRACE4 SeverityNumber = 4 - SeverityNumber_SEVERITY_NUMBER_DEBUG SeverityNumber = 5 - SeverityNumber_SEVERITY_NUMBER_DEBUG2 SeverityNumber = 6 - SeverityNumber_SEVERITY_NUMBER_DEBUG3 SeverityNumber = 7 - SeverityNumber_SEVERITY_NUMBER_DEBUG4 SeverityNumber = 8 - SeverityNumber_SEVERITY_NUMBER_INFO SeverityNumber = 9 - SeverityNumber_SEVERITY_NUMBER_INFO2 SeverityNumber = 10 - SeverityNumber_SEVERITY_NUMBER_INFO3 SeverityNumber = 11 - SeverityNumber_SEVERITY_NUMBER_INFO4 SeverityNumber = 12 - SeverityNumber_SEVERITY_NUMBER_WARN SeverityNumber = 13 - SeverityNumber_SEVERITY_NUMBER_WARN2 SeverityNumber = 14 - SeverityNumber_SEVERITY_NUMBER_WARN3 SeverityNumber = 15 - SeverityNumber_SEVERITY_NUMBER_WARN4 SeverityNumber = 16 - SeverityNumber_SEVERITY_NUMBER_ERROR SeverityNumber = 17 - SeverityNumber_SEVERITY_NUMBER_ERROR2 SeverityNumber = 18 - SeverityNumber_SEVERITY_NUMBER_ERROR3 SeverityNumber = 19 - SeverityNumber_SEVERITY_NUMBER_ERROR4 SeverityNumber = 20 - SeverityNumber_SEVERITY_NUMBER_FATAL SeverityNumber = 21 - SeverityNumber_SEVERITY_NUMBER_FATAL2 SeverityNumber = 22 - SeverityNumber_SEVERITY_NUMBER_FATAL3 SeverityNumber = 23 - SeverityNumber_SEVERITY_NUMBER_FATAL4 SeverityNumber = 24 -) - -var SeverityNumber_name = map[int32]string{ - 0: "SEVERITY_NUMBER_UNSPECIFIED", - 1: "SEVERITY_NUMBER_TRACE", - 2: "SEVERITY_NUMBER_TRACE2", - 3: "SEVERITY_NUMBER_TRACE3", - 4: "SEVERITY_NUMBER_TRACE4", - 5: "SEVERITY_NUMBER_DEBUG", - 6: "SEVERITY_NUMBER_DEBUG2", - 7: "SEVERITY_NUMBER_DEBUG3", - 8: "SEVERITY_NUMBER_DEBUG4", - 9: "SEVERITY_NUMBER_INFO", - 10: "SEVERITY_NUMBER_INFO2", - 11: "SEVERITY_NUMBER_INFO3", - 12: "SEVERITY_NUMBER_INFO4", - 13: "SEVERITY_NUMBER_WARN", - 14: "SEVERITY_NUMBER_WARN2", - 15: "SEVERITY_NUMBER_WARN3", - 16: "SEVERITY_NUMBER_WARN4", - 17: "SEVERITY_NUMBER_ERROR", - 18: "SEVERITY_NUMBER_ERROR2", - 19: "SEVERITY_NUMBER_ERROR3", - 20: "SEVERITY_NUMBER_ERROR4", - 21: "SEVERITY_NUMBER_FATAL", - 22: "SEVERITY_NUMBER_FATAL2", - 23: "SEVERITY_NUMBER_FATAL3", - 24: "SEVERITY_NUMBER_FATAL4", -} - -var SeverityNumber_value = map[string]int32{ - "SEVERITY_NUMBER_UNSPECIFIED": 0, - "SEVERITY_NUMBER_TRACE": 1, - "SEVERITY_NUMBER_TRACE2": 2, - "SEVERITY_NUMBER_TRACE3": 3, - "SEVERITY_NUMBER_TRACE4": 4, - "SEVERITY_NUMBER_DEBUG": 5, - "SEVERITY_NUMBER_DEBUG2": 6, - "SEVERITY_NUMBER_DEBUG3": 7, - "SEVERITY_NUMBER_DEBUG4": 8, - "SEVERITY_NUMBER_INFO": 9, - "SEVERITY_NUMBER_INFO2": 10, - "SEVERITY_NUMBER_INFO3": 11, - "SEVERITY_NUMBER_INFO4": 12, - "SEVERITY_NUMBER_WARN": 13, - "SEVERITY_NUMBER_WARN2": 14, - "SEVERITY_NUMBER_WARN3": 15, - "SEVERITY_NUMBER_WARN4": 16, - "SEVERITY_NUMBER_ERROR": 17, - "SEVERITY_NUMBER_ERROR2": 18, - "SEVERITY_NUMBER_ERROR3": 19, - "SEVERITY_NUMBER_ERROR4": 20, - "SEVERITY_NUMBER_FATAL": 21, - "SEVERITY_NUMBER_FATAL2": 22, - "SEVERITY_NUMBER_FATAL3": 23, - "SEVERITY_NUMBER_FATAL4": 24, -} - -func (x SeverityNumber) String() string { - return proto.EnumName(SeverityNumber_name, int32(x)) -} - -func (SeverityNumber) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} - -// Masks for LogRecord.flags field. -type LogRecordFlags int32 - -const ( - LogRecordFlags_LOG_RECORD_FLAG_UNSPECIFIED LogRecordFlags = 0 - LogRecordFlags_LOG_RECORD_FLAG_TRACE_FLAGS_MASK LogRecordFlags = 255 -) - -var LogRecordFlags_name = map[int32]string{ - 0: "LOG_RECORD_FLAG_UNSPECIFIED", - 255: "LOG_RECORD_FLAG_TRACE_FLAGS_MASK", -} - -var LogRecordFlags_value = map[string]int32{ - "LOG_RECORD_FLAG_UNSPECIFIED": 0, - "LOG_RECORD_FLAG_TRACE_FLAGS_MASK": 255, -} - -func (x LogRecordFlags) String() string { - return proto.EnumName(LogRecordFlags_name, int32(x)) -} - -func (LogRecordFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} - -// A collection of InstrumentationLibraryLogs from a Resource. -type ResourceLogs struct { - // The resource for the logs 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 InstrumentationLibraryLogs that originate from a resource. - InstrumentationLibraryLogs []*InstrumentationLibraryLogs `protobuf:"bytes,2,rep,name=instrumentation_library_logs,json=instrumentationLibraryLogs,proto3" json:"instrumentation_library_logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResourceLogs) Reset() { *m = ResourceLogs{} } -func (m *ResourceLogs) String() string { return proto.CompactTextString(m) } -func (*ResourceLogs) ProtoMessage() {} -func (*ResourceLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} -func (m *ResourceLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceLogs.Merge(m, src) -} -func (m *ResourceLogs) XXX_Size() int { - return m.Size() -} -func (m *ResourceLogs) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceLogs proto.InternalMessageInfo - -func (m *ResourceLogs) GetResource() *v1.Resource { - if m != nil { - return m.Resource - } - return nil -} - -func (m *ResourceLogs) GetInstrumentationLibraryLogs() []*InstrumentationLibraryLogs { - if m != nil { - return m.InstrumentationLibraryLogs - } - return nil -} - -// A collection of Logs produced by an InstrumentationLibrary. -type InstrumentationLibraryLogs struct { - // The instrumentation library information for the logs 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 log records. - Logs []*LogRecord `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InstrumentationLibraryLogs) Reset() { *m = InstrumentationLibraryLogs{} } -func (m *InstrumentationLibraryLogs) String() string { return proto.CompactTextString(m) } -func (*InstrumentationLibraryLogs) ProtoMessage() {} -func (*InstrumentationLibraryLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} -func (m *InstrumentationLibraryLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InstrumentationLibraryLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationLibraryLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationLibraryLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationLibraryLogs.Merge(m, src) -} -func (m *InstrumentationLibraryLogs) XXX_Size() int { - return m.Size() -} -func (m *InstrumentationLibraryLogs) XXX_DiscardUnknown() { - xxx_messageInfo_InstrumentationLibraryLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_InstrumentationLibraryLogs proto.InternalMessageInfo - -func (m *InstrumentationLibraryLogs) GetInstrumentationLibrary() *v11.InstrumentationLibrary { - if m != nil { - return m.InstrumentationLibrary - } - return nil -} - -func (m *InstrumentationLibraryLogs) GetLogs() []*LogRecord { - if m != nil { - return m.Logs - } - return nil -} - -// A log record according to OpenTelemetry Log Data Model: -// https://github.com/open-telemetry/oteps/blob/master/text/logs/0097-log-data-model.md -type LogRecord struct { - // time_unix_nano is the time when the event occurred. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // Numerical value of the severity, normalized to values described in Log Data Model. - // [Optional]. - SeverityNumber SeverityNumber `protobuf:"varint,2,opt,name=severity_number,json=severityNumber,proto3,enum=opentelemetry.proto.logs.v1.SeverityNumber" json:"severity_number,omitempty"` - // The severity text (also known as log level). The original string representation as - // it is known at the source. [Optional]. - SeverityText string `protobuf:"bytes,3,opt,name=severity_text,json=severityText,proto3" json:"severity_text,omitempty"` - // Short event identifier that does not contain varying parts. Name describes - // what happened (e.g. "ProcessStarted"). Recommended to be no longer than 50 - // characters. Not guaranteed to be unique in any way. [Optional]. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // A value containing the body of the log record. Can be for example a human-readable - // string message (including multi-line) describing the event in a free form or it can - // be a structured data composed of arrays and maps of other values. [Optional]. - Body *v11.AnyValue `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` - // Additional attributes that describe the specific event occurrence. [Optional]. - Attributes []*v11.KeyValue `protobuf:"bytes,6,rep,name=attributes,proto3" json:"attributes,omitempty"` - DroppedAttributesCount uint32 `protobuf:"varint,7,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Flags, a bit field. 8 least significant bits are the trace flags as - // defined in W3C Trace Context specification. 24 most significant bits are reserved - // and must be set to 0. Readers must not assume that 24 most significant bits - // will be zero and must correctly mask the bits when reading 8-bit trace flag (use - // flags & TRACE_FLAGS_MASK). [Optional]. - Flags uint32 `protobuf:"fixed32,8,opt,name=flags,proto3" json:"flags,omitempty"` - // A unique identifier for a trace. All logs from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes - // is considered invalid. Can be set for logs that are part of request processing - // and have an assigned trace id. [Optional]. - TraceId []byte `protobuf:"bytes,9,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. Can be set for logs that are part of a particular processing span. - // If span_id is present trace_id SHOULD be also present. [Optional]. - SpanId []byte `protobuf:"bytes,10,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogRecord) Reset() { *m = LogRecord{} } -func (m *LogRecord) String() string { return proto.CompactTextString(m) } -func (*LogRecord) ProtoMessage() {} -func (*LogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{2} -} -func (m *LogRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogRecord.Merge(m, src) -} -func (m *LogRecord) XXX_Size() int { - return m.Size() -} -func (m *LogRecord) XXX_DiscardUnknown() { - xxx_messageInfo_LogRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_LogRecord proto.InternalMessageInfo - -func (m *LogRecord) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *LogRecord) GetSeverityNumber() SeverityNumber { - if m != nil { - return m.SeverityNumber - } - return SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED -} - -func (m *LogRecord) GetSeverityText() string { - if m != nil { - return m.SeverityText - } - return "" -} - -func (m *LogRecord) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *LogRecord) GetBody() *v11.AnyValue { - if m != nil { - return m.Body - } - return nil -} - -func (m *LogRecord) GetAttributes() []*v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *LogRecord) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *LogRecord) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *LogRecord) GetTraceId() []byte { - if m != nil { - return m.TraceId - } - return nil -} - -func (m *LogRecord) GetSpanId() []byte { - if m != nil { - return m.SpanId - } - return nil -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.logs.v1.SeverityNumber", SeverityNumber_name, SeverityNumber_value) - proto.RegisterEnum("opentelemetry.proto.logs.v1.LogRecordFlags", LogRecordFlags_name, LogRecordFlags_value) - proto.RegisterType((*ResourceLogs)(nil), "opentelemetry.proto.logs.v1.ResourceLogs") - proto.RegisterType((*InstrumentationLibraryLogs)(nil), "opentelemetry.proto.logs.v1.InstrumentationLibraryLogs") - proto.RegisterType((*LogRecord)(nil), "opentelemetry.proto.logs.v1.LogRecord") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/logs/v1/logs.proto", fileDescriptor_d1c030a3ec7e961e) -} - -var fileDescriptor_d1c030a3ec7e961e = []byte{ - // 785 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xdd, 0x6e, 0x22, 0x37, - 0x14, 0xc7, 0xeb, 0x84, 0x40, 0xe2, 0x10, 0xd6, 0x75, 0xb3, 0xc9, 0x2c, 0xa9, 0xb2, 0xa3, 0xb4, - 0xdd, 0xd2, 0x54, 0xcb, 0x28, 0x03, 0x55, 0xab, 0xf6, 0x6a, 0x42, 0x06, 0x84, 0x96, 0x05, 0x64, - 0x60, 0xfb, 0x71, 0x33, 0x1a, 0xc0, 0x45, 0x23, 0x0d, 0x36, 0xf2, 0x18, 0x04, 0xcf, 0xd0, 0xc7, - 0xea, 0xcd, 0xaa, 0x57, 0xfb, 0x08, 0x55, 0x5e, 0xa4, 0xd5, 0x98, 0x8f, 0x5d, 0xd0, 0x98, 0x5c, - 0x61, 0x9f, 0xdf, 0xf9, 0xff, 0x7d, 0xce, 0x91, 0xf1, 0xc0, 0x57, 0x7c, 0x42, 0x99, 0xa4, 0x21, - 0x1d, 0x53, 0x29, 0x16, 0xd6, 0x44, 0x70, 0xc9, 0xad, 0x90, 0x8f, 0x22, 0x6b, 0x76, 0xa7, 0x7e, - 0x8b, 0x2a, 0x84, 0xaf, 0xb6, 0xf2, 0x96, 0xc1, 0xa2, 0xe2, 0xb3, 0xbb, 0xfc, 0x6d, 0x92, 0xc9, - 0x80, 0x8f, 0xc7, 0x9c, 0xc5, 0x36, 0xcb, 0xd5, 0x52, 0x93, 0x2f, 0x26, 0xe5, 0x0a, 0x1a, 0xf1, - 0xa9, 0x18, 0xd0, 0x38, 0x7b, 0xbd, 0x5e, 0xe6, 0xdf, 0x7c, 0x00, 0x30, 0x4b, 0x56, 0xa1, 0x06, - 0x1f, 0x45, 0xd8, 0x85, 0xc7, 0xeb, 0x14, 0x03, 0x98, 0xa0, 0x70, 0x6a, 0x7f, 0x57, 0x4c, 0x2a, - 0x6e, 0xe3, 0x33, 0xbb, 0x2b, 0xae, 0x0d, 0xc8, 0x46, 0x8a, 0x17, 0xf0, 0xcb, 0x80, 0x45, 0x52, - 0x4c, 0xc7, 0x94, 0x49, 0x5f, 0x06, 0x9c, 0x79, 0x61, 0xd0, 0x17, 0xbe, 0x58, 0x78, 0x71, 0x5b, - 0xc6, 0x81, 0x79, 0x58, 0x38, 0xb5, 0x7f, 0x2c, 0xee, 0xe9, 0xbb, 0x58, 0xdf, 0x36, 0x68, 0x2c, - 0xf5, 0x71, 0x95, 0x24, 0x1f, 0x68, 0xd9, 0xcd, 0x7b, 0x00, 0xf3, 0x7a, 0x29, 0x66, 0xf0, 0x52, - 0x53, 0xd9, 0xaa, 0xdf, 0x1f, 0x12, 0x8b, 0x5a, 0x4d, 0x59, 0x5b, 0x16, 0xb9, 0x48, 0x2e, 0x09, - 0xff, 0x0c, 0x53, 0x9f, 0x74, 0xfc, 0x6a, 0x6f, 0xc7, 0x0d, 0x3e, 0x22, 0x74, 0xc0, 0xc5, 0x90, - 0x28, 0xcd, 0xcd, 0x3f, 0x87, 0xf0, 0x64, 0x13, 0xc3, 0x5f, 0xc3, 0x9c, 0x0c, 0xc6, 0xd4, 0x9b, - 0xb2, 0x60, 0xee, 0x31, 0x9f, 0x71, 0x55, 0x70, 0x9a, 0x64, 0xe3, 0x68, 0x8f, 0x05, 0xf3, 0xa6, - 0xcf, 0x38, 0xee, 0xc2, 0x67, 0x11, 0x9d, 0x51, 0x11, 0xc8, 0x85, 0xc7, 0xa6, 0xe3, 0x3e, 0x15, - 0xc6, 0x81, 0x09, 0x0a, 0x39, 0xfb, 0xfb, 0xbd, 0x47, 0x77, 0x56, 0x9a, 0xa6, 0x92, 0x90, 0x5c, - 0xb4, 0xb5, 0xc7, 0x5f, 0xc1, 0xb3, 0x8d, 0xab, 0xa4, 0x73, 0x69, 0x1c, 0x9a, 0xa0, 0x70, 0x42, - 0xb2, 0xeb, 0x60, 0x97, 0xce, 0x25, 0xc6, 0x30, 0xc5, 0xfc, 0x31, 0x35, 0x52, 0x8a, 0xa9, 0x35, - 0xfe, 0x05, 0xa6, 0xfa, 0x7c, 0xb8, 0x30, 0x8e, 0xd4, 0x6c, 0xbf, 0x7d, 0x62, 0xb6, 0x0e, 0x5b, - 0xbc, 0xf3, 0xc3, 0x29, 0x25, 0x4a, 0x84, 0x6b, 0x10, 0xfa, 0x52, 0x8a, 0xa0, 0x3f, 0x95, 0x34, - 0x32, 0xd2, 0x6a, 0x82, 0x4f, 0x59, 0xbc, 0xa1, 0x2b, 0x8b, 0x4f, 0xa4, 0xf8, 0x27, 0x68, 0x0c, - 0x05, 0x9f, 0x4c, 0xe8, 0xd0, 0xfb, 0x18, 0xf5, 0x06, 0x7c, 0xca, 0xa4, 0x91, 0x31, 0x41, 0xe1, - 0x8c, 0x5c, 0xac, 0xb8, 0xb3, 0xc1, 0x95, 0x98, 0xe2, 0x73, 0x78, 0xf4, 0x67, 0xe8, 0x8f, 0x22, - 0xe3, 0xd8, 0x04, 0x85, 0x0c, 0x59, 0x6e, 0xf0, 0x0b, 0x78, 0x2c, 0x85, 0x3f, 0xa0, 0x5e, 0x30, - 0x34, 0x4e, 0x4c, 0x50, 0xc8, 0x92, 0x8c, 0xda, 0xd7, 0x87, 0xf8, 0x12, 0x66, 0xa2, 0x89, 0xcf, - 0x62, 0x02, 0x15, 0x49, 0xc7, 0xdb, 0xfa, 0xf0, 0xf6, 0xef, 0x23, 0x98, 0xdb, 0x9e, 0x32, 0x7e, - 0x09, 0xaf, 0x3a, 0xee, 0x3b, 0x97, 0xd4, 0xbb, 0xbf, 0x7b, 0xcd, 0xde, 0xdb, 0x7b, 0x97, 0x78, - 0xbd, 0x66, 0xa7, 0xed, 0x56, 0xea, 0xd5, 0xba, 0xfb, 0x80, 0x3e, 0xc3, 0x2f, 0xe0, 0xf3, 0xdd, - 0x84, 0x2e, 0x71, 0x2a, 0x2e, 0x02, 0x38, 0x0f, 0x2f, 0x12, 0x91, 0x8d, 0x0e, 0xb4, 0xac, 0x84, - 0x0e, 0xb5, 0xac, 0x8c, 0x52, 0x49, 0xc7, 0x3d, 0xb8, 0xf7, 0xbd, 0x1a, 0x3a, 0x4a, 0x92, 0x29, - 0x64, 0xa3, 0xb4, 0x96, 0x95, 0x50, 0x46, 0xcb, 0xca, 0xe8, 0x18, 0x1b, 0xf0, 0x7c, 0x97, 0xd5, - 0x9b, 0xd5, 0x16, 0x3a, 0x49, 0x2a, 0x24, 0x26, 0x36, 0x82, 0x3a, 0x54, 0x42, 0xa7, 0x3a, 0x54, - 0x46, 0xd9, 0xa4, 0xa3, 0x7e, 0x75, 0x48, 0x13, 0x9d, 0x25, 0x89, 0x62, 0x62, 0xa3, 0x9c, 0x0e, - 0x95, 0xd0, 0x33, 0x1d, 0x2a, 0x23, 0x94, 0x84, 0x5c, 0x42, 0x5a, 0x04, 0x7d, 0x9e, 0x34, 0x0c, - 0x85, 0x6c, 0x84, 0xb5, 0xac, 0x84, 0xbe, 0xd0, 0xb2, 0x32, 0x3a, 0x4f, 0x3a, 0xae, 0xea, 0x74, - 0x9d, 0x06, 0x7a, 0x9e, 0x24, 0x53, 0xc8, 0x46, 0x17, 0x5a, 0x56, 0x42, 0x97, 0x5a, 0x56, 0x46, - 0xc6, 0xed, 0x6f, 0x30, 0xb7, 0x79, 0x91, 0xaa, 0xea, 0xbf, 0xf0, 0x12, 0x5e, 0x35, 0x5a, 0x35, - 0x8f, 0xb8, 0x95, 0x16, 0x79, 0xf0, 0xaa, 0x0d, 0xa7, 0xb6, 0x73, 0x89, 0xbf, 0x81, 0xe6, 0x6e, - 0x82, 0xba, 0x71, 0x6a, 0xd9, 0xf1, 0xde, 0x3a, 0x9d, 0x37, 0xe8, 0x3f, 0x70, 0xff, 0x17, 0x78, - 0xff, 0x78, 0x0d, 0x3e, 0x3c, 0x5e, 0x83, 0x7f, 0x1f, 0xaf, 0x01, 0xbc, 0x0e, 0xf8, 0xbe, 0x07, - 0xeb, 0x3e, 0x7e, 0x18, 0xa3, 0x76, 0x1c, 0x6a, 0x83, 0x3f, 0xda, 0xa3, 0xdd, 0xe4, 0x80, 0x5b, - 0x5c, 0xd2, 0xd0, 0xa2, 0xf3, 0x09, 0x17, 0x92, 0x8a, 0xc8, 0xe2, 0x32, 0x9c, 0x58, 0x01, 0x93, - 0x54, 0x30, 0x3f, 0xb4, 0xb6, 0xb2, 0x5f, 0x2b, 0xeb, 0xd7, 0x23, 0xca, 0xd6, 0x1f, 0xe7, 0x7e, - 0x5a, 0x85, 0x4a, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x15, 0xaa, 0xeb, 0xc2, 0x07, 0x00, - 0x00, -} - -func (m *ResourceLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.InstrumentationLibraryLogs) > 0 { - for iNdEx := len(m.InstrumentationLibraryLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.InstrumentationLibraryLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Resource != nil { - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationLibraryLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationLibraryLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationLibraryLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.InstrumentationLibrary != nil { - { - size, err := m.InstrumentationLibrary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LogRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SpanId) > 0 { - i -= len(m.SpanId) - copy(dAtA[i:], m.SpanId) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SpanId))) - i-- - dAtA[i] = 0x52 - } - if len(m.TraceId) > 0 { - i -= len(m.TraceId) - copy(dAtA[i:], m.TraceId) - i = encodeVarintLogs(dAtA, i, uint64(len(m.TraceId))) - i-- - dAtA[i] = 0x4a - } - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x45 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x38 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintLogs(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - } - if len(m.SeverityText) > 0 { - i -= len(m.SeverityText) - copy(dAtA[i:], m.SeverityText) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SeverityText))) - i-- - dAtA[i] = 0x1a - } - if m.SeverityNumber != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.SeverityNumber)) - i-- - dAtA[i] = 0x10 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintLogs(dAtA []byte, offset int, v uint64) int { - offset -= sovLogs(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ResourceLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovLogs(uint64(l)) - } - if len(m.InstrumentationLibraryLogs) > 0 { - for _, e := range m.InstrumentationLibraryLogs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InstrumentationLibraryLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InstrumentationLibrary != nil { - l = m.InstrumentationLibrary.Size() - n += 1 + l + sovLogs(uint64(l)) - } - if len(m.Logs) > 0 { - for _, e := range m.Logs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LogRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - if m.SeverityNumber != 0 { - n += 1 + sovLogs(uint64(m.SeverityNumber)) - } - l = len(m.SeverityText) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovLogs(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovLogs(uint64(m.DroppedAttributesCount)) - } - if m.Flags != 0 { - n += 5 - } - l = len(m.TraceId) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - l = len(m.SpanId) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLogs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogs(x uint64) (n int) { - return sovLogs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResourceLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &v1.Resource{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibraryLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InstrumentationLibraryLogs = append(m.InstrumentationLibraryLogs, &InstrumentationLibraryLogs{}) - if err := m.InstrumentationLibraryLogs[len(m.InstrumentationLibraryLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationLibraryLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationLibraryLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationLibraryLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibrary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InstrumentationLibrary == nil { - m.InstrumentationLibrary = &v11.InstrumentationLibrary{} - } - if err := m.InstrumentationLibrary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Logs = append(m.Logs, &LogRecord{}) - if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityNumber", wireType) - } - m.SeverityNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SeverityNumber |= SeverityNumber(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityText", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SeverityText = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &v11.AnyValue{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) - if m.TraceId == nil { - m.TraceId = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanId = append(m.SpanId[:0], dAtA[iNdEx:postIndex]...) - if m.SpanId == nil { - m.SpanId = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogs(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogs - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogs - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogs - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogs = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogs = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogs = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go deleted file mode 100644 index eadfe5c1308..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1/metrics.pb.go +++ /dev/null @@ -1,5725 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/metrics/v1/metrics.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v11 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AggregationTemporality defines how a metric aggregator reports aggregated -// values. It describes how those values relate to the time interval over -// which they are aggregated. -type AggregationTemporality int32 - -const ( - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. 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. - AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 - // CUMULATIVE is an AggregationTemporality for a metic aggregator which - // reports changes since a fixed start time. 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. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 -) - -var AggregationTemporality_name = map[int32]string{ - 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", - 1: "AGGREGATION_TEMPORALITY_DELTA", - 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", -} - -var AggregationTemporality_value = map[string]int32{ - "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, - "AGGREGATION_TEMPORALITY_DELTA": 1, - "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, -} - -func (x AggregationTemporality) String() string { - return proto.EnumName(AggregationTemporality_name, int32(x)) -} - -func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{0} -} - -// 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 m.Unmarshal(b) -} -func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetrics.Merge(m, src) -} -func (m *ResourceMetrics) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *InstrumentationLibraryMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationLibraryMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationLibraryMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationLibraryMetrics.Merge(m, src) -} -func (m *InstrumentationLibraryMetrics) XXX_Size() int { - return m.Size() -} -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. Here, "DataPoint" is the term used to refer to any -// one of the specific data point value types, and "points" is the term used -// to refer to any one of the lists of points contained in the Metric. -// -// - Metric is composed of a metadata and data. -// - Metadata part contains a name, description, unit. -// - Data is one of the possible types (Gauge, Sum, Histogram, etc.). -// - DataPoint contains timestamps, labels, and one of the possible value type -// fields. -// -// Metric -// +------------+ -// |name | -// |description | -// |unit | +---------------------------+ -// |data |---> |Gauge, Sum, Histogram, ... | -// +------------+ +---------------------------+ -// -// Data [One of Gauge, Sum, Histogram, ...] -// +-----------+ -// |... | // Metadata about the Data. -// |points |--+ -// +-----------+ | -// | +---------------------------+ -// | |DataPoint 1 | -// v |+------+------+ +------+ | -// +-----+ ||label |label |...|label | | -// | 1 |-->||value1|value2|...|valueN| | -// +-----+ |+------+------+ +------+ | -// | . | |+-----+ | -// | . | ||value| | -// | . | |+-----+ | -// | . | +---------------------------+ -// | . | . -// | . | . -// | . | . -// | . | +---------------------------+ -// | . | |DataPoint M | -// +-----+ |+------+------+ +------+ | -// | M |-->||label |label |...|label | | -// +-----+ ||value1|value2|...|valueN| | -// |+------+------+ +------+ | -// |+-----+ | -// ||value| | -// |+-----+ | -// +---------------------------+ -// -// All DataPoint types have three common fields: -// - Labels zero or more key-value pairs associated with the data point. -// - StartTimeUnixNano MUST be set to the start of the interval when the data's -// type includes an AggregationTemporality. This field is not set otherwise. -// - TimeUnixNano MUST be set to: -// - the moment when an aggregation is reported (independent of the -// aggregation temporality). -// - the instantaneous time of the event. -type Metric 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"` - // Data determines the aggregation type (if any) of the metric, what is the - // reported value type for the data points, as well as the relatationship to - // the time interval over which they are reported. - // - // TODO: Update table after the decision on: - // https://github.com/open-telemetry/opentelemetry-specification/issues/731. - // By default, metrics recording using the OpenTelemetry API are exported as - // (the table does not include MeasurementValueType to avoid extra rows): - // - // Instrument Type - // ---------------------------------------------- - // Counter Sum(aggregation_temporality=delta;is_monotonic=true) - // UpDownCounter Sum(aggregation_temporality=delta;is_monotonic=false) - // ValueRecorder TBD - // SumObserver Sum(aggregation_temporality=cumulative;is_monotonic=true) - // UpDownSumObserver Sum(aggregation_temporality=cumulative;is_monotonic=false) - // ValueObserver Gauge() - // - // Types that are valid to be assigned to Data: - // *Metric_IntGauge - // *Metric_DoubleGauge - // *Metric_IntSum - // *Metric_DoubleSum - // *Metric_IntHistogram - // *Metric_DoubleHistogram - Data isMetric_Data `protobuf_oneof:"data"` - 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 m.Unmarshal(b) -} -func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metric.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metric) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metric.Merge(m, src) -} -func (m *Metric) XXX_Size() int { - return m.Size() -} -func (m *Metric) XXX_DiscardUnknown() { - xxx_messageInfo_Metric.DiscardUnknown(m) -} - -var xxx_messageInfo_Metric proto.InternalMessageInfo - -type isMetric_Data interface { - isMetric_Data() - MarshalTo([]byte) (int, error) - Size() int -} - -type Metric_IntGauge struct { - IntGauge *IntGauge `protobuf:"bytes,4,opt,name=int_gauge,json=intGauge,proto3,oneof" json:"int_gauge,omitempty"` -} -type Metric_DoubleGauge struct { - DoubleGauge *DoubleGauge `protobuf:"bytes,5,opt,name=double_gauge,json=doubleGauge,proto3,oneof" json:"double_gauge,omitempty"` -} -type Metric_IntSum struct { - IntSum *IntSum `protobuf:"bytes,6,opt,name=int_sum,json=intSum,proto3,oneof" json:"int_sum,omitempty"` -} -type Metric_DoubleSum struct { - DoubleSum *DoubleSum `protobuf:"bytes,7,opt,name=double_sum,json=doubleSum,proto3,oneof" json:"double_sum,omitempty"` -} -type Metric_IntHistogram struct { - IntHistogram *IntHistogram `protobuf:"bytes,8,opt,name=int_histogram,json=intHistogram,proto3,oneof" json:"int_histogram,omitempty"` -} -type Metric_DoubleHistogram struct { - DoubleHistogram *DoubleHistogram `protobuf:"bytes,9,opt,name=double_histogram,json=doubleHistogram,proto3,oneof" json:"double_histogram,omitempty"` -} - -func (*Metric_IntGauge) isMetric_Data() {} -func (*Metric_DoubleGauge) isMetric_Data() {} -func (*Metric_IntSum) isMetric_Data() {} -func (*Metric_DoubleSum) isMetric_Data() {} -func (*Metric_IntHistogram) isMetric_Data() {} -func (*Metric_DoubleHistogram) isMetric_Data() {} - -func (m *Metric) GetData() isMetric_Data { - if m != nil { - return m.Data - } - return nil -} - -func (m *Metric) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metric) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metric) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *Metric) GetIntGauge() *IntGauge { - if x, ok := m.GetData().(*Metric_IntGauge); ok { - return x.IntGauge - } - return nil -} - -func (m *Metric) GetDoubleGauge() *DoubleGauge { - if x, ok := m.GetData().(*Metric_DoubleGauge); ok { - return x.DoubleGauge - } - return nil -} - -func (m *Metric) GetIntSum() *IntSum { - if x, ok := m.GetData().(*Metric_IntSum); ok { - return x.IntSum - } - return nil -} - -func (m *Metric) GetDoubleSum() *DoubleSum { - if x, ok := m.GetData().(*Metric_DoubleSum); ok { - return x.DoubleSum - } - return nil -} - -func (m *Metric) GetIntHistogram() *IntHistogram { - if x, ok := m.GetData().(*Metric_IntHistogram); ok { - return x.IntHistogram - } - return nil -} - -func (m *Metric) GetDoubleHistogram() *DoubleHistogram { - if x, ok := m.GetData().(*Metric_DoubleHistogram); ok { - return x.DoubleHistogram - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Metric) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Metric_IntGauge)(nil), - (*Metric_DoubleGauge)(nil), - (*Metric_IntSum)(nil), - (*Metric_DoubleSum)(nil), - (*Metric_IntHistogram)(nil), - (*Metric_DoubleHistogram)(nil), - } -} - -// Gauge represents the type of a int scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -type IntGauge struct { - DataPoints []*IntDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntGauge) Reset() { *m = IntGauge{} } -func (m *IntGauge) String() string { return proto.CompactTextString(m) } -func (*IntGauge) ProtoMessage() {} -func (*IntGauge) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{3} -} -func (m *IntGauge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntGauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntGauge.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntGauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntGauge.Merge(m, src) -} -func (m *IntGauge) XXX_Size() int { - return m.Size() -} -func (m *IntGauge) XXX_DiscardUnknown() { - xxx_messageInfo_IntGauge.DiscardUnknown(m) -} - -var xxx_messageInfo_IntGauge proto.InternalMessageInfo - -func (m *IntGauge) GetDataPoints() []*IntDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// Gauge represents the type of a double scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -type DoubleGauge struct { - DataPoints []*DoubleDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleGauge) Reset() { *m = DoubleGauge{} } -func (m *DoubleGauge) String() string { return proto.CompactTextString(m) } -func (*DoubleGauge) ProtoMessage() {} -func (*DoubleGauge) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{4} -} -func (m *DoubleGauge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleGauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleGauge.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleGauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleGauge.Merge(m, src) -} -func (m *DoubleGauge) XXX_Size() int { - return m.Size() -} -func (m *DoubleGauge) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleGauge.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleGauge proto.InternalMessageInfo - -func (m *DoubleGauge) GetDataPoints() []*DoubleDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// Sum represents the type of a numeric int scalar metric that is calculated as -// a sum of all reported measurements over a time interval. -type IntSum struct { - DataPoints []*IntDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - // If "true" means that the sum is monotonic. - IsMonotonic bool `protobuf:"varint,3,opt,name=is_monotonic,json=isMonotonic,proto3" json:"is_monotonic,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntSum) Reset() { *m = IntSum{} } -func (m *IntSum) String() string { return proto.CompactTextString(m) } -func (*IntSum) ProtoMessage() {} -func (*IntSum) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{5} -} -func (m *IntSum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntSum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntSum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntSum) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntSum.Merge(m, src) -} -func (m *IntSum) XXX_Size() int { - return m.Size() -} -func (m *IntSum) XXX_DiscardUnknown() { - xxx_messageInfo_IntSum.DiscardUnknown(m) -} - -var xxx_messageInfo_IntSum proto.InternalMessageInfo - -func (m *IntSum) GetDataPoints() []*IntDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *IntSum) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -func (m *IntSum) GetIsMonotonic() bool { - if m != nil { - return m.IsMonotonic - } - return false -} - -// Sum represents the type of a numeric double scalar metric that is calculated -// as a sum of all reported measurements over a time interval. -type DoubleSum struct { - DataPoints []*DoubleDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - // If "true" means that the sum is monotonic. - IsMonotonic bool `protobuf:"varint,3,opt,name=is_monotonic,json=isMonotonic,proto3" json:"is_monotonic,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleSum) Reset() { *m = DoubleSum{} } -func (m *DoubleSum) String() string { return proto.CompactTextString(m) } -func (*DoubleSum) ProtoMessage() {} -func (*DoubleSum) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6} -} -func (m *DoubleSum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleSum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleSum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleSum) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleSum.Merge(m, src) -} -func (m *DoubleSum) XXX_Size() int { - return m.Size() -} -func (m *DoubleSum) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleSum.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleSum proto.InternalMessageInfo - -func (m *DoubleSum) GetDataPoints() []*DoubleDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *DoubleSum) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -func (m *DoubleSum) GetIsMonotonic() bool { - if m != nil { - return m.IsMonotonic - } - return false -} - -// Represents the type of a metric that is calculated by aggregating as a -// Histogram of all reported int measurements over a time interval. -type IntHistogram struct { - DataPoints []*IntHistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntHistogram) Reset() { *m = IntHistogram{} } -func (m *IntHistogram) String() string { return proto.CompactTextString(m) } -func (*IntHistogram) ProtoMessage() {} -func (*IntHistogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{7} -} -func (m *IntHistogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntHistogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntHistogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntHistogram.Merge(m, src) -} -func (m *IntHistogram) XXX_Size() int { - return m.Size() -} -func (m *IntHistogram) XXX_DiscardUnknown() { - xxx_messageInfo_IntHistogram.DiscardUnknown(m) -} - -var xxx_messageInfo_IntHistogram proto.InternalMessageInfo - -func (m *IntHistogram) GetDataPoints() []*IntHistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *IntHistogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// Represents the type of a metric that is calculated by aggregating as a -// Histogram of all reported double measurements over a time interval. -type DoubleHistogram struct { - DataPoints []*DoubleHistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleHistogram) Reset() { *m = DoubleHistogram{} } -func (m *DoubleHistogram) String() string { return proto.CompactTextString(m) } -func (*DoubleHistogram) ProtoMessage() {} -func (*DoubleHistogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{8} -} -func (m *DoubleHistogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleHistogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleHistogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleHistogram.Merge(m, src) -} -func (m *DoubleHistogram) XXX_Size() int { - return m.Size() -} -func (m *DoubleHistogram) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleHistogram.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleHistogram proto.InternalMessageInfo - -func (m *DoubleHistogram) GetDataPoints() []*DoubleHistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *DoubleHistogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// IntDataPoint is a single data point in a timeseries that describes the -// time-varying values of a int64 metric. -type IntDataPoint 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 last time when the aggregation value was reset - // to "zero". For some metric types this is ignored, see data types for more - // details. - // - // The aggregation 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 aggregation value was reported. - // - // 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:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []*IntExemplar `protobuf:"bytes,5,rep,name=exemplars,proto3" json:"exemplars,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntDataPoint) Reset() { *m = IntDataPoint{} } -func (m *IntDataPoint) String() string { return proto.CompactTextString(m) } -func (*IntDataPoint) ProtoMessage() {} -func (*IntDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{9} -} -func (m *IntDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntDataPoint.Merge(m, src) -} -func (m *IntDataPoint) XXX_Size() int { - return m.Size() -} -func (m *IntDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_IntDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_IntDataPoint proto.InternalMessageInfo - -func (m *IntDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil -} - -func (m *IntDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *IntDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *IntDataPoint) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *IntDataPoint) GetExemplars() []*IntExemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -// 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 last time when the aggregation value was reset - // to "zero". For some metric types this is ignored, see data types for more - // details. - // - // The aggregation 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 aggregation value was reported. - // - // 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"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []*DoubleExemplar `protobuf:"bytes,5,rep,name=exemplars,proto3" json:"exemplars,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{10} -} -func (m *DoubleDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleDataPoint.Merge(m, src) -} -func (m *DoubleDataPoint) XXX_Size() int { - return m.Size() -} -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 -} - -func (m *DoubleDataPoint) GetExemplars() []*DoubleExemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -// IntHistogramDataPoint is a single data point in a timeseries that describes -// the time-varying values of a Histogram of int values. 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 IntHistogramDataPoint 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 last time when the aggregation value was reset - // to "zero". For some metric types this is ignored, see data types for more - // details. - // - // The aggregation 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 aggregation value was reported. - // - // 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:"fixed64,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 int64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. - BucketCounts []uint64 `protobuf:"fixed64,6,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,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: - // - // (-infinity, 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. - // - // Note: only [a, b) intervals are currently supported for each bucket except the first one. - // If we decide 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"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []*IntExemplar `protobuf:"bytes,8,rep,name=exemplars,proto3" json:"exemplars,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntHistogramDataPoint) Reset() { *m = IntHistogramDataPoint{} } -func (m *IntHistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*IntHistogramDataPoint) ProtoMessage() {} -func (*IntHistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{11} -} -func (m *IntHistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntHistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntHistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntHistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntHistogramDataPoint.Merge(m, src) -} -func (m *IntHistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *IntHistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_IntHistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_IntHistogramDataPoint proto.InternalMessageInfo - -func (m *IntHistogramDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil -} - -func (m *IntHistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *IntHistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *IntHistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *IntHistogramDataPoint) GetSum() int64 { - if m != nil { - return m.Sum - } - return 0 -} - -func (m *IntHistogramDataPoint) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *IntHistogramDataPoint) GetExplicitBounds() []float64 { - if m != nil { - return m.ExplicitBounds - } - return nil -} - -func (m *IntHistogramDataPoint) GetExemplars() []*IntExemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -// HistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Histogram of double values. 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 DoubleHistogramDataPoint 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 last time when the aggregation value was reset - // to "zero". For some metric types this is ignored, see data types for more - // details. - // - // The aggregation 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 aggregation value was reported. - // - // 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:"fixed64,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"` - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. - BucketCounts []uint64 `protobuf:"fixed64,6,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,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: - // - // (-infinity, 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. - // - // Note: only [a, b) intervals are currently supported for each bucket except the first one. - // If we decide 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"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []*DoubleExemplar `protobuf:"bytes,8,rep,name=exemplars,proto3" json:"exemplars,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleHistogramDataPoint) Reset() { *m = DoubleHistogramDataPoint{} } -func (m *DoubleHistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*DoubleHistogramDataPoint) ProtoMessage() {} -func (*DoubleHistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{12} -} -func (m *DoubleHistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleHistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleHistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleHistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleHistogramDataPoint.Merge(m, src) -} -func (m *DoubleHistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *DoubleHistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleHistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleHistogramDataPoint proto.InternalMessageInfo - -func (m *DoubleHistogramDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil -} - -func (m *DoubleHistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *DoubleHistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *DoubleHistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *DoubleHistogramDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} - -func (m *DoubleHistogramDataPoint) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *DoubleHistogramDataPoint) GetExplicitBounds() []float64 { - if m != nil { - return m.ExplicitBounds - } - return nil -} - -func (m *DoubleHistogramDataPoint) GetExemplars() []*DoubleExemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -// A representation of an exemplar, which is a sample input int measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -type IntExemplar struct { - // The set of labels that were filtered out by the aggregator, but recorded - // alongside the original measurement. Only labels that were filtered out - // by the aggregator should be included - FilteredLabels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=filtered_labels,json=filteredLabels,proto3" json:"filtered_labels,omitempty"` - // time_unix_nano is the exact time 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"` - // Numerical int value of the measurement that was recorded. - Value int64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - SpanId []byte `protobuf:"bytes,4,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - TraceId []byte `protobuf:"bytes,5,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IntExemplar) Reset() { *m = IntExemplar{} } -func (m *IntExemplar) String() string { return proto.CompactTextString(m) } -func (*IntExemplar) ProtoMessage() {} -func (*IntExemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{13} -} -func (m *IntExemplar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntExemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IntExemplar.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IntExemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntExemplar.Merge(m, src) -} -func (m *IntExemplar) XXX_Size() int { - return m.Size() -} -func (m *IntExemplar) XXX_DiscardUnknown() { - xxx_messageInfo_IntExemplar.DiscardUnknown(m) -} - -var xxx_messageInfo_IntExemplar proto.InternalMessageInfo - -func (m *IntExemplar) GetFilteredLabels() []*v11.StringKeyValue { - if m != nil { - return m.FilteredLabels - } - return nil -} - -func (m *IntExemplar) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *IntExemplar) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *IntExemplar) GetSpanId() []byte { - if m != nil { - return m.SpanId - } - return nil -} - -func (m *IntExemplar) GetTraceId() []byte { - if m != nil { - return m.TraceId - } - return nil -} - -// A representation of an exemplar, which is a sample input double measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -type DoubleExemplar struct { - // The set of labels that were filtered out by the aggregator, but recorded - // alongside the original measurement. Only labels that were filtered out - // by the aggregator should be included - FilteredLabels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=filtered_labels,json=filteredLabels,proto3" json:"filtered_labels,omitempty"` - // time_unix_nano is the exact time 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"` - // Numerical double value of the measurement that was recorded. - Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - SpanId []byte `protobuf:"bytes,4,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - TraceId []byte `protobuf:"bytes,5,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleExemplar) Reset() { *m = DoubleExemplar{} } -func (m *DoubleExemplar) String() string { return proto.CompactTextString(m) } -func (*DoubleExemplar) ProtoMessage() {} -func (*DoubleExemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{14} -} -func (m *DoubleExemplar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DoubleExemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleExemplar.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleExemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleExemplar.Merge(m, src) -} -func (m *DoubleExemplar) XXX_Size() int { - return m.Size() -} -func (m *DoubleExemplar) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleExemplar.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleExemplar proto.InternalMessageInfo - -func (m *DoubleExemplar) GetFilteredLabels() []*v11.StringKeyValue { - if m != nil { - return m.FilteredLabels - } - return nil -} - -func (m *DoubleExemplar) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *DoubleExemplar) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *DoubleExemplar) GetSpanId() []byte { - if m != nil { - return m.SpanId - } - return nil -} - -func (m *DoubleExemplar) GetTraceId() []byte { - if m != nil { - return m.TraceId - } - return nil -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.metrics.v1.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_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((*IntGauge)(nil), "opentelemetry.proto.metrics.v1.IntGauge") - proto.RegisterType((*DoubleGauge)(nil), "opentelemetry.proto.metrics.v1.DoubleGauge") - proto.RegisterType((*IntSum)(nil), "opentelemetry.proto.metrics.v1.IntSum") - proto.RegisterType((*DoubleSum)(nil), "opentelemetry.proto.metrics.v1.DoubleSum") - proto.RegisterType((*IntHistogram)(nil), "opentelemetry.proto.metrics.v1.IntHistogram") - proto.RegisterType((*DoubleHistogram)(nil), "opentelemetry.proto.metrics.v1.DoubleHistogram") - proto.RegisterType((*IntDataPoint)(nil), "opentelemetry.proto.metrics.v1.IntDataPoint") - proto.RegisterType((*DoubleDataPoint)(nil), "opentelemetry.proto.metrics.v1.DoubleDataPoint") - proto.RegisterType((*IntHistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.IntHistogramDataPoint") - proto.RegisterType((*DoubleHistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.DoubleHistogramDataPoint") - proto.RegisterType((*IntExemplar)(nil), "opentelemetry.proto.metrics.v1.IntExemplar") - proto.RegisterType((*DoubleExemplar)(nil), "opentelemetry.proto.metrics.v1.DoubleExemplar") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/metrics/v1/metrics.proto", fileDescriptor_3c3112f9fa006917) -} - -var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1086 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd8, 0xc9, 0xda, 0x7e, 0x76, 0x13, 0x33, 0x2a, 0xed, 0x52, 0xa9, 0x21, 0x71, 0x51, - 0x1a, 0xda, 0xc6, 0x56, 0x82, 0x8a, 0xb8, 0x20, 0xe1, 0x24, 0x26, 0x31, 0x38, 0xa9, 0x35, 0x71, - 0x22, 0x05, 0x21, 0xad, 0xc6, 0xde, 0xc1, 0x8c, 0xd8, 0x9d, 0xb1, 0x76, 0x67, 0xa3, 0xe4, 0x07, - 0x70, 0x83, 0x13, 0xfc, 0x17, 0xfe, 0x02, 0x47, 0x38, 0x20, 0xb8, 0x20, 0x55, 0xb9, 0x72, 0xe2, - 0xc2, 0x89, 0x03, 0xda, 0xd9, 0xdd, 0xc4, 0x4e, 0x36, 0xb1, 0xab, 0x14, 0x29, 0xbd, 0xbd, 0x79, - 0xf3, 0xde, 0x37, 0xdf, 0xfb, 0xde, 0x7b, 0xde, 0x36, 0xf0, 0x4c, 0x0e, 0x98, 0x50, 0xcc, 0x61, - 0x2e, 0x53, 0xde, 0x49, 0x6d, 0xe0, 0x49, 0x25, 0x6b, 0xa1, 0xcd, 0x7b, 0x7e, 0xed, 0x68, 0x35, - 0x31, 0xab, 0xfa, 0x02, 0xcf, 0x8f, 0x44, 0x47, 0xce, 0x6a, 0x12, 0x72, 0xb4, 0xfa, 0xe0, 0x49, - 0x1a, 0x5a, 0x4f, 0xba, 0xae, 0x14, 0x21, 0x58, 0x64, 0x45, 0x69, 0x0f, 0xaa, 0x69, 0xb1, 0x1e, - 0xf3, 0x65, 0xe0, 0xf5, 0x58, 0x18, 0x9d, 0xd8, 0x51, 0x7c, 0xe5, 0x25, 0x82, 0x39, 0x12, 0xbb, - 0x76, 0xa2, 0x27, 0x71, 0x03, 0xf2, 0x49, 0x94, 0x89, 0x16, 0xd0, 0x72, 0x71, 0xed, 0xfd, 0x6a, - 0x1a, 0xc5, 0x33, 0xa8, 0xa3, 0xd5, 0x6a, 0x82, 0x41, 0xce, 0x52, 0xf1, 0xb7, 0x08, 0xde, 0xe5, - 0xc2, 0x57, 0x5e, 0xe0, 0x32, 0xa1, 0xa8, 0xe2, 0x52, 0x58, 0x0e, 0xef, 0x7a, 0xd4, 0x3b, 0xb1, - 0xe2, 0xea, 0xcc, 0xcc, 0x42, 0x76, 0xb9, 0xb8, 0xf6, 0x71, 0xf5, 0x7a, 0x05, 0xaa, 0xcd, 0x51, - 0x98, 0x56, 0x84, 0x12, 0xf3, 0x25, 0x0f, 0xf9, 0x75, 0xd7, 0x95, 0x5f, 0x11, 0x3c, 0xbc, 0x16, - 0x00, 0x0b, 0xb8, 0x7f, 0x05, 0xd1, 0xb8, 0xfe, 0xe7, 0xa9, 0x04, 0x63, 0xe1, 0xaf, 0xe4, 0x47, - 0xee, 0xa5, 0x13, 0xc3, 0x9f, 0x40, 0x6e, 0x54, 0x80, 0xa5, 0x71, 0x02, 0x44, 0x4c, 0x49, 0x92, - 0x56, 0xf9, 0x69, 0x1a, 0x8c, 0xc8, 0x87, 0x31, 0x4c, 0x0b, 0xea, 0x46, 0x9d, 0x2a, 0x10, 0x6d, - 0xe3, 0x05, 0x28, 0xda, 0xcc, 0xef, 0x79, 0x7c, 0x10, 0x3e, 0x6b, 0x66, 0xf4, 0xd5, 0xb0, 0x2b, - 0xcc, 0x0a, 0x04, 0x57, 0x66, 0x36, 0xca, 0x0a, 0x6d, 0xbc, 0x05, 0x05, 0x2e, 0x94, 0xd5, 0xa7, - 0x41, 0x9f, 0x99, 0xd3, 0xba, 0xf0, 0xe5, 0xf1, 0x9d, 0x51, 0x5b, 0x61, 0xfc, 0xf6, 0x14, 0xc9, - 0xf3, 0xd8, 0xc6, 0x6d, 0x28, 0xd9, 0x32, 0xe8, 0x3a, 0x2c, 0xc6, 0x9a, 0xd1, 0x58, 0x4f, 0xc7, - 0x61, 0x6d, 0xea, 0x9c, 0x04, 0xae, 0x68, 0x9f, 0x1f, 0x71, 0x1d, 0x72, 0x21, 0x35, 0x3f, 0x70, - 0x4d, 0x43, 0x83, 0x2d, 0x4d, 0x40, 0x6c, 0x2f, 0x70, 0xb7, 0xa7, 0x88, 0xc1, 0xb5, 0x85, 0x3f, - 0x03, 0x88, 0x49, 0x85, 0x28, 0xb9, 0x6b, 0xe6, 0xfa, 0x12, 0xa5, 0x08, 0xa8, 0x60, 0x27, 0x07, - 0xbc, 0x07, 0x77, 0x42, 0x3a, 0x5f, 0x73, 0x5f, 0xc9, 0xbe, 0x47, 0x5d, 0x33, 0xaf, 0xe1, 0x9e, - 0x4d, 0x40, 0x6a, 0x3b, 0xc9, 0xd9, 0x9e, 0x22, 0x25, 0x3e, 0x74, 0xc6, 0x5f, 0x42, 0x39, 0x26, - 0x78, 0x8e, 0x5b, 0xd0, 0xb8, 0xb5, 0xc9, 0x68, 0x0e, 0x43, 0xcf, 0xd9, 0xa3, 0xae, 0x75, 0x03, - 0xa6, 0x6d, 0xaa, 0x68, 0xe5, 0x10, 0xf2, 0x49, 0xcf, 0xf0, 0x0e, 0x14, 0x43, 0x9f, 0x35, 0x90, - 0x5c, 0x28, 0xdf, 0x44, 0x7a, 0x16, 0x27, 0x29, 0x62, 0x93, 0x2a, 0xda, 0x0e, 0x93, 0x08, 0xd8, - 0x89, 0xe9, 0x57, 0x2c, 0x28, 0x0e, 0xb5, 0x10, 0xb7, 0xd3, 0xd0, 0x27, 0x2c, 0x25, 0xfd, 0x81, - 0xbf, 0x10, 0x18, 0x51, 0x5f, 0x5f, 0x33, 0x75, 0x2c, 0xe1, 0x3e, 0xed, 0xf7, 0x3d, 0xd6, 0x8f, - 0xb6, 0x5f, 0x31, 0x77, 0x20, 0x3d, 0xea, 0x70, 0x75, 0xa2, 0x97, 0x67, 0x76, 0xed, 0xc3, 0x71, - 0xd0, 0xf5, 0xf3, 0xf4, 0xce, 0x79, 0x36, 0xb9, 0x47, 0x53, 0xfd, 0x78, 0x11, 0x4a, 0xdc, 0xb7, - 0x5c, 0x29, 0xa4, 0x92, 0x82, 0xf7, 0xf4, 0x1e, 0xe6, 0x49, 0x91, 0xfb, 0x3b, 0x89, 0xab, 0xf2, - 0x37, 0x82, 0xc2, 0xd9, 0xfc, 0xbd, 0x7e, 0x35, 0x6f, 0x65, 0xcd, 0xbf, 0x23, 0x28, 0x0d, 0x2f, - 0x09, 0x3e, 0x48, 0x2b, 0xfb, 0xf9, 0xab, 0xec, 0xd9, 0xed, 0x28, 0xbe, 0xf2, 0x27, 0x82, 0xb9, - 0x0b, 0x6b, 0x8a, 0x0f, 0xd3, 0x8a, 0xfb, 0xe8, 0x15, 0x97, 0xfd, 0x96, 0xd4, 0xf7, 0x7d, 0x46, - 0x77, 0xee, 0x8c, 0x0d, 0x6e, 0x80, 0xe1, 0xd0, 0x2e, 0x73, 0x92, 0xba, 0x56, 0xc6, 0x7c, 0x43, - 0xf7, 0x94, 0xc7, 0x45, 0xff, 0x73, 0x76, 0x72, 0x40, 0x9d, 0x80, 0x91, 0x38, 0x19, 0xd7, 0xe0, - 0xae, 0xaf, 0xa8, 0xa7, 0x2c, 0xc5, 0x5d, 0x66, 0x05, 0x82, 0x1f, 0x5b, 0x82, 0x0a, 0xa9, 0xab, - 0x30, 0xc8, 0x5b, 0xfa, 0xae, 0xc3, 0x5d, 0xb6, 0x2f, 0xf8, 0xf1, 0x2e, 0x15, 0x12, 0xbf, 0x07, - 0xb3, 0x17, 0x42, 0xb3, 0x3a, 0xb4, 0xa4, 0x86, 0xa3, 0xee, 0xc2, 0xcc, 0x51, 0xf8, 0x8e, 0xfe, - 0xce, 0x95, 0x49, 0x74, 0xc0, 0x4d, 0x28, 0xb0, 0x63, 0xe6, 0x0e, 0x1c, 0xea, 0xf9, 0xe6, 0x8c, - 0xa6, 0xfd, 0x74, 0x82, 0x59, 0x6b, 0xc4, 0x39, 0xe4, 0x3c, 0xbb, 0xf2, 0x43, 0x26, 0xe9, 0xf7, - 0x1b, 0x29, 0x09, 0x4a, 0x24, 0x69, 0x5d, 0x96, 0xa4, 0x3a, 0xd9, 0x84, 0xa6, 0xa9, 0xf2, 0x4f, - 0x06, 0xde, 0x4e, 0x5d, 0xce, 0xdb, 0xaf, 0x4d, 0x4f, 0x06, 0x42, 0x69, 0x6d, 0x0c, 0x12, 0x1d, - 0x70, 0x19, 0xb2, 0xe1, 0xbf, 0x25, 0x66, 0xf4, 0x08, 0x85, 0x26, 0x7e, 0x04, 0x77, 0xba, 0x41, - 0xef, 0x1b, 0xa6, 0x2c, 0x1d, 0xe1, 0x9b, 0xc6, 0x42, 0x36, 0x04, 0x8b, 0x9c, 0x1b, 0xda, 0x87, - 0x1f, 0xc3, 0x1c, 0x3b, 0x1e, 0x38, 0xbc, 0xc7, 0x95, 0xd5, 0x95, 0x81, 0xb0, 0x7d, 0x33, 0xb7, - 0x90, 0x5d, 0x46, 0x64, 0x36, 0x71, 0xaf, 0x6b, 0xef, 0xe8, 0x38, 0xe6, 0x6f, 0x34, 0x8e, 0xff, - 0x66, 0xc0, 0xbc, 0xea, 0x87, 0xe3, 0x4d, 0xd7, 0x1e, 0xfd, 0x1f, 0xda, 0xb7, 0x2e, 0x6b, 0x7f, - 0x83, 0xb9, 0xff, 0x0d, 0x41, 0x71, 0xa8, 0x33, 0xf8, 0x00, 0xe6, 0xbe, 0xe2, 0x8e, 0x62, 0x1e, - 0xb3, 0xad, 0x9b, 0x48, 0x3f, 0x9b, 0xa0, 0xb4, 0xa2, 0x16, 0x5c, 0x56, 0x34, 0x73, 0xdd, 0xa6, - 0x67, 0x87, 0x7f, 0xfc, 0xee, 0x43, 0xce, 0x1f, 0x50, 0x61, 0x71, 0x5b, 0x2b, 0x5d, 0x22, 0x46, - 0x78, 0x6c, 0xda, 0xf8, 0x1d, 0xc8, 0x2b, 0x8f, 0xf6, 0x58, 0x78, 0x33, 0xa3, 0x6f, 0x72, 0xfa, - 0xdc, 0xb4, 0x2b, 0x7f, 0x20, 0x98, 0x1d, 0xad, 0xfa, 0x36, 0x95, 0x86, 0x6e, 0x50, 0xda, 0x93, - 0xef, 0x10, 0xdc, 0x4b, 0xff, 0x06, 0xe2, 0xc7, 0xf0, 0xa8, 0xbe, 0xb5, 0x45, 0x1a, 0x5b, 0xf5, - 0x4e, 0xf3, 0xc5, 0xae, 0xd5, 0x69, 0xec, 0xb4, 0x5f, 0x90, 0x7a, 0xab, 0xd9, 0x39, 0xb4, 0xf6, - 0x77, 0xf7, 0xda, 0x8d, 0x8d, 0xe6, 0xa7, 0xcd, 0xc6, 0x66, 0x79, 0x0a, 0x2f, 0xc2, 0xc3, 0xab, - 0x02, 0x37, 0x1b, 0xad, 0x4e, 0xbd, 0x8c, 0xf0, 0x12, 0x54, 0xae, 0x0a, 0xd9, 0xd8, 0xdf, 0xd9, - 0x6f, 0xd5, 0x3b, 0xcd, 0x83, 0x46, 0x39, 0xb3, 0xfe, 0x23, 0xfa, 0xf9, 0x74, 0x1e, 0xfd, 0x72, - 0x3a, 0x8f, 0x5e, 0x9e, 0xce, 0x23, 0x58, 0xe4, 0x72, 0xcc, 0x34, 0xae, 0x97, 0xe2, 0xff, 0xde, - 0xb6, 0xc3, 0x8b, 0x36, 0xfa, 0x62, 0xaf, 0x7f, 0x31, 0x85, 0xcb, 0x9a, 0x54, 0xcc, 0xa9, 0xb1, - 0xe3, 0x81, 0xf4, 0x14, 0xf3, 0xfc, 0x9a, 0x54, 0xce, 0xa0, 0xc6, 0x85, 0x62, 0x9e, 0xa0, 0x4e, - 0x6d, 0x24, 0x7a, 0x45, 0x3f, 0xb0, 0xd2, 0x67, 0x62, 0xe8, 0x2f, 0x19, 0x5d, 0x43, 0x7b, 0x3f, - 0xf8, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x51, 0xc2, 0xe2, 0xf2, 0x10, 0x00, 0x00, -} - -func (m *ResourceMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.InstrumentationLibraryMetrics) > 0 { - for iNdEx := len(m.InstrumentationLibraryMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.InstrumentationLibraryMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Resource != nil { - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationLibraryMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationLibraryMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationLibraryMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Metrics) > 0 { - for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.InstrumentationLibrary != nil { - { - size, err := m.InstrumentationLibrary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metric) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metric) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Data != nil { - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metric_IntGauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_IntGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IntGauge != nil { - { - size, err := m.IntGauge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Metric_DoubleGauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_DoubleGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DoubleGauge != nil { - { - size, err := m.DoubleGauge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Metric_IntSum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_IntSum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IntSum != nil { - { - size, err := m.IntSum.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *Metric_DoubleSum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_DoubleSum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DoubleSum != nil { - { - size, err := m.DoubleSum.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Metric_IntHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_IntHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IntHistogram != nil { - { - size, err := m.IntHistogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *Metric_DoubleHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_DoubleHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DoubleHistogram != nil { - { - size, err := m.DoubleHistogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *IntGauge) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntGauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleGauge) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleGauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IntSum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntSum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntSum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsMonotonic { - i-- - if m.IsMonotonic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleSum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleSum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleSum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsMonotonic { - i-- - if m.IsMonotonic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IntHistogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleHistogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IntDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Value)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Labels) > 0 { - for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Labels) > 0 { - for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IntHistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntHistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.ExplicitBounds) > 0 { - for iNdEx := len(m.ExplicitBounds) - 1; iNdEx >= 0; iNdEx-- { - f9 := math.Float64bits(float64(m.ExplicitBounds[iNdEx])) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.ExplicitBounds)*8)) - i-- - dAtA[i] = 0x3a - } - if len(m.BucketCounts) > 0 { - for iNdEx := len(m.BucketCounts) - 1; iNdEx >= 0; iNdEx-- { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.BucketCounts[iNdEx])) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.BucketCounts)*8)) - i-- - dAtA[i] = 0x32 - } - if m.Sum != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Sum)) - i-- - dAtA[i] = 0x29 - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Labels) > 0 { - for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleHistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleHistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.ExplicitBounds) > 0 { - for iNdEx := len(m.ExplicitBounds) - 1; iNdEx >= 0; iNdEx-- { - f10 := math.Float64bits(float64(m.ExplicitBounds[iNdEx])) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f10)) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.ExplicitBounds)*8)) - i-- - dAtA[i] = 0x3a - } - if len(m.BucketCounts) > 0 { - for iNdEx := len(m.BucketCounts) - 1; iNdEx >= 0; iNdEx-- { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.BucketCounts[iNdEx])) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.BucketCounts)*8)) - i-- - dAtA[i] = 0x32 - } - if m.Sum != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Labels) > 0 { - for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IntExemplar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntExemplar) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntExemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.TraceId) > 0 { - i -= len(m.TraceId) - copy(dAtA[i:], m.TraceId) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.TraceId))) - i-- - dAtA[i] = 0x2a - } - if len(m.SpanId) > 0 { - i -= len(m.SpanId) - copy(dAtA[i:], m.SpanId) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SpanId))) - i-- - dAtA[i] = 0x22 - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Value)) - i-- - dAtA[i] = 0x19 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.FilteredLabels) > 0 { - for iNdEx := len(m.FilteredLabels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FilteredLabels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DoubleExemplar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleExemplar) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleExemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.TraceId) > 0 { - i -= len(m.TraceId) - copy(dAtA[i:], m.TraceId) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.TraceId))) - i-- - dAtA[i] = 0x2a - } - if len(m.SpanId) > 0 { - i -= len(m.SpanId) - copy(dAtA[i:], m.SpanId) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SpanId))) - i-- - dAtA[i] = 0x22 - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x19 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.FilteredLabels) > 0 { - for iNdEx := len(m.FilteredLabels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FilteredLabels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { - offset -= sovMetrics(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ResourceMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - if len(m.InstrumentationLibraryMetrics) > 0 { - for _, e := range m.InstrumentationLibraryMetrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InstrumentationLibraryMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InstrumentationLibrary != nil { - l = m.InstrumentationLibrary.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - if len(m.Metrics) > 0 { - for _, e := range m.Metrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Metric) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Unit) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.Data != nil { - n += m.Data.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Metric_IntGauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IntGauge != nil { - l = m.IntGauge.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_DoubleGauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DoubleGauge != nil { - l = m.DoubleGauge.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_IntSum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IntSum != nil { - l = m.IntSum.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_DoubleSum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DoubleSum != nil { - l = m.DoubleSum.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_IntHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IntHistogram != nil { - l = m.IntHistogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_DoubleHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DoubleHistogram != nil { - l = m.DoubleHistogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *IntGauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleGauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IntSum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.IsMonotonic { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleSum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.IsMonotonic { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IntHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IntDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Labels) > 0 { - for _, e := range m.Labels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Labels) > 0 { - for _, e := range m.Labels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IntHistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Labels) > 0 { - for _, e := range m.Labels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum != 0 { - n += 9 - } - if len(m.BucketCounts) > 0 { - n += 1 + sovMetrics(uint64(len(m.BucketCounts)*8)) + len(m.BucketCounts)*8 - } - if len(m.ExplicitBounds) > 0 { - n += 1 + sovMetrics(uint64(len(m.ExplicitBounds)*8)) + len(m.ExplicitBounds)*8 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleHistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Labels) > 0 { - for _, e := range m.Labels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum != 0 { - n += 9 - } - if len(m.BucketCounts) > 0 { - n += 1 + sovMetrics(uint64(len(m.BucketCounts)*8)) + len(m.BucketCounts)*8 - } - if len(m.ExplicitBounds) > 0 { - n += 1 + sovMetrics(uint64(len(m.ExplicitBounds)*8)) + len(m.ExplicitBounds)*8 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IntExemplar) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FilteredLabels) > 0 { - for _, e := range m.FilteredLabels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - l = len(m.SpanId) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.TraceId) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleExemplar) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FilteredLabels) > 0 { - for _, e := range m.FilteredLabels { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - l = len(m.SpanId) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.TraceId) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetrics(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetrics(x uint64) (n int) { - return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResourceMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &v1.Resource{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibraryMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InstrumentationLibraryMetrics = append(m.InstrumentationLibraryMetrics, &InstrumentationLibraryMetrics{}) - if err := m.InstrumentationLibraryMetrics[len(m.InstrumentationLibraryMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationLibraryMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationLibraryMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationLibraryMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibrary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InstrumentationLibrary == nil { - m.InstrumentationLibrary = &v11.InstrumentationLibrary{} - } - if err := m.InstrumentationLibrary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metrics = append(m.Metrics, &Metric{}) - if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metric) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metric: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Unit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntGauge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &IntGauge{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_IntGauge{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleGauge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DoubleGauge{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_DoubleGauge{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntSum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &IntSum{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_IntSum{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleSum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DoubleSum{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_DoubleSum{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntHistogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &IntHistogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_IntHistogram{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleHistogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DoubleHistogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_DoubleHistogram{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntGauge) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntGauge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntGauge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &IntDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleGauge) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleGauge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleGauge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &DoubleDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntSum) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntSum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntSum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &IntDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsMonotonic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsMonotonic = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleSum) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleSum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleSum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &DoubleDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsMonotonic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsMonotonic = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntHistogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntHistogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntHistogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &IntHistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleHistogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleHistogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleHistogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &DoubleHistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Labels = append(m.Labels, &v11.StringKeyValue{}) - if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Value = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, &IntExemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Labels = append(m.Labels, &v11.StringKeyValue{}) - if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, &DoubleExemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntHistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntHistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntHistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Labels = append(m.Labels, &v11.StringKeyValue{}) - if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - m.Sum = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Sum = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - case 7: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.ExplicitBounds) == 0 { - m.ExplicitBounds = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ExplicitBounds", wireType) - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, &IntExemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleHistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleHistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleHistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Labels = append(m.Labels, &v11.StringKeyValue{}) - if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - case 7: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.ExplicitBounds) == 0 { - m.ExplicitBounds = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ExplicitBounds", wireType) - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, &DoubleExemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IntExemplar) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntExemplar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntExemplar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilteredLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilteredLabels = append(m.FilteredLabels, &v11.StringKeyValue{}) - if err := m.FilteredLabels[len(m.FilteredLabels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Value = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanId = append(m.SpanId[:0], dAtA[iNdEx:postIndex]...) - if m.SpanId == nil { - m.SpanId = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) - if m.TraceId == nil { - m.TraceId = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DoubleExemplar) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleExemplar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleExemplar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilteredLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilteredLabels = append(m.FilteredLabels, &v11.StringKeyValue{}) - if err := m.FilteredLabels[len(m.FilteredLabels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanId = append(m.SpanId[:0], dAtA[iNdEx:postIndex]...) - if m.SpanId == nil { - m.SpanId = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) - if m.TraceId == nil { - m.TraceId = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetrics(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetrics - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetrics - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go deleted file mode 100644 index 505fd8cc36b..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1/resource.pb.go +++ /dev/null @@ -1,388 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/resource/v1/resource.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 m.Unmarshal(b) -} -func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Resource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Resource) XXX_Merge(src proto.Message) { - xxx_messageInfo_Resource.Merge(m, src) -} -func (m *Resource) XXX_Size() int { - return m.Size() -} -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{ - // 260 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, 0x9a, 0xce, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, - 0x72, 0x29, 0x65, 0xe6, 0xeb, 0x11, 0xf0, 0xae, 0x13, 0x2f, 0xcc, 0xfd, 0x01, 0x20, 0xa9, 0x00, - 0xc6, 0xa8, 0x90, 0x74, 0x74, 0x4d, 0x99, 0xf9, 0xfa, 0xf9, 0x25, 0xa9, 0x39, 0xfa, 0xa9, 0x15, - 0x05, 0xf9, 0x45, 0x25, 0xa9, 0x45, 0xc5, 0xfa, 0xf9, 0x25, 0x39, 0x05, 0xfa, 0x99, 0x79, 0x25, - 0xa9, 0x45, 0x79, 0x89, 0x39, 0xfa, 0x28, 0xaa, 0x75, 0xc1, 0x56, 0xe8, 0xa6, 0xa7, 0xe6, 0x21, - 0xc7, 0x42, 0x12, 0x1b, 0x58, 0xd8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x40, 0xde, 0xfb, 0xf4, - 0xaf, 0x01, 0x00, 0x00, -} - -func (m *Resource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintResource(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x10 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResource(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintResource(dAtA []byte, offset int, v uint64) int { - offset -= sovResource(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Resource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovResource(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovResource(uint64(m.DroppedAttributesCount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovResource(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResource(x uint64) (n int) { - return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Resource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResource(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResource(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResource - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResource - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResource - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go b/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go deleted file mode 100644 index 4c02a065b6f..00000000000 --- a/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1/trace.pb.go +++ /dev/null @@ -1,2781 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/trace/v1/trace.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - v11 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - v1 "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// 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.GoGoProtoPackageIsVersion3 // 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_SPAN_KIND_INTERNAL Span_SpanKind = 1 - // Indicates that the span covers server-side handling of an RPC or other - // remote network request. - Span_SPAN_KIND_SERVER Span_SpanKind = 2 - // Indicates that the span describes a request to some remote service. - Span_SPAN_KIND_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_SPAN_KIND_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_SPAN_KIND_CONSUMER Span_SpanKind = 5 -) - -var Span_SpanKind_name = map[int32]string{ - 0: "SPAN_KIND_UNSPECIFIED", - 1: "SPAN_KIND_INTERNAL", - 2: "SPAN_KIND_SERVER", - 3: "SPAN_KIND_CLIENT", - 4: "SPAN_KIND_PRODUCER", - 5: "SPAN_KIND_CONSUMER", -} - -var Span_SpanKind_value = map[string]int32{ - "SPAN_KIND_UNSPECIFIED": 0, - "SPAN_KIND_INTERNAL": 1, - "SPAN_KIND_SERVER": 2, - "SPAN_KIND_CLIENT": 3, - "SPAN_KIND_PRODUCER": 4, - "SPAN_KIND_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} -} - -type Status_DeprecatedStatusCode int32 - -const ( - Status_DEPRECATED_STATUS_CODE_OK Status_DeprecatedStatusCode = 0 - Status_DEPRECATED_STATUS_CODE_CANCELLED Status_DeprecatedStatusCode = 1 - Status_DEPRECATED_STATUS_CODE_UNKNOWN_ERROR Status_DeprecatedStatusCode = 2 - Status_DEPRECATED_STATUS_CODE_INVALID_ARGUMENT Status_DeprecatedStatusCode = 3 - Status_DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED Status_DeprecatedStatusCode = 4 - Status_DEPRECATED_STATUS_CODE_NOT_FOUND Status_DeprecatedStatusCode = 5 - Status_DEPRECATED_STATUS_CODE_ALREADY_EXISTS Status_DeprecatedStatusCode = 6 - Status_DEPRECATED_STATUS_CODE_PERMISSION_DENIED Status_DeprecatedStatusCode = 7 - Status_DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED Status_DeprecatedStatusCode = 8 - Status_DEPRECATED_STATUS_CODE_FAILED_PRECONDITION Status_DeprecatedStatusCode = 9 - Status_DEPRECATED_STATUS_CODE_ABORTED Status_DeprecatedStatusCode = 10 - Status_DEPRECATED_STATUS_CODE_OUT_OF_RANGE Status_DeprecatedStatusCode = 11 - Status_DEPRECATED_STATUS_CODE_UNIMPLEMENTED Status_DeprecatedStatusCode = 12 - Status_DEPRECATED_STATUS_CODE_INTERNAL_ERROR Status_DeprecatedStatusCode = 13 - Status_DEPRECATED_STATUS_CODE_UNAVAILABLE Status_DeprecatedStatusCode = 14 - Status_DEPRECATED_STATUS_CODE_DATA_LOSS Status_DeprecatedStatusCode = 15 - Status_DEPRECATED_STATUS_CODE_UNAUTHENTICATED Status_DeprecatedStatusCode = 16 -) - -var Status_DeprecatedStatusCode_name = map[int32]string{ - 0: "DEPRECATED_STATUS_CODE_OK", - 1: "DEPRECATED_STATUS_CODE_CANCELLED", - 2: "DEPRECATED_STATUS_CODE_UNKNOWN_ERROR", - 3: "DEPRECATED_STATUS_CODE_INVALID_ARGUMENT", - 4: "DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED", - 5: "DEPRECATED_STATUS_CODE_NOT_FOUND", - 6: "DEPRECATED_STATUS_CODE_ALREADY_EXISTS", - 7: "DEPRECATED_STATUS_CODE_PERMISSION_DENIED", - 8: "DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED", - 9: "DEPRECATED_STATUS_CODE_FAILED_PRECONDITION", - 10: "DEPRECATED_STATUS_CODE_ABORTED", - 11: "DEPRECATED_STATUS_CODE_OUT_OF_RANGE", - 12: "DEPRECATED_STATUS_CODE_UNIMPLEMENTED", - 13: "DEPRECATED_STATUS_CODE_INTERNAL_ERROR", - 14: "DEPRECATED_STATUS_CODE_UNAVAILABLE", - 15: "DEPRECATED_STATUS_CODE_DATA_LOSS", - 16: "DEPRECATED_STATUS_CODE_UNAUTHENTICATED", -} - -var Status_DeprecatedStatusCode_value = map[string]int32{ - "DEPRECATED_STATUS_CODE_OK": 0, - "DEPRECATED_STATUS_CODE_CANCELLED": 1, - "DEPRECATED_STATUS_CODE_UNKNOWN_ERROR": 2, - "DEPRECATED_STATUS_CODE_INVALID_ARGUMENT": 3, - "DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED": 4, - "DEPRECATED_STATUS_CODE_NOT_FOUND": 5, - "DEPRECATED_STATUS_CODE_ALREADY_EXISTS": 6, - "DEPRECATED_STATUS_CODE_PERMISSION_DENIED": 7, - "DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED": 8, - "DEPRECATED_STATUS_CODE_FAILED_PRECONDITION": 9, - "DEPRECATED_STATUS_CODE_ABORTED": 10, - "DEPRECATED_STATUS_CODE_OUT_OF_RANGE": 11, - "DEPRECATED_STATUS_CODE_UNIMPLEMENTED": 12, - "DEPRECATED_STATUS_CODE_INTERNAL_ERROR": 13, - "DEPRECATED_STATUS_CODE_UNAVAILABLE": 14, - "DEPRECATED_STATUS_CODE_DATA_LOSS": 15, - "DEPRECATED_STATUS_CODE_UNAUTHENTICATED": 16, -} - -func (x Status_DeprecatedStatusCode) String() string { - return proto.EnumName(Status_DeprecatedStatusCode_name, int32(x)) -} - -func (Status_DeprecatedStatusCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3, 0} -} - -// For the semantics of status codes see -// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#set-status -type Status_StatusCode int32 - -const ( - // The default status. - Status_STATUS_CODE_UNSET Status_StatusCode = 0 - // The Span has been validated by an Application developers or Operator to have - // completed successfully. - Status_STATUS_CODE_OK Status_StatusCode = 1 - // The Span contains an error. - Status_STATUS_CODE_ERROR Status_StatusCode = 2 -) - -var Status_StatusCode_name = map[int32]string{ - 0: "STATUS_CODE_UNSET", - 1: "STATUS_CODE_OK", - 2: "STATUS_CODE_ERROR", -} - -var Status_StatusCode_value = map[string]int32{ - "STATUS_CODE_UNSET": 0, - "STATUS_CODE_OK": 1, - "STATUS_CODE_ERROR": 2, -} - -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, 1} -} - -// 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 m.Unmarshal(b) -} -func (m *ResourceSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceSpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSpans.Merge(m, src) -} -func (m *ResourceSpans) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *InstrumentationLibrarySpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationLibrarySpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationLibrarySpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationLibrarySpans.Merge(m, src) -} -func (m *InstrumentationLibrarySpans) XXX_Size() int { - return m.Size() -} -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 isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (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 m.Unmarshal(b) -} -func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span.Merge(m, src) -} -func (m *Span) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *Span_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Event.Merge(m, src) -} -func (m *Span_Event) XXX_Size() int { - return m.Size() -} -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 m.Unmarshal(b) -} -func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Link.Merge(m, src) -} -func (m *Span_Link) XXX_Size() int { - return m.Size() -} -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 deprecated status code. This is an optional field. - // - // This field is deprecated and is replaced by the `code` field below. See backward - // compatibility notes below. According to our stability guarantees this field - // will be removed in 12 months, on Oct 22, 2021. All usage of old senders and - // receivers that do not understand the `code` field MUST be phased out by then. - DeprecatedCode Status_DeprecatedStatusCode `protobuf:"varint,1,opt,name=deprecated_code,json=deprecatedCode,proto3,enum=opentelemetry.proto.trace.v1.Status_DeprecatedStatusCode" json:"deprecated_code,omitempty"` // Deprecated: Do not use. - // A developer-facing human readable error message. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // The status code. - Code Status_StatusCode `protobuf:"varint,3,opt,name=code,proto3,enum=opentelemetry.proto.trace.v1.Status_StatusCode" json:"code,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 m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *Status) GetDeprecatedCode() Status_DeprecatedStatusCode { - if m != nil { - return m.DeprecatedCode - } - return Status_DEPRECATED_STATUS_CODE_OK -} - -func (m *Status) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Status) GetCode() Status_StatusCode { - if m != nil { - return m.Code - } - return Status_STATUS_CODE_UNSET -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) - proto.RegisterEnum("opentelemetry.proto.trace.v1.Status_DeprecatedStatusCode", Status_DeprecatedStatusCode_name, Status_DeprecatedStatusCode_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{ - // 1160 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0xae, 0x93, 0xdd, 0x4d, 0xfa, 0x92, 0x6c, 0xdc, 0x21, 0x6d, 0xdd, 0x94, 0xa6, 0xab, 0x25, - 0xb4, 0xdb, 0x96, 0xee, 0xd2, 0x22, 0xa4, 0x22, 0x81, 0xc0, 0xb1, 0x27, 0xad, 0x15, 0xc7, 0x5e, - 0xc6, 0x76, 0x28, 0x5c, 0x46, 0x6e, 0x3c, 0x54, 0x56, 0x77, 0xc7, 0x2b, 0x7b, 0x36, 0x6a, 0x0f, - 0xfc, 0x05, 0xee, 0x48, 0xfc, 0x1c, 0x24, 0x38, 0x72, 0xe1, 0xc2, 0x01, 0xa1, 0xfe, 0x0e, 0x0e, - 0xc8, 0x63, 0x6f, 0x92, 0x8d, 0x62, 0xa7, 0x97, 0x5e, 0xa2, 0xf1, 0xf7, 0xbe, 0xef, 0x7d, 0xef, - 0xcd, 0x7b, 0xa3, 0x0d, 0xf4, 0x92, 0x09, 0xe3, 0x82, 0x8d, 0xd8, 0x98, 0x89, 0xf4, 0xcd, 0x60, - 0x92, 0x26, 0x22, 0x19, 0x88, 0x34, 0x3c, 0x64, 0x83, 0xa3, 0x47, 0xc5, 0xa1, 0x2f, 0x41, 0xf4, - 0xe1, 0x1c, 0xb3, 0x00, 0xfb, 0x05, 0xe1, 0xe8, 0xd1, 0xe6, 0xfd, 0xf3, 0xf2, 0x1c, 0x26, 0xe3, - 0x71, 0xc2, 0xf3, 0x44, 0xc5, 0xa9, 0x10, 0x6d, 0xf6, 0xcf, 0xe3, 0xa6, 0x2c, 0x4b, 0xa6, 0x69, - 0x61, 0x3b, 0x3b, 0x17, 0xfc, 0xee, 0x5f, 0x0a, 0xac, 0x91, 0x12, 0xf2, 0x26, 0x21, 0xcf, 0x10, - 0x86, 0xe5, 0x19, 0x47, 0x53, 0x3a, 0x4a, 0x6f, 0xe5, 0xf1, 0xbd, 0xfe, 0x79, 0xe5, 0x1d, 0x27, - 0x3a, 0x7a, 0xd4, 0x9f, 0x65, 0x20, 0xc7, 0x52, 0xf4, 0x13, 0xdc, 0x8a, 0x79, 0x26, 0xd2, 0xe9, - 0x98, 0x71, 0x11, 0x8a, 0x38, 0xe1, 0x74, 0x14, 0xbf, 0x48, 0xc3, 0xf4, 0x0d, 0xcd, 0x72, 0x1f, - 0x6d, 0xa1, 0xb3, 0xd8, 0x5b, 0x79, 0xfc, 0x45, 0xbf, 0xae, 0xf5, 0xbe, 0x35, 0x9f, 0xc2, 0x2e, - 0x32, 0xc8, 0x42, 0xc9, 0xcd, 0xb8, 0x3a, 0xd8, 0xfd, 0x5d, 0x81, 0x9b, 0x35, 0x62, 0xc4, 0xe1, - 0x7a, 0x45, 0x79, 0x65, 0xd3, 0x9f, 0x9f, 0x5b, 0x58, 0x79, 0xd7, 0x95, 0x95, 0x91, 0x6b, 0xe7, - 0x17, 0x85, 0x9e, 0x40, 0xf3, 0x74, 0xdb, 0xdd, 0xfa, 0xb6, 0xf3, 0x1a, 0x49, 0x21, 0xe8, 0xfe, - 0x0a, 0xd0, 0xc8, 0xbf, 0xd1, 0x0d, 0x58, 0x96, 0x04, 0x1a, 0x47, 0xb2, 0xc6, 0x55, 0xb2, 0x24, - 0xbf, 0xad, 0x08, 0x5d, 0x87, 0xa5, 0x9c, 0x9c, 0x47, 0x16, 0x64, 0xa4, 0x95, 0x7f, 0x5a, 0x11, - 0xba, 0x0d, 0x2b, 0x85, 0x26, 0x13, 0xa1, 0x60, 0xda, 0x62, 0x47, 0xe9, 0x5d, 0x26, 0x20, 0x21, - 0x2f, 0x47, 0xd0, 0x36, 0xb4, 0x27, 0x61, 0xca, 0xb8, 0xa0, 0xb3, 0x04, 0x0d, 0x99, 0x60, 0xb5, - 0x40, 0xbd, 0x22, 0x0d, 0x82, 0x06, 0x0f, 0xc7, 0x4c, 0x6b, 0x4a, 0xbd, 0x3c, 0xa3, 0xaf, 0xa1, - 0xf1, 0x2a, 0xe6, 0x91, 0xd6, 0xea, 0x28, 0xbd, 0xf6, 0xe3, 0x07, 0x17, 0x37, 0x24, 0xff, 0xec, - 0xc5, 0x3c, 0x22, 0x52, 0x88, 0x06, 0xb0, 0x91, 0x89, 0x30, 0x15, 0x54, 0xc4, 0x63, 0x46, 0xa7, - 0x3c, 0x7e, 0x4d, 0x79, 0xc8, 0x13, 0x6d, 0xa9, 0xa3, 0xf4, 0x5a, 0xe4, 0x8a, 0x8c, 0xf9, 0xf1, - 0x98, 0x05, 0x3c, 0x7e, 0xed, 0x84, 0x3c, 0x41, 0x0f, 0x00, 0x31, 0x1e, 0x9d, 0xa5, 0x2f, 0x4b, - 0xfa, 0x3a, 0xe3, 0xd1, 0x1c, 0xf9, 0x29, 0x40, 0x28, 0x44, 0x1a, 0xbf, 0x98, 0x0a, 0x96, 0x69, - 0x97, 0xe5, 0xad, 0xdf, 0xbd, 0x60, 0xa6, 0x7b, 0xec, 0xcd, 0x41, 0x38, 0x9a, 0x32, 0x72, 0x4a, - 0x8a, 0x9e, 0x80, 0x16, 0xa5, 0xc9, 0x64, 0xc2, 0x22, 0x7a, 0x82, 0xd2, 0xc3, 0x64, 0xca, 0x85, - 0x06, 0x1d, 0xa5, 0xb7, 0x46, 0xae, 0x95, 0x71, 0xfd, 0x38, 0x6c, 0xe4, 0x51, 0xf4, 0x0d, 0xb4, - 0xd8, 0x11, 0xe3, 0x22, 0xd3, 0x56, 0xa4, 0x7d, 0xef, 0x1d, 0xee, 0x08, 0xe7, 0x02, 0x52, 0xea, - 0xd0, 0xa7, 0xb0, 0x31, 0xf3, 0x2e, 0x90, 0xd2, 0x77, 0x55, 0xfa, 0xa2, 0x32, 0x26, 0x35, 0xa5, - 0xe7, 0x57, 0xd0, 0x1c, 0xc5, 0xfc, 0x55, 0xa6, 0xad, 0xd5, 0x74, 0x3c, 0x6f, 0x69, 0xc7, 0xfc, - 0x15, 0x29, 0x54, 0xa8, 0x0f, 0x1f, 0xcc, 0x0c, 0x25, 0x50, 0xfa, 0xb5, 0xa5, 0xdf, 0x95, 0x32, - 0x94, 0x0b, 0x4a, 0xbb, 0x2f, 0xa1, 0x95, 0x6f, 0xd6, 0x34, 0xd3, 0xd6, 0xe5, 0xab, 0xd9, 0xbe, - 0xc0, 0x4f, 0x72, 0x49, 0xa9, 0xd9, 0xfc, 0x4d, 0x81, 0xa6, 0x2c, 0x3e, 0x5f, 0xc3, 0x33, 0x63, - 0x55, 0xe4, 0x58, 0x57, 0xc5, 0xe9, 0x99, 0xce, 0xd6, 0x70, 0xe1, 0xd4, 0x1a, 0xce, 0xcf, 0x79, - 0xf1, 0xfd, 0xcc, 0xb9, 0x51, 0x37, 0xe7, 0xcd, 0x7f, 0x14, 0x68, 0xe4, 0x77, 0xf2, 0x7e, 0x5e, - 0xe8, 0x7c, 0x83, 0x8d, 0xf7, 0xd3, 0x60, 0xb3, 0xae, 0xc1, 0xee, 0x2f, 0x0a, 0x2c, 0xcf, 0x1e, - 0x2f, 0xba, 0x01, 0x57, 0xbd, 0xa1, 0xee, 0xd0, 0x3d, 0xcb, 0x31, 0x69, 0xe0, 0x78, 0x43, 0x6c, - 0x58, 0xbb, 0x16, 0x36, 0xd5, 0x4b, 0xe8, 0x1a, 0xa0, 0x93, 0x90, 0xe5, 0xf8, 0x98, 0x38, 0xba, - 0xad, 0x2a, 0x68, 0x03, 0xd4, 0x13, 0xdc, 0xc3, 0xe4, 0x00, 0x13, 0x75, 0x61, 0x1e, 0x35, 0x6c, - 0x0b, 0x3b, 0xbe, 0xba, 0x38, 0x9f, 0x63, 0x48, 0x5c, 0x33, 0x30, 0x30, 0x51, 0x1b, 0xf3, 0xb8, - 0xe1, 0x3a, 0x5e, 0xb0, 0x8f, 0x89, 0xda, 0xec, 0xfe, 0xb7, 0x04, 0xad, 0x62, 0xad, 0xd0, 0x8f, - 0xb0, 0x1e, 0xb1, 0x49, 0xca, 0x0e, 0x43, 0xc1, 0x22, 0x7a, 0x98, 0x44, 0xc5, 0x0f, 0x58, 0xfb, - 0xa2, 0x1f, 0x99, 0x42, 0xde, 0x37, 0x8f, 0xb5, 0x05, 0x60, 0x24, 0x11, 0xdb, 0x59, 0xd0, 0x14, - 0xd2, 0x3e, 0xc9, 0x9a, 0x63, 0x48, 0x83, 0xa5, 0x31, 0xcb, 0xb2, 0xf0, 0xe5, 0x6c, 0x13, 0x67, - 0x9f, 0xc8, 0x80, 0x86, 0xb4, 0x5d, 0x94, 0xb6, 0x83, 0x77, 0xb2, 0x3d, 0x31, 0x23, 0x52, 0xdc, - 0xfd, 0xbb, 0x09, 0x1b, 0xe7, 0xd5, 0x82, 0x6e, 0xc1, 0x0d, 0x13, 0x0f, 0x09, 0x36, 0x74, 0x1f, - 0x9b, 0xd4, 0xf3, 0x75, 0x3f, 0xf0, 0xa8, 0xe1, 0x9a, 0x98, 0xba, 0x7b, 0xea, 0x25, 0xb4, 0x0d, - 0x9d, 0x8a, 0xb0, 0xa1, 0x3b, 0x06, 0xb6, 0x6d, 0x6c, 0xaa, 0x0a, 0xea, 0xc1, 0x76, 0x05, 0x2b, - 0x70, 0xf6, 0x1c, 0xf7, 0x3b, 0x87, 0x62, 0x42, 0xdc, 0x7c, 0x3e, 0x0f, 0xe0, 0x6e, 0x05, 0xd3, - 0x72, 0x0e, 0x74, 0xdb, 0x32, 0xa9, 0x4e, 0x9e, 0x06, 0xfb, 0xc5, 0xd8, 0x3e, 0x81, 0x5e, 0x05, - 0xd9, 0xc4, 0xba, 0x69, 0x5b, 0x0e, 0xa6, 0xf8, 0xb9, 0x81, 0xb1, 0x89, 0x4d, 0xb5, 0x51, 0x53, - 0xaa, 0xe3, 0xfa, 0x74, 0xd7, 0x0d, 0x1c, 0x53, 0x6d, 0xa2, 0x7b, 0xf0, 0x71, 0x05, 0x4b, 0xb7, - 0x09, 0xd6, 0xcd, 0xef, 0x29, 0x7e, 0x6e, 0x79, 0xbe, 0xa7, 0xb6, 0x6a, 0xec, 0x87, 0x98, 0xec, - 0x5b, 0x9e, 0x67, 0xb9, 0x0e, 0x35, 0xb1, 0x93, 0xef, 0xe9, 0x12, 0x7a, 0x08, 0xf7, 0x2a, 0xd8, - 0x04, 0x7b, 0x6e, 0x40, 0x8c, 0xbc, 0xd8, 0x67, 0x7a, 0xe0, 0xf9, 0xd8, 0x54, 0x97, 0x51, 0x1f, - 0xee, 0x57, 0xd0, 0x77, 0x75, 0xcb, 0xc6, 0xf9, 0x9a, 0x62, 0xc3, 0x75, 0x4c, 0xcb, 0xb7, 0x5c, - 0x47, 0xbd, 0x8c, 0xba, 0xb0, 0x55, 0x55, 0xf7, 0x8e, 0x4b, 0xf2, 0x9c, 0x80, 0xee, 0xc2, 0x47, - 0x55, 0xb3, 0x0c, 0x7c, 0xea, 0xee, 0x52, 0xa2, 0x3b, 0x4f, 0xb1, 0xba, 0x52, 0x3b, 0x2f, 0x6b, - 0x7f, 0x68, 0xe3, 0x7c, 0x00, 0xd8, 0x54, 0x57, 0x6b, 0xae, 0x6b, 0xf6, 0x14, 0xcb, 0xd1, 0xae, - 0xa1, 0x3b, 0xd0, 0xad, 0x4c, 0xaa, 0x1f, 0xe8, 0x96, 0xad, 0xef, 0xd8, 0x58, 0x6d, 0xd7, 0xcc, - 0xc9, 0xd4, 0x7d, 0x9d, 0xda, 0xae, 0xe7, 0xa9, 0xeb, 0xe8, 0x3e, 0xdc, 0xa9, 0xce, 0x16, 0xf8, - 0xcf, 0xb0, 0xe3, 0x5b, 0x32, 0xa6, 0xaa, 0x5d, 0x07, 0xe0, 0xd4, 0x46, 0x5f, 0x85, 0x2b, 0xf3, - 0x74, 0x0f, 0xfb, 0xea, 0x25, 0x84, 0xa0, 0x7d, 0x66, 0xbb, 0x95, 0xb3, 0xd4, 0x72, 0x49, 0x77, - 0x7e, 0x56, 0xfe, 0x78, 0xbb, 0xa5, 0xfc, 0xf9, 0x76, 0x4b, 0xf9, 0xf7, 0xed, 0x96, 0x02, 0xb7, - 0xe3, 0xa4, 0xf6, 0xd1, 0xed, 0x80, 0x9f, 0x9f, 0x86, 0x39, 0x38, 0x54, 0x7e, 0xf8, 0xf6, 0xe5, - 0x59, 0x7a, 0x9c, 0x0c, 0x12, 0xc1, 0x46, 0x03, 0xf6, 0x7a, 0x92, 0xa4, 0x82, 0xa5, 0xd9, 0x20, - 0x11, 0xa3, 0xc9, 0x20, 0xe6, 0x82, 0xa5, 0x3c, 0x1c, 0x0d, 0xe6, 0xd8, 0x0f, 0x65, 0xf2, 0x87, - 0x2f, 0x19, 0x3f, 0xfe, 0xb7, 0xfe, 0x45, 0x4b, 0x62, 0x9f, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, - 0xc6, 0x22, 0x3f, 0x48, 0xfd, 0x0b, 0x00, 0x00, -} - -func (m *ResourceSpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceSpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.InstrumentationLibrarySpans) > 0 { - for iNdEx := len(m.InstrumentationLibrarySpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.InstrumentationLibrarySpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Resource != nil { - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationLibrarySpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationLibrarySpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationLibrarySpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.InstrumentationLibrary != nil { - { - size, err := m.InstrumentationLibrary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Span) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - if m.DroppedLinksCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedLinksCount)) - i-- - dAtA[i] = 0x70 - } - if len(m.Links) > 0 { - for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - } - if m.DroppedEventsCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedEventsCount)) - i-- - dAtA[i] = 0x60 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x50 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.EndTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) - i-- - dAtA[i] = 0x41 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x39 - } - if m.Kind != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Kind)) - i-- - dAtA[i] = 0x30 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - } - if len(m.ParentSpanId) > 0 { - i -= len(m.ParentSpanId) - copy(dAtA[i:], m.ParentSpanId) - i = encodeVarintTrace(dAtA, i, uint64(len(m.ParentSpanId))) - i-- - dAtA[i] = 0x22 - } - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - if len(m.SpanId) > 0 { - i -= len(m.SpanId) - copy(dAtA[i:], m.SpanId) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SpanId))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceId) > 0 { - i -= len(m.TraceId) - copy(dAtA[i:], m.TraceId) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Span_Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Span_Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - if len(m.SpanId) > 0 { - i -= len(m.SpanId) - copy(dAtA[i:], m.SpanId) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SpanId))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceId) > 0 { - i -= len(m.TraceId) - copy(dAtA[i:], m.TraceId) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Status) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Status) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Code != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x18 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.DeprecatedCode != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DeprecatedCode)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTrace(dAtA []byte, offset int, v uint64) int { - offset -= sovTrace(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ResourceSpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.InstrumentationLibrarySpans) > 0 { - for _, e := range m.InstrumentationLibrarySpans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InstrumentationLibrarySpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InstrumentationLibrary != nil { - l = m.InstrumentationLibrary.Size() - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Span) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TraceId) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.SpanId) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.ParentSpanId) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Kind != 0 { - n += 1 + sovTrace(uint64(m.Kind)) - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.EndTimeUnixNano != 0 { - n += 9 - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedEventsCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedEventsCount)) - } - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedLinksCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedLinksCount)) - } - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovTrace(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Span_Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Span_Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TraceId) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.SpanId) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Status) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeprecatedCode != 0 { - n += 1 + sovTrace(uint64(m.DeprecatedCode)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Code != 0 { - n += 1 + sovTrace(uint64(m.Code)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTrace(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTrace(x uint64) (n int) { - return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResourceSpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceSpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceSpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &v1.Resource{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibrarySpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InstrumentationLibrarySpans = append(m.InstrumentationLibrarySpans, &InstrumentationLibrarySpans{}) - if err := m.InstrumentationLibrarySpans[len(m.InstrumentationLibrarySpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationLibrarySpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationLibrarySpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationLibrarySpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstrumentationLibrary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InstrumentationLibrary == nil { - m.InstrumentationLibrary = &v11.InstrumentationLibrary{} - } - if err := m.InstrumentationLibrary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) - if m.TraceId == nil { - m.TraceId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanId = append(m.SpanId[:0], dAtA[iNdEx:postIndex]...) - if m.SpanId == nil { - m.SpanId = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentSpanId = append(m.ParentSpanId[:0], dAtA[iNdEx:postIndex]...) - if m.ParentSpanId == nil { - m.ParentSpanId = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - m.Kind = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Kind |= Span_SpanKind(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) - } - m.EndTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Span_Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedEventsCount", wireType) - } - m.DroppedEventsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedEventsCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &Span_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedLinksCount", wireType) - } - m.DroppedLinksCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedLinksCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &Status{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) - if m.TraceId == nil { - m.TraceId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanId = append(m.SpanId[:0], dAtA[iNdEx:postIndex]...) - if m.SpanId == nil { - m.SpanId = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Status) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedCode", wireType) - } - m.DeprecatedCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DeprecatedCode |= Status_DeprecatedStatusCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= Status_StatusCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTrace(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTrace - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTrace - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTrace - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") -) diff --git a/exporters/otlp/internal/otlptest/collector.go b/exporters/otlp/internal/otlptest/collector.go index c3b7e46e137..d2fcbc0e631 100644 --- a/exporters/otlp/internal/otlptest/collector.go +++ b/exporters/otlp/internal/otlptest/collector.go @@ -17,12 +17,12 @@ package otlptest import ( "sort" - collectormetricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1" - collectortracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - resourcepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" + collectormetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + collectortracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + resourcepb "go.opentelemetry.io/proto/otlp/resource/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" ) // Collector is an interface that mock collectors should implements, diff --git a/exporters/otlp/internal/otlptest/otlptest.go b/exporters/otlp/internal/otlptest/otlptest.go index d2ffd2022f4..a01f13a6a72 100644 --- a/exporters/otlp/internal/otlptest/otlptest.go +++ b/exporters/otlp/internal/otlptest/otlptest.go @@ -25,7 +25,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/number" exportmetric "go.opentelemetry.io/otel/sdk/export/metric" @@ -34,6 +33,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" ) // RunEndToEndTest can be used by protocol driver tests to validate diff --git a/exporters/otlp/internal/transform/attribute.go b/exporters/otlp/internal/transform/attribute.go index 8ad27f7f6c0..5902cad6ae2 100644 --- a/exporters/otlp/internal/transform/attribute.go +++ b/exporters/otlp/internal/transform/attribute.go @@ -18,7 +18,7 @@ import ( "reflect" "go.opentelemetry.io/otel/attribute" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" "go.opentelemetry.io/otel/sdk/resource" ) diff --git a/exporters/otlp/internal/transform/attribute_test.go b/exporters/otlp/internal/transform/attribute_test.go index beafb86cb1f..9d86a9687c0 100644 --- a/exporters/otlp/internal/transform/attribute_test.go +++ b/exporters/otlp/internal/transform/attribute_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/attribute" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" ) type attributeTest struct { diff --git a/exporters/otlp/internal/transform/instrumentation.go b/exporters/otlp/internal/transform/instrumentation.go index f3a2efab370..4ed5f96646c 100644 --- a/exporters/otlp/internal/transform/instrumentation.go +++ b/exporters/otlp/internal/transform/instrumentation.go @@ -15,7 +15,7 @@ package transform import ( - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" + commonpb "go.opentelemetry.io/proto/otlp/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 d27dd4c1f12..1922b9b9c69 100644 --- a/exporters/otlp/internal/transform/metric.go +++ b/exporters/otlp/internal/transform/metric.go @@ -25,9 +25,9 @@ import ( "time" "go.opentelemetry.io/otel/attribute" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - resourcepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + resourcepb "go.opentelemetry.io/proto/otlp/resource/v1" "go.opentelemetry.io/otel/metric/number" export "go.opentelemetry.io/otel/sdk/export/metric" diff --git a/exporters/otlp/internal/transform/metric_test.go b/exporters/otlp/internal/transform/metric_test.go index b80aaff5d50..06fad8a4ada 100644 --- a/exporters/otlp/internal/transform/metric_test.go +++ b/exporters/otlp/internal/transform/metric_test.go @@ -25,8 +25,6 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/number" export "go.opentelemetry.io/otel/sdk/export/metric" @@ -39,6 +37,8 @@ import ( "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" sumAgg "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" "go.opentelemetry.io/otel/sdk/resource" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" ) var ( diff --git a/exporters/otlp/internal/transform/resource.go b/exporters/otlp/internal/transform/resource.go index 98a8912a3a5..5be53566bf8 100644 --- a/exporters/otlp/internal/transform/resource.go +++ b/exporters/otlp/internal/transform/resource.go @@ -15,7 +15,7 @@ package transform import ( - resourcepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" + resourcepb "go.opentelemetry.io/proto/otlp/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 1634015d0c0..6cda57e70eb 100644 --- a/exporters/otlp/internal/transform/span.go +++ b/exporters/otlp/internal/transform/span.go @@ -17,7 +17,7 @@ package transform import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" export "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/instrumentation" diff --git a/exporters/otlp/internal/transform/span_test.go b/exporters/otlp/internal/transform/span_test.go index c020619f302..e64308ef8dd 100644 --- a/exporters/otlp/internal/transform/span_test.go +++ b/exporters/otlp/internal/transform/span_test.go @@ -19,14 +19,14 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" "go.opentelemetry.io/otel/attribute" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/trace" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" "go.opentelemetry.io/otel/codes" export "go.opentelemetry.io/otel/sdk/export/trace" diff --git a/exporters/otlp/otlp_metric_test.go b/exporters/otlp/otlp_metric_test.go index e1544831e2a..724f422f86a 100644 --- a/exporters/otlp/otlp_metric_test.go +++ b/exporters/otlp/otlp_metric_test.go @@ -25,9 +25,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - resourcepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/number" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" @@ -36,6 +33,9 @@ import ( "go.opentelemetry.io/otel/sdk/metric/aggregator/histogram" "go.opentelemetry.io/otel/sdk/metric/aggregator/sum" "go.opentelemetry.io/otel/sdk/resource" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + resourcepb "go.opentelemetry.io/proto/otlp/resource/v1" ) var ( @@ -154,7 +154,7 @@ func TestNoGroupingExport(t *testing.T) { append(baseKeyValues, cpuKey.Int(2)), }, }, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: nil, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -200,7 +200,7 @@ func TestValuerecorderMetricGroupingExport(t *testing.T) { nil, append(baseKeyValues, cpuKey.Int(1)), } - expected := []metricpb.ResourceMetrics{ + expected := []*metricpb.ResourceMetrics{ { Resource: nil, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -273,7 +273,7 @@ func TestCountInt64MetricGroupingExport(t *testing.T) { t, nil, []record{r, r}, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: nil, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -323,7 +323,7 @@ func TestCountFloat64MetricGroupingExport(t *testing.T) { t, nil, []record{r, r}, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: nil, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -416,7 +416,7 @@ func TestResourceMetricGroupingExport(t *testing.T) { append(baseKeyValues, cpuKey.Int(1)), }, }, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: testerAResource, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -550,7 +550,7 @@ func TestResourceInstLibMetricGroupingExport(t *testing.T) { append(baseKeyValues, cpuKey.Int(1)), }, }, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: testerAResource, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -708,7 +708,7 @@ func TestStatelessExportKind(t *testing.T) { append(baseKeyValues, cpuKey.Int(1)), }, }, - []metricpb.ResourceMetrics{ + []*metricpb.ResourceMetrics{ { Resource: testerAResource, InstrumentationLibraryMetrics: []*metricpb.InstrumentationLibraryMetrics{ @@ -741,7 +741,7 @@ func TestStatelessExportKind(t *testing.T) { } } -func runMetricExportTests(t *testing.T, opts []otlp.ExporterOption, rs []record, expected []metricpb.ResourceMetrics) { +func runMetricExportTests(t *testing.T, opts []otlp.ExporterOption, rs []record, expected []*metricpb.ResourceMetrics) { exp, driver := newExporter(t, opts...) recs := map[attribute.Distinct][]metricsdk.Record{} @@ -886,15 +886,15 @@ func TestEmptyMetricExport(t *testing.T) { for _, test := range []struct { records []metricsdk.Record - want []metricpb.ResourceMetrics + want []*metricpb.ResourceMetrics }{ { []metricsdk.Record(nil), - []metricpb.ResourceMetrics(nil), + []*metricpb.ResourceMetrics(nil), }, { []metricsdk.Record{}, - []metricpb.ResourceMetrics(nil), + []*metricpb.ResourceMetrics(nil), }, } { driver.Reset() diff --git a/exporters/otlp/otlp_span_test.go b/exporters/otlp/otlp_span_test.go index c8524c5675e..62fdc39ee88 100644 --- a/exporters/otlp/otlp_span_test.go +++ b/exporters/otlp/otlp_span_test.go @@ -23,10 +23,10 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" - resourcepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/resource/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/trace" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + resourcepb "go.opentelemetry.io/proto/otlp/resource/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" tracesdk "go.opentelemetry.io/otel/sdk/export/trace" "go.opentelemetry.io/otel/sdk/instrumentation" @@ -42,15 +42,15 @@ func TestExportSpans(t *testing.T) { for _, test := range []struct { sd []*tracesdk.SpanSnapshot - want []tracepb.ResourceSpans + want []*tracepb.ResourceSpans }{ { []*tracesdk.SpanSnapshot(nil), - []tracepb.ResourceSpans(nil), + []*tracepb.ResourceSpans(nil), }, { []*tracesdk.SpanSnapshot{}, - []tracepb.ResourceSpans(nil), + []*tracepb.ResourceSpans(nil), }, { []*tracesdk.SpanSnapshot{ @@ -144,7 +144,7 @@ func TestExportSpans(t *testing.T) { }, }, }, - []tracepb.ResourceSpans{ + []*tracepb.ResourceSpans{ { Resource: &resourcepb.Resource{ Attributes: []*commonpb.KeyValue{ diff --git a/exporters/otlp/otlp_test.go b/exporters/otlp/otlp_test.go index b36e27d2056..87a324cae32 100644 --- a/exporters/otlp/otlp_test.go +++ b/exporters/otlp/otlp_test.go @@ -25,11 +25,11 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/exporters/otlp" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/transform" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" tracesdk "go.opentelemetry.io/otel/sdk/export/trace" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" ) func stubSpanSnapshot(count int) []*tracesdk.SpanSnapshot { @@ -115,8 +115,8 @@ func (m *stubProtocolDriver) ExportTraces(ctx context.Context, ss []*tracesdk.Sp } type stubTransformingProtocolDriver struct { - rm []metricpb.ResourceMetrics - rs []tracepb.ResourceSpans + rm []*metricpb.ResourceMetrics + rs []*tracepb.ResourceSpans } var _ otlp.ProtocolDriver = (*stubTransformingProtocolDriver)(nil) @@ -138,7 +138,7 @@ func (m *stubTransformingProtocolDriver) ExportMetrics(parent context.Context, c if rm == nil { continue } - m.rm = append(m.rm, *rm) + m.rm = append(m.rm, rm) } return nil } @@ -148,7 +148,7 @@ func (m *stubTransformingProtocolDriver) ExportTraces(ctx context.Context, ss [] if rs == nil { continue } - m.rs = append(m.rs, *rs) + m.rs = append(m.rs, rs) } return nil } diff --git a/exporters/otlp/otlpgrpc/driver.go b/exporters/otlp/otlpgrpc/driver.go index ee6f7399cbd..b8e66f41a04 100644 --- a/exporters/otlp/otlpgrpc/driver.go +++ b/exporters/otlp/otlpgrpc/driver.go @@ -23,13 +23,13 @@ import ( "google.golang.org/grpc" "go.opentelemetry.io/otel/exporters/otlp" - colmetricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1" - coltracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/transform" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" tracesdk "go.opentelemetry.io/otel/sdk/export/trace" + colmetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" ) type driver struct { diff --git a/exporters/otlp/otlpgrpc/mock_collector_test.go b/exporters/otlp/otlpgrpc/mock_collector_test.go index 6e5bd5c33b7..fd806008a5f 100644 --- a/exporters/otlp/otlpgrpc/mock_collector_test.go +++ b/exporters/otlp/otlpgrpc/mock_collector_test.go @@ -25,11 +25,11 @@ import ( "google.golang.org/grpc" metadata "google.golang.org/grpc/metadata" - collectormetricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1" - collectortracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/otlptest" + collectormetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + collectortracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" ) func makeMockCollector(t *testing.T) *mockCollector { @@ -45,6 +45,8 @@ func makeMockCollector(t *testing.T) *mockCollector { } type mockTraceService struct { + collectortracepb.UnimplementedTraceServiceServer + mu sync.RWMutex storage otlptest.SpansStorage headers metadata.MD @@ -78,6 +80,8 @@ func (mts *mockTraceService) Export(ctx context.Context, exp *collectortracepb.E } type mockMetricService struct { + collectormetricpb.UnimplementedMetricsServiceServer + mu sync.RWMutex storage otlptest.MetricsStorage } diff --git a/exporters/otlp/otlpgrpc/otlp_integration_test.go b/exporters/otlp/otlpgrpc/otlp_integration_test.go index 35e3e2fd9b5..ff86c92ff39 100644 --- a/exporters/otlp/otlpgrpc/otlp_integration_test.go +++ b/exporters/otlp/otlpgrpc/otlp_integration_test.go @@ -30,11 +30,11 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp" - commonpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/common/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/otlptest" "go.opentelemetry.io/otel/exporters/otlp/otlpgrpc" exporttrace "go.opentelemetry.io/otel/sdk/export/trace" sdktrace "go.opentelemetry.io/otel/sdk/trace" + commonpb "go.opentelemetry.io/proto/otlp/common/v1" ) func TestNewExporter_endToEnd(t *testing.T) { diff --git a/exporters/otlp/otlphttp/driver.go b/exporters/otlp/otlphttp/driver.go index f1c2e7185a4..54e287ff489 100644 --- a/exporters/otlp/otlphttp/driver.go +++ b/exporters/otlp/otlphttp/driver.go @@ -28,16 +28,16 @@ import ( "strings" "time" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" + jsonpb "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/otlp" - colmetricspb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1" - coltracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/transform" metricsdk "go.opentelemetry.io/otel/sdk/export/metric" tracesdk "go.opentelemetry.io/otel/sdk/export/trace" + colmetricspb "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" ) const contentTypeProto = "application/x-protobuf" @@ -171,8 +171,7 @@ func (d *driver) ExportTraces(ctx context.Context, ss []*tracesdk.SpanSnapshot) func (d *driver) marshal(msg proto.Message) ([]byte, error) { if d.cfg.marshaler == MarshalJSON { - s, err := (&jsonpb.Marshaler{}).MarshalToString(msg) - return []byte(s), err + return jsonpb.Marshal(msg) } return proto.Marshal(msg) } diff --git a/exporters/otlp/otlphttp/mock_collector_test.go b/exporters/otlp/otlphttp/mock_collector_test.go index 82b905f805c..3834436a543 100644 --- a/exporters/otlp/otlphttp/mock_collector_test.go +++ b/exporters/otlp/otlphttp/mock_collector_test.go @@ -27,16 +27,17 @@ import ( "sync" "testing" - "github.com/gogo/protobuf/jsonpb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + jsonpb "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" - collectormetricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/metrics/v1" - collectortracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/collector/trace/v1" - metricpb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/metrics/v1" - tracepb "go.opentelemetry.io/otel/exporters/otlp/internal/opentelemetry-proto-gen/trace/v1" "go.opentelemetry.io/otel/exporters/otlp/internal/otlptest" "go.opentelemetry.io/otel/exporters/otlp/otlphttp" + collectormetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + collectortracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + metricpb "go.opentelemetry.io/proto/otlp/metrics/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" ) type mockCollector struct { @@ -96,7 +97,7 @@ func (c *mockCollector) serveMetrics(w http.ResponseWriter, r *http.Request) { return } response := collectormetricpb.ExportMetricsServiceResponse{} - rawResponse, err := response.Marshal() + rawResponse, err := proto.Marshal(&response) if err != nil { w.WriteHeader(http.StatusInternalServerError) return @@ -124,10 +125,10 @@ func (c *mockCollector) serveMetrics(w http.ResponseWriter, r *http.Request) { func unmarshalMetricsRequest(rawRequest []byte, contentType string) (*collectormetricpb.ExportMetricsServiceRequest, error) { request := &collectormetricpb.ExportMetricsServiceRequest{} if contentType == "application/json" { - err := jsonpb.UnmarshalString(string(rawRequest), request) + err := jsonpb.Unmarshal(rawRequest, request) return request, err } - err := request.Unmarshal(rawRequest) + err := proto.Unmarshal(rawRequest, request) return request, err } @@ -137,7 +138,7 @@ func (c *mockCollector) serveTraces(w http.ResponseWriter, r *http.Request) { return } response := collectortracepb.ExportTraceServiceResponse{} - rawResponse, err := response.Marshal() + rawResponse, err := proto.Marshal(&response) if err != nil { w.WriteHeader(http.StatusInternalServerError) return @@ -166,10 +167,10 @@ func (c *mockCollector) serveTraces(w http.ResponseWriter, r *http.Request) { func unmarshalTraceRequest(rawRequest []byte, contentType string) (*collectortracepb.ExportTraceServiceRequest, error) { request := &collectortracepb.ExportTraceServiceRequest{} if contentType == "application/json" { - err := jsonpb.UnmarshalString(string(rawRequest), request) + err := jsonpb.Unmarshal(rawRequest, request) return request, err } - err := request.Unmarshal(rawRequest) + err := proto.Unmarshal(rawRequest, request) return request, err }