-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.alloy
More file actions
70 lines (63 loc) · 1.49 KB
/
Copy pathconfig.alloy
File metadata and controls
70 lines (63 loc) · 1.49 KB
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
69
70
discovery.docker "all" {
host = "unix:///var/run/docker.sock"
}
discovery.relabel "local_containers" {
targets = discovery.docker.all.targets
rule {
action = "replace"
source_labels = ["__meta_docker_container_name"]
target_label = "service_name"
}
}
pyroscope.ebpf "instance" {
forward_to = [pyroscope.write.endpoint.receiver]
targets = discovery.docker.all.targets
demangle = "full"
collect_user_profile = true
collect_kernel_profile = false
sample_rate = 50
off_cpu_threshold = 1000
}
discovery.process "all" {
join = discovery.docker.all.targets
}
discovery.relabel "java" {
targets = discovery.process.all.targets
rule {
source_labels = ["__meta_process_exe"]
action = "keep"
regex = ".*/java$"
}
rule {
source_labels = ["__meta_process_commandline"]
regex = "java PerformanceTest"
action = "keep"
}
rule {
action = "replace"
target_label = "service_name"
replacement = "java-performance-test"
}
}
pyroscope.scrape "local" {
targets = [
{"__address__" = "localhost:12345", "service_name"="alloy"},
]
forward_to = [pyroscope.write.endpoint.receiver]
}
pyroscope.java "java" {
profiling_config {
interval = "15s"
alloc = "512k"
cpu = true
lock = "10ms"
sample_rate = 97
}
forward_to = [pyroscope.write.endpoint.receiver]
targets = discovery.relabel.java.output
}
pyroscope.write "endpoint" {
endpoint {
url = "http://pyroscope:4040"
}
}