spring-cloud / spring-cloud/spring-cloud-config
Ability to customize the default ObservationEnvironmentRepositoryObservationConvention
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
Is your feature request related to a problem? Please describe.
Current implementation doesn't allow to customize the default ObservationEnvironmentRepositoryObservationConvention implementation. The default implementation adds to the lowCardinalityTags the application. This can be a problem when we have many applications, like our use case. This is exploding the cardinality for this metric when we expose this metric to prometheus and this is a known performance issue.
Describe the solution you'd like
I would like to be able to change the tags that are exported in metrics.
Describe alternatives you've considered
I tried to use an ObservationFilter as described in micrometer docs, but since it is a post-processing component it didn't take effect.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/ObservationEnvironmentRepositoryObservationConvention.java, especially the lowCardinalityTags handling linked in the issue. Review how the convention is selected and how the Micrometer observation customization described in the issue differs from post-processing; done means applications can change the exported tags without the default application tag causing excessive cardinality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100