Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ message ExportProfilesServiceRequest {
// data from multiple origins typically batch the data before forwarding further and
// in that case this array will contain multiple elements.
repeated opentelemetry.proto.profiles.v1development.ResourceProfiles resource_profiles = 1;

// The reference table containing all data shared by profiles across the message being sent.
opentelemetry.proto.profiles.v1development.ProfilesReferenceTables reference_tables = 2;
}

message ExportProfilesServiceResponse {
Expand Down
87 changes: 47 additions & 40 deletions opentelemetry/proto/profiles/v1development/profiles.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1development";

// Relationships Diagram
//
// ┌──────────────────┐ LEGEND
// │ ProfilesData │
// └──────────────────┘ ─────▶ embedded
// │
// │ 1-n ─────▷ referenced by index
// ▼
// ┌──────────────────┐
// │ ResourceProfiles │
// └──────────────────┘
// ┌──────────────────┐ LEGEND
// │ ProfilesData │ ─────┐
// └──────────────────┘ ─────▶ embedded
// │
// │ 1-n ─────▷ referenced by index
// ▼
// ┌──────────────────┐ ┌─────────────────────────┐
// │ ResourceProfiles │ │ ProfilesReferenceTables │
// └──────────────────┘ └─────────────────────────┘
// │
// │ 1-n
// ▼
Expand Down Expand Up @@ -90,26 +90,9 @@ option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1development";
// └──────────────────┘
//

// ProfilesData represents the profiles data that can be stored in 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 an SDK profiler, this array will typically contain one
// element. Host-level profilers will usually create one ResourceProfile per
// container, as well as one additional ResourceProfile grouping all samples
// from non-containerized processes.
// Other resource groupings are possible as well and clarified via
// Resource.attributes and semantic conventions.
repeated ResourceProfiles resource_profiles = 1;

// ProfilesReferenceTables represents the profiles data shared across the
// entire message being sent.
message ProfilesReferenceTables {
// Mappings from address ranges to the image/binary/library mapped
// into that address range referenced by locations via Location.mapping_index.
repeated Mapping mapping_table = 2;
Comment thread
felixge marked this conversation as resolved.
Outdated
Expand All @@ -134,6 +117,30 @@ message ProfilesData {
repeated AttributeUnit attribute_units = 8;
}

// ProfilesData represents the profiles data that can be stored in 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 an SDK profiler, this array will typically contain one
// element. Host-level profilers will usually create one ResourceProfile per
// container, as well as one additional ResourceProfile grouping all samples
// from non-containerized processes.
// Other resource groupings are possible as well and clarified via
// Resource.attributes and semantic conventions.
repeated ResourceProfiles resource_profiles = 1;

// One instance of ProfilesReferenceTables
ProfilesReferenceTables reference_tables = 2;
}


// A collection of ScopeProfiles from a Resource.
message ResourceProfiles {
Expand Down Expand Up @@ -217,7 +224,7 @@ message Profile {
// The set of samples recorded in this profile.
repeated Sample sample = 2;

// References to locations in ProfilesData.location_table.
// References to locations in ProfilesReferenceTables.location_table.
repeated int32 location_indices = 3;

// The following fields 4-14 are informational, do not affect
Expand All @@ -237,7 +244,7 @@ message Profile {
// 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 int32 comment_strindices = 8; // Indices into ProfilesData.string_table.
repeated int32 comment_strindices = 8; // Indices into ProfilesReferenceTables.string_table.
// Index into the sample_type array to the default sample type.
int32 default_sample_type_index = 9;

Expand Down Expand Up @@ -368,8 +375,8 @@ enum AggregationTemporality {

// ValueType describes the type and units of a value, with an optional aggregation temporality.
message ValueType {
int32 type_strindex = 1; // Index into ProfilesData.string_table.
int32 unit_strindex = 2; // Index into ProfilesData.string_table.
int32 type_strindex = 1; // Index into ProfilesReferenceTables.string_table.
int32 unit_strindex = 2; // Index into ProfilesReferenceTables.string_table.

AggregationTemporality aggregation_temporality = 3;
}
Expand All @@ -391,10 +398,10 @@ message Sample {
// result has a list of values that is the element-wise sum of the
// lists of the originals.
repeated int64 value = 3;
// References to attributes in ProfilesData.attribute_table. [optional]
// References to attributes in ProfilesReferenceTables.attribute_table. [optional]
repeated int32 attribute_indices = 4;

// Reference to link in ProfilesData.link_table. [optional]
// Reference to link in ProfilesReferenceTables.link_table. [optional]
optional int32 link_index = 5;

// Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
Expand All @@ -414,8 +421,8 @@ 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]".
int32 filename_strindex = 4; // Index into ProfilesData.string_table.
// References to attributes in ProfilesData.attribute_table. [optional]
int32 filename_strindex = 4; // Index into ProfilesReferenceTables.string_table.
// References to attributes in ProfilesReferenceTables.attribute_table. [optional]
repeated int32 attribute_indices = 5;
// The following fields indicate the resolution of symbolic info.
bool has_functions = 6;
Expand All @@ -426,7 +433,7 @@ message Mapping {

// Describes function and line table debug information.
message Location {
// Reference to mapping in ProfilesData.mapping_table.
// Reference to mapping in ProfilesReferenceTables.mapping_table.
// It can be unset if the mapping is unknown or not applicable for
// this profile type.
optional int32 mapping_index = 1;
Expand All @@ -451,13 +458,13 @@ message Location {
// profile changes.
bool is_folded = 4;

// References to attributes in ProfilesData.attribute_table. [optional]
// References to attributes in ProfilesReferenceTables.attribute_table. [optional]
repeated int32 attribute_indices = 5;
}

// Details a specific line in a source code, linked to a function.
message Line {
// Reference to function in ProfilesData.function_table.
// Reference to function in ProfilesReferenceTables.function_table.
int32 function_index = 1;
// Line number in source code. 0 means unset.
int64 line = 2;
Expand Down