I'm trying to automate pushing of metrics to Compass using Curl from our CI/CD system as described here,
https://developer.atlassian.com/cloud/compass/components/push-metric-values-using-a-curl-command/
I note that the curl event command is significantly better documented (although I haven't tried that yet, so might have similar questions once I get to that).
@Michael Akinde thanks for the feedback about the documentation! I'll make sure that gets passed along so that we can hopefully make this more clear for future users.
As to your questions:
I replied in the other anser, in order to avoid splitting the discussion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Michael Akinde !
To answer your questions:
Let me know whether that works for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got GraphQL working for retrieving the sourceIds, though not without some trial and error. This is my main issue with GraphQL - it does the job, but it is just so verbose to use (and thus error prone) when all I really want is a simple query.
Does the inserMetricValue not have the 100 calls per minute limitation? If so, I guess that is an alternative workaround if we hit the limit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll just reply to @Erik Budtke here as well, rather than split the discussion.
Our use case is that we have test and analysis jobs running on our CI/CD server, which pushes data to SonarQube. Since the SonarQube integration for Atlassian is extremely limited, we need some way to send the metrics to Compass.
We have several hundred projects in our system. Manually copying the sourceId from Compass into a variable somewhere is not an option.
What we do now is grab the SonarID, fetch the metrics from Sonar through it's API, then grab the CompassComponentId (from the compass.yml), retrieve the metricSourceIds from the Compass GraphQL API, and then post the metrics to Compass. All of this is scripted.
Currently we do this on every commit. We considered doing this on a timer, but then you'd have a 100 builds jobs running in parallel, and that would almost certainly cause an issue with the rate limit.
The problem is that we have to post every metric individually. Currently in the version we are testing, we are just posting 2 metrics, but there are easily 10-15 metrics that could be interesting to push to Compass per component. If every iteration of this job results in ~15 calls, then it's not going to take very many simultaneous build jobs to hit the rate limit.
Segmenting the call across multiple users is not an option I'd like to take. The caller is our "bot" user for the CI/CD system; having multiple users for the system would complicate the scripting.
Being able to post the metrics in a single call would solve the problem for our use case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A follow-up question: Using the GraphQL command, it looks like I am only able to get the built-in compass metrics. Is there a way to get hold of the codes for custom metrics as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I think I found the answer to this - I guess that the metric needs to be connected to the component for it to be useful.
The only way seems to be doing it component by component. Though this of course means that this is never happening (again - 200+ components - no one is spending their time doing this manually).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.