Spring-boot: Spring actuator with git-commit-id-plugin does not use all the data

Created on 12 Mar 2015  路  10Comments  路  Source: spring-projects/spring-boot

I am trying to use git-commit-id-plugin with Spring actuator,

App generated these values in the "git.properties" file:

screen shot 2015-03-12 at 17 25 26

but when i use /info url the app only shows:

screen shot 2015-03-12 at 17 23 34

why only shows 2 values of git.commit? The other values does not appear. (git.commit.id.describe which is the most important value for this plugin )

enhancement

Most helpful comment

@snicoll You're my hero! But now I've to update my Spring Boot Actuator demo ;-)

All 10 comments

The values that are read from that file are constrained by the structure of GitInfo.

Do you intend to show everything or do you believe only some properties are missing?

I Inted to show every properties, specially git.commit.id.describe, This value is a must to be Able to know which version of an App is deployed in the server, this is the main feature that we use of git-commit-id- plugin in my company.

I think that we deliberately kept GitInfo somewhat light so that it works well with other build systems. It should be relatively easy to add some more properties.

Also see #2484 which discusses moving the class outside of actuator.

Thank you philwebb and snicoll for your fast support.

I got it working for me, but I dropped the GitInfo in favor of a Map<String, Object>, so that the git.properties can evolve independently without requiring code update.

If you're interested, I can make a PR. If not, not a problem since Spring Boot is easily extensible.

+1 for me

See also #3492

management.info.git.mode=full can be used to display all the information available in git.properties. The default is simple and displays what we used to so far.

@snicoll You're my hero! But now I've to update my Spring Boot Actuator demo ;-)

Was this page helpful?
0 / 5 - 0 ratings