Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ out/
# Kotlin Daemon logs
buildSrc/.kotlin/errors/

### Application Logs ###
logs/

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class SpringBootAppConventionPlugin : Plugin<Project> {
add("implementation", "io.micrometer:micrometer-registry-prometheus")
add("implementation", "io.micrometer:micrometer-tracing-bridge-otel")

// JSON 로깅 (ELK 연동)
add("implementation", "net.logstash.logback:logstash-logback-encoder:7.4")

add("testImplementation", "org.springframework.boot:spring-boot-starter-test")
}

Expand Down
47 changes: 47 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ services:
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081
depends_on:
kafka:
condition: service_healthy
schema-registry:
condition: service_started

schema-registry:
image: confluentinc/cp-schema-registry:7.6.0
Expand Down Expand Up @@ -121,11 +124,55 @@ services:
depends_on:
- prometheus

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
container_name: transfer-elasticsearch
restart: unless-stopped
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- es_data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q status"]
interval: 10s
timeout: 5s
retries: 10

kibana:
image: docker.elastic.co/kibana/kibana:8.11.0
container_name: transfer-kibana
restart: unless-stopped
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
elasticsearch:
condition: service_healthy

filebeat:
image: docker.elastic.co/beats/filebeat:8.11.0
container_name: transfer-filebeat
restart: unless-stopped
user: root
volumes:
- ./monitoring/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- ./logs:/var/log/apps:ro
depends_on:
elasticsearch:
condition: service_healthy
command: filebeat -e -strict.perms=false

volumes:
pg_data:
kafka_data:
prometheus_data:
grafana_data:
es_data:

networks:
default:
Expand Down
Binary file added docs/etc/image/kafkaUi_has_traceId.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/etc/image/kafkaUi_none_traceId.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/etc/image/success_traceId_in_kibana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading