aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/Status.scala
blob: a5cfe86823210f0a9e0b0e401259a30c5ce9501e (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
/* =========================================================================================
 * Copyright © 2013-2019 the kamon project <https://kamon.io/>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 * =========================================================================================
 */

package kamon

/**
  * Exposes access to the Kamon's current status. The status information contains details about the internal state of
  * several Kamon components and is exposed for the sole purpose of troubleshooting and debugging issues that might be
  * related to Kamon.
  *
  * The Status APIs might change between minor versions.
  */
trait Status { self: ModuleLoading with Metrics with Configuration =>
  private val _status = new kamon.status.Status(self._moduleRegistry, self._metricsRegistry, self)

  /**
    * Returns an accessor to Kamon's current status. The current status information is split into four main sections:
    *   - Settings: which include the Kamon version, environment and configuration being used.
    *   - Module Registry: Lists all modules that have been detected on the classpath and their current state.
    *   - Metric Registry: Lists all metrics currently registered in Kamon and all instruments belonging to them.
    *   - Instrumentation: Lists all instrumentation modules that have been detected and their current state.
    *
    * All information exposed by the Status API represents an immutable snapshot of the state at the moment the status
    * was requested.
    */
  def status(): kamon.status.Status =
    _status
}