diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2018-10-29 17:45:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 17:45:57 +0100 |
commit | f1c6ceffa22c59a463d6d8cd2ca77e2b440eb450 (patch) | |
tree | 5b871456e3d5ec72ed19a85484a28975efafc4a4 /kamon-core/src/main/scala/kamon/module/ReportingModule.scala | |
parent | d0a0dfe886952ba924adacaabf85cb96ce5fe032 (diff) | |
download | Kamon-f1c6ceffa22c59a463d6d8cd2ca77e2b440eb450.tar.gz Kamon-f1c6ceffa22c59a463d6d8cd2ca77e2b440eb450.tar.bz2 Kamon-f1c6ceffa22c59a463d6d8cd2ca77e2b440eb450.zip |
Implement a module registry that supports loading from configuration (#559)
Diffstat (limited to 'kamon-core/src/main/scala/kamon/module/ReportingModule.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/module/ReportingModule.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/module/ReportingModule.scala b/kamon-core/src/main/scala/kamon/module/ReportingModule.scala new file mode 100644 index 00000000..0e88fc23 --- /dev/null +++ b/kamon-core/src/main/scala/kamon/module/ReportingModule.scala @@ -0,0 +1,21 @@ +package kamon +package module + +import kamon.trace.Span +import kamon.metric.PeriodSnapshot + +/** + * Modules implementing this trait will get registered for periodically receiving metric period snapshots. The + * frequency of the period snapshots is controlled by the kamon.metric.tick-interval setting. + */ +trait MetricReporter extends Module { + def reportPeriodSnapshot(snapshot: PeriodSnapshot): Unit +} + +/** + * Modules implementing this trait will get registered for periodically receiving span batches. The frequency of the + * span batches is controlled by the kamon.trace.tick-interval setting. + */ +trait SpanReporter extends Module { + def reportSpans(spans: Seq[Span.FinishedSpan]): Unit +} |