Skip to content

Commit

Permalink
profile: drop duplicate field in message Profile (#606)
Browse files Browse the repository at this point in the history
* profile: drop duplicate field in message Profile

The message Profile contains two fields of type `opentelemetry.proto.common.v1.KeyValue`, `attribute_table` and `attributes`. Both fields are intended for the same use. Therefore drop the later one.

* fixup: add attribute_indices to message Profile

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>

* fixup: move comment

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>

---------

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
  • Loading branch information
florianl and lmolkova authored Dec 13, 2024
1 parent fcebfd2 commit ae87ce7
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions opentelemetry/proto/profiles/v1development/profiles.proto
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,6 @@ message Profile {
// This field is required.
bytes profile_id = 17;

// 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 = 18;

// 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.
Expand All @@ -271,6 +257,21 @@ 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;

// References to attributes in attribute_table. [optional]
// It 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 int32 attribute_indices = 22;
}

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

0 comments on commit ae87ce7

Please sign in to comment.