-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: parse line numbers to pprof #27
Conversation
9cbe6df
to
111191a
Compare
for _, label := range labels { | ||
if labelsCtx != nil && labelsSnapshot != nil { | ||
sample.Label = make([]*profilev1.Label, 0, len(labelsCtx.Labels)) | ||
for k, v := range labelsCtx.Labels { //todo iterating over map is not deterministic, this can break tests and maybe even affect performance |
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.
TODO: discuss if it is bad for stoarge
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 do not assume any particular order of labels at ingestion time and always sort them explicitly in the distributor https://github.com/grafana/pyroscope/blob/main/pkg/distributor/distributor.go#L270
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.
I think these are different labels. Distributor sorts series labels. These are sample labels.
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.
Yep, sample labels are sorted as well – at normalisation we drop duplicate samples based on their stacks and labels (ignoring numeric ones)
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.
ah, ok. Im probably overthinking it. Thanks
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.
LGTM
No description provided.