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: Extract main binary version from labels #2914

Merged
merged 4 commits into from
Jan 16, 2024
Merged

Conversation

cyriltovena
Copy link
Contributor

This extract repository and commit from labels and inject them into the main binary mapping version.

This information can then be read using the pprof API.

@cyriltovena cyriltovena requested a review from a team as a code owner January 11, 2024 14:33
Comment on lines 36 to 37
LabelNameMappingRepository = "__mapping_repository__"
LabelNameMappingCommit = "__mapping_commit__"
Copy link
Collaborator

@kolesnikovae kolesnikovae Jan 12, 2024

Choose a reason for hiding this comment

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

I would consider not making them reserved.

  • It will probably affect the data locality: __mapping_* goes before __service_*, therefore profiles of the same service but different versions can be stored far from each other.
  • Reserved labels are discarded in the /ingest endpoint.
  • Users may want to use them, esp. commit e.g., for comparison. Although, we could copy them with a public name.

Should we use service instead of mapping? mapping is very specific to how we currently use it, not to its actual content.

Also, should we have a broader ref (commit/branch/tag) instead of commit? Github API is also using it. Or just version?

That being said, I propose to name them service_repository and service_version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make the change, and yes we can use refs good idea this might be even easier for some people to integrate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright good catch on this. Let me know what you think now I've made some suggested changes.

pkg/distributor/distributor.go Outdated Show resolved Hide resolved
pkg/distributor/distributor.go Outdated Show resolved Hide resolved
pkg/model/labels.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@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

@cyriltovena cyriltovena merged commit fbd1561 into main Jan 16, 2024
19 checks passed
@cyriltovena cyriltovena deleted the feat/mapping-versions branch January 16, 2024 08:28
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.

2 participants