Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/MZ-629 #205

Merged
merged 6 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions components/infra/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,29 @@ services:
primary-ledger:
condition: service_healthy

# grafana-lgtm:
qnen marked this conversation as resolved.
Show resolved Hide resolved
# container_name: grafana
# image: grafana/otel-lgtm:0.7.1
# ports:
# - "3100:3000"
# networks:
# - infra_network
#
# otel-collector
# depends_on:
# - grafana-lgtm
# container_name: otel-collector
# image: otel/opentelemetry-collector-contrib
# volumes:
# - ./otelcol/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# ports:
# - 4317:4317 # OTLP gRPC receiver
# - 4318:4318 # OTLP http receiver
# - 13133:13133 # health_check extension
# - 55679:55679 # zpages extension for debugging and performance monitoring [Reference](https://github.com/open-telemetry/opentelemetry-collector/blob/main/extension/zpagesextension/README.md)
# networks:
# - infra_network

volumes:
mongodb_data_container:

Expand Down
41 changes: 41 additions & 0 deletions components/infra/otelcol/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
batch:
send_batch_size: 1024
timeout: 10s

exporters:
debug:
otlp:
endpoint: grafana-lgtm:4317
tls:
insecure: true

extensions:
health_check:
endpoint: 0.0.0.0:13133
zpages:
endpoint: 0.0.0.0:55679

service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp, debug]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp, debug]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp, debug]
extensions: [zpages, health_check]
5 changes: 4 additions & 1 deletion components/ledger/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,7 @@ CASDOOR_CLIENT_SECRET=dd03f916cacf4a98c6a413d9c38ba102dce436a9
CASDOOR_ORGANIZATION_NAME=lerian
CASDOOR_APPLICATION_NAME=app-midaz
CASDOOR_ENFORCER_NAME=lerian-enforcer
CASDOOR_JWK_ADDRESS=${CASDOOR_ADDRESS}/.well-known/jwks
CASDOOR_JWK_ADDRESS=${CASDOOR_ADDRESS}/.well-known/jwks

# OPEN TELEMETRY
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-migrate/migrate/v4 v4.17.1 h1:4zQ6iqL6t6AiItphxJctQb3cFqWiSpMnX7wLTPnnYO4=
github.com/golang-migrate/migrate/v4 v4.17.1/go.mod h1:m8hinFyWBn0SA4QKHuKh175Pm9wjmxj3S2Mia7dbXzM=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
Expand Down
Loading