forked from cashapp/misk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split remaining service dependencies into their own modules
This is AWS, Graphite, Jaeger, SignalFx, and Zipkin. The Zipkin/Jaeger change is unsatisfying because we used to support choosing a tracer at runtime depending on what was in the config. This was nice behavior but it meant that every application had the union of all tracing dependencies in their binary. I'm going to try to find a nicer way in follow-up.
- Loading branch information
1 parent
8aa8e0c
commit cea3164
Showing
47 changed files
with
263 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import org.junit.platform.console.options.Details | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'org.junit.platform.gradle.plugin' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin/' | ||
test.java.srcDirs += 'src/test/kotlin/' | ||
} | ||
|
||
junitPlatform { | ||
details Details.VERBOSE | ||
} | ||
|
||
dependencies { | ||
compile dep.awsApi | ||
compile dep.awsLogging | ||
compile project(':misk') | ||
|
||
testCompile dep.assertj | ||
testCompile dep.junitApi | ||
testCompile dep.junitEngine | ||
testCompile dep.junitParams | ||
testCompile project(':misk-testing') | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POM_ARTIFACT_ID=misk-aws | ||
POM_NAME=misk-aws | ||
POM_DESCRIPTION=Misk module for AWS | ||
POM_PACKAGING=jar |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import org.junit.platform.console.options.Details | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'org.junit.platform.gradle.plugin' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin/' | ||
test.java.srcDirs += 'src/test/kotlin/' | ||
} | ||
|
||
junitPlatform { | ||
details Details.VERBOSE | ||
} | ||
|
||
dependencies { | ||
compile dep.metricsGraphite | ||
compile project(':misk') | ||
|
||
testCompile dep.assertj | ||
testCompile dep.junitApi | ||
testCompile dep.junitEngine | ||
testCompile dep.junitParams | ||
testCompile project(':misk-testing') | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POM_ARTIFACT_ID=misk-graphite | ||
POM_NAME=misk-graphite | ||
POM_DESCRIPTION=Misk module for Graphite | ||
POM_PACKAGING=jar |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import org.junit.platform.console.options.Details | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'org.junit.platform.gradle.plugin' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin/' | ||
test.java.srcDirs += 'src/test/kotlin/' | ||
} | ||
|
||
junitPlatform { | ||
details Details.VERBOSE | ||
} | ||
|
||
dependencies { | ||
compile dep.tracingJaeger | ||
compile project(':misk') | ||
|
||
testCompile dep.assertj | ||
testCompile dep.junitApi | ||
testCompile dep.junitEngine | ||
testCompile dep.junitParams | ||
testCompile project(':misk-testing') | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POM_ARTIFACT_ID=misk-jaeger | ||
POM_NAME=misk-jaeger | ||
POM_DESCRIPTION=Misk module for Jaeger | ||
POM_PACKAGING=jar |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions
9
...ain/kotlin/misk/tracing/TracingService.kt → ...g/backends/jaeger/JaegerTracingService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package misk.tracing | ||
package misk.tracing.backends.jaeger | ||
|
||
import com.google.common.util.concurrent.AbstractIdleService | ||
import io.opentracing.Tracer | ||
import io.opentracing.util.GlobalTracer | ||
import javax.inject.Inject | ||
|
||
internal class TracingService @Inject internal constructor( | ||
internal class JaegerTracingService @Inject internal constructor( | ||
private val tracer: Tracer | ||
) : AbstractIdleService() { | ||
override fun startUp() = GlobalTracer.register(tracer) | ||
override fun shutDown() {} | ||
} | ||
override fun shutDown() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import org.junit.platform.console.options.Details | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'org.junit.platform.gradle.plugin' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin/' | ||
test.java.srcDirs += 'src/test/kotlin/' | ||
} | ||
|
||
junitPlatform { | ||
details Details.VERBOSE | ||
} | ||
|
||
dependencies { | ||
compile dep.metricsSignalFx | ||
compile project(':misk') | ||
|
||
testCompile dep.assertj | ||
testCompile dep.junitApi | ||
testCompile dep.junitEngine | ||
testCompile dep.junitParams | ||
testCompile project(':misk-testing') | ||
testCompile project(':misk-gcp-testing') | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POM_ARTIFACT_ID=misk-signalfx | ||
POM_NAME=misk-signalfx | ||
POM_DESCRIPTION=Misk module for SignalFx | ||
POM_PACKAGING=jar |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import org.junit.platform.console.options.Details | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'org.junit.platform.gradle.plugin' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
allWarningsAsErrors = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin/' | ||
test.java.srcDirs += 'src/test/kotlin/' | ||
} | ||
|
||
junitPlatform { | ||
details Details.VERBOSE | ||
} | ||
|
||
dependencies { | ||
compile dep.tracingZipkin | ||
compile dep.zipkinReporter | ||
compile dep.zipkinBrave | ||
compile project(':misk') | ||
|
||
testCompile dep.assertj | ||
testCompile dep.junitApi | ||
testCompile dep.junitEngine | ||
testCompile dep.junitParams | ||
testCompile project(':misk-testing') | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POM_ARTIFACT_ID=misk-zipkin | ||
POM_NAME=misk-zipkin | ||
POM_DESCRIPTION=Misk module for Zipkin | ||
POM_PACKAGING=jar |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
misk-zipkin/src/main/kotlin/misk/tracing/backends/zipkin/ZipkinTracingService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package misk.tracing.backends.zipkin | ||
|
||
import com.google.common.util.concurrent.AbstractIdleService | ||
import io.opentracing.Tracer | ||
import io.opentracing.util.GlobalTracer | ||
import javax.inject.Inject | ||
|
||
internal class ZipkinTracingService @Inject internal constructor( | ||
private val tracer: Tracer | ||
) : AbstractIdleService() { | ||
override fun startUp() = GlobalTracer.register(tracer) | ||
override fun shutDown() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.