-
Notifications
You must be signed in to change notification settings - Fork 25
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
add cf task metrics #56
Conversation
Hello, those mettrics are available in firehose_exporter, for the use case you mentioned (when you have task never ending), you can use metric you can also get the drop-in replacement (more close too a drop-in) of firehose_exporter in PR here cloudfoundry/firehose_exporter#63 if you have a big cluster (we use it in production) |
I may be missing something, but I don't think those firehose metrics would have allowed us to break it down by application, and thus ultimately discover its owner. |
☝️ Have added another metric, the |
Have rebased following the merge of #57. Most of what I've written above is still applicable. This now provisionally depends on cloudfoundry/cli#2343 to allow me to make calls to the |
vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_routes.go
Show resolved
Hide resolved
thanks @risicle for this very usefull contribution ! |
2b9e2e6
to
176d954
Compare
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
I think I've thoroughly failed to get cloudfoundry/cli#2343 merged, so if anyone ever wants to see this functionality in cf exporter they're probably going to have to take on the task (pun intended) of getting that merged themselves. |
This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 5 days. |
This PR was automatically closed because it has been stalled for 5 days with no activity. |
@risicle it happened, your CLI PR is merged :D |
I noticed - I'm still in shock. Have to rebase this now... |
this is a version which is GetTasksRequest-aware
pre-aggregated to avoid exposing any transient and therefore high cardinality labels oldest_created_at allows long-running tasks to be spotted while still avoiding the high-cardinality labels that would be needed to identify individual tasks disable by default for its initial introduction to avoid nasty surprises
Tested again running as a cf app, works fine. |
outdated, requested review from gmlt and/or mdimiceli
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.
Looks good to me, thanks @risicle !
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.
Good for me, thanks @risicle for the contribution
🎂 Happy anniversary! 🎂 |
Hi,
We noticed cf_exporter was missing metrics for cf tasks. This information would have proved useful when we had a tenant spinning up nightly-but-never-ending tasks using ever accumulating amounts of resources.
Firstly this required a bump to the vendored go-cfclient to include theRelationships
field inTask
structs, added in cloudfoundry/go-cfclient#309Secondly note how this collector is a little different from others because it performs some amount of aggregation up-front. This is because all potential labels that would allow identification of individual tasks are likely to be high cardinality ephemeral identifiers which could lead to the dreaded "cardinality explosion".
Of the information we can access about a task, the
guid
is unique for each task launched - an hourly task running 24/7 would produce a lot of these.sequence_id
on its own is low-ish cardinality but when multiplied against the application guids would cause similar problems. A newdroplet_guid
is generated every time an application is re-staged (correct me?), and so a team doing a release a day would again start to generate a lot of unique combinations. Though a task'sname
could be heavily reused, in practise I suspect most users fall back to the default, which is randomly generated.So that just leaves us with
application_id
andstate
as labels.This uses the v3 task interface, so this is hidden behind the "v3 enabled" flag much likeIsolationSegmentsCollector
.