-
Notifications
You must be signed in to change notification settings - Fork 544
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
Ingester/Distributor: Add support for exporting cost attribution metrics #10269
Merged
Merged
Changes from 106 commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
e315ebb
Poc: cost attribution proposal 2
ying-jeanne f04c28f
refectory
ying-jeanne 2c422d1
add experimental features in about-versioning.md
ying-jeanne d2eab6b
change const variable to private
ying-jeanne 1f39282
make timer service
ying-jeanne 9b4337d
rename TrackerForUser to Tracker
ying-jeanne 1a523e1
use fine locking
ying-jeanne f10f787
add comments explain why we use unchecked collector
ying-jeanne cc0e939
rename deleteUserTracker to deleteTracker
ying-jeanne c020be0
rename cat in cost attribution package to t or tracker
ying-jeanne 71e4666
avoid get tracker twice
ying-jeanne 9dd101b
refactor inactiveObservationsForUser
ying-jeanne 7d4ea9a
refactor shouldDelete function
ying-jeanne 6754666
rename calabels and calabelmap to labels and index
ying-jeanne fffc5b3
remove getter and setter of max cardinality and cooldown duration
ying-jeanne 2cf8c3e
rename CompareLabels to hasSameLabels
ying-jeanne f994034
remove the mapping logic since the slices are ordered
ying-jeanne b060c09
remove unnecessary tracker nil checking
ying-jeanne e35a8d9
fix linting
ying-jeanne 5cc0b5d
refactor updateOverflow method
ying-jeanne 389dff0
remove stream in comments
ying-jeanne 116a69e
make observation struct private
ying-jeanne 9c30445
remove unnecessary pointers
ying-jeanne 88ef49e
rename discardSampleMtx to discardedSampleMtx
ying-jeanne 130636a
rename variable observedMtx because I write with feet
ying-jeanne b701ba7
update test name dum dum
ying-jeanne dccd9c8
remove test result
ying-jeanne eebd028
address doc change
ying-jeanne 8386503
remove time checking
ying-jeanne d8f1e9b
add createIfDoesNotExist parameter
ying-jeanne b9efb94
add more condition for trigger newTracker
ying-jeanne a37e6de
remove the label adapter to labels call
ying-jeanne 211b3a2
remove useless function dum dum
ying-jeanne f697e6f
make hardcoded increment value
ying-jeanne fe8a1e5
rename + make cooldownuntil a normal int64 and lock with observedMtx
ying-jeanne 8b5836f
use build-in functon dum dum
ying-jeanne 888d8b0
modify the copy of calabels instead of directly the slice
ying-jeanne b15b487
update mimir-prometheus
ying-jeanne 87209d6
Merge remote-tracking branch 'origin/r322' into final-cost-attribution
ying-jeanne 4706bde
vendor new mimir-prometheus
ying-jeanne 1ab1f00
rename function
ying-jeanne 8111b6c
fix lint
ying-jeanne 17b64a9
add unittest in active series
ying-jeanne a191044
copy slice instead
ying-jeanne 2bb1845
add test for discarded samples
ying-jeanne ddd507d
change small map to slice since it is quicker
ying-jeanne b27e379
remove unused parameter
ying-jeanne a79fac7
add new parameter
ying-jeanne 37901b7
update config file
ying-jeanne f7115f4
Update pkg/costattribution/manager.go
ying-jeanne 679f2cc
take config before locking tracker map
ying-jeanne 66accc9
simplify logics
ying-jeanne f4a4efd
remove useless initialization
ying-jeanne f90ac0e
change int64 to time.x
ying-jeanne 1ab89c5
change pointer to instance
ying-jeanne 23b32cf
change instance to pointer in map
ying-jeanne 7a60c7d
remove callback
ying-jeanne 0287bf6
use string when create new key in map
ying-jeanne 9c4c2df
move the logic to different place
ying-jeanne f8f2a49
get cat once out of loop
ying-jeanne 1ad99ad
update tracker per request for received samples
ying-jeanne fa62ee1
make the lock fanny by dum dum
ying-jeanne 1b0fb00
make ingester work
ying-jeanne ced8346
fix lock
ying-jeanne 0a7c858
add changelog
ying-jeanne 4336f7f
update changelog
ying-jeanne 67b6cea
update doc with correct metrics name
ying-jeanne 800fe85
remove useless function
ying-jeanne 80e69fb
cast only once
ying-jeanne a2ffe5a
stop using string
ying-jeanne f28d672
simplify logics
ying-jeanne a5c3944
add new tracker for active series only
ying-jeanne aee9049
add new sample tracker vs active series tracker
ying-jeanne 3bd23e4
Merge remote-tracking branch 'origin/main' into final-cost-attribution
ying-jeanne 749bafd
remove conflict
ying-jeanne 5f07f16
clean up code
ying-jeanne 37ba4f2
fix
ying-jeanne 8d06204
Update pkg/distributor/distributor.go
ying-jeanne 68410c8
address comments
ying-jeanne c4a44eb
update docs
ying-jeanne 091e5c2
update tests
ying-jeanne 78ea839
correct the metrics name
ying-jeanne f0b0b40
fix lint
ying-jeanne fbb2fac
update examples
ying-jeanne 70c1d9e
remove test files
ying-jeanne 39b888f
change tests
ying-jeanne 23ca840
rename cat to cast
ying-jeanne d7886f0
remove the unnecessary indent
ying-jeanne 5a7dbbb
format
ying-jeanne 5c26a0b
move the order function to the caller
ying-jeanne 56beeaa
add comments
ying-jeanne 21a6d3a
Update pkg/costattribution/sample_tracker.go
ying-jeanne 73a9881
remove useless function
ying-jeanne 6d27724
change overflowSince to time.Time
ying-jeanne 5ac64f5
change the lock to RWMutex
ying-jeanne e5cda41
change the condition of recovered to less than maxcardinality
ying-jeanne 41e9f47
remove useless function
ying-jeanne cb5512b
change overflowsince to time.time
ying-jeanne c968b95
Update pkg/costattribution/manager.go
ying-jeanne 5733955
Update pkg/costattribution/sample_tracker.go
ying-jeanne 80b64dc
fix test
ying-jeanne 34fd8b3
formatting
ying-jeanne 72c16ea
fix dum dum
ying-jeanne f1da054
just defer
ying-jeanne 673d607
use write lock to write, sounds reasonable hum?
ying-jeanne aa57e2f
update lock
ying-jeanne 582e92e
Merge remote-tracking branch 'origin/main' into final-cost-attribution
ying-jeanne c5eb8c2
changelog update
ying-jeanne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry for a late comment, but this should be a FEATURE.