spring-cloud / spring-cloud/spring-cloud-config

Ability to customize the default ObservationEnvironmentRepositoryObservationConvention

Open
#2,383 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback-provided
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.