├── .github ├── dependabot.yml └── workflows │ └── golangci-lint.yml ├── .gitignore ├── .golangci.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── Makefile ├── NOTICE ├── README.md ├── SECURITY.md ├── go.mod ├── go.sum ├── go └── metrics.pb.go └── io └── prometheus └── client └── metrics.proto /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | - package-ecosystem: "gomod" 8 | directory: "/examples/middleware" 9 | schedule: 10 | interval: "monthly" 11 | - package-ecosystem: "gomod" 12 | directory: "/tutorial/whatsup" 13 | schedule: 14 | interval: "monthly" 15 | -------------------------------------------------------------------------------- /.github/workflows/golangci-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This action is synced from https://github.com/prometheus/prometheus 3 | name: golangci-lint 4 | on: 5 | push: 6 | paths: 7 | - "go.sum" 8 | - "go.mod" 9 | - "**.go" 10 | - "scripts/errcheck_excludes.txt" 11 | - ".github/workflows/golangci-lint.yml" 12 | - ".golangci.yml" 13 | pull_request: 14 | 15 | permissions: # added using https://github.com/step-security/secure-repo 16 | contents: read 17 | 18 | jobs: 19 | golangci: 20 | permissions: 21 | contents: read # for actions/checkout to fetch code 22 | pull-requests: read # for golangci/golangci-lint-action to fetch pull requests 23 | name: lint 24 | runs-on: ubuntu-latest 25 | steps: 26 | - name: Checkout repository 27 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 28 | - name: Install Go 29 | uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 30 | with: 31 | go-version: 1.24.x 32 | - name: Install snmp_exporter/generator dependencies 33 | run: sudo apt-get update && sudo apt-get -y install libsnmp-dev 34 | if: github.repository == 'prometheus/snmp_exporter' 35 | - name: Lint 36 | uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 37 | with: 38 | args: --verbose 39 | version: v2.1.5 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | tmp/ 3 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Prometheus Community Code of Conduct 2 | 3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is deprecated. It is only used for specific purposes by the 4 | [Go instrumentation library](https://github.com/prometheus/client_golang). 5 | 6 | Therefore, contributions to this repository are only expected to happen as 7 | required by changes in the instrumentation library. 8 | Please see 9 | [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/master/CONTRIBUTING.md) 10 | of the latter for details. 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Björn Rabenstein @beorn7 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Prometheus Team 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | all: 15 | $(MAKE) go 16 | $(MAKE) build 17 | 18 | GO_FILE := go/metrics.pb.go 19 | PROTO_FILE := io/prometheus/client/metrics.proto 20 | 21 | PROTOC_VERSION := 3.20.3 22 | PROTOC_GEN_GO_VERSION := v1.30.0 23 | 24 | # There are no protobuf releases for Darwin ARM so for 25 | # now we always use the x86_64 release through Rosetta. 26 | UNAME_OS := $(shell uname -s) 27 | UNAME_ARCH := $(shell uname -m) 28 | ifeq ($(UNAME_OS),Darwin) 29 | PROTOC_OS := osx 30 | PROTOC_ARCH := x86_64 31 | endif 32 | ifeq ($(UNAME_OS),Linux) 33 | PROTOC_OS = linux 34 | PROTOC_ARCH := $(UNAME_ARCH) 35 | endif 36 | PROTOC := tmp/versions/protoc/$(PROTOC_VERSION) 37 | PROTOC_BIN := tmp/bin/protoc 38 | PROTOC_INCLUDE := tmp/include/google 39 | $(PROTOC): 40 | @if ! command -v curl >/dev/null 2>/dev/null; then echo "error: curl must be installed" >&2; exit 1; fi 41 | @if ! command -v unzip >/dev/null 2>/dev/null; then echo "error: unzip must be installed" >&2; exit 1; fi 42 | @rm -f $(PROTOC_BIN) 43 | @rm -rf $(PROTOC_INCLUDE) 44 | @mkdir -p $(dir $(PROTOC_BIN)) $(dir $(PROTOC_INCLUDE)) 45 | $(eval PROTOC_TMP := $(shell mktemp -d)) 46 | cd $(PROTOC_TMP); curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-$(PROTOC_OS)-$(PROTOC_ARCH).zip -o protoc.zip 47 | cd $(PROTOC_TMP); unzip protoc.zip && mv bin/protoc $(PWD)/$(PROTOC_BIN) && mv include/google $(PWD)/$(PROTOC_INCLUDE) 48 | @rm -rf $(PROTOC_TMP) 49 | @rm -rf $(dir $(PROTOC)) 50 | @mkdir -p $(dir $(PROTOC)) 51 | @touch $(PROTOC) 52 | 53 | PROTOC_GEN_GO := tmp/versions/protoc-gen-go/$(PROTOC_GEN_GO_VERSION) 54 | PROTOC_GEN_GO_BIN := tmp/bin/protoc-gen-go 55 | $(PROTOC_GEN_GO): 56 | @rm -f $(PROTOC_GEN_GO_BIN) 57 | @mkdir -p $(dir $(PROTOC_GEN_GO_BIN)) 58 | $(eval PROTOC_GEN_GO_TMP := $(shell mktemp -d)) 59 | cd $(PROTOC_GEN_GO_TMP); GOBIN=$(PWD)/$(dir $(PROTOC_GEN_GO_BIN)) go install google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GEN_GO_VERSION) 60 | @rm -rf $(PROTOC_GEN_GO_TMP) 61 | @rm -rf $(dir $(PROTOC_GEN_GO)) 62 | @mkdir -p $(dir $(PROTOC_GEN_GO)) 63 | @touch $(PROTOC_GEN_GO) 64 | 65 | go: $(GO_FILE) 66 | 67 | $(GO_FILE): $(PROTO_FILE) $(PROTOC_GEN_GO) $(PROTOC) 68 | @rm -rf $(dir $(GO_FILE)) tmp/go 69 | @mkdir -p $(dir $(GO_FILE)) tmp/go 70 | PATH=$(PWD)/tmp/bin:$$PATH protoc -I tmp/include -I . --go_out=paths=source_relative:tmp/go $(PROTO_FILE) 71 | @mv tmp/go/$(patsubst %.proto,%.pb.go,$(PROTO_FILE)) $(GO_FILE) 72 | 73 | build: $(GO_FILE) 74 | go build ./go 75 | 76 | clean: 77 | -rm -rf go tmp 78 | 79 | .PHONY: all clean go build 80 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | _(If you are reading this because you are interested in Prometheus's native 2 | histograms, pay special attention to the last paragraph below.)_ 3 | 4 | # Deprecation note 5 | 6 | This repository used to contain the [protocol 7 | buffer](https://developers.google.com/protocol-buffers) code that defined both 8 | the data model and the exposition format of Prometheus metrics. 9 | 10 | Starting with v2.0.0, the [Prometheus 11 | server](https://github.com/prometheus/prometheus) does not ingest the 12 | protobuf-based exposition format anymore. Currently, all but one of the 13 | [official instrumentation 14 | libraries](https://prometheus.io/docs/instrumenting/clientlibs/) do not expose 15 | the protobuf-based exposition format. The [Go instrumentation 16 | library](https://github.com/prometheus/client_golang), however, has been built 17 | around the protobuf-based data model. As a byproduct thereof, it is still able 18 | to expose the protobuf-based exposition format. The Go instrumentation library 19 | is the only remaining repository within the [Prometheus GitHub 20 | org](https://github.com/prometheus) directly using the prometheus/client_model 21 | repository. 22 | 23 | Therefore, formerly existing support for languages other than Go (namely C++, 24 | Java, Python, Ruby) has been removed from this repository. If you are a 3rd 25 | party user of those languages, you can go back to [commit 26 | 14fe0d1](https://github.com/prometheus/client_model/commit/14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016) 27 | to keep using the old code, or you can consume 28 | [`metrics.proto`](https://github.com/prometheus/client_model/blob/master/metrics.proto) 29 | directly with your own protobuf tooling. Note, however, that changes of 30 | `metrics.proto` after [commit 31 | 14fe0d1](https://github.com/prometheus/client_model/commit/14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016) 32 | are solely informed by requirements of the Go instrumentation library and will 33 | not take into account any requirements of other languages or stability concerns 34 | for the protobuf-based exposition format. 35 | 36 | Check out the [OpenMetrics project](https://openmetrics.io/) for the future of 37 | the data model and exposition format used by Prometheus and others. 38 | 39 | Note, though, that in an ironic twist of fate, the protobuf-based exposition 40 | format got revived to ease the implementation of experimental support for 41 | native histograms in Prometheus. Therefore, starting with v2.40.0, the 42 | Prometheus server is again capable of ingesting the protobuf-based exposition 43 | format (if the respective feature flag is enabled). Eventually, native 44 | histogram support will be added in some form to OpenMetrics, too. 45 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a security issue 2 | 3 | The Prometheus security policy, including how to report vulnerabilities, can be 4 | found here: 5 | 6 | 7 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/prometheus/client_model 2 | 3 | go 1.22.0 4 | 5 | require google.golang.org/protobuf v1.36.6 6 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 2 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 3 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= 4 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 5 | google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= 6 | google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 7 | -------------------------------------------------------------------------------- /go/metrics.pb.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Prometheus Team 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // Code generated by protoc-gen-go. DO NOT EDIT. 15 | // versions: 16 | // protoc-gen-go v1.30.0 17 | // protoc v3.20.3 18 | // source: io/prometheus/client/metrics.proto 19 | 20 | package io_prometheus_client 21 | 22 | import ( 23 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 24 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 25 | timestamppb "google.golang.org/protobuf/types/known/timestamppb" 26 | reflect "reflect" 27 | sync "sync" 28 | ) 29 | 30 | const ( 31 | // Verify that this generated code is sufficiently up-to-date. 32 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 33 | // Verify that runtime/protoimpl is sufficiently up-to-date. 34 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 35 | ) 36 | 37 | type MetricType int32 38 | 39 | const ( 40 | // COUNTER must use the Metric field "counter". 41 | MetricType_COUNTER MetricType = 0 42 | // GAUGE must use the Metric field "gauge". 43 | MetricType_GAUGE MetricType = 1 44 | // SUMMARY must use the Metric field "summary". 45 | MetricType_SUMMARY MetricType = 2 46 | // UNTYPED must use the Metric field "untyped". 47 | MetricType_UNTYPED MetricType = 3 48 | // HISTOGRAM must use the Metric field "histogram". 49 | MetricType_HISTOGRAM MetricType = 4 50 | // GAUGE_HISTOGRAM must use the Metric field "histogram". 51 | MetricType_GAUGE_HISTOGRAM MetricType = 5 52 | ) 53 | 54 | // Enum value maps for MetricType. 55 | var ( 56 | MetricType_name = map[int32]string{ 57 | 0: "COUNTER", 58 | 1: "GAUGE", 59 | 2: "SUMMARY", 60 | 3: "UNTYPED", 61 | 4: "HISTOGRAM", 62 | 5: "GAUGE_HISTOGRAM", 63 | } 64 | MetricType_value = map[string]int32{ 65 | "COUNTER": 0, 66 | "GAUGE": 1, 67 | "SUMMARY": 2, 68 | "UNTYPED": 3, 69 | "HISTOGRAM": 4, 70 | "GAUGE_HISTOGRAM": 5, 71 | } 72 | ) 73 | 74 | func (x MetricType) Enum() *MetricType { 75 | p := new(MetricType) 76 | *p = x 77 | return p 78 | } 79 | 80 | func (x MetricType) String() string { 81 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 82 | } 83 | 84 | func (MetricType) Descriptor() protoreflect.EnumDescriptor { 85 | return file_io_prometheus_client_metrics_proto_enumTypes[0].Descriptor() 86 | } 87 | 88 | func (MetricType) Type() protoreflect.EnumType { 89 | return &file_io_prometheus_client_metrics_proto_enumTypes[0] 90 | } 91 | 92 | func (x MetricType) Number() protoreflect.EnumNumber { 93 | return protoreflect.EnumNumber(x) 94 | } 95 | 96 | // Deprecated: Do not use. 97 | func (x *MetricType) UnmarshalJSON(b []byte) error { 98 | num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) 99 | if err != nil { 100 | return err 101 | } 102 | *x = MetricType(num) 103 | return nil 104 | } 105 | 106 | // Deprecated: Use MetricType.Descriptor instead. 107 | func (MetricType) EnumDescriptor() ([]byte, []int) { 108 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{0} 109 | } 110 | 111 | type LabelPair struct { 112 | state protoimpl.MessageState 113 | sizeCache protoimpl.SizeCache 114 | unknownFields protoimpl.UnknownFields 115 | 116 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 117 | Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` 118 | } 119 | 120 | func (x *LabelPair) Reset() { 121 | *x = LabelPair{} 122 | if protoimpl.UnsafeEnabled { 123 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[0] 124 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 125 | ms.StoreMessageInfo(mi) 126 | } 127 | } 128 | 129 | func (x *LabelPair) String() string { 130 | return protoimpl.X.MessageStringOf(x) 131 | } 132 | 133 | func (*LabelPair) ProtoMessage() {} 134 | 135 | func (x *LabelPair) ProtoReflect() protoreflect.Message { 136 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[0] 137 | if protoimpl.UnsafeEnabled && x != nil { 138 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 139 | if ms.LoadMessageInfo() == nil { 140 | ms.StoreMessageInfo(mi) 141 | } 142 | return ms 143 | } 144 | return mi.MessageOf(x) 145 | } 146 | 147 | // Deprecated: Use LabelPair.ProtoReflect.Descriptor instead. 148 | func (*LabelPair) Descriptor() ([]byte, []int) { 149 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{0} 150 | } 151 | 152 | func (x *LabelPair) GetName() string { 153 | if x != nil && x.Name != nil { 154 | return *x.Name 155 | } 156 | return "" 157 | } 158 | 159 | func (x *LabelPair) GetValue() string { 160 | if x != nil && x.Value != nil { 161 | return *x.Value 162 | } 163 | return "" 164 | } 165 | 166 | type Gauge struct { 167 | state protoimpl.MessageState 168 | sizeCache protoimpl.SizeCache 169 | unknownFields protoimpl.UnknownFields 170 | 171 | Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` 172 | } 173 | 174 | func (x *Gauge) Reset() { 175 | *x = Gauge{} 176 | if protoimpl.UnsafeEnabled { 177 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[1] 178 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 179 | ms.StoreMessageInfo(mi) 180 | } 181 | } 182 | 183 | func (x *Gauge) String() string { 184 | return protoimpl.X.MessageStringOf(x) 185 | } 186 | 187 | func (*Gauge) ProtoMessage() {} 188 | 189 | func (x *Gauge) ProtoReflect() protoreflect.Message { 190 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[1] 191 | if protoimpl.UnsafeEnabled && x != nil { 192 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 193 | if ms.LoadMessageInfo() == nil { 194 | ms.StoreMessageInfo(mi) 195 | } 196 | return ms 197 | } 198 | return mi.MessageOf(x) 199 | } 200 | 201 | // Deprecated: Use Gauge.ProtoReflect.Descriptor instead. 202 | func (*Gauge) Descriptor() ([]byte, []int) { 203 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{1} 204 | } 205 | 206 | func (x *Gauge) GetValue() float64 { 207 | if x != nil && x.Value != nil { 208 | return *x.Value 209 | } 210 | return 0 211 | } 212 | 213 | type Counter struct { 214 | state protoimpl.MessageState 215 | sizeCache protoimpl.SizeCache 216 | unknownFields protoimpl.UnknownFields 217 | 218 | Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` 219 | Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar" json:"exemplar,omitempty"` 220 | CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` 221 | } 222 | 223 | func (x *Counter) Reset() { 224 | *x = Counter{} 225 | if protoimpl.UnsafeEnabled { 226 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[2] 227 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 228 | ms.StoreMessageInfo(mi) 229 | } 230 | } 231 | 232 | func (x *Counter) String() string { 233 | return protoimpl.X.MessageStringOf(x) 234 | } 235 | 236 | func (*Counter) ProtoMessage() {} 237 | 238 | func (x *Counter) ProtoReflect() protoreflect.Message { 239 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[2] 240 | if protoimpl.UnsafeEnabled && x != nil { 241 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 242 | if ms.LoadMessageInfo() == nil { 243 | ms.StoreMessageInfo(mi) 244 | } 245 | return ms 246 | } 247 | return mi.MessageOf(x) 248 | } 249 | 250 | // Deprecated: Use Counter.ProtoReflect.Descriptor instead. 251 | func (*Counter) Descriptor() ([]byte, []int) { 252 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{2} 253 | } 254 | 255 | func (x *Counter) GetValue() float64 { 256 | if x != nil && x.Value != nil { 257 | return *x.Value 258 | } 259 | return 0 260 | } 261 | 262 | func (x *Counter) GetExemplar() *Exemplar { 263 | if x != nil { 264 | return x.Exemplar 265 | } 266 | return nil 267 | } 268 | 269 | func (x *Counter) GetCreatedTimestamp() *timestamppb.Timestamp { 270 | if x != nil { 271 | return x.CreatedTimestamp 272 | } 273 | return nil 274 | } 275 | 276 | type Quantile struct { 277 | state protoimpl.MessageState 278 | sizeCache protoimpl.SizeCache 279 | unknownFields protoimpl.UnknownFields 280 | 281 | Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` 282 | Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` 283 | } 284 | 285 | func (x *Quantile) Reset() { 286 | *x = Quantile{} 287 | if protoimpl.UnsafeEnabled { 288 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[3] 289 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 290 | ms.StoreMessageInfo(mi) 291 | } 292 | } 293 | 294 | func (x *Quantile) String() string { 295 | return protoimpl.X.MessageStringOf(x) 296 | } 297 | 298 | func (*Quantile) ProtoMessage() {} 299 | 300 | func (x *Quantile) ProtoReflect() protoreflect.Message { 301 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[3] 302 | if protoimpl.UnsafeEnabled && x != nil { 303 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 304 | if ms.LoadMessageInfo() == nil { 305 | ms.StoreMessageInfo(mi) 306 | } 307 | return ms 308 | } 309 | return mi.MessageOf(x) 310 | } 311 | 312 | // Deprecated: Use Quantile.ProtoReflect.Descriptor instead. 313 | func (*Quantile) Descriptor() ([]byte, []int) { 314 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{3} 315 | } 316 | 317 | func (x *Quantile) GetQuantile() float64 { 318 | if x != nil && x.Quantile != nil { 319 | return *x.Quantile 320 | } 321 | return 0 322 | } 323 | 324 | func (x *Quantile) GetValue() float64 { 325 | if x != nil && x.Value != nil { 326 | return *x.Value 327 | } 328 | return 0 329 | } 330 | 331 | type Summary struct { 332 | state protoimpl.MessageState 333 | sizeCache protoimpl.SizeCache 334 | unknownFields protoimpl.UnknownFields 335 | 336 | SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"` 337 | SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"` 338 | Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"` 339 | CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` 340 | } 341 | 342 | func (x *Summary) Reset() { 343 | *x = Summary{} 344 | if protoimpl.UnsafeEnabled { 345 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[4] 346 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 347 | ms.StoreMessageInfo(mi) 348 | } 349 | } 350 | 351 | func (x *Summary) String() string { 352 | return protoimpl.X.MessageStringOf(x) 353 | } 354 | 355 | func (*Summary) ProtoMessage() {} 356 | 357 | func (x *Summary) ProtoReflect() protoreflect.Message { 358 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[4] 359 | if protoimpl.UnsafeEnabled && x != nil { 360 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 361 | if ms.LoadMessageInfo() == nil { 362 | ms.StoreMessageInfo(mi) 363 | } 364 | return ms 365 | } 366 | return mi.MessageOf(x) 367 | } 368 | 369 | // Deprecated: Use Summary.ProtoReflect.Descriptor instead. 370 | func (*Summary) Descriptor() ([]byte, []int) { 371 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{4} 372 | } 373 | 374 | func (x *Summary) GetSampleCount() uint64 { 375 | if x != nil && x.SampleCount != nil { 376 | return *x.SampleCount 377 | } 378 | return 0 379 | } 380 | 381 | func (x *Summary) GetSampleSum() float64 { 382 | if x != nil && x.SampleSum != nil { 383 | return *x.SampleSum 384 | } 385 | return 0 386 | } 387 | 388 | func (x *Summary) GetQuantile() []*Quantile { 389 | if x != nil { 390 | return x.Quantile 391 | } 392 | return nil 393 | } 394 | 395 | func (x *Summary) GetCreatedTimestamp() *timestamppb.Timestamp { 396 | if x != nil { 397 | return x.CreatedTimestamp 398 | } 399 | return nil 400 | } 401 | 402 | type Untyped struct { 403 | state protoimpl.MessageState 404 | sizeCache protoimpl.SizeCache 405 | unknownFields protoimpl.UnknownFields 406 | 407 | Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` 408 | } 409 | 410 | func (x *Untyped) Reset() { 411 | *x = Untyped{} 412 | if protoimpl.UnsafeEnabled { 413 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[5] 414 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 415 | ms.StoreMessageInfo(mi) 416 | } 417 | } 418 | 419 | func (x *Untyped) String() string { 420 | return protoimpl.X.MessageStringOf(x) 421 | } 422 | 423 | func (*Untyped) ProtoMessage() {} 424 | 425 | func (x *Untyped) ProtoReflect() protoreflect.Message { 426 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[5] 427 | if protoimpl.UnsafeEnabled && x != nil { 428 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 429 | if ms.LoadMessageInfo() == nil { 430 | ms.StoreMessageInfo(mi) 431 | } 432 | return ms 433 | } 434 | return mi.MessageOf(x) 435 | } 436 | 437 | // Deprecated: Use Untyped.ProtoReflect.Descriptor instead. 438 | func (*Untyped) Descriptor() ([]byte, []int) { 439 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{5} 440 | } 441 | 442 | func (x *Untyped) GetValue() float64 { 443 | if x != nil && x.Value != nil { 444 | return *x.Value 445 | } 446 | return 0 447 | } 448 | 449 | type Histogram struct { 450 | state protoimpl.MessageState 451 | sizeCache protoimpl.SizeCache 452 | unknownFields protoimpl.UnknownFields 453 | 454 | SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"` 455 | SampleCountFloat *float64 `protobuf:"fixed64,4,opt,name=sample_count_float,json=sampleCountFloat" json:"sample_count_float,omitempty"` // Overrides sample_count if > 0. 456 | SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"` 457 | // Buckets for the conventional histogram. 458 | Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"` // Ordered in increasing order of upper_bound, +Inf bucket is optional. 459 | CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` 460 | // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8. 461 | // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and 462 | // then each power of two is divided into 2^n logarithmic buckets. 463 | // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n). 464 | // In the future, more bucket schemas may be added using numbers < -4 or > 8. 465 | Schema *int32 `protobuf:"zigzag32,5,opt,name=schema" json:"schema,omitempty"` 466 | ZeroThreshold *float64 `protobuf:"fixed64,6,opt,name=zero_threshold,json=zeroThreshold" json:"zero_threshold,omitempty"` // Breadth of the zero bucket. 467 | ZeroCount *uint64 `protobuf:"varint,7,opt,name=zero_count,json=zeroCount" json:"zero_count,omitempty"` // Count in zero bucket. 468 | ZeroCountFloat *float64 `protobuf:"fixed64,8,opt,name=zero_count_float,json=zeroCountFloat" json:"zero_count_float,omitempty"` // Overrides sb_zero_count if > 0. 469 | // Negative buckets for the native histogram. 470 | NegativeSpan []*BucketSpan `protobuf:"bytes,9,rep,name=negative_span,json=negativeSpan" json:"negative_span,omitempty"` 471 | // Use either "negative_delta" or "negative_count", the former for 472 | // regular histograms with integer counts, the latter for float 473 | // histograms. 474 | NegativeDelta []int64 `protobuf:"zigzag64,10,rep,name=negative_delta,json=negativeDelta" json:"negative_delta,omitempty"` // Count delta of each bucket compared to previous one (or to zero for 1st bucket). 475 | NegativeCount []float64 `protobuf:"fixed64,11,rep,name=negative_count,json=negativeCount" json:"negative_count,omitempty"` // Absolute count of each bucket. 476 | // Positive buckets for the native histogram. 477 | // Use a no-op span (offset 0, length 0) for a native histogram without any 478 | // observations yet and with a zero_threshold of 0. Otherwise, it would be 479 | // indistinguishable from a classic histogram. 480 | PositiveSpan []*BucketSpan `protobuf:"bytes,12,rep,name=positive_span,json=positiveSpan" json:"positive_span,omitempty"` 481 | // Use either "positive_delta" or "positive_count", the former for 482 | // regular histograms with integer counts, the latter for float 483 | // histograms. 484 | PositiveDelta []int64 `protobuf:"zigzag64,13,rep,name=positive_delta,json=positiveDelta" json:"positive_delta,omitempty"` // Count delta of each bucket compared to previous one (or to zero for 1st bucket). 485 | PositiveCount []float64 `protobuf:"fixed64,14,rep,name=positive_count,json=positiveCount" json:"positive_count,omitempty"` // Absolute count of each bucket. 486 | // Only used for native histograms. These exemplars MUST have a timestamp. 487 | Exemplars []*Exemplar `protobuf:"bytes,16,rep,name=exemplars" json:"exemplars,omitempty"` 488 | } 489 | 490 | func (x *Histogram) Reset() { 491 | *x = Histogram{} 492 | if protoimpl.UnsafeEnabled { 493 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[6] 494 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 495 | ms.StoreMessageInfo(mi) 496 | } 497 | } 498 | 499 | func (x *Histogram) String() string { 500 | return protoimpl.X.MessageStringOf(x) 501 | } 502 | 503 | func (*Histogram) ProtoMessage() {} 504 | 505 | func (x *Histogram) ProtoReflect() protoreflect.Message { 506 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[6] 507 | if protoimpl.UnsafeEnabled && x != nil { 508 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 509 | if ms.LoadMessageInfo() == nil { 510 | ms.StoreMessageInfo(mi) 511 | } 512 | return ms 513 | } 514 | return mi.MessageOf(x) 515 | } 516 | 517 | // Deprecated: Use Histogram.ProtoReflect.Descriptor instead. 518 | func (*Histogram) Descriptor() ([]byte, []int) { 519 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{6} 520 | } 521 | 522 | func (x *Histogram) GetSampleCount() uint64 { 523 | if x != nil && x.SampleCount != nil { 524 | return *x.SampleCount 525 | } 526 | return 0 527 | } 528 | 529 | func (x *Histogram) GetSampleCountFloat() float64 { 530 | if x != nil && x.SampleCountFloat != nil { 531 | return *x.SampleCountFloat 532 | } 533 | return 0 534 | } 535 | 536 | func (x *Histogram) GetSampleSum() float64 { 537 | if x != nil && x.SampleSum != nil { 538 | return *x.SampleSum 539 | } 540 | return 0 541 | } 542 | 543 | func (x *Histogram) GetBucket() []*Bucket { 544 | if x != nil { 545 | return x.Bucket 546 | } 547 | return nil 548 | } 549 | 550 | func (x *Histogram) GetCreatedTimestamp() *timestamppb.Timestamp { 551 | if x != nil { 552 | return x.CreatedTimestamp 553 | } 554 | return nil 555 | } 556 | 557 | func (x *Histogram) GetSchema() int32 { 558 | if x != nil && x.Schema != nil { 559 | return *x.Schema 560 | } 561 | return 0 562 | } 563 | 564 | func (x *Histogram) GetZeroThreshold() float64 { 565 | if x != nil && x.ZeroThreshold != nil { 566 | return *x.ZeroThreshold 567 | } 568 | return 0 569 | } 570 | 571 | func (x *Histogram) GetZeroCount() uint64 { 572 | if x != nil && x.ZeroCount != nil { 573 | return *x.ZeroCount 574 | } 575 | return 0 576 | } 577 | 578 | func (x *Histogram) GetZeroCountFloat() float64 { 579 | if x != nil && x.ZeroCountFloat != nil { 580 | return *x.ZeroCountFloat 581 | } 582 | return 0 583 | } 584 | 585 | func (x *Histogram) GetNegativeSpan() []*BucketSpan { 586 | if x != nil { 587 | return x.NegativeSpan 588 | } 589 | return nil 590 | } 591 | 592 | func (x *Histogram) GetNegativeDelta() []int64 { 593 | if x != nil { 594 | return x.NegativeDelta 595 | } 596 | return nil 597 | } 598 | 599 | func (x *Histogram) GetNegativeCount() []float64 { 600 | if x != nil { 601 | return x.NegativeCount 602 | } 603 | return nil 604 | } 605 | 606 | func (x *Histogram) GetPositiveSpan() []*BucketSpan { 607 | if x != nil { 608 | return x.PositiveSpan 609 | } 610 | return nil 611 | } 612 | 613 | func (x *Histogram) GetPositiveDelta() []int64 { 614 | if x != nil { 615 | return x.PositiveDelta 616 | } 617 | return nil 618 | } 619 | 620 | func (x *Histogram) GetPositiveCount() []float64 { 621 | if x != nil { 622 | return x.PositiveCount 623 | } 624 | return nil 625 | } 626 | 627 | func (x *Histogram) GetExemplars() []*Exemplar { 628 | if x != nil { 629 | return x.Exemplars 630 | } 631 | return nil 632 | } 633 | 634 | // A Bucket of a conventional histogram, each of which is treated as 635 | // an individual counter-like time series by Prometheus. 636 | type Bucket struct { 637 | state protoimpl.MessageState 638 | sizeCache protoimpl.SizeCache 639 | unknownFields protoimpl.UnknownFields 640 | 641 | CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"` // Cumulative in increasing order. 642 | CumulativeCountFloat *float64 `protobuf:"fixed64,4,opt,name=cumulative_count_float,json=cumulativeCountFloat" json:"cumulative_count_float,omitempty"` // Overrides cumulative_count if > 0. 643 | UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"` // Inclusive. 644 | Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar" json:"exemplar,omitempty"` 645 | } 646 | 647 | func (x *Bucket) Reset() { 648 | *x = Bucket{} 649 | if protoimpl.UnsafeEnabled { 650 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[7] 651 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 652 | ms.StoreMessageInfo(mi) 653 | } 654 | } 655 | 656 | func (x *Bucket) String() string { 657 | return protoimpl.X.MessageStringOf(x) 658 | } 659 | 660 | func (*Bucket) ProtoMessage() {} 661 | 662 | func (x *Bucket) ProtoReflect() protoreflect.Message { 663 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[7] 664 | if protoimpl.UnsafeEnabled && x != nil { 665 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 666 | if ms.LoadMessageInfo() == nil { 667 | ms.StoreMessageInfo(mi) 668 | } 669 | return ms 670 | } 671 | return mi.MessageOf(x) 672 | } 673 | 674 | // Deprecated: Use Bucket.ProtoReflect.Descriptor instead. 675 | func (*Bucket) Descriptor() ([]byte, []int) { 676 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{7} 677 | } 678 | 679 | func (x *Bucket) GetCumulativeCount() uint64 { 680 | if x != nil && x.CumulativeCount != nil { 681 | return *x.CumulativeCount 682 | } 683 | return 0 684 | } 685 | 686 | func (x *Bucket) GetCumulativeCountFloat() float64 { 687 | if x != nil && x.CumulativeCountFloat != nil { 688 | return *x.CumulativeCountFloat 689 | } 690 | return 0 691 | } 692 | 693 | func (x *Bucket) GetUpperBound() float64 { 694 | if x != nil && x.UpperBound != nil { 695 | return *x.UpperBound 696 | } 697 | return 0 698 | } 699 | 700 | func (x *Bucket) GetExemplar() *Exemplar { 701 | if x != nil { 702 | return x.Exemplar 703 | } 704 | return nil 705 | } 706 | 707 | // A BucketSpan defines a number of consecutive buckets in a native 708 | // histogram with their offset. Logically, it would be more 709 | // straightforward to include the bucket counts in the Span. However, 710 | // the protobuf representation is more compact in the way the data is 711 | // structured here (with all the buckets in a single array separate 712 | // from the Spans). 713 | type BucketSpan struct { 714 | state protoimpl.MessageState 715 | sizeCache protoimpl.SizeCache 716 | unknownFields protoimpl.UnknownFields 717 | 718 | Offset *int32 `protobuf:"zigzag32,1,opt,name=offset" json:"offset,omitempty"` // Gap to previous span, or starting point for 1st span (which can be negative). 719 | Length *uint32 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"` // Length of consecutive buckets. 720 | } 721 | 722 | func (x *BucketSpan) Reset() { 723 | *x = BucketSpan{} 724 | if protoimpl.UnsafeEnabled { 725 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[8] 726 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 727 | ms.StoreMessageInfo(mi) 728 | } 729 | } 730 | 731 | func (x *BucketSpan) String() string { 732 | return protoimpl.X.MessageStringOf(x) 733 | } 734 | 735 | func (*BucketSpan) ProtoMessage() {} 736 | 737 | func (x *BucketSpan) ProtoReflect() protoreflect.Message { 738 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[8] 739 | if protoimpl.UnsafeEnabled && x != nil { 740 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 741 | if ms.LoadMessageInfo() == nil { 742 | ms.StoreMessageInfo(mi) 743 | } 744 | return ms 745 | } 746 | return mi.MessageOf(x) 747 | } 748 | 749 | // Deprecated: Use BucketSpan.ProtoReflect.Descriptor instead. 750 | func (*BucketSpan) Descriptor() ([]byte, []int) { 751 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{8} 752 | } 753 | 754 | func (x *BucketSpan) GetOffset() int32 { 755 | if x != nil && x.Offset != nil { 756 | return *x.Offset 757 | } 758 | return 0 759 | } 760 | 761 | func (x *BucketSpan) GetLength() uint32 { 762 | if x != nil && x.Length != nil { 763 | return *x.Length 764 | } 765 | return 0 766 | } 767 | 768 | type Exemplar struct { 769 | state protoimpl.MessageState 770 | sizeCache protoimpl.SizeCache 771 | unknownFields protoimpl.UnknownFields 772 | 773 | Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` 774 | Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` 775 | Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"` // OpenMetrics-style. 776 | } 777 | 778 | func (x *Exemplar) Reset() { 779 | *x = Exemplar{} 780 | if protoimpl.UnsafeEnabled { 781 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[9] 782 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 783 | ms.StoreMessageInfo(mi) 784 | } 785 | } 786 | 787 | func (x *Exemplar) String() string { 788 | return protoimpl.X.MessageStringOf(x) 789 | } 790 | 791 | func (*Exemplar) ProtoMessage() {} 792 | 793 | func (x *Exemplar) ProtoReflect() protoreflect.Message { 794 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[9] 795 | if protoimpl.UnsafeEnabled && x != nil { 796 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 797 | if ms.LoadMessageInfo() == nil { 798 | ms.StoreMessageInfo(mi) 799 | } 800 | return ms 801 | } 802 | return mi.MessageOf(x) 803 | } 804 | 805 | // Deprecated: Use Exemplar.ProtoReflect.Descriptor instead. 806 | func (*Exemplar) Descriptor() ([]byte, []int) { 807 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{9} 808 | } 809 | 810 | func (x *Exemplar) GetLabel() []*LabelPair { 811 | if x != nil { 812 | return x.Label 813 | } 814 | return nil 815 | } 816 | 817 | func (x *Exemplar) GetValue() float64 { 818 | if x != nil && x.Value != nil { 819 | return *x.Value 820 | } 821 | return 0 822 | } 823 | 824 | func (x *Exemplar) GetTimestamp() *timestamppb.Timestamp { 825 | if x != nil { 826 | return x.Timestamp 827 | } 828 | return nil 829 | } 830 | 831 | type Metric struct { 832 | state protoimpl.MessageState 833 | sizeCache protoimpl.SizeCache 834 | unknownFields protoimpl.UnknownFields 835 | 836 | Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` 837 | Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` 838 | Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"` 839 | Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"` 840 | Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"` 841 | Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"` 842 | TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"` 843 | } 844 | 845 | func (x *Metric) Reset() { 846 | *x = Metric{} 847 | if protoimpl.UnsafeEnabled { 848 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[10] 849 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 850 | ms.StoreMessageInfo(mi) 851 | } 852 | } 853 | 854 | func (x *Metric) String() string { 855 | return protoimpl.X.MessageStringOf(x) 856 | } 857 | 858 | func (*Metric) ProtoMessage() {} 859 | 860 | func (x *Metric) ProtoReflect() protoreflect.Message { 861 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[10] 862 | if protoimpl.UnsafeEnabled && x != nil { 863 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 864 | if ms.LoadMessageInfo() == nil { 865 | ms.StoreMessageInfo(mi) 866 | } 867 | return ms 868 | } 869 | return mi.MessageOf(x) 870 | } 871 | 872 | // Deprecated: Use Metric.ProtoReflect.Descriptor instead. 873 | func (*Metric) Descriptor() ([]byte, []int) { 874 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{10} 875 | } 876 | 877 | func (x *Metric) GetLabel() []*LabelPair { 878 | if x != nil { 879 | return x.Label 880 | } 881 | return nil 882 | } 883 | 884 | func (x *Metric) GetGauge() *Gauge { 885 | if x != nil { 886 | return x.Gauge 887 | } 888 | return nil 889 | } 890 | 891 | func (x *Metric) GetCounter() *Counter { 892 | if x != nil { 893 | return x.Counter 894 | } 895 | return nil 896 | } 897 | 898 | func (x *Metric) GetSummary() *Summary { 899 | if x != nil { 900 | return x.Summary 901 | } 902 | return nil 903 | } 904 | 905 | func (x *Metric) GetUntyped() *Untyped { 906 | if x != nil { 907 | return x.Untyped 908 | } 909 | return nil 910 | } 911 | 912 | func (x *Metric) GetHistogram() *Histogram { 913 | if x != nil { 914 | return x.Histogram 915 | } 916 | return nil 917 | } 918 | 919 | func (x *Metric) GetTimestampMs() int64 { 920 | if x != nil && x.TimestampMs != nil { 921 | return *x.TimestampMs 922 | } 923 | return 0 924 | } 925 | 926 | type MetricFamily struct { 927 | state protoimpl.MessageState 928 | sizeCache protoimpl.SizeCache 929 | unknownFields protoimpl.UnknownFields 930 | 931 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 932 | Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"` 933 | Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"` 934 | Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"` 935 | Unit *string `protobuf:"bytes,5,opt,name=unit" json:"unit,omitempty"` 936 | } 937 | 938 | func (x *MetricFamily) Reset() { 939 | *x = MetricFamily{} 940 | if protoimpl.UnsafeEnabled { 941 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[11] 942 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 943 | ms.StoreMessageInfo(mi) 944 | } 945 | } 946 | 947 | func (x *MetricFamily) String() string { 948 | return protoimpl.X.MessageStringOf(x) 949 | } 950 | 951 | func (*MetricFamily) ProtoMessage() {} 952 | 953 | func (x *MetricFamily) ProtoReflect() protoreflect.Message { 954 | mi := &file_io_prometheus_client_metrics_proto_msgTypes[11] 955 | if protoimpl.UnsafeEnabled && x != nil { 956 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 957 | if ms.LoadMessageInfo() == nil { 958 | ms.StoreMessageInfo(mi) 959 | } 960 | return ms 961 | } 962 | return mi.MessageOf(x) 963 | } 964 | 965 | // Deprecated: Use MetricFamily.ProtoReflect.Descriptor instead. 966 | func (*MetricFamily) Descriptor() ([]byte, []int) { 967 | return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{11} 968 | } 969 | 970 | func (x *MetricFamily) GetName() string { 971 | if x != nil && x.Name != nil { 972 | return *x.Name 973 | } 974 | return "" 975 | } 976 | 977 | func (x *MetricFamily) GetHelp() string { 978 | if x != nil && x.Help != nil { 979 | return *x.Help 980 | } 981 | return "" 982 | } 983 | 984 | func (x *MetricFamily) GetType() MetricType { 985 | if x != nil && x.Type != nil { 986 | return *x.Type 987 | } 988 | return MetricType_COUNTER 989 | } 990 | 991 | func (x *MetricFamily) GetMetric() []*Metric { 992 | if x != nil { 993 | return x.Metric 994 | } 995 | return nil 996 | } 997 | 998 | func (x *MetricFamily) GetUnit() string { 999 | if x != nil && x.Unit != nil { 1000 | return *x.Unit 1001 | } 1002 | return "" 1003 | } 1004 | 1005 | var File_io_prometheus_client_metrics_proto protoreflect.FileDescriptor 1006 | 1007 | var file_io_prometheus_client_metrics_proto_rawDesc = []byte{ 1008 | 0x0a, 0x22, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 1009 | 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 1010 | 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 1011 | 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 1012 | 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 1013 | 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x09, 0x4c, 1014 | 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 1015 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 1016 | 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 1017 | 0x75, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 1018 | 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 1019 | 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 1020 | 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 1021 | 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x18, 1022 | 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 1023 | 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x65, 1024 | 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x12, 1025 | 0x47, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 1026 | 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 1027 | 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 1028 | 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 1029 | 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3c, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6e, 1030 | 0x74, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 1031 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 1032 | 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 1033 | 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, 1034 | 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 1035 | 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 1036 | 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 1037 | 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x70, 0x6c, 1038 | 0x65, 0x53, 0x75, 0x6d, 0x12, 0x3a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 1039 | 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 1040 | 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 1041 | 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 1042 | 0x12, 0x47, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 1043 | 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 1044 | 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 1045 | 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 1046 | 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1f, 0x0a, 0x07, 0x55, 0x6e, 0x74, 1047 | 0x79, 0x70, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 1048 | 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x09, 0x48, 1049 | 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, 1050 | 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 1051 | 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 1052 | 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 1053 | 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 1054 | 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 1055 | 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x73, 1056 | 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 1057 | 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 1058 | 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 1059 | 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x47, 1060 | 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 1061 | 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 1062 | 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 1063 | 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 1064 | 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 1065 | 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 1066 | 0x25, 0x0a, 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 1067 | 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x7a, 0x65, 0x72, 0x6f, 0x54, 0x68, 0x72, 1068 | 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x63, 1069 | 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x7a, 0x65, 0x72, 0x6f, 1070 | 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 1071 | 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 1072 | 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 1073 | 0x45, 0x0a, 0x0d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 1074 | 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 1075 | 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x75, 1076 | 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x0c, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 1077 | 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 1078 | 0x76, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0d, 1079 | 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x25, 0x0a, 1080 | 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 1081 | 0x0b, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 1082 | 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 1083 | 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x6f, 1084 | 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 1085 | 0x6e, 0x74, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x0c, 0x70, 1086 | 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x70, 1087 | 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x0d, 0x20, 1088 | 0x03, 0x28, 0x12, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x6c, 1089 | 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 1090 | 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 1091 | 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x78, 0x65, 1092 | 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 1093 | 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 1094 | 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x09, 0x65, 0x78, 1095 | 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x63, 0x6b, 1096 | 0x65, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 1097 | 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x75, 1098 | 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, 1099 | 0x16, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 1100 | 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x63, 1101 | 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, 1102 | 0x6f, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 1103 | 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x70, 0x65, 0x72, 0x42, 1104 | 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 1105 | 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 1106 | 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 1107 | 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 1108 | 0x22, 0x3c, 0x0a, 0x0a, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x16, 1109 | 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 1110 | 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 1111 | 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x91, 1112 | 0x01, 0x0a, 0x08, 0x45, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x6c, 1113 | 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, 1114 | 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 1115 | 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x6c, 0x61, 0x62, 1116 | 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 1117 | 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 1118 | 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 1119 | 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 1120 | 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 1121 | 0x6d, 0x70, 0x22, 0xff, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x35, 0x0a, 1122 | 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 1123 | 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 1124 | 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x6c, 1125 | 0x61, 0x62, 0x65, 0x6c, 0x12, 0x31, 0x0a, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x18, 0x02, 0x20, 1126 | 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 1127 | 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 1128 | 0x52, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 1129 | 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 1130 | 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 1131 | 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 1132 | 0x12, 0x37, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 1133 | 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 1134 | 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 1135 | 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x07, 0x75, 0x6e, 0x74, 1136 | 0x79, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, 1137 | 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 1138 | 0x74, 0x2e, 0x55, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x64, 0x52, 0x07, 0x75, 0x6e, 0x74, 0x79, 0x70, 1139 | 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 1140 | 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 1141 | 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 1142 | 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 1143 | 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 1144 | 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 1145 | 0x6d, 0x70, 0x4d, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 1146 | 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 1147 | 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, 1148 | 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x34, 0x0a, 1149 | 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x69, 0x6f, 1150 | 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 1151 | 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 1152 | 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 1153 | 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 1154 | 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 1155 | 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 1156 | 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x2a, 0x62, 0x0a, 1157 | 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 1158 | 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 1159 | 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x02, 1160 | 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x54, 0x59, 0x50, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 1161 | 0x09, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 1162 | 0x47, 0x41, 0x55, 0x47, 0x45, 0x5f, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 1163 | 0x05, 0x42, 0x52, 0x0a, 0x14, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 1164 | 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 1165 | 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 1166 | 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x67, 0x6f, 1167 | 0x3b, 0x69, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5f, 0x63, 1168 | 0x6c, 0x69, 0x65, 0x6e, 0x74, 1169 | } 1170 | 1171 | var ( 1172 | file_io_prometheus_client_metrics_proto_rawDescOnce sync.Once 1173 | file_io_prometheus_client_metrics_proto_rawDescData = file_io_prometheus_client_metrics_proto_rawDesc 1174 | ) 1175 | 1176 | func file_io_prometheus_client_metrics_proto_rawDescGZIP() []byte { 1177 | file_io_prometheus_client_metrics_proto_rawDescOnce.Do(func() { 1178 | file_io_prometheus_client_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_io_prometheus_client_metrics_proto_rawDescData) 1179 | }) 1180 | return file_io_prometheus_client_metrics_proto_rawDescData 1181 | } 1182 | 1183 | var file_io_prometheus_client_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 1184 | var file_io_prometheus_client_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 12) 1185 | var file_io_prometheus_client_metrics_proto_goTypes = []interface{}{ 1186 | (MetricType)(0), // 0: io.prometheus.client.MetricType 1187 | (*LabelPair)(nil), // 1: io.prometheus.client.LabelPair 1188 | (*Gauge)(nil), // 2: io.prometheus.client.Gauge 1189 | (*Counter)(nil), // 3: io.prometheus.client.Counter 1190 | (*Quantile)(nil), // 4: io.prometheus.client.Quantile 1191 | (*Summary)(nil), // 5: io.prometheus.client.Summary 1192 | (*Untyped)(nil), // 6: io.prometheus.client.Untyped 1193 | (*Histogram)(nil), // 7: io.prometheus.client.Histogram 1194 | (*Bucket)(nil), // 8: io.prometheus.client.Bucket 1195 | (*BucketSpan)(nil), // 9: io.prometheus.client.BucketSpan 1196 | (*Exemplar)(nil), // 10: io.prometheus.client.Exemplar 1197 | (*Metric)(nil), // 11: io.prometheus.client.Metric 1198 | (*MetricFamily)(nil), // 12: io.prometheus.client.MetricFamily 1199 | (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp 1200 | } 1201 | var file_io_prometheus_client_metrics_proto_depIdxs = []int32{ 1202 | 10, // 0: io.prometheus.client.Counter.exemplar:type_name -> io.prometheus.client.Exemplar 1203 | 13, // 1: io.prometheus.client.Counter.created_timestamp:type_name -> google.protobuf.Timestamp 1204 | 4, // 2: io.prometheus.client.Summary.quantile:type_name -> io.prometheus.client.Quantile 1205 | 13, // 3: io.prometheus.client.Summary.created_timestamp:type_name -> google.protobuf.Timestamp 1206 | 8, // 4: io.prometheus.client.Histogram.bucket:type_name -> io.prometheus.client.Bucket 1207 | 13, // 5: io.prometheus.client.Histogram.created_timestamp:type_name -> google.protobuf.Timestamp 1208 | 9, // 6: io.prometheus.client.Histogram.negative_span:type_name -> io.prometheus.client.BucketSpan 1209 | 9, // 7: io.prometheus.client.Histogram.positive_span:type_name -> io.prometheus.client.BucketSpan 1210 | 10, // 8: io.prometheus.client.Histogram.exemplars:type_name -> io.prometheus.client.Exemplar 1211 | 10, // 9: io.prometheus.client.Bucket.exemplar:type_name -> io.prometheus.client.Exemplar 1212 | 1, // 10: io.prometheus.client.Exemplar.label:type_name -> io.prometheus.client.LabelPair 1213 | 13, // 11: io.prometheus.client.Exemplar.timestamp:type_name -> google.protobuf.Timestamp 1214 | 1, // 12: io.prometheus.client.Metric.label:type_name -> io.prometheus.client.LabelPair 1215 | 2, // 13: io.prometheus.client.Metric.gauge:type_name -> io.prometheus.client.Gauge 1216 | 3, // 14: io.prometheus.client.Metric.counter:type_name -> io.prometheus.client.Counter 1217 | 5, // 15: io.prometheus.client.Metric.summary:type_name -> io.prometheus.client.Summary 1218 | 6, // 16: io.prometheus.client.Metric.untyped:type_name -> io.prometheus.client.Untyped 1219 | 7, // 17: io.prometheus.client.Metric.histogram:type_name -> io.prometheus.client.Histogram 1220 | 0, // 18: io.prometheus.client.MetricFamily.type:type_name -> io.prometheus.client.MetricType 1221 | 11, // 19: io.prometheus.client.MetricFamily.metric:type_name -> io.prometheus.client.Metric 1222 | 20, // [20:20] is the sub-list for method output_type 1223 | 20, // [20:20] is the sub-list for method input_type 1224 | 20, // [20:20] is the sub-list for extension type_name 1225 | 20, // [20:20] is the sub-list for extension extendee 1226 | 0, // [0:20] is the sub-list for field type_name 1227 | } 1228 | 1229 | func init() { file_io_prometheus_client_metrics_proto_init() } 1230 | func file_io_prometheus_client_metrics_proto_init() { 1231 | if File_io_prometheus_client_metrics_proto != nil { 1232 | return 1233 | } 1234 | if !protoimpl.UnsafeEnabled { 1235 | file_io_prometheus_client_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 1236 | switch v := v.(*LabelPair); i { 1237 | case 0: 1238 | return &v.state 1239 | case 1: 1240 | return &v.sizeCache 1241 | case 2: 1242 | return &v.unknownFields 1243 | default: 1244 | return nil 1245 | } 1246 | } 1247 | file_io_prometheus_client_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 1248 | switch v := v.(*Gauge); i { 1249 | case 0: 1250 | return &v.state 1251 | case 1: 1252 | return &v.sizeCache 1253 | case 2: 1254 | return &v.unknownFields 1255 | default: 1256 | return nil 1257 | } 1258 | } 1259 | file_io_prometheus_client_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 1260 | switch v := v.(*Counter); i { 1261 | case 0: 1262 | return &v.state 1263 | case 1: 1264 | return &v.sizeCache 1265 | case 2: 1266 | return &v.unknownFields 1267 | default: 1268 | return nil 1269 | } 1270 | } 1271 | file_io_prometheus_client_metrics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 1272 | switch v := v.(*Quantile); i { 1273 | case 0: 1274 | return &v.state 1275 | case 1: 1276 | return &v.sizeCache 1277 | case 2: 1278 | return &v.unknownFields 1279 | default: 1280 | return nil 1281 | } 1282 | } 1283 | file_io_prometheus_client_metrics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 1284 | switch v := v.(*Summary); i { 1285 | case 0: 1286 | return &v.state 1287 | case 1: 1288 | return &v.sizeCache 1289 | case 2: 1290 | return &v.unknownFields 1291 | default: 1292 | return nil 1293 | } 1294 | } 1295 | file_io_prometheus_client_metrics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 1296 | switch v := v.(*Untyped); i { 1297 | case 0: 1298 | return &v.state 1299 | case 1: 1300 | return &v.sizeCache 1301 | case 2: 1302 | return &v.unknownFields 1303 | default: 1304 | return nil 1305 | } 1306 | } 1307 | file_io_prometheus_client_metrics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 1308 | switch v := v.(*Histogram); i { 1309 | case 0: 1310 | return &v.state 1311 | case 1: 1312 | return &v.sizeCache 1313 | case 2: 1314 | return &v.unknownFields 1315 | default: 1316 | return nil 1317 | } 1318 | } 1319 | file_io_prometheus_client_metrics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 1320 | switch v := v.(*Bucket); i { 1321 | case 0: 1322 | return &v.state 1323 | case 1: 1324 | return &v.sizeCache 1325 | case 2: 1326 | return &v.unknownFields 1327 | default: 1328 | return nil 1329 | } 1330 | } 1331 | file_io_prometheus_client_metrics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 1332 | switch v := v.(*BucketSpan); i { 1333 | case 0: 1334 | return &v.state 1335 | case 1: 1336 | return &v.sizeCache 1337 | case 2: 1338 | return &v.unknownFields 1339 | default: 1340 | return nil 1341 | } 1342 | } 1343 | file_io_prometheus_client_metrics_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 1344 | switch v := v.(*Exemplar); i { 1345 | case 0: 1346 | return &v.state 1347 | case 1: 1348 | return &v.sizeCache 1349 | case 2: 1350 | return &v.unknownFields 1351 | default: 1352 | return nil 1353 | } 1354 | } 1355 | file_io_prometheus_client_metrics_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { 1356 | switch v := v.(*Metric); i { 1357 | case 0: 1358 | return &v.state 1359 | case 1: 1360 | return &v.sizeCache 1361 | case 2: 1362 | return &v.unknownFields 1363 | default: 1364 | return nil 1365 | } 1366 | } 1367 | file_io_prometheus_client_metrics_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { 1368 | switch v := v.(*MetricFamily); i { 1369 | case 0: 1370 | return &v.state 1371 | case 1: 1372 | return &v.sizeCache 1373 | case 2: 1374 | return &v.unknownFields 1375 | default: 1376 | return nil 1377 | } 1378 | } 1379 | } 1380 | type x struct{} 1381 | out := protoimpl.TypeBuilder{ 1382 | File: protoimpl.DescBuilder{ 1383 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1384 | RawDescriptor: file_io_prometheus_client_metrics_proto_rawDesc, 1385 | NumEnums: 1, 1386 | NumMessages: 12, 1387 | NumExtensions: 0, 1388 | NumServices: 0, 1389 | }, 1390 | GoTypes: file_io_prometheus_client_metrics_proto_goTypes, 1391 | DependencyIndexes: file_io_prometheus_client_metrics_proto_depIdxs, 1392 | EnumInfos: file_io_prometheus_client_metrics_proto_enumTypes, 1393 | MessageInfos: file_io_prometheus_client_metrics_proto_msgTypes, 1394 | }.Build() 1395 | File_io_prometheus_client_metrics_proto = out.File 1396 | file_io_prometheus_client_metrics_proto_rawDesc = nil 1397 | file_io_prometheus_client_metrics_proto_goTypes = nil 1398 | file_io_prometheus_client_metrics_proto_depIdxs = nil 1399 | } 1400 | -------------------------------------------------------------------------------- /io/prometheus/client/metrics.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Prometheus Team 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | syntax = "proto2"; 15 | 16 | package io.prometheus.client; 17 | option java_package = "io.prometheus.client"; 18 | option go_package = "github.com/prometheus/client_model/go;io_prometheus_client"; 19 | 20 | import "google/protobuf/timestamp.proto"; 21 | 22 | message LabelPair { 23 | optional string name = 1; 24 | optional string value = 2; 25 | } 26 | 27 | enum MetricType { 28 | // COUNTER must use the Metric field "counter". 29 | COUNTER = 0; 30 | // GAUGE must use the Metric field "gauge". 31 | GAUGE = 1; 32 | // SUMMARY must use the Metric field "summary". 33 | SUMMARY = 2; 34 | // UNTYPED must use the Metric field "untyped". 35 | UNTYPED = 3; 36 | // HISTOGRAM must use the Metric field "histogram". 37 | HISTOGRAM = 4; 38 | // GAUGE_HISTOGRAM must use the Metric field "histogram". 39 | GAUGE_HISTOGRAM = 5; 40 | } 41 | 42 | message Gauge { 43 | optional double value = 1; 44 | } 45 | 46 | message Counter { 47 | optional double value = 1; 48 | optional Exemplar exemplar = 2; 49 | 50 | optional google.protobuf.Timestamp created_timestamp = 3; 51 | } 52 | 53 | message Quantile { 54 | optional double quantile = 1; 55 | optional double value = 2; 56 | } 57 | 58 | message Summary { 59 | optional uint64 sample_count = 1; 60 | optional double sample_sum = 2; 61 | repeated Quantile quantile = 3; 62 | 63 | optional google.protobuf.Timestamp created_timestamp = 4; 64 | } 65 | 66 | message Untyped { 67 | optional double value = 1; 68 | } 69 | 70 | message Histogram { 71 | optional uint64 sample_count = 1; 72 | optional double sample_count_float = 4; // Overrides sample_count if > 0. 73 | optional double sample_sum = 2; 74 | // Buckets for the conventional histogram. 75 | repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional. 76 | 77 | optional google.protobuf.Timestamp created_timestamp = 15; 78 | 79 | // Everything below here is for native histograms (also known as sparse histograms). 80 | // Native histograms are an experimental feature without stability guarantees. 81 | 82 | // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8. 83 | // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and 84 | // then each power of two is divided into 2^n logarithmic buckets. 85 | // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n). 86 | // In the future, more bucket schemas may be added using numbers < -4 or > 8. 87 | optional sint32 schema = 5; 88 | optional double zero_threshold = 6; // Breadth of the zero bucket. 89 | optional uint64 zero_count = 7; // Count in zero bucket. 90 | optional double zero_count_float = 8; // Overrides sb_zero_count if > 0. 91 | 92 | // Negative buckets for the native histogram. 93 | repeated BucketSpan negative_span = 9; 94 | // Use either "negative_delta" or "negative_count", the former for 95 | // regular histograms with integer counts, the latter for float 96 | // histograms. 97 | repeated sint64 negative_delta = 10; // Count delta of each bucket compared to previous one (or to zero for 1st bucket). 98 | repeated double negative_count = 11; // Absolute count of each bucket. 99 | 100 | // Positive buckets for the native histogram. 101 | // Use a no-op span (offset 0, length 0) for a native histogram without any 102 | // observations yet and with a zero_threshold of 0. Otherwise, it would be 103 | // indistinguishable from a classic histogram. 104 | repeated BucketSpan positive_span = 12; 105 | // Use either "positive_delta" or "positive_count", the former for 106 | // regular histograms with integer counts, the latter for float 107 | // histograms. 108 | repeated sint64 positive_delta = 13; // Count delta of each bucket compared to previous one (or to zero for 1st bucket). 109 | repeated double positive_count = 14; // Absolute count of each bucket. 110 | 111 | // Only used for native histograms. These exemplars MUST have a timestamp. 112 | repeated Exemplar exemplars = 16; 113 | } 114 | 115 | // A Bucket of a conventional histogram, each of which is treated as 116 | // an individual counter-like time series by Prometheus. 117 | message Bucket { 118 | optional uint64 cumulative_count = 1; // Cumulative in increasing order. 119 | optional double cumulative_count_float = 4; // Overrides cumulative_count if > 0. 120 | optional double upper_bound = 2; // Inclusive. 121 | optional Exemplar exemplar = 3; 122 | } 123 | 124 | // A BucketSpan defines a number of consecutive buckets in a native 125 | // histogram with their offset. Logically, it would be more 126 | // straightforward to include the bucket counts in the Span. However, 127 | // the protobuf representation is more compact in the way the data is 128 | // structured here (with all the buckets in a single array separate 129 | // from the Spans). 130 | message BucketSpan { 131 | optional sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative). 132 | optional uint32 length = 2; // Length of consecutive buckets. 133 | } 134 | 135 | message Exemplar { 136 | repeated LabelPair label = 1; 137 | optional double value = 2; 138 | optional google.protobuf.Timestamp timestamp = 3; // OpenMetrics-style. 139 | } 140 | 141 | message Metric { 142 | repeated LabelPair label = 1; 143 | optional Gauge gauge = 2; 144 | optional Counter counter = 3; 145 | optional Summary summary = 4; 146 | optional Untyped untyped = 5; 147 | optional Histogram histogram = 7; 148 | optional int64 timestamp_ms = 6; 149 | } 150 | 151 | message MetricFamily { 152 | optional string name = 1; 153 | optional string help = 2; 154 | optional MetricType type = 3; 155 | repeated Metric metric = 4; 156 | optional string unit = 5; 157 | } 158 | --------------------------------------------------------------------------------