Additional data in webhook payload

  • ALM: Azure DevOps
  • CI: Azure DevOps
  • Languages of the repository: mainly C#

Use Case
We’re using the webhook to provide data to OpsLevel to use in maturity report rubric checks to analyse the maturity of our services.

Issue
If I understand correctly, the webhook only includes metrics for new code rather than the whole code project. I can see that information is really useful for some use cases, but for ours, where we want to understand the quality of the project as a whole rather than just the last change, we need to understand the metrics for the whole project e.g. the coverage matric rather than new coverage.

Questions

  • Is there a way to configure which metrics are sent in the webhook payload?
  • If not, how would I request it as a feature to send additional metrics?

Thanks.

3 Likes

Hey Simon.

The Webhook includes those metrics that are used in the Quality Gate assigned to your project. So you can adjust which metrics are included by adjusting your Quality Gate.

I’m curious to know if there’s a metric you want included that you don’t want checked for in your Quality Gate?

Thanks @Colin, I hadn’t realised that.

I’m curious to know if there’s a metric you want included that you don’t want checked for in your Quality Gate?

In short, yes. For our quality gate, we want to enforce code coverage, security rating etc. on new code only. However, we also want to track those metrics on the whole repo in our developer portal so we’d like those metrics to be available in the webhook data.

Is that possible?

Many thanks.

It’s not possible. But luckily those measures are preserved in the Activity tab of your project (new_ measures aren’t, because once there’s a new analysis they’re no longer “new”). These Overall code measures can be queried using GET api/measures_search_history.

So while it’s not possible to put these measures in the webhook, they are queryable.

Thanks for the quick response @Colin.
How would I go about raising that as a feature request? It would massively simplify things for us if we could make more metric data available in the webhooks.
Cheers.

I’ve moved your post to the Product Manager for a Day category which is, effectively, our feature request category. Other people can add their voice to our thread, and our PMs regularly review the threads here.

2 Likes

Thanks @Colin.