diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-25 16:52:52 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-25 16:52:52 +0200 |
commit | a3d78ef61a277b0b62dc93daf84756dfa7625d3d (patch) | |
tree | 4fee7ce93ecfb4e32c7aaaa22efb75ed07c667f6 /kamon-core/src/main/scala/kamon/trace/Tracer.scala | |
parent | 22379d3f318b2cd3a4c995ff1c45bda33d935a46 (diff) | |
download | Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.tar.gz Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.tar.bz2 Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.zip |
trying to flatten out the structure and eliminate the notion of entitites
Diffstat (limited to 'kamon-core/src/main/scala/kamon/trace/Tracer.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/Tracer.scala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/Tracer.scala b/kamon-core/src/main/scala/kamon/trace/Tracer.scala index 6bb5a252..ed42b810 100644 --- a/kamon-core/src/main/scala/kamon/trace/Tracer.scala +++ b/kamon-core/src/main/scala/kamon/trace/Tracer.scala @@ -7,12 +7,11 @@ import io.opentracing.propagation.{TextMap, Format} import io.opentracing.propagation.Format.Builtin.{BINARY, HTTP_HEADERS, TEXT_MAP} import io.opentracing.util.ThreadLocalActiveSpanSource import kamon.ReporterRegistryImpl -import kamon.metric.{Entity, EntityRecorder, RecorderRegistry} import kamon.util.Clock -class Tracer(metrics: RecorderRegistry, reporterRegistry: ReporterRegistryImpl) extends io.opentracing.Tracer { +class Tracer(metrics: Any, reporterRegistry: ReporterRegistryImpl) extends io.opentracing.Tracer { private val logger = Logger(classOf[Tracer]) - private val metricsRecorder = new TracerMetricsRecorder(metrics.getRecorder(Entity("tracer", "tracer", Map.empty))) + ///private val metricsRecorder = new TracerMetricsRecorder(metrics.getRecorder(Entity("tracer", "tracer", Map.empty))) private val activeSpanSource = new ThreadLocalActiveSpanSource() @volatile private var sampler: Sampler = Sampler.never @@ -118,15 +117,12 @@ class Tracer(metrics: RecorderRegistry, reporterRegistry: ReporterRegistryImpl) new SpanContext(traceID, traceID, 0L, sampler.decide(traceID), initialTags) } - metricsRecorder.createdSpans.increment() - new Span(spanContext, operationName, initialTags, startTimestampMicros, metrics, reporterRegistry) + //metricsRecorder.createdSpans.increment() + new Span(spanContext, operationName, initialTags, startTimestampMicros, ???, reporterRegistry) } private def createID(): Long = ThreadLocalRandom.current().nextLong() } - private class TracerMetricsRecorder(recorder: EntityRecorder) { - val createdSpans = recorder.counter("created-spans") - } } |