From 3a839547a4f5103434bb8317bbf4c1c0b0dfa51c Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 15 Mar 2021 12:37:07 -0700 Subject: [PATCH 1/8] Add min/max fields to HistogramDataPoint --- opentelemetry/proto/metrics/v1/metrics.proto | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 317dc7363..9a0a3c756 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -518,6 +518,27 @@ message DoubleHistogramDataPoint { // (Optional) List of exemplars collected from // measurements that were used to form the data point repeated DoubleExemplar exemplars = 8; + + // Note: the definition used to for min and max fields below is + // based on temporality in a way meant to match the Prometheus + // Summary data type used with quantiles 0 and 1, respectively, when + // paired with cumulative temporality. This uses a fixed width that + // SHOULD be up to 5-10 minutes or for as long as data is available. + + // min is the minimum value over a recent window of time. + // + // The interpretation is based on Metric's temporality. + // - delta temporality: the min value MUST be computed over over [start_time, end_time] + // - cumulative temporality: the min value SHOULD be computed over [now - WIDTH, end_time] + // for WIDTH in the 5-10 minute range. + double min = 13; + + // max is the maximum value over a recent window of time. + // + // The interpretation is based on Metric's temporality. + // - delta temporality: the max value MUST be computed over over [start_time, end_time] + // - cumulative temporality: the max value SHOULD be computed over [now - WIDTH, end_time] + double max = 14; } // SummaryDataPoint is a single data point in a timeseries that describes the From 0a6b972f03043f03052945e52c96150507a9ff62 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 15 Mar 2021 12:38:29 -0700 Subject: [PATCH 2/8] Typos --- opentelemetry/proto/metrics/v1/metrics.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 9a0a3c756..00d3174c0 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -524,6 +524,7 @@ message DoubleHistogramDataPoint { // Summary data type used with quantiles 0 and 1, respectively, when // paired with cumulative temporality. This uses a fixed width that // SHOULD be up to 5-10 minutes or for as long as data is available. + // https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary // min is the minimum value over a recent window of time. // From af32e8bfe0875a97b31424723682d45b1fd47e05 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Thu, 16 Sep 2021 14:46:06 -0700 Subject: [PATCH 3/8] 10 minutes --- opentelemetry/proto/metrics/v1/metrics.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 94997a441..ff4571a3b 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -457,16 +457,17 @@ message HistogramDataPoint { // min is the minimum value over a recent window of time. // // The interpretation is based on Metric's temporality. - // - delta temporality: the min value MUST be computed over over [start_time, end_time] + // - delta temporality: the min value MUST be computed over [start_time, end_time] // - cumulative temporality: the min value SHOULD be computed over [now - WIDTH, end_time] - // for WIDTH in the 10 minute range. + // for WIDTH up to 10 minutes. optional double min = 11; // max is the maximum value over a recent window of time. // // The interpretation is based on Metric's temporality. - // - delta temporality: the max value MUST be computed over over [start_time, end_time] + // - delta temporality: the max value MUST be computed over [start_time, end_time] // - cumulative temporality: the max value SHOULD be computed over [now - WIDTH, end_time] + // for WIDTH up to 10 minutes. optional double max = 12; } From 9a3f85735a4a558e072d439b2028817469313052 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 4 Oct 2021 22:52:07 -0700 Subject: [PATCH 4/8] make min/max optional but strictly refer to (start_time, end_time] --- opentelemetry/proto/metrics/v1/metrics.proto | 27 ++++++-------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index fbb116d3e..a560e1df9 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -476,27 +476,10 @@ message HistogramDataPoint { // for the available flags and their meaning. uint32 flags = 10; - // Note: the definition used to for min and max fields below is - // based on temporality in a way meant to match the Prometheus - // Summary data type used with quantiles 0 and 1, respectively, when - // paired with cumulative temporality. This uses a fixed width that - // SHOULD be up to 10 minutes or for as long as data is available. - // https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary - - // min is the minimum value over a recent window of time. - // - // The interpretation is based on Metric's temporality. - // - delta temporality: the min value MUST be computed over [start_time, end_time] - // - cumulative temporality: the min value SHOULD be computed over [now - WIDTH, end_time] - // for WIDTH up to 10 minutes. + // min is the minimum value over (start_time, end_time]. optional double min = 11; - // max is the maximum value over a recent window of time. - // - // The interpretation is based on Metric's temporality. - // - delta temporality: the max value MUST be computed over [start_time, end_time] - // - cumulative temporality: the max value SHOULD be computed over [now - WIDTH, end_time] - // for WIDTH up to 10 minutes. + // max is the maximum value over (start_time, end_time]. optional double max = 12; } @@ -598,6 +581,12 @@ message ExponentialHistogramDataPoint { // (Optional) List of exemplars collected from // measurements that were used to form the data point repeated Exemplar exemplars = 11; + + // min is the minimum value over (start_time, end_time]. + optional double min = 12; + + // max is the maximum value over (start_time, end_time]. + optional double max = 13; } // SummaryDataPoint is a single data point in a timeseries that describes the From 3149875da72f71f90c30595a9b8e057025b13d84 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Wed, 2 Feb 2022 14:17:20 -0800 Subject: [PATCH 5/8] --experimental_allow_proto3_optional --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d1761f70f..63469c9e4 100755 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ endef gen-all: gen-cpp gen-csharp gen-go gen-java gen-objc gen-openapi gen-php gen-python gen-ruby OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.4.0 -PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD} +PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD} --experimental_allow_proto3_optional PROTO_INCLUDES := -I/usr/include/github.com/gogo/protobuf PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp From 6f6a18c6b9522672bc0cbbe70a3d973f9a08ef2b Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Wed, 2 Feb 2022 14:28:48 -0800 Subject: [PATCH 6/8] remove gogo --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 63469c9e4..51d3815dd 100755 --- a/Makefile +++ b/Makefile @@ -19,7 +19,6 @@ gen-all: gen-cpp gen-csharp gen-go gen-java gen-objc gen-openapi gen-php gen-pyt OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.4.0 PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD} --experimental_allow_proto3_optional -PROTO_INCLUDES := -I/usr/include/github.com/gogo/protobuf PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp PROTO_GEN_CSHARP_DIR ?= $(GENDIR)/csharp @@ -62,7 +61,7 @@ gen-csharp: gen-go: rm -rf ./$(PROTO_GEN_GO_DIR) mkdir -p ./$(PROTO_GEN_GO_DIR) - $(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) $(PROTO_INCLUDES) --gogo_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file))) + $(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) $(PROTO_INCLUDES) --go_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file))) $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/trace/v1/trace_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/metrics/v1/metrics_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/logs/v1/logs_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto From 21792bb8f0fa6fbd1cbdc447db97ee25d309b9c5 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Wed, 2 Mar 2022 10:19:46 -0800 Subject: [PATCH 7/8] Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 634366431..52cc4f383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ Full list of differences found in [this compare](https://github.com/open-telemet ### Changed -* Remove if no changes for this section before release. +* Introduce optional `min` and `max` fields to the Histogram and ExponentialHistogram data points. + [(#279)](https://github.com/open-telemetry/opentelemetry-proto/pull/279) ### Added From 39a83fa23f7f04c620753ddd4a1360f05bc38606 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 1 Apr 2022 08:54:32 -0700 Subject: [PATCH 8/8] revert accidental makefile --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f2ac7d540..54c234d52 100755 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ endef gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-php gen-python gen-ruby OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0 -PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD} --experimental_allow_proto3_optional +PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD} PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp PROTO_GEN_CSHARP_DIR ?= $(GENDIR)/csharp @@ -62,11 +62,7 @@ gen-csharp: gen-go: rm -rf ./$(PROTO_GEN_GO_DIR) mkdir -p ./$(PROTO_GEN_GO_DIR) -<<<<<<< HEAD - $(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) $(PROTO_INCLUDES) --go_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file))) -======= $(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) --go_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file))) ->>>>>>> 108ecf3ff70f83ee8b6eaacfaf6253029433b9fb $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/trace/v1/trace_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/metrics/v1/metrics_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto $(PROTOC) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/logs/v1/logs_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto