Skip to content

Commit 78fbbf6

Browse files
authored
[pdata/pprofile] remove field Profile.StartTime from pdata/pprofile (#13315)
When working with pdata/pprofile I noticed, there is no field named StartTime in message Profile of the OTel Profiling signal in version v1.7.0 - see https://github.com/open-telemetry/opentelemetry-proto/blob/v1.7.0/opentelemetry/proto/profiles/v1development/profiles.proto. I also reordered the fields according to the OTel Profiling signal specification. <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> #### Link to tracking issue Fixes # <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Florian Lehner <[email protected]>
1 parent 2882733 commit 78fbbf6

File tree

4 files changed

+43
-50
lines changed

4 files changed

+43
-50
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: pdata/pprofile
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Remove field Profile.StartTime from pdata/pprofile
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [13315]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: Remove Profile.StartTime from OTel Profiling signal.
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [api]

pdata/internal/cmd/pdatagen/internal/pprofile_package.go

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,6 @@ var profile = &messageValueStruct{
171171
testVal: "1234567890",
172172
},
173173
},
174-
&primitiveTypedField{
175-
fieldName: "StartTime",
176-
originFieldName: "TimeNanos",
177-
returnType: &primitiveType{
178-
structName: "Timestamp",
179-
packageName: "pcommon",
180-
rawType: "int64",
181-
defaultVal: "0",
182-
testVal: "1234567890",
183-
},
184-
},
185174
&messageValueField{
186175
fieldName: "PeriodType",
187176
returnMessage: valueType,
@@ -212,10 +201,6 @@ var profile = &messageValueStruct{
212201
testVal: "data.ProfileID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1})",
213202
},
214203
},
215-
&sliceField{
216-
fieldName: "AttributeIndices",
217-
returnSlice: int32Slice,
218-
},
219204
droppedAttributesCount,
220205
&primitiveField{
221206
fieldName: "OriginalPayloadFormat",
@@ -227,6 +212,10 @@ var profile = &messageValueStruct{
227212
fieldName: "OriginalPayload",
228213
returnSlice: byteSlice,
229214
},
215+
&sliceField{
216+
fieldName: "AttributeIndices",
217+
returnSlice: int32Slice,
218+
},
230219
},
231220
}
232221

pdata/pprofile/generated_profile.go

Lines changed: 6 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pdata/pprofile/generated_profile_test.go

Lines changed: 8 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)