Commit 973a546
authored
feat(server): replace OpenTelemetry with Micrometer (#1823)
To test locally, follow these steps after installing docker and docker
compose:
1. Execute `./gradlew jit-binding-server:publishImageToLocalRegistry`
2. Create `docker-compose.yml` with the following content:
```
services:
github-workflows-kt:
image: github-workflows-kt-jit-binding-server
ports:
- "8080:8080"
environment:
- GITHUB_TOKEN
networks:
prometheus:
grafana:
image: grafana/grafana:11.5.0
ports:
- "3000:3000"
volumes:
- ./datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
networks:
prometheus:
prometheus:
image: prom/prometheus:v3.1.0
configs:
- source: prometheus
target: /etc/prometheus/prometheus.yml
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.enable-remote-write-receiver"
networks:
prometheus:
networks:
prometheus:
configs:
prometheus:
file: prometheus.yml
```
3. Create `.env` on the same folder as docker-compose:
```
GITHUB_TOKEN=XXX
```
where XXX is a generated github token with access to public repositories
4. Create `prometheus.yml` on the same folder as docker-compose:
```
global:
scrape_interval: 5s
scrape_configs:
- job_name: 'ktor-app'
metrics_path: '/metrics'
static_configs:
- targets: ['github-workflows-kt:8080']
```
5. Create `datasources.yaml` on the same folder as docker-compose:
```
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090/
access: proxy
isDefault: true
```
6. Execute `docker compose up -d`
- Workflows should be accessible on port 8080
- Prometheus should be accessible on port 9090
- Grafana should be accessible on port 30001 parent e4349d1 commit 973a546
5 files changed
Lines changed: 29 additions & 165 deletions
File tree
- jit-binding-server
- src/main/kotlin/io/github/typesafegithub/workflows/jitbindingserver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | | - | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
11 | 24 | | |
12 | 25 | | |
13 | 26 | | |
| |||
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
28 | | - | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | | - | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
Lines changed: 0 additions & 154 deletions
This file was deleted.
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
0 commit comments