Skip to content

Commit e8f1361

Browse files
jhallidaychristos68kaalexandjsuereth
authored
profiles: improve Sample message clarity and usage documentation. (#724)
* profiles: improve Sample message clarity and usage documentation. * profiles: improve Sample message clarity and usage documentation. Co-authored-by: Christos Kalkanis <[email protected]> * profiles: improve Sample message clarity and usage documentation. Co-authored-by: Christos Kalkanis <[email protected]> * profiles: improve Sample message clarity and usage documentation. * profiles: improve Sample message clarity and usage documentation. --------- Co-authored-by: Christos Kalkanis <[email protected]> Co-authored-by: Alexey Alexandrov <[email protected]> Co-authored-by: Josh Suereth <[email protected]>
1 parent e5a5dc1 commit e8f1361

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

opentelemetry/proto/profiles/v1development/profiles.proto

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ message ValueType {
364364
// both fields are populated, they MUST contain the same number of elements, and
365365
// the elements at the same index MUST refer to the same event.
366366
//
367+
// For the purposes of efficiently representing aggregated data observations, a Sample is regarded
368+
// as having a shared identity and an associated collection of per-observation data points.
369+
// Samples having the same identity SHOULD be combined by inserting timestamps and values to the data arrays.
370+
//
367371
// Examples of different ways of representing a sample with the total value of 10:
368372
//
369373
// Report of a stacktrace at 10 timestamps (consumers must assume the value is 1 for each point):
@@ -378,17 +382,21 @@ message ValueType {
378382
// values: [2, 2, 3, 3]
379383
// timestamps_unix_nano: [1, 2, 3, 4]
380384
message Sample {
385+
386+
// A Sample's identity (i.e. 'primary key') is the tuple of {stack_index, set_of(attribute_indices), link_index}
387+
381388
// Reference to stack in ProfilesDictionary.stack_table.
382389
int32 stack_index = 1;
383-
// The type and unit of each value is defined by Profile.sample_type.
384-
repeated int64 values = 2;
385390
// References to attributes in ProfilesDictionary.attribute_table. [optional]
386-
repeated int32 attribute_indices = 3;
387-
391+
repeated int32 attribute_indices = 2;
388392
// Reference to link in ProfilesDictionary.link_table. [optional]
389393
// It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
390-
int32 link_index = 4;
394+
int32 link_index = 3;
395+
396+
// The following fields may contain per-observation data and do not form part of the Sample's identity.
391397

398+
// The type and unit of each value is defined by Profile.sample_type.
399+
repeated int64 values = 4;
392400
// Timestamps associated with Sample represented in nanoseconds. These
393401
// timestamps should fall within the Profile's time range.
394402
repeated fixed64 timestamps_unix_nano = 5;

0 commit comments

Comments
 (0)