From 0c3571c98c238780b553128131b220672956d2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisend=C3=B6rfer?= Date: Thu, 26 Jan 2023 18:35:27 +0100 Subject: [PATCH 01/22] WIP: add profiling signal --- .../profiling/v1/profiling_service.proto | 65 ++++++++++ .../profiling/v1/trace_service_http.yaml | 9 ++ .../proto/profiling/v1/profiling.proto | 120 ++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 opentelemetry/proto/collector/profiling/v1/profiling_service.proto create mode 100644 opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml create mode 100644 opentelemetry/proto/profiling/v1/profiling.proto diff --git a/opentelemetry/proto/collector/profiling/v1/profiling_service.proto b/opentelemetry/proto/collector/profiling/v1/profiling_service.proto new file mode 100644 index 000000000..d074cfac9 --- /dev/null +++ b/opentelemetry/proto/collector/profiling/v1/profiling_service.proto @@ -0,0 +1,65 @@ +// Copyright 2019, OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package opentelemetry.proto.collector.profiling.v1; + +import "opentelemetry/proto/profiling/v1/profiling.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiling.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.collector.profiling.v1"; +option java_outer_classname = "ProfilingServiceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/collector/profiling/v1"; + +// Service that can be used to push profiles between one Application instrumented with +// OpenTelemetry and a collector, or between a collector and a central collector (in this +// case spans are sent/received to/from multiple Applications). +service ProfilingService { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + rpc Export(ExportProfilingServiceRequest) returns (ExportProfilingServiceResponse) {} +} + +message ExportProfilingServiceRequest { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain one + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive + // data from multiple origins typically batch the data before forwarding further and + // in that case this array will contain multiple elements. + repeated opentelemetry.proto.profiling.v1.ResourceProfiles resource_profiles = 1; +} + +message ExportProfilingServiceResponse { + // The details of a partially successful export request. + // + // If the request is only partially accepted + // (i.e. when the server accepts only parts of the data and rejects the rest) + // the server MUST initialize the `partial_success` field and MUST + // set the `rejected_` with the number of items it rejected. + // + // Servers MAY also make use of the `partial_success` field to convey + // warnings/suggestions to senders even when the request was fully accepted. + // In such cases, the `rejected_` MUST have a value of `0` and + // the `error_message` MUST be non-empty. + // + // A `partial_success` message with an empty value (rejected_ = 0 and + // `error_message` = "") is equivalent to it not being set/present. Senders + // SHOULD interpret it the same way as in the full success case. + ExportProfilingPartialSuccess partial_success = 1; +} + +message ExportProfilingPartialSuccess { +} diff --git a/opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml b/opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml new file mode 100644 index 000000000..287473597 --- /dev/null +++ b/opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml @@ -0,0 +1,9 @@ +# This is an API configuration to generate an HTTP/JSON -> gRPC gateway for the +# OpenTelemetry service using github.com/grpc-ecosystem/grpc-gateway. +type: google.api.Service +config_version: 3 +http: + rules: + - selector: opentelemetry.proto.collector.trace.v1.TraceService.Export + post: /v1/trace + body: "*" \ No newline at end of file diff --git a/opentelemetry/proto/profiling/v1/profiling.proto b/opentelemetry/proto/profiling/v1/profiling.proto new file mode 100644 index 000000000..ed665d4bf --- /dev/null +++ b/opentelemetry/proto/profiling/v1/profiling.proto @@ -0,0 +1,120 @@ +// Copyright 2019, OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package opentelemetry.proto.profiling.v1; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Profiling.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.profiling.v1"; +option java_outer_classname = "ProfilingProto"; +option go_package = "go.opentelemetry.io/proto/otlp/profiling/v1"; + + +// A collection of ScopeProfiles from a Resource. +message ResourceProfiles { + reserved 1000; + + // The resource for the profiles in this message. + // If this field is not set then no resource info is known. + opentelemetry.proto.resource.v1.Resource resource = 1; + + // A list of ScopeProfiles that originate from a resource. + repeated ScopeProfiles scope_profiles = 2; + + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_profiles" field which have their own schema_url field. + string schema_url = 3; +} + +// A collection of Profiles produced by an InstrumentationScope. +message ScopeProfiles { + // The instrumentation scope information for the profiles in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + + // A list of Profiles that originate from an instrumentation scope. + repeated Profile profiles = 2; + + // This schema_url applies to all profiles and profile events in the "profiles" field. + string schema_url = 3; +} + +// A Profile represents a single profile. +message Profile { + // A unique identifier for a profile. The ID is a 16-byte array. An ID with + // all zeroes is considered invalid. + // + // This field is required. + bytes profile_id = 1; + + // start_time_unix_nano is the start time of the profile. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + fixed64 start_time_unix_nano = 2; + + // end_time_unix_nano is the end time of the span. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + fixed64 end_time_unix_nano = 3; + + // attributes is a collection of key/value pairs. Note, global attributes + // like server name can be set using the resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + // + // The OpenTelemetry API specification further restricts the allowed value types: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; + + // dropped_attributes_count is the number of attributes that were discarded. Attributes + // can be discarded because their keys are too long or because there are too many + // attributes. If this value is 0, then no attributes were dropped. + uint32 dropped_attributes_count = 5; + + reserved 6 to 15; + + // PPROF contains a pprof profile. + message PPROF { + // payload contains a pprof file. + bytes payload = 1; + } + + // JFR contains a JFR file. + message JFR { + // payload contains a JFR file. + bytes payload = 1; + } + + // OPROF contains a batch of oprof events (details TBD) + message OPROF {} + + oneof profile_kind { + PPROF pprof = 16; + JFR jfr = 17; + OPROF oprof = 18; + } +} From 912021b15b8d1a2c305df0f20977a9ebadafb518 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Wed, 14 Jun 2023 14:13:22 -0700 Subject: [PATCH 02/22] snapshot --- .../v1/profiles_service.proto} | 26 +++++++++---------- .../v1/profiles_service_http.yaml} | 6 ++--- .../v1/profiles.proto} | 10 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) rename opentelemetry/proto/collector/{profiling/v1/profiling_service.proto => profiles/v1/profiles_service.proto} (76%) rename opentelemetry/proto/collector/{profiling/v1/trace_service_http.yaml => profiles/v1/profiles_service_http.yaml} (65%) rename opentelemetry/proto/{profiling/v1/profiling.proto => profiles/v1/profiles.proto} (93%) diff --git a/opentelemetry/proto/collector/profiling/v1/profiling_service.proto b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto similarity index 76% rename from opentelemetry/proto/collector/profiling/v1/profiling_service.proto rename to opentelemetry/proto/collector/profiles/v1/profiles_service.proto index d074cfac9..538d6f47b 100644 --- a/opentelemetry/proto/collector/profiling/v1/profiling_service.proto +++ b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto @@ -14,35 +14,35 @@ syntax = "proto3"; -package opentelemetry.proto.collector.profiling.v1; +package opentelemetry.proto.collector.profiles.v1; -import "opentelemetry/proto/profiling/v1/profiling.proto"; +import "opentelemetry/proto/profiles/v1/profiles.proto"; -option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiling.V1"; +option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1"; option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.collector.profiling.v1"; -option java_outer_classname = "ProfilingServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/profiling/v1"; +option java_package = "io.opentelemetry.proto.collector.profiles.v1"; +option java_outer_classname = "ProfilesServiceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1"; // Service that can be used to push profiles between one Application instrumented with // OpenTelemetry and a collector, or between a collector and a central collector (in this // case spans are sent/received to/from multiple Applications). -service ProfilingService { +service ProfilesService { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. - rpc Export(ExportProfilingServiceRequest) returns (ExportProfilingServiceResponse) {} + rpc Export(ExportProfilesServiceRequest) returns (ExportProfilesServiceResponse) {} } -message ExportProfilingServiceRequest { +message ExportProfilesServiceRequest { // An array of ResourceProfiles. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and // in that case this array will contain multiple elements. - repeated opentelemetry.proto.profiling.v1.ResourceProfiles resource_profiles = 1; + repeated opentelemetry.proto.profiles.v1.ResourceProfiles resource_profiles = 1; } -message ExportProfilingServiceResponse { +message ExportProfilesServiceResponse { // The details of a partially successful export request. // // If the request is only partially accepted @@ -58,8 +58,8 @@ message ExportProfilingServiceResponse { // A `partial_success` message with an empty value (rejected_ = 0 and // `error_message` = "") is equivalent to it not being set/present. Senders // SHOULD interpret it the same way as in the full success case. - ExportProfilingPartialSuccess partial_success = 1; + ExportProfilesPartialSuccess partial_success = 1; } -message ExportProfilingPartialSuccess { +message ExportProfilesPartialSuccess { } diff --git a/opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml b/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml similarity index 65% rename from opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml rename to opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml index 287473597..64a314f1c 100644 --- a/opentelemetry/proto/collector/profiling/v1/trace_service_http.yaml +++ b/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml @@ -4,6 +4,6 @@ type: google.api.Service config_version: 3 http: rules: - - selector: opentelemetry.proto.collector.trace.v1.TraceService.Export - post: /v1/trace - body: "*" \ No newline at end of file + - selector: opentelemetry.proto.collector.profiles.v1.TraceService.Export + post: /v1/profiles + body: "*" diff --git a/opentelemetry/proto/profiling/v1/profiling.proto b/opentelemetry/proto/profiles/v1/profiles.proto similarity index 93% rename from opentelemetry/proto/profiling/v1/profiling.proto rename to opentelemetry/proto/profiles/v1/profiles.proto index ed665d4bf..c1afc8d20 100644 --- a/opentelemetry/proto/profiling/v1/profiling.proto +++ b/opentelemetry/proto/profiles/v1/profiles.proto @@ -14,16 +14,16 @@ syntax = "proto3"; -package opentelemetry.proto.profiling.v1; +package opentelemetry.proto.profiles.v1; import "opentelemetry/proto/common/v1/common.proto"; import "opentelemetry/proto/resource/v1/resource.proto"; -option csharp_namespace = "OpenTelemetry.Proto.Profiling.V1"; +option csharp_namespace = "OpenTelemetry.Proto.Profiles.V1"; option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.profiling.v1"; -option java_outer_classname = "ProfilingProto"; -option go_package = "go.opentelemetry.io/proto/otlp/profiling/v1"; +option java_package = "io.opentelemetry.proto.profiles.v1"; +option java_outer_classname = "ProfilesProto"; +option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1"; // A collection of ScopeProfiles from a Resource. From 72ddb55bbab2a048d2fda0664124eb488fa68476 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Wed, 14 Jun 2023 14:14:52 -0700 Subject: [PATCH 03/22] snapshot --- .../proto/collector/profiles/v1/profiles_service_http.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml b/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml index 64a314f1c..eed628920 100644 --- a/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml +++ b/opentelemetry/proto/collector/profiles/v1/profiles_service_http.yaml @@ -4,6 +4,6 @@ type: google.api.Service config_version: 3 http: rules: - - selector: opentelemetry.proto.collector.profiles.v1.TraceService.Export + - selector: opentelemetry.proto.collector.profiles.v1.ProfilesService.Export post: /v1/profiles body: "*" From 05ecb3c0e54b534b606189f5d2371bbd309d3cf7 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Wed, 14 Jun 2023 15:16:52 -0700 Subject: [PATCH 04/22] empty profile proto --- .../profiles/v1/profiles_service.proto | 14 +++++ .../proto/profiles/v1/profiles.proto | 55 +++++++++++++------ 2 files changed, 51 insertions(+), 18 deletions(-) diff --git a/opentelemetry/proto/collector/profiles/v1/profiles_service.proto b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto index 538d6f47b..aaaefdef7 100644 --- a/opentelemetry/proto/collector/profiles/v1/profiles_service.proto +++ b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto @@ -62,4 +62,18 @@ message ExportProfilesServiceResponse { } message ExportProfilesPartialSuccess { + // The number of rejected profile records. + // + // A `rejected_` field holding a `0` value indicates that the + // request was fully accepted. + int64 rejected_profile_records = 1; + + // A developer-facing human-readable message in English. It should be used + // either to explain why the server rejected parts of the data during a partial + // success or to convey warnings/suggestions during a full success. The message + // should offer guidance on how users can address such issues. + // + // error_message is an optional field. An error_message with an empty value + // is equivalent to it not being set. + string error_message = 2; } diff --git a/opentelemetry/proto/profiles/v1/profiles.proto b/opentelemetry/proto/profiles/v1/profiles.proto index c1afc8d20..08dfdffc3 100644 --- a/opentelemetry/proto/profiles/v1/profiles.proto +++ b/opentelemetry/proto/profiles/v1/profiles.proto @@ -25,6 +25,25 @@ option java_package = "io.opentelemetry.proto.profiles.v1"; option java_outer_classname = "ProfilesProto"; option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1"; +// ProfilesData represents the profiles data that can be stored in a persistent storage, +// OR can be embedded by other protocols that transfer OTLP profiles data but do not +// implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +message ProfilesData { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + repeated ResourceProfiles resource_profiles = 1; +} + // A collection of ScopeProfiles from a Resource. message ResourceProfiles { @@ -95,26 +114,26 @@ message Profile { // attributes. If this value is 0, then no attributes were dropped. uint32 dropped_attributes_count = 5; - reserved 6 to 15; + // reserved 6 to 15; - // PPROF contains a pprof profile. - message PPROF { - // payload contains a pprof file. - bytes payload = 1; - } + // // PPROF contains a pprof profile. + // message PPROF { + // // payload contains a pprof file. + // bytes payload = 1; + // } - // JFR contains a JFR file. - message JFR { - // payload contains a JFR file. - bytes payload = 1; - } + // // JFR contains a JFR file. + // message JFR { + // // payload contains a JFR file. + // bytes payload = 1; + // } - // OPROF contains a batch of oprof events (details TBD) - message OPROF {} + // // OPROF contains a batch of oprof events (details TBD) + // message OPROF {} - oneof profile_kind { - PPROF pprof = 16; - JFR jfr = 17; - OPROF oprof = 18; - } + // oneof profile_kind { + // PPROF pprof = 16; + // JFR jfr = 17; + // OPROF oprof = 18; + // } } From 1ebf7eb59ed5dd82ed5a1144c5fdaac0013ba879 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Tue, 20 Jun 2023 11:08:47 -0700 Subject: [PATCH 05/22] improved naming (profile_records came from log_records) --- .../proto/collector/profiles/v1/profiles_service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry/proto/collector/profiles/v1/profiles_service.proto b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto index aaaefdef7..bfbd0aa29 100644 --- a/opentelemetry/proto/collector/profiles/v1/profiles_service.proto +++ b/opentelemetry/proto/collector/profiles/v1/profiles_service.proto @@ -62,11 +62,11 @@ message ExportProfilesServiceResponse { } message ExportProfilesPartialSuccess { - // The number of rejected profile records. + // The number of rejected profiles. // // A `rejected_` field holding a `0` value indicates that the // request was fully accepted. - int64 rejected_profile_records = 1; + int64 rejected_profiles = 1; // A developer-facing human-readable message in English. It should be used // either to explain why the server rejected parts of the data during a partial From fb6e2152bc0ff20943686d4ff27110cb4848d4c0 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Mon, 26 Jun 2023 22:49:17 -0700 Subject: [PATCH 06/22] adds alternative variations of profiles proto --- .../denormalized/denormalized.proto | 131 +++++++++++ .../alternatives/normalized/normalized.proto | 142 +++++++++++ .../v1/alternatives/pprof/pprof.proto | 221 ++++++++++++++++++ .../proto/profiles/v1/profiles.proto | 38 ++- 4 files changed, 510 insertions(+), 22 deletions(-) create mode 100644 opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto create mode 100644 opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto create mode 100644 opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto diff --git a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto new file mode 100644 index 000000000..605c913e3 --- /dev/null +++ b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto @@ -0,0 +1,131 @@ +syntax = "proto3"; + +package opentelemetry.proto.profiles.v1.alternatives.denormalized; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1/alternatives/denormalized"; + + +// A pointer from a profile to a trace span. +message Link { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + bytes trace_id = 1; + // A unique identifier for the linked span. The ID is an 8-byte array. + bytes span_id = 2; +} + +message Sample { + repeated Location locations = 1; + repeated Link links = 2; + repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; + uint32 dropped_attributes_count = 4; + + // this one is repeated because there can be multiple profile kinds in one profile. Typical example is memory profiles in go that contain: + // * alloc_objects + // * alloc_bytes + // * inuse_objects + // * inuse_bytes + repeated fixed64 values = 5; + + // optional + fixed64 timestamp_unix_nano = 6; +} + +// borrowed from metrics proto +enum AggregationTemporality { + AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; + AGGREGATION_TEMPORALITY_DELTA = 1; + AGGREGATION_TEMPORALITY_CUMULATIVE = 2; +} + +message SampleType { + AggregationTemporality aggregation_temporality = 1; + uint64 sample_size = 2; + + // CPU / memory /etc + string type = 3; + string unit = 4; +} + +message Profile { + repeated SampleType sample_types = 1; + repeated Sample samples = 2; +} + +// borrowed from pprof proto +message Mapping { + // Address at which the binary (or DLL) is loaded into memory. + uint64 memory_start = 1; + // The limit of the address range occupied by this mapping. + uint64 memory_limit = 2; + // Offset in the binary that corresponds to the first mapped address. + uint64 file_offset = 3; + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + string filename = 4; + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + string build_id = 5; + + // The following fields indicate the resolution of symbolic info. + bool has_functions = 6; + bool has_filenames = 7; + bool has_line_numbers = 8; + bool has_inline_frames = 9; +} + +// borrowed from pprof proto +// Describes function and line table debug information. +message Location { + // profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + Mapping mapping = 1; + + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + uint64 address = 2; + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + repeated Line line = 3; + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + bool is_folded = 4; +} + +// borrowed from pprof proto +message Line { + // Function for this line. + Function function = 1; + // Line number in source code. + int64 line = 2; +} + +// borrowed from pprof proto +message Function { + // Name of the function, in human-readable form if available. + string name = 1; + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + string system_name = 2; + // Source file containing the function. + string filename = 3; + // Line number in source file. + string start_line = 4; +} diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto new file mode 100644 index 000000000..7fd156f0e --- /dev/null +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -0,0 +1,142 @@ +syntax = "proto3"; + +package opentelemetry.proto.profiles.v1.alternatives.normalized; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1/normalized"; + + +// A pointer from a profile to a trace span. +message Link { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + bytes trace_id = 1; + // A unique identifier for the linked span. The ID is an 8-byte array. + bytes span_id = 2; +} + +// we link to attribute sets because +message AttributeSet { + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; + uint32 dropped_attributes_count = 2; +} + +message Sample { + repeated uint64 location_ids = 1; + repeated uint64 link_ids = 2; + repeated uint64 attribute_set_ids = 3; + + // this one is repeated because there can be multiple profile kinds in one profile. Typical example is memory profiles in go that contain: + // * alloc_objects + // * alloc_bytes + // * inuse_objects + // * inuse_bytes + repeated fixed64 values = 4; + + // optional + fixed64 timestamp_unix_nano = 5; +} + +// borrowed from metrics proto +enum AggregationTemporality { + AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; + AGGREGATION_TEMPORALITY_DELTA = 1; + AGGREGATION_TEMPORALITY_CUMULATIVE = 2; +} + +message SampleType { + AggregationTemporality aggregation_temporality = 1; + uint64 sample_size = 2; + + // CPU / memory /etc + int64 type = 3; // Index into string table. + int64 unit = 4; // Index into string table. +} + +message Profile { + repeated SampleType sample_types = 1; + repeated Sample samples = 2; + repeated Mapping mappings = 3; + repeated Location locations = 4; + repeated Function functions = 5; + repeated Link links = 6; + repeated AttributeSet attribute_sets = 7; + repeated string string_table = 8; +} + + +// borrowed from pprof proto +message Mapping { + // Address at which the binary (or DLL) is loaded into memory. + uint64 memory_start = 1; + // The limit of the address range occupied by this mapping. + uint64 memory_limit = 2; + // Offset in the binary that corresponds to the first mapped address. + uint64 file_offset = 3; + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + int64 filename = 4; // Index into string table + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + int64 build_id = 5; // Index into string table + + // The following fields indicate the resolution of symbolic info. + bool has_functions = 6; + bool has_filenames = 7; + bool has_line_numbers = 8; + bool has_inline_frames = 9; +} + +// borrowed from pprof proto +// Describes function and line table debug information. +message Location { + // The id of the corresponding profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + uint64 mapping_id = 1; + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + uint64 address = 2; + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + repeated Line line = 3; + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + bool is_folded = 4; +} + +// borrowed from pprof proto +message Line { + // The id of the corresponding profile.Function for this line. + uint64 function_id = 1; + // Line number in source code. + int64 line = 2; +} + +// borrowed from pprof proto +message Function { + // Name of the function, in human-readable form if available. + int64 name = 1; // Index into string table + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + int64 system_name = 2; // Index into string table + // Source file containing the function. + int64 filename = 3; // Index into string table + // Line number in source file. + int64 start_line = 4; +} diff --git a/opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto b/opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto new file mode 100644 index 000000000..ec55bc207 --- /dev/null +++ b/opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto @@ -0,0 +1,221 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Profile is a common stacktrace profile format. +// +// Measurements represented with this format should follow the +// following conventions: +// +// - Consumers should treat unset optional fields as if they had been +// set with their default value. +// +// - When possible, measurements should be stored in "unsampled" form +// that is most useful to humans. There should be enough +// information present to determine the original sampled values. +// +// - On-disk, the serialized proto must be gzip-compressed. +// +// - The profile is represented as a set of samples, where each sample +// references a sequence of locations, and where each location belongs +// to a mapping. +// - There is a N->1 relationship from sample.location_id entries to +// locations. For every sample.location_id entry there must be a +// unique Location with that id. +// - There is an optional N->1 relationship from locations to +// mappings. For every nonzero Location.mapping_id there must be a +// unique Mapping with that id. + +syntax = "proto3"; + +package opentelemetry.proto.profiles.v1.alternatives.pprof; + +option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1/alternatives/pprof"; + +message Profile { + // A description of the samples associated with each Sample.value. + // For a cpu profile this might be: + // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]] + // For a heap profile, this might be: + // [["allocations","count"], ["space","bytes"]], + // If one of the values represents the number of events represented + // by the sample, by convention it should be at index 0 and use + // sample_type.unit == "count". + repeated ValueType sample_type = 1; + // The set of samples recorded in this profile. + repeated Sample sample = 2; + // Mapping from address ranges to the image/binary/library mapped + // into that address range. mapping[0] will be the main binary. + repeated Mapping mapping = 3; + // Locations referenced by samples. + repeated Location location = 4; + // Functions referenced by locations. + repeated Function function = 5; + // A common table for strings referenced by various messages. + // string_table[0] must always be "". + repeated string string_table = 6; + // frames with Function.function_name fully matching the following + // regexp will be dropped from the samples, along with their successors. + int64 drop_frames = 7; // Index into string table. + // frames with Function.function_name fully matching the following + // regexp will be kept, even if it matches drop_frames. + int64 keep_frames = 8; // Index into string table. + + // The following fields are informational, do not affect + // interpretation of results. + + // Time of collection (UTC) represented as nanoseconds past the epoch. + int64 time_nanos = 9; + // Duration of the profile, if a duration makes sense. + int64 duration_nanos = 10; + // The kind of events between sampled occurrences. + // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] + ValueType period_type = 11; + // The number of events between sampled occurrences. + int64 period = 12; + // Free-form text associated with the profile. The text is displayed as is + // to the user by the tools that read profiles (e.g. by pprof). This field + // should not be used to store any machine-readable information, it is only + // for human-friendly content. The profile must stay functional if this field + // is cleaned. + repeated int64 comment = 13; // Indices into string table. + // Index into the string table of the type of the preferred sample + // value. If unset, clients should default to the last sample value. + int64 default_sample_type = 14; +} + +// ValueType describes the semantics and measurement units of a value. +message ValueType { + int64 type = 1; // Index into string table. + int64 unit = 2; // Index into string table. +} + +// Each Sample records values encountered in some program +// context. The program context is typically a stack trace, perhaps +// augmented with auxiliary information like the thread-id, some +// indicator of a higher level request being handled etc. +message Sample { + // The ids recorded here correspond to a Profile.location.id. + // The leaf is at location_id[0]. + repeated uint64 location_id = 1; + // The type and unit of each value is defined by the corresponding + // entry in Profile.sample_type. All samples must have the same + // number of values, the same as the length of Profile.sample_type. + // When aggregating multiple samples into a single sample, the + // result has a list of values that is the element-wise sum of the + // lists of the originals. + repeated int64 value = 2; + // label includes additional context for this sample. It can include + // things like a thread id, allocation size, etc. + // + // NOTE: While possible, having multiple values for the same label key is + // strongly discouraged and should never be used. Most tools (e.g. pprof) do + // not have good (or any) support for multi-value labels. And an even more + // discouraged case is having a string label and a numeric label of the same + // name on a sample. Again, possible to express, but should not be used. + repeated Label label = 3; +} + +message Label { + int64 key = 1; // Index into string table + + // At most one of the following must be present + int64 str = 2; // Index into string table + int64 num = 3; + + // Should only be present when num is present. + // Specifies the units of num. + // Use arbitrary string (for example, "requests") as a custom count unit. + // If no unit is specified, consumer may apply heuristic to deduce the unit. + // Consumers may also interpret units like "bytes" and "kilobytes" as memory + // units and units like "seconds" and "nanoseconds" as time units, + // and apply appropriate unit conversions to these. + int64 num_unit = 4; // Index into string table +} + +message Mapping { + // Unique nonzero id for the mapping. + uint64 id = 1; + // Address at which the binary (or DLL) is loaded into memory. + uint64 memory_start = 2; + // The limit of the address range occupied by this mapping. + uint64 memory_limit = 3; + // Offset in the binary that corresponds to the first mapped address. + uint64 file_offset = 4; + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + int64 filename = 5; // Index into string table + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + int64 build_id = 6; // Index into string table + + // The following fields indicate the resolution of symbolic info. + bool has_functions = 7; + bool has_filenames = 8; + bool has_line_numbers = 9; + bool has_inline_frames = 10; +} + +// Describes function and line table debug information. +message Location { + // Unique nonzero id for the location. A profile could use + // instruction addresses or any integer sequence as ids. + uint64 id = 1; + // The id of the corresponding profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + uint64 mapping_id = 2; + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + uint64 address = 3; + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + repeated Line line = 4; + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + bool is_folded = 5; +} + +message Line { + // The id of the corresponding profile.Function for this line. + uint64 function_id = 1; + // Line number in source code. + int64 line = 2; +} + +message Function { + // Unique nonzero id for the function. + uint64 id = 1; + // Name of the function, in human-readable form if available. + int64 name = 2; // Index into string table + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + int64 system_name = 3; // Index into string table + // Source file containing the function. + int64 filename = 4; // Index into string table + // Line number in source file. + int64 start_line = 5; +} diff --git a/opentelemetry/proto/profiles/v1/profiles.proto b/opentelemetry/proto/profiles/v1/profiles.proto index 08dfdffc3..1adae179f 100644 --- a/opentelemetry/proto/profiles/v1/profiles.proto +++ b/opentelemetry/proto/profiles/v1/profiles.proto @@ -19,6 +19,12 @@ package opentelemetry.proto.profiles.v1; import "opentelemetry/proto/common/v1/common.proto"; import "opentelemetry/proto/resource/v1/resource.proto"; +// TODO(@petethepig): idea here is that we will eventually get rid of these +// and have just version in this (profiles.proto) file +import "opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto"; +import "opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto"; +import "opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto"; + option csharp_namespace = "OpenTelemetry.Proto.Profiles.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.profiles.v1"; @@ -89,7 +95,7 @@ message Profile { // This field is semantically required and it is expected that end_time >= start_time. fixed64 start_time_unix_nano = 2; - // end_time_unix_nano is the end time of the span. + // end_time_unix_nano is the end time of the profile. // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. // // This field is semantically required and it is expected that end_time >= start_time. @@ -114,26 +120,14 @@ message Profile { // attributes. If this value is 0, then no attributes were dropped. uint32 dropped_attributes_count = 5; - // reserved 6 to 15; - - // // PPROF contains a pprof profile. - // message PPROF { - // // payload contains a pprof file. - // bytes payload = 1; - // } - - // // JFR contains a JFR file. - // message JFR { - // // payload contains a JFR file. - // bytes payload = 1; - // } - - // // OPROF contains a batch of oprof events (details TBD) - // message OPROF {} + // This can be original pprof or jfr encoded profile. + bytes original_payload = 7; - // oneof profile_kind { - // PPROF pprof = 16; - // JFR jfr = 17; - // OPROF oprof = 18; - // } + // this is temporary until we pick one of these formats + // fields from one of these will be embedded in Profile message: + oneof alternative_profile { + opentelemetry.proto.profiles.v1.alternatives.pprof.Profile pprof = 8; + opentelemetry.proto.profiles.v1.alternatives.normalized.Profile normalized = 9; + opentelemetry.proto.profiles.v1.alternatives.denormalized.Profile denormalized = 10; + } } From 25dce2ebcc39508e4e29b9eb5e92e606f3d142b7 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Mon, 26 Jun 2023 23:03:56 -0700 Subject: [PATCH 07/22] fix --- .../proto/profiles/v1/alternatives/normalized/normalized.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index 7fd156f0e..ab69254e2 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -17,7 +17,6 @@ message Link { bytes span_id = 2; } -// we link to attribute sets because message AttributeSet { repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; uint32 dropped_attributes_count = 2; From e041293e5ec69b64df8dcfe0a154b6dc6146bd2f Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:10:55 -0400 Subject: [PATCH 08/22] Update CHANGELOG.md for 1.0.0 release (#493) --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bca0bb7ae..8ac7a6eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,18 @@ ## Unreleased -Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...main). +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v1.0.0...main). + +## 1.0.0 - 2023-07-03 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...v1.0.0). + +### Maturity + +* Add note about the possibility to have unstable components after 1.0.0 + [#489](https://github.com/open-telemetry/opentelemetry-proto/pull/489) +* Add maturity JSON entry per package + [#490](https://github.com/open-telemetry/opentelemetry-proto/pull/490) ## 0.20.0 - 2023-06-06 From 169500224961e4b3f8dacb81d8923b1388c45c30 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Wed, 5 Jul 2023 11:36:25 -0700 Subject: [PATCH 09/22] incorporating the feedback from the last meeting --- .../alternatives/normalized/normalized.proto | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index ab69254e2..2746db3ae 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -17,41 +17,44 @@ message Link { bytes span_id = 2; } +// AttributeSet represents a set of attributes. It is referenced from Samples +// and not embedded because it is common for multiple samples to have the same +// set of attributes message AttributeSet { repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; uint32 dropped_attributes_count = 2; } message Sample { - repeated uint64 location_ids = 1; - repeated uint64 link_ids = 2; - repeated uint64 attribute_set_ids = 3; + repeated uint64 location_indices = 1; + repeated uint64 link_indices = 2; + repeated uint64 attribute_set_indices = 3; // this one is repeated because there can be multiple profile kinds in one profile. Typical example is memory profiles in go that contain: // * alloc_objects // * alloc_bytes // * inuse_objects // * inuse_bytes - repeated fixed64 values = 4; + repeated int64 values = 4; // optional fixed64 timestamp_unix_nano = 5; } -// borrowed from metrics proto -enum AggregationTemporality { - AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; - AGGREGATION_TEMPORALITY_DELTA = 1; - AGGREGATION_TEMPORALITY_CUMULATIVE = 2; -} - message SampleType { + // borrowed from metrics proto + enum AggregationTemporality { + AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; + AGGREGATION_TEMPORALITY_DELTA = 1; + AGGREGATION_TEMPORALITY_CUMULATIVE = 2; + } + AggregationTemporality aggregation_temporality = 1; uint64 sample_size = 2; // CPU / memory /etc - int64 type = 3; // Index into string table. - int64 unit = 4; // Index into string table. + uint32 type_index = 3; // Index into string table. + uint32 unit_index = 4; // Index into string table. } message Profile { @@ -62,6 +65,8 @@ message Profile { repeated Function functions = 5; repeated Link links = 6; repeated AttributeSet attribute_sets = 7; + + // 0-th element must be an empty string ("") repeated string string_table = 8; } @@ -77,17 +82,20 @@ message Mapping { // The object this entry is loaded from. This can be a filename on // disk for the main binary and shared libraries, or virtual // abstractions like "[vdso]". - int64 filename = 4; // Index into string table + uint32 filename_index = 4; // Index into string table // A string that uniquely identifies a particular program version // with high probability. E.g., for binaries generated by GNU tools, // it could be the contents of the .note.gnu.build-id field. - int64 build_id = 5; // Index into string table + uint32 build_id_index = 5; // Index into string table + + enum SymbolicInfo { + SYMBOLIC_INFO_UNSPECIFIED = 0; + SYMBOLIC_INFO_FULL = 1; + SYMBOLIC_INFO_FUNCTIONS_ONLY = 2; + SYMBOLIC_INFO_NO_INLINE_FRAMES = 3; + } - // The following fields indicate the resolution of symbolic info. - bool has_functions = 6; - bool has_filenames = 7; - bool has_line_numbers = 8; - bool has_inline_frames = 9; + SymbolicInfo symbolic_info = 6; } // borrowed from pprof proto @@ -96,7 +104,7 @@ message Location { // The id of the corresponding profile.Mapping for this location. // It can be unset if the mapping is unknown or not applicable for // this profile type. - uint64 mapping_id = 1; + uint32 mapping_index = 1; // The instruction address for this location, if available. It // should be within [Mapping.memory_start...Mapping.memory_limit] // for the corresponding mapping. A non-leaf address may be in the @@ -122,20 +130,20 @@ message Location { // borrowed from pprof proto message Line { // The id of the corresponding profile.Function for this line. - uint64 function_id = 1; + uint32 function_index = 1; // Line number in source code. - int64 line = 2; + uint32 line = 2; } // borrowed from pprof proto message Function { // Name of the function, in human-readable form if available. - int64 name = 1; // Index into string table + uint32 name_index = 1; // Index into string table // Name of the function, as identified by the system. // For instance, it can be a C++ mangled name. - int64 system_name = 2; // Index into string table + uint32 system_name_index = 2; // Index into string table // Source file containing the function. - int64 filename = 3; // Index into string table + uint32 filename_index = 3; // Index into string table // Line number in source file. - int64 start_line = 4; + uint32 start_line = 4; } From 7faab0e9b4298ccdd985b06550ee308457a0f7a3 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 09:05:35 -0700 Subject: [PATCH 10/22] copyright year fix --- opentelemetry/proto/profiles/v1/profiles.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/profiles/v1/profiles.proto b/opentelemetry/proto/profiles/v1/profiles.proto index 1adae179f..b2d4b83a3 100644 --- a/opentelemetry/proto/profiles/v1/profiles.proto +++ b/opentelemetry/proto/profiles/v1/profiles.proto @@ -1,4 +1,4 @@ -// Copyright 2019, OpenTelemetry Authors +// Copyright 2023, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From a87c23641d10a8d255558c22448428d700e5cb6c Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 09:06:12 -0700 Subject: [PATCH 11/22] uint64 -> uint32 for indices --- .../profiles/v1/alternatives/normalized/normalized.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index 2746db3ae..e40f3f961 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -26,9 +26,9 @@ message AttributeSet { } message Sample { - repeated uint64 location_indices = 1; - repeated uint64 link_indices = 2; - repeated uint64 attribute_set_indices = 3; + repeated uint32 location_indices = 1; + repeated uint32 link_indices = 2; + repeated uint32 attribute_set_indices = 3; // this one is repeated because there can be multiple profile kinds in one profile. Typical example is memory profiles in go that contain: // * alloc_objects From 980fc893bf5c0ebfe8bc9e77af2b36971f6ba581 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 09:08:08 -0700 Subject: [PATCH 12/22] adds attributes to Location and Mapping --- .../profiles/v1/alternatives/normalized/normalized.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index e40f3f961..675cff548 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -96,6 +96,9 @@ message Mapping { } SymbolicInfo symbolic_info = 6; + + // TODO(@petethepig): I wonder if we need something a little more specialized here + repeated uint32 attribute_set_indices = 7; } // borrowed from pprof proto @@ -125,6 +128,9 @@ message Location { // symbols. This field must be recomputed when the symbolization state of the // profile changes. bool is_folded = 4; + + // TODO(@petethepig): I wonder if we need something a little more specialized here + repeated uint32 attribute_set_indices = 5; } // borrowed from pprof proto From 6b98f0ca3b2205eed6ea5459b01ecd3ac5de68ac Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 20:38:42 -0700 Subject: [PATCH 13/22] move stacktraces to a separate message --- .../v1/alternatives/denormalized/denormalized.proto | 6 +++++- .../profiles/v1/alternatives/normalized/normalized.proto | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto index 605c913e3..b2d10abad 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto @@ -17,8 +17,12 @@ message Link { bytes span_id = 2; } -message Sample { +message StackTrace { repeated Location locations = 1; +} + +message Sample { + repeated StackTrace stacktrace = 1; repeated Link links = 2; repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; uint32 dropped_attributes_count = 4; diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index 675cff548..a840a092e 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -25,8 +25,12 @@ message AttributeSet { uint32 dropped_attributes_count = 2; } -message Sample { +message StackTrace { repeated uint32 location_indices = 1; +} + +message Sample { + StackTrace stacktrace = 1; repeated uint32 link_indices = 2; repeated uint32 attribute_set_indices = 3; From efc572cff93ef943d7f949e7fd361d8d10da4b01 Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 22:41:48 -0700 Subject: [PATCH 14/22] follow up to prev commit --- .../denormalized/denormalized.proto | 6 +++--- .../alternatives/normalized/normalized.proto | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto index b2d10abad..471aca88d 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto @@ -17,12 +17,12 @@ message Link { bytes span_id = 2; } -message StackTrace { +message Stacktrace { repeated Location locations = 1; } message Sample { - repeated StackTrace stacktrace = 1; + Stacktrace stacktrace = 1; repeated Link links = 2; repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; uint32 dropped_attributes_count = 4; @@ -131,5 +131,5 @@ message Function { // Source file containing the function. string filename = 3; // Line number in source file. - string start_line = 4; + uint32 start_line = 4; } diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index a840a092e..6688997b6 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -25,12 +25,12 @@ message AttributeSet { uint32 dropped_attributes_count = 2; } -message StackTrace { +message Stacktrace { repeated uint32 location_indices = 1; } message Sample { - StackTrace stacktrace = 1; + uint32 stacktrace_index = 1; repeated uint32 link_indices = 2; repeated uint32 attribute_set_indices = 3; @@ -63,15 +63,16 @@ message SampleType { message Profile { repeated SampleType sample_types = 1; - repeated Sample samples = 2; - repeated Mapping mappings = 3; - repeated Location locations = 4; - repeated Function functions = 5; - repeated Link links = 6; - repeated AttributeSet attribute_sets = 7; + repeated Stacktrace stacktraces = 2; + repeated Sample samples = 3; + repeated Mapping mappings = 4; + repeated Location locations = 5; + repeated Function functions = 6; + repeated Link links = 7; + repeated AttributeSet attribute_sets = 8; // 0-th element must be an empty string ("") - repeated string string_table = 8; + repeated string string_table = 9; } From 8fe43e9b6a04ecdebf7bb3352927846e2796b82b Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Thu, 6 Jul 2023 22:42:00 -0700 Subject: [PATCH 15/22] adds another alternative (arrays) --- .../v1/alternatives/arrays/arrays.proto | 169 ++++++++++++++++++ .../proto/profiles/v1/profiles.proto | 4 +- 2 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto diff --git a/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto b/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto new file mode 100644 index 000000000..d66107e37 --- /dev/null +++ b/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto @@ -0,0 +1,169 @@ +syntax = "proto3"; + +package opentelemetry.proto.profiles.v1.alternatives.arrays; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1/arrays"; + + +// A pointer from a profile to a trace span. +message Link { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + bytes trace_id = 1; + // A unique identifier for the linked span. The ID is an 8-byte array. + bytes span_id = 2; +} + +// AttributeSet represents a set of attributes. It is referenced from Samples +// and not embedded because it is common for multiple samples to have the same +// set of attributes +message AttributeSet { + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; + uint32 dropped_attributes_count = 2; +} + +message Stacktrace { + repeated uint32 location_indices = 1; +} + +// message Sample { +// uint32 stacktrace_index = 1; +// repeated uint32 link_indices = 2; +// repeated uint32 attribute_set_indices = 3; +// repeated int64 values = 4; + +// // optional +// fixed64 timestamp_unix_nano = 5; +// } + +message SampleType { + // borrowed from metrics proto + enum AggregationTemporality { + AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; + AGGREGATION_TEMPORALITY_DELTA = 1; + AGGREGATION_TEMPORALITY_CUMULATIVE = 2; + } + + AggregationTemporality aggregation_temporality = 1; + uint64 sample_size = 2; + + // CPU / memory /etc + uint32 type_index = 3; // Index into string table. + uint32 unit_index = 4; // Index into string table. +} + +message ProfileType { + repeated uint32 stacktrace_indices = 10; + repeated uint32 link_indices = 11; + repeated uint32 attribute_set_indices = 12; + repeated int64 values = 13; + repeated uint64 timestamps = 14; +} + +message Profile { + repeated SampleType sample_types = 1; + repeated Stacktrace stacktraces = 2; + repeated Mapping mappings = 4; + repeated Location locations = 5; + repeated Function functions = 6; + repeated Link links = 7; + repeated AttributeSet attribute_sets = 8; + + // 0-th element must be an empty string ("") + repeated string string_table = 9; + + repeated ProfileType profile_types = 10; + + // stacktrace_index + // link_indices + // attribute_set_indices + // values + // timestamp_unix_nano +} + + +// borrowed from pprof proto +message Mapping { + // Address at which the binary (or DLL) is loaded into memory. + uint64 memory_start = 1; + // The limit of the address range occupied by this mapping. + uint64 memory_limit = 2; + // Offset in the binary that corresponds to the first mapped address. + uint64 file_offset = 3; + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + uint32 filename_index = 4; // Index into string table + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + uint32 build_id_index = 5; // Index into string table + + enum SymbolicInfo { + SYMBOLIC_INFO_UNSPECIFIED = 0; + SYMBOLIC_INFO_FULL = 1; + SYMBOLIC_INFO_FUNCTIONS_ONLY = 2; + SYMBOLIC_INFO_NO_INLINE_FRAMES = 3; + } + + SymbolicInfo symbolic_info = 6; + + // TODO(@petethepig): I wonder if we need something a little more specialized here + repeated uint32 attribute_set_indices = 7; +} + +// borrowed from pprof proto +// Describes function and line table debug information. +message Location { + // The id of the corresponding profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + uint32 mapping_index = 1; + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + uint64 address = 2; + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + repeated Line line = 3; + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + bool is_folded = 4; + + // TODO(@petethepig): I wonder if we need something a little more specialized here + repeated uint32 attribute_set_indices = 5; +} + +// borrowed from pprof proto +message Line { + // The id of the corresponding profile.Function for this line. + uint32 function_index = 1; + // Line number in source code. + uint32 line = 2; +} + +// borrowed from pprof proto +message Function { + // Name of the function, in human-readable form if available. + uint32 name_index = 1; // Index into string table + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + uint32 system_name_index = 2; // Index into string table + // Source file containing the function. + uint32 filename_index = 3; // Index into string table + // Line number in source file. + uint32 start_line = 4; +} diff --git a/opentelemetry/proto/profiles/v1/profiles.proto b/opentelemetry/proto/profiles/v1/profiles.proto index b2d4b83a3..2f902d5ec 100644 --- a/opentelemetry/proto/profiles/v1/profiles.proto +++ b/opentelemetry/proto/profiles/v1/profiles.proto @@ -24,6 +24,7 @@ import "opentelemetry/proto/resource/v1/resource.proto"; import "opentelemetry/proto/profiles/v1/alternatives/pprof/pprof.proto"; import "opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto"; import "opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto"; +import "opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto"; option csharp_namespace = "OpenTelemetry.Proto.Profiles.V1"; option java_multiple_files = true; @@ -128,6 +129,7 @@ message Profile { oneof alternative_profile { opentelemetry.proto.profiles.v1.alternatives.pprof.Profile pprof = 8; opentelemetry.proto.profiles.v1.alternatives.normalized.Profile normalized = 9; - opentelemetry.proto.profiles.v1.alternatives.denormalized.Profile denormalized = 10; + opentelemetry.proto.profiles.v1.alternatives.arrays.Profile arrays = 10; + opentelemetry.proto.profiles.v1.alternatives.denormalized.Profile denormalized = 11; } } From 2487cf36c9a3a377840dde91043bdb90df06df01 Mon Sep 17 00:00:00 2001 From: Tobias Andersen Date: Wed, 12 Jul 2023 15:17:40 +0200 Subject: [PATCH 16/22] Fix EOF issue in metrics payload --- examples/metrics.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/metrics.json b/examples/metrics.json index b3143a5c8..ee6f92374 100644 --- a/examples/metrics.json +++ b/examples/metrics.json @@ -29,7 +29,7 @@ { "name": "my.counter", "unit": "1", - "description": "I'm a Counter", + "description": "I`m a Counter", "sum": { "aggregationTemporality": 1, "isMonotonic": true, @@ -53,7 +53,7 @@ { "name": "my.gauge", "unit": "1", - "description": "I'm a Gauge", + "description": "I`m a Gauge", "gauge": { "dataPoints": [ { @@ -74,7 +74,7 @@ { "name": "my.histogram", "unit": "1", - "description": "I'm a Histogram", + "description": "I`m a Histogram", "histogram": { "aggregationTemporality": 1, "dataPoints": [ From afcd2aa7f728216d5891ffc0d83f09f0278a6611 Mon Sep 17 00:00:00 2001 From: Tobias Andersen Date: Wed, 12 Jul 2023 19:46:09 +0200 Subject: [PATCH 17/22] Update metrics.json Changing to "I am a...." based on maintainer request --- examples/metrics.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/metrics.json b/examples/metrics.json index ee6f92374..2b4592205 100644 --- a/examples/metrics.json +++ b/examples/metrics.json @@ -29,7 +29,7 @@ { "name": "my.counter", "unit": "1", - "description": "I`m a Counter", + "description": "I am a Counter", "sum": { "aggregationTemporality": 1, "isMonotonic": true, @@ -53,7 +53,7 @@ { "name": "my.gauge", "unit": "1", - "description": "I`m a Gauge", + "description": "I am a Gauge", "gauge": { "dataPoints": [ { @@ -74,7 +74,7 @@ { "name": "my.histogram", "unit": "1", - "description": "I`m a Histogram", + "description": "I am a Histogram", "histogram": { "aggregationTemporality": 1, "dataPoints": [ @@ -104,4 +104,4 @@ ] } ] -} \ No newline at end of file +} From b0166761b45030d12f00e2e2723d1bd6d0ff269c Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Tue, 18 Jul 2023 13:08:35 -0700 Subject: [PATCH 18/22] adds a decision log --- .../proto/profiles/v1/decision-log.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 opentelemetry/proto/profiles/v1/decision-log.md diff --git a/opentelemetry/proto/profiles/v1/decision-log.md b/opentelemetry/proto/profiles/v1/decision-log.md new file mode 100644 index 000000000..310b82862 --- /dev/null +++ b/opentelemetry/proto/profiles/v1/decision-log.md @@ -0,0 +1,116 @@ +# Decision #1 +Spec must include an optional field for the original payload (e.g original JFR/pprof profile) + +### Date +Jun 01 2023 + +### Context +Some formats (JFR) have advanced functinality that is too hard to generalize (e.g in JFR you can include custom events in your profiles) + +### Alternatives Considered +* try to generalize it anyway, so that OTEL format is a subset of JFR +* discard such data + +### Reasoning +* generalizing it is too hard, JFR allows for pretty much any kind of message +* discarding is not good, some percentage of users depend on custom JFR events + +### Details +[SIG Meeting Notes from June 1 2023](https://docs.google.com/document/d/19UqPPPlGE83N37MhS93uRlxsP1_wGxQ33Qv6CDHaEp0/edit?usp=sharing) + + + + + +# Decision #2 +Use normalized representation of profiling data + +### Date +Jun 29 2023 + +### Context +Profiling data is different than other signals in a way that it has heavy structures with many links between them. + +### Alternatives Considered +Use denormalized represenation of profiling data + +### Reasoning +Because profiling data has many heavy structures with many links between them, denormalized representation takes 10x more space compared to normalized version where each object references other objects by index + +### Details +[Github Conversation](https://github.com/open-telemetry/opentelemetry-proto/pull/488#discussion_r1246163710) +[Github Conversation](https://github.com/open-telemetry/opentelemetry-proto/pull/488#pullrequestreview-1505265763) + + + + + +# Decision #3 +When referring to other structs use array indexes for references instead of ids + +### Date +Jun 29 2023 + +### Context +in pprof references happen using ids, e.g {function_id=123}. this leads to confusion, as these ids almost always match array indexes. e.g "function" with id=1 will usually be in functions array at index 1. + +### Alternatives Considered +Using ids instead of indexes + +### Reasoning +* reduces confusion +* reduces serialized size +* improves performance since array lookup is faster than search (O(1) vs O(n) + +### Details +[Github Conversation](https://github.com/open-telemetry/opentelemetry-proto/pull/488#discussion_r1248116971) + + + + + +# Decision #4 +Spec must include an optional Mapping struct from pprof + +### Date +Jun 29 2023 + +### Context +pprof includes Mapping struct that describes relationships between functions and where those functions are located in the binary. This struct is rarely used in client implementations + +### Alternatives Considered +Not include it to simplify spec + +### Reasoning +It is useful when symbol information is supplied separately, e.g very common in linux + +### Details +[SIG Meeting Notes from Jun 29 2023](https://docs.google.com/document/d/19UqPPPlGE83N37MhS93uRlxsP1_wGxQ33Qv6CDHaEp0/edit?usp=sharing) + + + + + +# Decision #5 +Internal references should be uint32 + +### Date +Jun 29 2023 + +### Context +there's many internal reference fields, e.g: +* location_id +* function_id +if they are > 32 bits then the payload is going to be too huge anyway + +### Alternatives Considered +* use uint64 + + +### Reasoning +* uint32 is big enough +* but it's better than uint64 because it will reduce struct size in go +* this will reduct collector memory footprint + +### Details +[Github Conversation](https://github.com/open-telemetry/opentelemetry-proto/pull/488/files#r1246155907) From 1ced00ec9974d31aa82cd9c9c3b8ea7f95386100 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 19 Jul 2023 10:46:07 -0400 Subject: [PATCH 19/22] [CI] Report link-check error when external URL used for local doc page (#498) Co-authored-by: Carlos Alberto Cortez --- .markdown_link_check_config.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.markdown_link_check_config.json b/.markdown_link_check_config.json index dac3ae97b..f8cf2cdd0 100644 --- a/.markdown_link_check_config.json +++ b/.markdown_link_check_config.json @@ -6,8 +6,12 @@ ], "replacementPatterns": [ { - "pattern": "^/", - "replacement": "{{BASEURL}}/" + "pattern": "^/", + "replacement": "{{BASEURL}}/" + }, + { + "pattern": "^https://github.com/open-telemetry/opentelemetry-proto/(blob|tree)/[^/]+/docs/", + "replacement": "LINK-CHECK-ERROR-USE-LOCAL-PATH-TO-DOC-PAGE-NOT-EXTERNAL-URL/" } ], "retryOn429": true, From 199d94d87b34a7f56b2a55596e8f193b50c30afb Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Tue, 4 Jul 2023 12:36:51 -0400 Subject: [PATCH 20/22] add markdown linting to makefile and github actions (reference: #464) --- .github/workflows/build-check.yaml | 12 + .markdownlint.yaml | 14 + CHANGELOG.md | 10 +- Makefile | 11 +- package-lock.json | 564 ++++++++++++++++++++++++++++- package.json | 3 +- 6 files changed, 605 insertions(+), 9 deletions(-) create mode 100644 .markdownlint.yaml diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index 4512d9308..d84a42ae3 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -111,3 +111,15 @@ jobs: - name: run markdown-link-check run: make markdown-link-check + + markdownlint: + runs-on: ubuntu-latest + steps: + - name: check out code + uses: actions/checkout@v2 + + - name: install dependencies + run: npm install + + - name: run markdownlint + run: make markdownlint \ No newline at end of file diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 000000000..eb42d5b55 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,14 @@ +# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +# and https://github.com/DavidAnson/markdownlint/blob/main/README.md + +# Default state for all rules +default: true + +ul-style: false +line-length: false +no-duplicate-header: + siblings_only: true +ol-prefix: + style: ordered +no-inline-html: false +fenced-code-language: false \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac7a6eca..d2d22123e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet * Add `csharp_namespace` option to protos. ([#399](https://github.com/open-telemetry/opentelemetry-proto/pull/399)) * Fix some out-of-date urls which link to [specification](https://github.com/open-telemetry/opentelemetry-specification). ([#402](https://github.com/open-telemetry/opentelemetry-proto/pull/402)) -* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary, +* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary, InstrumentationLibraryLogs, InstrumentationLibrarySpans and InstrumentationLibraryMetrics messages. Delete deprecated instrumentation_library_logs, instrumentation_library_spans and @@ -137,7 +137,7 @@ Full list of differences found in [this compare](https://github.com/open-telemet * Remove unused deprecated message StringKeyValue (#358) * Remove experimental metrics config service (#359) - + ## 0.12.0 - 2022-01-19 Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.11.0...v0.12.0). @@ -288,9 +288,9 @@ Full list of differences found in [this compare.](https://github.com/open-teleme ### Changed * :stop_sign: [BREAKING] Metrics - protocol was refactored, and lots of breaking changes. -** Removed MetricDescriptor and embedded into Metric and the new data types. -** Add new data types Gauge/Sum/Histogram. -** Make use of the "AggregationTemporality" into the data types that allow that support. + * Removed MetricDescriptor and embedded into Metric and the new data types. + * Add new data types Gauge/Sum/Histogram. + * Make use of the "AggregationTemporality" into the data types that allow that support. * Rename enum values to follow the proto3 style guide. ### Added diff --git a/Makefile b/Makefile index 6e7136465..f1d608c87 100755 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ $(1) endef .PHONY: all -all: gen-all markdown-link-check +all: gen-all markdown-link-check markdownlint # Generate all implementations .PHONY: gen-all @@ -165,3 +165,12 @@ markdown-link-check: npx --no -- markdown-link-check --quiet --config .markdown_link_check_config.json $$f \ || exit 1; \ done + +.PHONY: markdownlint +markdownlint: + @if ! npm ls markdownlint; then npm install; fi + @for f in $(ALL_DOCS); do \ + echo $$f; \ + npx --no -p markdownlint-cli markdownlint -c .markdownlint.yaml $$f \ + || exit 1; \ + done diff --git a/package-lock.json b/package-lock.json index da3ef4546..331c5bc33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { - "name": "otlp", + "name": "opentelemetry-proto", "lockfileVersion": 2, "requires": true, "packages": { "": { "devDependencies": { - "markdown-link-check": "3.10.3" + "markdown-link-check": "3.10.3", + "markdownlint-cli": "0.31.0" } }, "node_modules/ansi-styles": { @@ -23,18 +24,40 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", "dev": true }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -116,6 +139,12 @@ "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -153,6 +182,15 @@ "ms": "^2.1.1" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -220,6 +258,56 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -269,6 +357,40 @@ "node": ">=0.10.0" } }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", @@ -308,6 +430,24 @@ "node": ">=4.0.0" } }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "node_modules/link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -320,12 +460,46 @@ "needle": "^3.1.0" } }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/markdown-link-check": { "version": "3.10.3", "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.3.tgz", @@ -355,6 +529,57 @@ "marked": "^4.1.0" } }, + "node_modules/markdownlint": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.25.1.tgz", + "integrity": "sha512-AG7UkLzNa1fxiOv5B+owPsPhtM4D6DoODhsJgiaNg1xowXovrYgOnLqAgOOFQpWOlHFVQUzjMY5ypNNTeov92g==", + "dev": true, + "dependencies": { + "markdown-it": "12.3.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/markdownlint-cli": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.31.0.tgz", + "integrity": "sha512-UCNA10I2evrEqGWUGM4I6ae6LubLeySkKegP1GQaZSES516BYBgOn8Ai8MXU+5rSIeCvMyKi91alqHyRDuUnYA==", + "dev": true, + "dependencies": { + "commander": "~9.0.0", + "get-stdin": "~9.0.0", + "glob": "~7.2.0", + "ignore": "~5.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.0.0", + "markdownlint": "~0.25.1", + "markdownlint-rule-helpers": "~0.16.0", + "minimatch": "~3.0.4", + "run-con": "~1.2.10" + }, + "bin": { + "markdownlint": "markdownlint.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/markdownlint-cli/node_modules/commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/markdownlint-rule-helpers": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz", + "integrity": "sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==", + "dev": true + }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -367,6 +592,33 @@ "node": ">= 12" } }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -402,6 +654,15 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -427,6 +688,15 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -445,6 +715,21 @@ "node": ">=6" } }, + "node_modules/run-con": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.12.tgz", + "integrity": "sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~3.0.0", + "minimist": "^1.2.8", + "strip-json-comments": "~3.1.1" + }, + "bin": { + "run-con": "cli.js" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -457,6 +742,18 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -468,6 +765,18 @@ "engines": { "node": ">=8" } + }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true } }, "dependencies": { @@ -480,18 +789,40 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", "dev": true }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -552,6 +883,12 @@ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, "css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -580,6 +917,12 @@ "ms": "^2.1.1" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -623,6 +966,43 @@ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -659,6 +1039,34 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true + }, "is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", @@ -683,6 +1091,21 @@ "punycode": "2.x.x" } }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -695,12 +1118,42 @@ "needle": "^3.1.0" } }, + "linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "requires": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + } + } + }, "markdown-link-check": { "version": "3.10.3", "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.3.tgz", @@ -727,12 +1180,74 @@ "marked": "^4.1.0" } }, + "markdownlint": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.25.1.tgz", + "integrity": "sha512-AG7UkLzNa1fxiOv5B+owPsPhtM4D6DoODhsJgiaNg1xowXovrYgOnLqAgOOFQpWOlHFVQUzjMY5ypNNTeov92g==", + "dev": true, + "requires": { + "markdown-it": "12.3.2" + } + }, + "markdownlint-cli": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.31.0.tgz", + "integrity": "sha512-UCNA10I2evrEqGWUGM4I6ae6LubLeySkKegP1GQaZSES516BYBgOn8Ai8MXU+5rSIeCvMyKi91alqHyRDuUnYA==", + "dev": true, + "requires": { + "commander": "~9.0.0", + "get-stdin": "~9.0.0", + "glob": "~7.2.0", + "ignore": "~5.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.0.0", + "markdownlint": "~0.25.1", + "markdownlint-rule-helpers": "~0.16.0", + "minimatch": "~3.0.4", + "run-con": "~1.2.10" + }, + "dependencies": { + "commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "dev": true + } + } + }, + "markdownlint-rule-helpers": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz", + "integrity": "sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==", + "dev": true + }, "marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -759,6 +1274,15 @@ "boolbase": "^1.0.0" } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, "parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -778,6 +1302,12 @@ "parse5": "^7.0.0" } }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -790,6 +1320,18 @@ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, + "run-con": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.12.tgz", + "integrity": "sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~3.0.0", + "minimist": "^1.2.8", + "strip-json-comments": "~3.1.1" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -802,6 +1344,12 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -810,6 +1358,18 @@ "requires": { "has-flag": "^4.0.0" } + }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true } } } diff --git a/package.json b/package.json index ed875da02..a590a3fbe 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "devDependencies": { - "markdown-link-check": "3.10.3" + "markdown-link-check": "3.10.3", + "markdownlint-cli": "0.31.0" } } From 81a296f9dba23e32d77f46d58c8ea4244a2157a6 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Thu, 13 Jul 2023 18:43:33 -0400 Subject: [PATCH 21/22] fix linting errors from recent merge from main --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d22123e..b93bd0618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ Full list of differences found in [this compare](https://github.com/open-telemet Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...v1.0.0). ### Maturity - -* Add note about the possibility to have unstable components after 1.0.0 + +* Add note about the possibility to have unstable components after 1.0.0 [#489](https://github.com/open-telemetry/opentelemetry-proto/pull/489) * Add maturity JSON entry per package [#490](https://github.com/open-telemetry/opentelemetry-proto/pull/490) From 8cd1e60d9857e66e08c094356583c59222b95b7b Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Tue, 25 Jul 2023 22:44:36 -0700 Subject: [PATCH 22/22] included recent suggestions --- .../v1/alternatives/arrays/arrays.proto | 16 ++++------------ .../denormalized/denormalized.proto | 6 ------ .../v1/alternatives/normalized/normalized.proto | 17 ++++------------- 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto b/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto index d66107e37..571d0644e 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/arrays/arrays.proto @@ -102,14 +102,12 @@ message Mapping { // it could be the contents of the .note.gnu.build-id field. uint32 build_id_index = 5; // Index into string table - enum SymbolicInfo { - SYMBOLIC_INFO_UNSPECIFIED = 0; - SYMBOLIC_INFO_FULL = 1; - SYMBOLIC_INFO_FUNCTIONS_ONLY = 2; - SYMBOLIC_INFO_NO_INLINE_FRAMES = 3; + enum SymbolFidelity { + SYMBOL_FIDELITY_UNSPECIFIED = 0; + SYMBOL_FIDELITY_FULL = 1; } - SymbolicInfo symbolic_info = 6; + SymbolFidelity symbolic_info = 6; // TODO(@petethepig): I wonder if we need something a little more specialized here repeated uint32 attribute_set_indices = 7; @@ -136,12 +134,6 @@ message Location { // line[0].function_name == "memcpy" // line[1].function_name == "printf" repeated Line line = 3; - // Provides an indication that multiple symbols map to this location's - // address, for example due to identical code folding by the linker. In that - // case the line information above represents one of the multiple - // symbols. This field must be recomputed when the symbolization state of the - // profile changes. - bool is_folded = 4; // TODO(@petethepig): I wonder if we need something a little more specialized here repeated uint32 attribute_set_indices = 5; diff --git a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto index 471aca88d..8f0576766 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/denormalized/denormalized.proto @@ -105,12 +105,6 @@ message Location { // line[0].function_name == "memcpy" // line[1].function_name == "printf" repeated Line line = 3; - // Provides an indication that multiple symbols map to this location's - // address, for example due to identical code folding by the linker. In that - // case the line information above represents one of the multiple - // symbols. This field must be recomputed when the symbolization state of the - // profile changes. - bool is_folded = 4; } // borrowed from pprof proto diff --git a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto index 6688997b6..1e1508bab 100644 --- a/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto +++ b/opentelemetry/proto/profiles/v1/alternatives/normalized/normalized.proto @@ -93,14 +93,12 @@ message Mapping { // it could be the contents of the .note.gnu.build-id field. uint32 build_id_index = 5; // Index into string table - enum SymbolicInfo { - SYMBOLIC_INFO_UNSPECIFIED = 0; - SYMBOLIC_INFO_FULL = 1; - SYMBOLIC_INFO_FUNCTIONS_ONLY = 2; - SYMBOLIC_INFO_NO_INLINE_FRAMES = 3; + enum SymbolFidelity { + SYMBOL_FIDELITY_UNSPECIFIED = 0; + SYMBOL_FIDELITY_FULL = 1; } - SymbolicInfo symbolic_info = 6; + SymbolFidelity symbolic_info = 6; // TODO(@petethepig): I wonder if we need something a little more specialized here repeated uint32 attribute_set_indices = 7; @@ -127,13 +125,6 @@ message Location { // line[0].function_name == "memcpy" // line[1].function_name == "printf" repeated Line line = 3; - // Provides an indication that multiple symbols map to this location's - // address, for example due to identical code folding by the linker. In that - // case the line information above represents one of the multiple - // symbols. This field must be recomputed when the symbolization state of the - // profile changes. - bool is_folded = 4; - // TODO(@petethepig): I wonder if we need something a little more specialized here repeated uint32 attribute_set_indices = 5; }