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

Add appName when report jvm metrics to prometheus #42

Closed
khotyn opened this issue Oct 12, 2018 · 3 comments
Closed

Add appName when report jvm metrics to prometheus #42

khotyn opened this issue Oct 12, 2018 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@khotyn
Copy link
Member

khotyn commented Oct 12, 2018

Currently app name tag is not set then report jvm metrics to prometheus, which should have.

@khotyn khotyn added the enhancement New feature or request label Oct 12, 2018
@joker0035
Copy link

原来的上报的metric 格式为
jvm_heap_memory_used{instance="$instance", job="$job"}

希望可以变成
jvm_heap_memory_used{instance="$instance", job="$job",app="$app"}

app为spring boot应用的名字,如果程序中没有该项配置,可以只带上instance和job。

@joker0035
Copy link

spring boot应用的应用名通常定义在 application.properties中,
spring.application.name=“xxxxx”

@khotyn
Copy link
Member Author

khotyn commented Oct 15, 2018

@joker0035 Just release a new SNAPSHOT verison of SOFALookout to fix this problem, you can add the follow dependencies to your project to have a try:

  <dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-sofa-boot-starter</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
    <dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-api</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-client</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-common</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-core</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-ext-jvm</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-ext-os</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-reg-prometheus</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.alipay.sofa.lookout</groupId>
    <artifactId>lookout-reg-server</artifactId>
    <version>1.5.2-SNAPSHOT</version>
</dependency>

Please reopen the issue if you have any further questions.

@khotyn khotyn closed this as completed Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants