blob: 317920f4f08bceea93b4eb50c9e96e10cd97aef2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
package kamon
import com.typesafe.config.{Config, ConfigFactory}
import kamon.metric.{RecorderRegistry, RecorderRegistryImpl}
import kamon.trace.Tracer
/**
* The main entry point to all Kamon functionality.
*
*
*
*
*/
object Kamon {
private val recorderRegistry = new RecorderRegistryImpl(ConfigFactory.load())
private val reporterRegistry = new ReporterRegistryImpl(recorderRegistry, ConfigFactory.load())
private val kamonTracer = new Tracer(recorderRegistry, reporterRegistry)
def tracer: io.opentracing.Tracer = kamonTracer
def metrics: RecorderRegistry = recorderRegistry
def reporters: ReporterRegistry = reporterRegistry
def reconfigure(config: Config): Unit = synchronized {
recorderRegistry.reconfigure(config)
reporterRegistry.reconfigure(config)
}
def environment: Environment = ???
def diagnose: Diagnostic = ???
def util: Util = ???
}
/*
Kamon.metrics.getRecorder("app-metrics")
Kamon.metrics.getRecorder("akka-actor", "test")
Kamon.entities.get("akka-actor", "test")
Kamon.entities.remove(entity)
Kamon.util.entityFilters.accept(entity)
Kamon.util.clock.
Kamon.entities.new().
Kamon.subscriptions.loadFromConfig()
Kamon.subscriptions.subscribe(StatsD, Filters.IncludeAll)
Kamon.subscriptions.subscribe(NewRelic, Filters.Empty().includeCategory("span").withTag("span.kind", "server"))
Things that you need to do with Kamon:
Global:
- Reconfigure
- Get Diagnostic Data
Metrics:
- create entities
- subscribe to metrics data
Tracer:
- Build Spans / Use ActiveSpanSource
- subscribe to tracing data
*/
|