Skip to content
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

Merged
merged 9 commits into from
Jan 19, 2024
Merged

feat: parse line numbers to pprof #27

merged 9 commits into from
Jan 19, 2024

Conversation

korniltsev
Copy link
Collaborator

No description provided.

@korniltsev korniltsev changed the title WIP: Linenumbers feat: parse line numbers to pprof Jan 18, 2024
@korniltsev korniltsev marked this pull request as ready for review January 18, 2024 10:15
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
Copy link
Collaborator Author

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

Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Contributor

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)

Copy link
Collaborator Author

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

Copy link
Contributor

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@korniltsev korniltsev merged commit c8e7725 into main Jan 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants