-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added `countries-service` app to demonstrate use of `wrap-compojure-route` - Updated guide to include Compojure support
- Loading branch information
1 parent
39a8ef5
commit 9277539
Showing
11 changed files
with
364 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
services: | ||
|
||
# Jaeger | ||
jaeger: | ||
image: jaegertracing/all-in-one:latest | ||
command: | ||
- --collector.otlp.enabled=true | ||
ports: | ||
- "16686:16686" # Jaeger web interface | ||
|
||
# Prometheus | ||
prometheus: | ||
image: prom/prometheus:latest | ||
volumes: | ||
- ./prometheus.yaml:/etc/prometheus.yaml | ||
command: | ||
- --config.file=/etc/prometheus.yaml | ||
- --web.enable-remote-write-receiver | ||
ports: | ||
- "9090:9090" # Prometheus web interface | ||
|
||
# OpenTelemetry Collector | ||
otel-collector: | ||
image: otel/opentelemetry-collector:latest | ||
volumes: | ||
- ./otel-collector.yaml:/etc/otel-collector.yaml | ||
command: | ||
- --config=/etc/otel-collector.yaml | ||
ports: | ||
- "4317:4317" # OTLP gRPC receiver | ||
# - "4318:4318" # OTLP HTTP receiver | ||
depends_on: | ||
- jaeger | ||
- prometheus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
;!zprint {:style [:respect-nl] :width 140} | ||
|
||
{:paths ["src" "resources"] | ||
|
||
:deps {org.clojure/clojure {:mvn/version "1.11.1"} | ||
|
||
;; Application configuration | ||
aero/aero {:mvn/version "1.1.6"} | ||
|
||
;; Clojure wrapper of OpenTelemetry API | ||
com.github.steffan-westcott/clj-otel-api {:local/root "../../clj-otel-api"} | ||
|
||
;; Compojure HTTP router | ||
compojure/compojure {:mvn/version "1.7.0"} | ||
|
||
;; Ring-Jetty web server integration | ||
ring/ring-jetty-adapter {:mvn/version "1.10.0"}} | ||
|
||
:aliases {;; Include this alias to export telemetry data | ||
:otel {:jvm-opts [;; Use the OpenTelemetry instrumentation agent | ||
"-javaagent:../opentelemetry-javaagent.jar" | ||
"-Dotel.semconv-stability.opt-in=http" | ||
|
||
;; Name the instrumented application or service | ||
"-Dotel.resource.attributes=service.name=countries-service" | ||
|
||
;; Set metric export to every 5 seconds | ||
"-Dotel.metric.export.interval=5000" | ||
|
||
;; Disable logs export | ||
"-Dotel.logs.exporter=none"]}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# OpenTelemetry Collector configuration. | ||
|
||
# Telemetry data receivers components | ||
receivers: | ||
|
||
# Receives data in OpenTelemetry Protocol format | ||
otlp: | ||
protocols: | ||
|
||
# Enable gRPC receiver | ||
grpc: | ||
|
||
# Enable HTTP receiver | ||
# http: | ||
|
||
|
||
|
||
# Telemetry data processors components | ||
processors: | ||
|
||
# Help avoid out-of-memory errors during high load | ||
memory_limiter: | ||
check_interval: 1s | ||
limit_mib: 50 | ||
|
||
# Places received data in batches prior to export | ||
batch: | ||
|
||
|
||
|
||
# Telemetry data exporters components | ||
exporters: | ||
|
||
# Logs brief summary of telemetry data to console | ||
logging: | ||
|
||
# Exports to Jaeger using OTLP over gRPC | ||
otlp/jaeger: | ||
endpoint: "jaeger:4317" | ||
tls: | ||
insecure: true | ||
|
||
# Exports to Prometheus | ||
prometheusremotewrite: | ||
endpoint: "http://prometheus:9090/api/v1/write" | ||
tls: | ||
insecure: true | ||
|
||
|
||
|
||
# Enable receivers, processors, exporters and extensions components | ||
service: | ||
|
||
# Enable pipelines of components for telemetry data | ||
pipelines: | ||
|
||
# Enable pipeline of components for traces | ||
traces: | ||
receivers: [ otlp ] | ||
processors: [ memory_limiter, batch ] | ||
exporters: [ logging, otlp/jaeger ] | ||
|
||
# Enable pipeline of components for metrics | ||
metrics: | ||
receivers: [ otlp ] | ||
processors: [ memory_limiter, batch ] | ||
exporters: [ prometheusremotewrite ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
global: | ||
evaluation_interval: 15s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:jetty-opts {:max-threads 16 | ||
:port 8080}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
status = warn | ||
|
||
appender.console.type = Console | ||
appender.console.name = STDOUT | ||
appender.console.layout.type = JsonTemplateLayout | ||
appender.console.layout.eventTemplateUri = classpath:JsonLayout.json | ||
appender.console.layout.eventTemplateAdditionalField[0].type = EventTemplateAdditionalField | ||
appender.console.layout.eventTemplateAdditionalField[0].key = message | ||
appender.console.layout.eventTemplateAdditionalField[0].format = JSON | ||
appender.console.layout.eventTemplateAdditionalField[0].value = {"$resolver":"message"} | ||
|
||
logger.app.level = debug | ||
logger.app.name = example | ||
|
||
rootLogger.level = info | ||
rootLogger.appenderRef.stdout.ref = STDOUT |
Oops, something went wrong.