Skip to content

Commit

Permalink
profiles: update default value field in message Profile
Browse files Browse the repository at this point in the history
To indicate the default kind of the sample type, the pointer should point to the array of `sample_type`. This avoids issues where the string that is pointed to by `default_sample_type_strindex` does not match with the value types in `sample_type`.

ping @open-telemetry/profiling-maintainers @jhalliday
  • Loading branch information
florianl authored Dec 9, 2024
1 parent c488cd5 commit 00cee57
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions opentelemetry/proto/profiles/v1development/profiles.proto
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ message Profile {
// for human-friendly content. The profile must stay functional if this field
// is cleaned.
repeated int32 comment_strindices = 15; // 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.
int32 default_sample_type_strindex = 16;


// A globally unique identifier for a profile. The ID is a 16-byte array. An ID with
// all zeroes is considered invalid.
Expand Down Expand Up @@ -269,6 +265,9 @@ message Profile {
// The field is optional, however if it is present then equivalent converted data should be populated in other fields
// of this message as far as is practicable.
bytes original_payload = 21;

// Index into the sample_type array for the type of the default sample value.
int32 default_sample_type_index = 23;
}

// Represents a mapping between Attribute Keys and Units.
Expand Down

0 comments on commit 00cee57

Please sign in to comment.