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

Discoverable modules and the new module registry #559

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

ivantopo
Copy link
Contributor

This PR brings back something we had back in Kamon 0.6.x: the ability to discover modules by simply having them in the classpath. From this point on, calling Kamon.loadModules() will pick everything under the kamon.modules configuration and try to start them.

We didn't have the actual "modules" concept in 1.x, only reporters were available but with this PR the MetricReporter and SpanReporter traits are just a special type of module. Soon we should be moving things like the executor metrics collectors and JVM/host metrics to modules so that we can globally control their lifecycle and allow a "drop a jar" installation method :).

Also deprecated the "addReporter" variants but kept them compatible.

@dpsoft
Copy link
Contributor

dpsoft commented Oct 16, 2018

@ivantopo awesome man!!!
We have only a compilation error:
image

@@ -46,8 +46,9 @@ lazy val core = (project in file("kamon-core"))
.settings(
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.3.1",
"org.slf4j" % "slf4j-api" % "1.7.25",
"org.hdrhistogram" % "HdrHistogram" % "2.1.9"
"org.hdrhistogram" % "HdrHistogram" % "2.1.9",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in a near future we need shade HDR and JCTools. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree. I remember we had an issue with users having a different version of the HDR histogram in the classpath already. That we can do before releasing.

@ivantopo
Copy link
Contributor Author

I noticed the compilation error, but it seems like travis is somehow stuck on a previous version.. if you look at the branch, that is not the code that is there: https://github.com/ivantopo/Kamon/blob/modules/kamon-core/src/main/scala/kamon/trace/SpanPropagation.scala#L130

@dpsoft
Copy link
Contributor

dpsoft commented Oct 19, 2018

@ivantopo LGTM!

@ivantopo ivantopo merged commit f1c6cef into kamon-io:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants