Skip to content
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

carbonserver: introduce new api /metrics/list_query #435

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

bom-d-van
Copy link
Member

The api call allows us to query metrics under a namespace query. Unlike /metrics/find, it would
traverse down the matched namespaces and returns all the metrics within them.

It is created to enable management tools to check how many metrics are within matched namespaces,
how big are they physically or logically, etc.

Currently only json payload is supported. I am postponing adding protobuf support as I am
not sure how far the api could go.

A few usage examples:

/metrics/list_query/?format=json&target=sys.app.*&limit=1024 (list 1024 metrics under namespace `sys.app`)
/metrics/list_query/?format=json&target=sys.app.* (by default, limit is 65536)
/metrics/list_query/?format=json&target=sys.app.*&stats_only=true (returns stats info only)

@deniszh
Copy link
Member

deniszh commented Nov 15, 2021

@bom-d-van : LGTM, Deepsorce complaint about "Control-coupled functions detected", not sure if fix needed, though.

@bom-d-van bom-d-van force-pushed the carbonserver/queryable-list-api branch from b1fb5a9 to 7c35f8c Compare November 16, 2021 08:55
@bom-d-van
Copy link
Member Author

Thanks Denis, I have added skipcq: RVV-A0005 in the two functions. The lint suggestions don't seem a good alternative for them.

The api call allows us to query metrics under a namespace query. Unlike /metrics/find, it would
traverse down the matched namespaces and returns all the metrics within them.

It is created to enable management tools to check how many metrics are within matched namespaces,
how big are they physically or logically.

Currently only json payload is supported. I am postponing adding protobuf support as I am
not sure how far the api could go.

A few usage examples:

    /metrics/list_query/?format=json&target=sys.app.*&limit=1024 (list 1024 metrics under namespace `sys.app`)
    /metrics/list_query/?format=json&target=sys.app.* (by default, limit is 65536)
    /metrics/list_query/?format=json&target=sys.app.*&stats_only=true (returns stats info only)
@bom-d-van bom-d-van force-pushed the carbonserver/queryable-list-api branch from 7c35f8c to 731802c Compare November 29, 2021 10:25
@grzkv grzkv self-requested a review November 30, 2021 14:01
@bom-d-van bom-d-van merged commit e5e8821 into master Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants