Skip to content

Commit

Permalink
[Examples] Change default otel collector for go (#218)
Browse files Browse the repository at this point in the history
The default port changed for recent version of opentelemtry-collector.
  • Loading branch information
miry authored Oct 13, 2021
1 parent 48fa60f commit 4d26e42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/go/otel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . .
RUN go build -o /app .

FROM scratch AS bin
ENV OT_COLLECTOR_ADDR="localhost:55680"
ENV OT_COLLECTOR_ADDR="localhost:4317"
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /app /
ENTRYPOINT ["/app"]
4 changes: 2 additions & 2 deletions example/go/otel/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
expose:
# - "6831/udp" # Default endpoint for Jaeger thrift_compact receiver
- "14268" # Jaeger http thrift receiver
- "55680" # Default endpoint for OpenTelemetry receiver
- "4317" # Default endpoint for OpenTelemetry receiver
- "9411" # Zipkin port
- "8888" # Metrics
ports:
Expand Down Expand Up @@ -72,7 +72,7 @@ services:
ports:
- "8080:8080"
environment:
OT_COLLECTOR_ADDR: otel:55680
OT_COLLECTOR_ADDR: otel:4317

networks:
example: {}
2 changes: 1 addition & 1 deletion example/go/otel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
func run() error {
collector_addr := os.Getenv("OT_COLLECTOR_ADDR")
if collector_addr == "" {
collector_addr = "localhost:55680"
collector_addr = "localhost:4317"
}

shutdown, err := initProvider("checkout", collector_addr)
Expand Down

0 comments on commit 4d26e42

Please sign in to comment.