diff options
author | Chris Baumbauer <cab@cabnetworks.net> | 2019-04-06 02:02:39 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-04-06 02:02:39 +0000 |
commit | b77fe7db3e885edca14c862f362e2bbd43f0e498 (patch) | |
tree | cd984b8bb900a6b3e37c8f6106101ba8617bf524 /app/serializers | |
parent | 8e33e7cf474b61bbc684d993d86cb5aa775a01d0 (diff) | |
download | gitlab-ce-b77fe7db3e885edca14c862f362e2bbd43f0e498.tar.gz |
Add Knative metrics to Prometheus
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/projects/serverless/service_entity.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/projects/serverless/service_entity.rb b/app/serializers/projects/serverless/service_entity.rb index c98dc1a1c4a..a46f8af1466 100644 --- a/app/serializers/projects/serverless/service_entity.rb +++ b/app/serializers/projects/serverless/service_entity.rb @@ -32,6 +32,13 @@ module Projects service.dig('podcount') end + expose :metrics_url do |service| + project_serverless_metrics_path( + request.project, + service.dig('environment_scope'), + service.dig('metadata', 'name')) + ".json" + end + expose :created_at do |service| service.dig('metadata', 'creationTimestamp') end |