Skip to content

Tracing

Eventually, services may need to expose information and values counted during their execution that are not common. This information is called tracing collectors and also defined in the service's own configuration file.

Each tracing collector must have the following information:

  • Name
  • Category
  • Description

In the service configuration file, this information is arranged as follows:

toml
name = "alert"
type = "grpc"
version = "v0.1.0"
language = "go"
product = "SDS"

[[features.tracing.collectors]]
name = "a_regular_name"
kind = "counter"
description = "the custom collector description."

[[features.tracing.collectors]]
name = "another_name"
kind = "counter_vec"
description = "a simple description"
labels = [ "one", "two", "three" ]

[[features.tracing.collectors]]
name = "a_histogram"
kind = "histogram"
description = "the custom collector description."
labels = [ "first", "second", "third" ]
buckets = [ 0.05, 0.1, 0.25, 0.5 ]

It is important to note that the name field must have a term in snake case in lowercase letters.

The kind field supports the following formats:

TypeDescription
counterA common counter, which can only be incremented.
counter_vecAn array of counters, indexed by labels, capable of being incremented.
This category requires the use of the labels field allowing you to define the counter labels.
flagA value of type true true or false false.
histogramAn array of values also indexed by "labels", with the possibility of customized intervals.
This category requires the use of the labels field. It also allows you to define custom intervals
using the buckets field.
valueA common value, allowing updates without restriction of lower or upper limit.