Skip to content

Commit e988ef2

Browse files
committed
chore: configure grafana otel config
1 parent 13ba79b commit e988ef2

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.dev/otelcol/grafana-cloud.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Grafana Cloud Example
2+
extensions:
3+
memory_ballast:
4+
size_mib: 64
5+
basicauth/grafanacloudprom:
6+
client_auth:
7+
username: "${env:GC_PROM_USERNAME}"
8+
password: "${env:GC_API_KEY}"
9+
receivers:
10+
otlp:
11+
protocols:
12+
grpc:
13+
endpoint: "127.0.0.1:4317"
14+
processors:
15+
memory_limiter:
16+
check_interval: 10s
17+
# hard limit
18+
limit_mib: 500
19+
# sort limit 400
20+
spike_limit_mib: 100
21+
batch/metrics:
22+
send_batch_size: 8192
23+
timeout: 3s
24+
send_batch_max_size: 16384
25+
exporters:
26+
prometheusremotewrite/grafanacloud:
27+
endpoint: "${env:GC_PROM_REMOTE_WRITE_URL}"
28+
resource_to_telemetry_conversion:
29+
enabled: true
30+
auth:
31+
authenticator: basicauth/grafanacloudprom
32+
debug:
33+
verbosity: detailed
34+
service:
35+
extensions: [memory_ballast, basicauth/grafanacloudprom]
36+
pipelines:
37+
metrics:
38+
receivers:
39+
- otlp
40+
processors:
41+
- memory_limiter
42+
- batch/metrics
43+
exporters:
44+
- debug
45+
- prometheusremotewrite/grafanacloud
File renamed without changes.

justfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ api *flags:
8585
cd crates/synd_api; \
8686
RUST_LOG="info,synd_api=debug" \
8787
OTEL_EXPORTER_OTLP_ENDPOINT={{otlp_endpoint}} \
88+
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=local" \
8889
cargo run \
8990
--features "introspection" -- \
9091
--kvsd-host 127.0.0.1 --kvsd-port 7379 --kvsd-username {{kvsd_user}} --kvsd-password secret \
@@ -95,9 +96,8 @@ term *flags:
9596
cd crates/synd_term; cargo run -- --log /tmp/syndterm.log --endpoint https://localhost:5959/graphql {{flags}}
9697

9798
# Run opentelemetry-collector-contrib
98-
@otelcol:
99-
LOKI_ENDPOINT={{loki_endpoint}} \
100-
otelcontribcol --config=file:.dev/otelcol-config.yaml
99+
@otelcol config:
100+
otelcontribcol --config=file:.dev/otelcol/{{config}}
101101

102102
# Run backends
103103
backend:

0 commit comments

Comments
 (0)