From a8f08fc49d60538f97ffabcc7feac92f832976dd Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Thu, 26 Sep 2024 15:57:20 +0200 Subject: [PATCH] profiles: Make mapping in Profile optional (#556) As commented in [0] and discussed in the OTel Profiling SIG meeting, there are situations where a main binary for a Profile can not be identified. For these cases mark the field optional. FYI: @brancz @petethepig @open-telemetry/profiling-maintainers [0]: https://github.com/open-telemetry/opentelemetry-proto/pull/534#discussion_r1561141336 --- opentelemetry/proto/profiles/v1development/pprofextended.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opentelemetry/proto/profiles/v1development/pprofextended.proto b/opentelemetry/proto/profiles/v1development/pprofextended.proto index 211b3c74..7984ab6d 100644 --- a/opentelemetry/proto/profiles/v1development/pprofextended.proto +++ b/opentelemetry/proto/profiles/v1development/pprofextended.proto @@ -79,6 +79,8 @@ message 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. + // If multiple binaries contribute to the Profile and no main + // binary can be identified, mapping[0] has no special meaning. repeated Mapping mapping = 3; // Locations referenced by samples via location_indices. repeated Location location = 4;