You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To resolve the issue of empty groups showing up as metric titles, follow these steps:
Locate Metric Title Generation: Identify where metric titles are generated in the codebase. This is likely in the GraphQL models or resolvers.
Modify Title Generation Logic: Update the logic to handle empty groups correctly. For example, in models_gen.go, locate the relevant struct or method responsible for generating metric titles.
Add Conditional Check: Add a conditional check to ensure that empty groups are not included in the metric titles. For instance:
// Example modification in models_gen.goifgroup=="" {
// Handle empty group casetitle="Unknown Group"
} else {
title=group
}
Regenerate Code: If using code generation tools like gqlgen, ensure to regenerate the code to apply the changes.
Test Changes: Verify that the changes correctly handle empty groups and do not show them as metric titles.
e.g. group by service_name -> "service1", "service2", "Count"
The text was updated successfully, but these errors were encountered: