Skip to content

Commit fb07ee0

Browse files
committed
Add dashboard to compose
1 parent 59e0d1c commit fb07ee0

4 files changed

Lines changed: 56 additions & 2 deletions

File tree

config.example.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tls_key_path = "certs/server-key.pem"
55

66
[observability]
77
log_level = "info"
8-
otlp_endpoint = "http://localhost:4317"
8+
otlp_endpoint = "http://otel-collector:4317"
99
[policy]
1010
# Custom extension OID to extract from client certs.
1111
client_ext_oid = "1.3.6.1.4.1.57264.1.1"

demo/setup.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ wait_for_postgres
154154
apply_migrations
155155

156156
echo "==> Starting gateway"
157-
compose up -d --force-recreate gateway
157+
compose up -d --force-recreate gateway otel-collector dashboard
158158

159159
echo "==> Registering demo principal $PRINCIPAL"
160160
env "${demo_env[@]}" "$REPO_ROOT/registry-cli/register-principal-key.sh" "$PRINCIPAL"
@@ -196,6 +196,9 @@ cat <<EOF
196196
197197
Demo is ready.
198198
199+
Dashboard URL:
200+
http://localhost:3000
201+
199202
Mock service URLs available through the gateway:
200203
https://docstore/health
201204
https://docstore/documents

docker-compose.demo.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,29 @@ services:
4242
depends_on:
4343
- postgres
4444
- mock-services
45+
46+
dashboard:
47+
image: ghcr.io/sl5taskforce/agent-gateway-dashboard:main
48+
environment:
49+
AGENT_GATEWAY_DATABASE_URL: postgres://agent_gateway_admin:agent_gateway_dev@postgres:5432/agent_gateway
50+
ports:
51+
- "3000:3000"
52+
depends_on:
53+
postgres:
54+
condition: service_healthy
55+
56+
otel-collector:
57+
image: otel/opentelemetry-collector:0.111.0
58+
command: --config=/etc/otel-collector.yaml
59+
volumes:
60+
- ./otel-collector.yaml:/etc/otel-collector.yaml:ro
61+
ports:
62+
- "4317:4317"
63+
depends_on:
64+
postgres:
65+
condition: service_healthy
66+
dashboard:
67+
condition: service_started
4568

4669
volumes:
4770
agent-gateway-demo-postgres:

otel-collector.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
receivers:
2+
otlp:
3+
protocols:
4+
grpc:
5+
endpoint: 0.0.0.0:4317
6+
7+
processors:
8+
batch:
9+
timeout: 1s
10+
send_batch_size: 50
11+
12+
exporters:
13+
otlphttp/dashboard:
14+
endpoint: http://dashboard:3000
15+
encoding: json
16+
tls:
17+
insecure: true
18+
19+
service:
20+
pipelines:
21+
traces:
22+
receivers: [otlp]
23+
processors: [batch]
24+
exporters: [otlphttp/dashboard]
25+
26+
telemetry:
27+
logs:
28+
level: info

0 commit comments

Comments
 (0)