Skip to content

Commit

Permalink
Add missing files 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi committed Mar 20, 2024
1 parent 2b21c7a commit f56c65f
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 20 deletions.
37 changes: 17 additions & 20 deletions src/go/.gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# Allowlisting gitignore template for GO projects prevents us
# from adding various unwanted local files, such as generated
# files, developer configurations or IDE-specific files etc.
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Recommended: Go.AllowList.gitignore
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
.idea/

# Ignore everything
*
# Test binary, built with `go test -c`
*.test

# But not these files...
!/.gitignore
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

!*.go
!go.sum
!go.mod
!recipefile.json
!Dockerfile
# Dependency directories (remove the comment below to include it)
# vendor/

!README.md
!LICENSE

# !Makefile

# ...even if they are in subdirectories
!*/
# Go workspace file
go.work
17 changes: 17 additions & 0 deletions src/go/trace/console/collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
debug:
verbosity: detailed
otlphttp:
endpoint: http://otlp-backend:4319
compression: none
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp, debug]
37 changes: 37 additions & 0 deletions src/go/trace/console/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: "2.4"
services:

app:
build:
context: .
dockerfile: Dockerfile
depends_on:
- otlp-backend
- collector-otel-recipes
networks:
- otel-recipes

otlp-backend:
build:
context: ../../../../internal/otlp_backend
dockerfile: Dockerfile
ports:
- "4319:4319" # OTLP HTTP receiver
networks:
- otel-recipes

collector-otel-recipes:
image: otel/opentelemetry-collector-contrib:0.96.0
command: ["--config=/etc/collector-config.yaml", "${OTELCOL_ARGS}"]
volumes:
- ./collector-config.yaml:/etc/collector-config.yaml
ports:
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
depends_on:
- otlp-backend
networks:
- otel-recipes
networks:
otel-recipes:
17 changes: 17 additions & 0 deletions src/go/trace/gin-api/collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
debug:
verbosity: detailed
otlphttp:
endpoint: http://otlp-backend:4319
compression: none
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp, debug]
39 changes: 39 additions & 0 deletions src/go/trace/gin-api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "2.4"
services:

app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- otlp-backend
- collector-otel-recipes
networks:
- otel-recipes

otlp-backend:
build:
context: ../../../../internal/otlp_backend
dockerfile: Dockerfile
ports:
- "4319:4319" # OTLP HTTP receiver
networks:
- otel-recipes

collector-otel-recipes:
image: otel/opentelemetry-collector-contrib:0.96.0
command: ["--config=/etc/collector-config.yaml", "${OTELCOL_ARGS}"]
volumes:
- ./collector-config.yaml:/etc/collector-config.yaml
ports:
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
depends_on:
- otlp-backend
networks:
- otel-recipes
networks:
otel-recipes:

0 comments on commit f56c65f

Please sign in to comment.