-
Notifications
You must be signed in to change notification settings - Fork 297
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
feature: Need Cardinality Limiter for gql.loaderBatchSize tag in gql.dataLoader metrics #1974
Comments
Hi @hzariv, Is there any discussion thread on this feature request that I can read to understand this issue better? |
@mrvaruntandon We have many applications that use @DgsDataLoader heavily with diffrent batch sizes. This results in high cardinality in our metrics system. Here is an example of these metrics. As you can see gql_loaderBatchSize is unbounded and can very. This results in cardinality issues for us. So I need a way to limit the cardinality for this tag or a way to customise the gql_dataLoader_seconds_count and gql_dataLoader_seconds_sum metrics.
|
@hzariv, Thank you for sharing the behaviour you are seeing. Do you have some sample project from which I can replicate this high cardinality behaviour explained in this issue? |
@mrvaruntandon the following example project already has a MappedBatchLoader so if the query is asking for a group of shows with multiple reviews you will get the dataloader metrics as describe here with loaderBatchSize tag in dataLoader metrics. There is nothing special here that application is using. If the caller send queries for multiple shows with a number of reviews, DGS framework will create dataLoader metrics with different batch sizes and that can result in high cardinality. |
@hzariv are you still facing this issue? |
@mrvaruntandon I ended up removing gql.loaderBatchSize tag from gql.dataLoader.seconds* metrics using a MeterFilter to circumvent the problem. |
@hzariv - how did you install the MeterFilter? Per this discussion here, you mentioned you couldn't accomplish that because the MeterRegistry bean cannot be customized because DgsMeterRegistrySupplier is internal: #1986 (reply in thread) |
Please read our contributor guide before
creating an issue. Also consider discussing your idea on
the discussion forum first.
Describe the Feature Request
gql.loaderBatchSize tag in gql.dataLoader metrics can have a high cordinality. I need a way to limit this tag cardinality.
Describe Preferred Solution
I would like management.metrics.dgs-graphql.tags.limiter.limit property to apply to gql.loaderBatchSize tag
Describe Alternatives
Provide a way for me to customize the metrics tags
The text was updated successfully, but these errors were encountered: