Skip to content

Commit bee9737

Browse files
committed
Specify Alloy ports in Docker compose
not necessary for internal communications but recommended
1 parent 94ee65f commit bee9737

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

alloy/cloud.alloy

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,15 @@ pyroscope.scrape "application_containers" {
9595
// Traces
9696
otelcol.receiver.otlp "default" {
9797
// https://grafana.com/docs/alloy/latest/reference/components/otelcol.receiver.otlp/
98-
9998
// configures the default grpc endpoint "0.0.0.0:4317"
100-
grpc { }
99+
grpc {
100+
endpoint = "0.0.0.0:4317"
101+
}
102+
101103
// configures the default http/protobuf endpoint "0.0.0.0:4318"
102-
http { }
104+
http {
105+
endpoint = "0.0.0.0:4318"
106+
}
103107

104108
output {
105109
metrics = [otelcol.processor.resourcedetection.default.input]

alloy/local.alloy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ pyroscope.scrape "application_containers" {
9898

9999
// Receive traces and metrics with OTEL setup
100100
otelcol.receiver.otlp "default" {
101+
// configures the default grpc endpoint "0.0.0.0:4317"
101102
grpc {
102103
endpoint = "0.0.0.0:4317"
103104
}
104105

106+
// configures the default http/protobuf endpoint "0.0.0.0:4318"
105107
http {
106108
endpoint = "0.0.0.0:4318"
107109
}

compose.grafana-cloud.microservices.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ services:
2525
- --stability.level=public-preview
2626
ports:
2727
- "12345:12345"
28+
- "4317:4317" # OTLP gRPC
29+
- "4318:4318" # OTLP HTTP
2830
environment:
2931
QUICKPIZZA_HOST: public-api:3333
3032
# must be set with an .env file

compose.grafana-cloud.monolithic.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ services:
1414
- --stability.level=public-preview
1515
ports:
1616
- "12345:12345"
17+
- "4317:4317" # OTLP gRPC
18+
- "4318:4318" # OTLP HTTP
1719
environment:
1820
QUICKPIZZA_HOST: quickpizza:3333
1921
# must be set with an .env file

0 commit comments

Comments
 (0)