pambrose/prometheus-proxy

Is it possible to publish this for use in Spring Boot projects?

joshblease opened this issue · 4 comments

Hi Paul,

I'd love to use the agent embedded within a spring boot application of mine, however the "javax.servlet" is causing me some headaches and I can't exclude the dependency to use the version that comes with spring. Is there anyway you could publish the project for use in other applications at all?

Resolved this with jitpack and a bit of trial & error with gradle imports, eventually settled on this which seem to work for me:

    implementation "com.google.guava:guava:30.1.1-jre"
    implementation "com.github.pambrose.common-utils:guava-utils:1.10.0"
    implementation "com.github.pambrose.common-utils:service-utils:1.10.0"
    implementation 'com.github.pambrose:prometheus-proxy:1.9.1'

Hi Josh,

Are you embedding the agent in your app or are you running it as a standalone process?

That javax.servlet package is getting dragged in by Jetty, which is used for reporting metrics by Dropwizard.

Paul

I've embedded it within the application as it was a requirement to only have one executable for our use case. It works well within it after overcoming the few dependency issues and using Java+Kotlin.

Glad to hear embedding it worked well for you. That approach is less hassle than using an agent.