Skip to content

Commit cb85d1c

Browse files
committed
profiles: remove default_sample_type
This resolves the ambiguity when a `ScopesProfiles` message contains more than one `profiles` entry matching the `default_sample_type`. Also add a comment to clarify which profile viewers should display by default. This was previously also ambiguous. This change creates a minor problem when it comes to ensuring that pprof profiles can round-trip through otel conversion as it may require the `ScopeProfiles.profiles` entries to be reordered in order to honor the `default_sample_type` of the original pprof message. Naively converting the resulting otel profile back to pprof would cause the order of `Profile.sample_types` to be changed. Merging this change indiciates consensus within the profiling group that this issue should be handled by adding a `pprof.profile_order` attribute (name TBD) to the `ScopeProfiles.attributes` during the initial pprof->otel conversion. This label will allow converting the resulting otel profile back to pprof without any information loss. See [gh-633][] for additional details. [gh-633]: #633 (comment)
1 parent c306100 commit cb85d1c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

opentelemetry/proto/profiles/v1development/profiles.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ message ProfilesData {
139139
// from non-containerized processes.
140140
// Other resource groupings are possible as well and clarified via
141141
// Resource.attributes and semantic conventions.
142+
// Tools that visualize profiles should prefer displaying
143+
// resources_profiles[0].scope_profiles[0].profiles[0] by default.
142144
repeated ResourceProfiles resource_profiles = 1;
143145

144146
// One instance of ProfilesDictionary
@@ -182,10 +184,6 @@ message ScopeProfiles {
182184
// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
183185
// This schema_url applies to all profiles in the "profiles" field.
184186
string schema_url = 3;
185-
186-
// The preferred type and unit of Samples in at least one Profile.
187-
// See Profile.sample_type for possible values.
188-
ValueType default_sample_type = 4;
189187
}
190188

191189
// Profile is a common stacktrace profile format.

0 commit comments

Comments
 (0)