-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reporter: use semantic convention to report frame type #167
Changes from 3 commits
8bd65dd
dfeddf9
31dde29
d49c23d
6a493db
b026f8e
97c9727
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -546,13 +546,15 @@ func (r *OTLPReporter) getProfile() (profile *profiles.Profile, startTS, endTS u | |
|
||
// Walk every frame of the trace. | ||
for i := range traceInfo.frameTypes { | ||
frameAttributes := addProfileAttributes(profile, []attrKeyValue{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows "abort-marker" ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @christos68k Does it make sense to create a separate issue for this, so we can merge this PR. Without it, the devfiler won't work with the latest agent. |
||
{key: "profile.frame.type", value: traceInfo.frameTypes[i].String()}, | ||
}, attributeMap) | ||
|
||
loc := &profiles.Location{ | ||
// Id - Optional element we do not use. | ||
TypeIndex: getStringMapIndex(stringMap, | ||
traceInfo.frameTypes[i].String()), | ||
Address: uint64(traceInfo.linenos[i]), | ||
// IsFolded - Optional element we do not use. | ||
// Attributes - Optional element we do not use. | ||
Attributes: frameAttributes, | ||
} | ||
|
||
switch frameKind := traceInfo.frameTypes[i]; frameKind { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there is no
phpjit
semantic convention, justphp
, so we should also introduce it (unless we think there is no value in the distinction between the two). It seems useful to keep the distinction.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. A lot of language runtimes have multiple execution tiers like "interpreted", "jit" or in the case of HotSpot even multiple tiers of JITing (C1 and C2). Perhaps instead of duplicating each frame kind, we should consider a separate attribute for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christos68k Does it make sense to create a separate issue for this, so we can merge this PR. Without it, the devfiler won't work with the latest agent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this and decided to wait until @florianl comes back as there's a decision to be made also for error frames and I lack context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also discussed this today and think that it makes sense to introduce a new attribute for per-frame interpreter-specific metadata which may include:
We can discuss the specifics in the SIG.
As far as this PR is concerned, I think we can keep the frame type attribute and its string encoding, but this PR needs to be amended to be compliant with semantic conventions by:
@florianl What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied the suggested changes.