Closed sebco59 closed 3 years ago
Add schema registry metrics in order to expose schema count (based on the connector_ksql.go)
A new resource type is available schema_registry (https://api.telemetry.confluent.cloud/docs)
schema_registry
curl https://api.telemetry.confluent.cloud/v2/metrics/cloud/descriptors/metrics?resource_type=schema_registry
and is in GA !
{ "data": [ { "name": "io.confluent.kafka.schema_registry/schema_count", "description": "The number of registered schemas.", "type": "GAUGE_INT64", "unit": "1", "lifecycle_stage": "GENERAL_AVAILABILITY", "labels": [] } ], "meta": { "pagination": { "page_size": 100, "total_size": 1 } }, "links": {} }
Metrics can be get by this call
curl --request POST 'https://api.telemetry.confluent.cloud/v2/metrics/cloud/query' \ --data-raw '{ "aggregations": [ { "agg": "SUM", "metric": "io.confluent.kafka.schema_registry/schema_count" } ], "filter": { "filters": [ { "field": "resource.schema_registry.id", "op": "EQ", "value": "lsrc-abcde" } ], "op": "AND" }, "granularity": "PT1M", "group_by": [ ], "intervals": [ "2021-06-03T10:00:00+01:00/2021-06-03T11:00:00+01:00" ], "limit": 500 }'
Fix #64
Thanks @sebco59 for the PR. It looks good to me. Let me merge it, a new docker image should be available a few minutes after the merge.
Add schema registry metrics in order to expose schema count (based on the connector_ksql.go)
A new resource type is available
schema_registry
(https://api.telemetry.confluent.cloud/docs)and is in GA !
Metrics can be get by this call