summaryrefslogtreecommitdiff
path: root/modules/eko-config.alloy
blob: d9c2e23dafba5fc66426ed853b80ffbf4ba3e794 (plain)
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
local.file_match "eko_logs" {
  path_targets = [
    { __path__ = "/home/kyren/projects/eko/logs/*.log" },
  ]
  sync_period = "1s"
}

loki.source.file "eko_tail" {
  targets       = local.file_match.eko_logs.targets
  forward_to    = [loki.write.eko.receiver]
  tail_from_end = true
}

loki.write "eko" {
  endpoint {
    url = "http://localhost:3100/loki/api/v1/push"
  }
  external_labels = { app = "eko-server" }
}

pyroscope.write "write_job_name" {
  endpoint {
    url = "http://localhost:4040"
  }
}

pyroscope.scrape "scrape_job_name" {
  targets    = [{"__address__" = "localhost:4040", "service_name" = "eko"}]
  forward_to = [pyroscope.write.write_job_name.receiver]

  profiling_config {
    profile.process_cpu {
      enabled = true
    }

    profile.godeltaprof_memory {
      enabled = true
    }

    profile.memory { // disable memory, use godeltaprof_memory instead
      enabled = false
    }

    profile.godeltaprof_mutex {
      enabled = true
    }

    profile.mutex { // disable mutex, use godeltaprof_mutex instead
      enabled = false
    }

    profile.godeltaprof_block {
      enabled = true
    }

    profile.block { // disable block, use godeltaprof_block instead
      enabled = false
    }

    profile.goroutine {
      enabled = true
    }
  }
}