diff --git a/blacklight/Gemfile b/blacklight/Gemfile
index 1f5f178..d3975ae 100644
--- a/blacklight/Gemfile
+++ b/blacklight/Gemfile
@@ -28,9 +28,9 @@ gem 'jbuilder', '~> 2.7'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false
-# Instrument and report to Jaeger what is happening.
+# Instrument and report to LGTM OTLP collector
gem 'opentelemetry-sdk'
-gem 'opentelemetry-exporter-jaeger'
+gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
group :development, :test do
diff --git a/blacklight/config/initializers/opentelemetry.rb b/blacklight/config/initializers/opentelemetry.rb
index 8a492a1..1f72380 100644
--- a/blacklight/config/initializers/opentelemetry.rb
+++ b/blacklight/config/initializers/opentelemetry.rb
@@ -1,13 +1,17 @@
require 'opentelemetry/sdk'
-require 'opentelemetry/exporter/jaeger'
+require 'opentelemetry/exporter/otlp'
require 'opentelemetry/instrumentation/all'
-# Configure the sdk with the Jaeger collector exporter
-ENV['OTEL_TRACES_EXPORTER'] = 'jaeger'
+# Configure the sdk with the OTLP exporter for LGTM stack
+ENV['OTEL_TRACES_EXPORTER'] = 'otlp'
OpenTelemetry::SDK.configure do |c|
c.service_name = 'blacklight'
- #c.use_all() # enables all instrumentation! We should prune this down.
+
+ # Configure OTLP exporter
+ # The endpoint is set via OTEL_EXPORTER_OTLP_ENDPOINT environment variable
+ # which should be http://lgtm:4318 for HTTP or http://lgtm:4317 for gRPC
+
##### Instruments
c.use 'OpenTelemetry::Instrumentation::Rack'
#c.use 'OpenTelemetry::Instrumentation::ActionPack'
@@ -23,4 +27,4 @@
#c.use 'OpenTelemetry::Instrumentation::RestClient'
#c.use 'OpenTelemetry::Instrumentation::RubyKafka'
#c.use 'OpenTelemetry::Instrumentation::Sidekiq'
-end
+end
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 1fb3d39..9451e9d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -14,10 +14,12 @@ services:
environment:
- SOLR_URL=http://${SOLR_USER}:${SOLR_PASSWORD}@solr1:8983/solr/ecommerce
- PORT=3000
- - OTEL_EXPORTER_JAEGER_ENDPOINT=http://jaeger:14268/api/traces
+ - OTEL_SERVICE_NAME=blacklight
+ - OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4317
+ - OTEL_TRACES_EXPORTER=otlp
depends_on:
- solr1
- # - jaeger
+ - lgtm
mysql:
container_name: mysql
@@ -72,12 +74,12 @@ services:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- - JAEGER_SERVICE_NAME=solr1 # not working ;-(
- - JAEGER_SAMPLER_TYPE=const
- - JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- - JAEGER_AGENT_HOST=jaeger
- - JAEGER_AGENT_PORT=5775
- - "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
+ - OTEL_SERVICE_NAME=solr
+ - OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
+ - OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_GRPC_EXPORTER_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_EXPORTER_ENABLED=${SOLR_METRICS_OTLP_EXPORTER_ENABLED}
+ - "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
depends_on:
- zoo1
- zoo2
@@ -93,12 +95,12 @@ services:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- - JAEGER_SERVICE_NAME=solr2
- - JAEGER_SAMPLER_TYPE=const
- - JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- - JAEGER_AGENT_HOST=jaeger
- - JAEGER_AGENT_PORT=5775
- - "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
+ - OTEL_SERVICE_NAME=solr
+ - OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
+ - OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_GRPC_EXPORTER_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_EXPORTER_ENABLED=${SOLR_METRICS_OTLP_EXPORTER_ENABLED}
+ - "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
depends_on:
- zoo1
- zoo2
@@ -114,12 +116,12 @@ services:
- SOLR_OPTS=-XX:-UseLargePages
- SOLR_HEAP=1g
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
- - JAEGER_SERVICE_NAME=solr3
- - JAEGER_SAMPLER_TYPE=const
- - JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
- - JAEGER_AGENT_HOST=jaeger
- - JAEGER_AGENT_PORT=5775
- - "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
+ - OTEL_SERVICE_NAME=solr
+ - OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
+ - OTEL_EXPORTER_OTLP_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_GRPC_EXPORTER_ENDPOINT=http://lgtm:4317
+ - SOLR_METRICS_OTLP_EXPORTER_ENABLED=${SOLR_METRICS_OTLP_EXPORTER_ENABLED}
+ - "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
depends_on:
- zoo1
- zoo2
@@ -127,7 +129,7 @@ services:
- keycloak
zoo1:
- image: zookeeper:3.9.2
+ image: zookeeper:3.9.5
container_name: zoo1
hostname: zoo1
ports:
@@ -141,7 +143,7 @@ services:
zoo2:
- image: zookeeper:3.9.2
+ image: zookeeper:3.9.5
container_name: zoo2
hostname: zoo2
ports:
@@ -155,7 +157,7 @@ services:
zoo3:
- image: zookeeper:3.9.2
+ image: zookeeper:3.9.5
container_name: zoo3
hostname: zoo3
ports:
@@ -169,7 +171,7 @@ services:
quepid:
container_name: quepid
- image: o19s/quepid:8.3.0
+ image: o19s/quepid:8.5.0
ports:
- 3000:3000
command: "foreman s -f Procfile"
@@ -215,82 +217,9 @@ services:
reservations:
memory: 512M
-
- solr-exporter:
- image: solr:9.1.1
- container_name: solr-exporter
- hostname: solr-exporter
- ports:
- - 9854:9854
- command: /bin/bash -c "/usr/bin/wait-for-http-200.sh; export JAVA_OPTS='-Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory -Dsolr.httpclient.config=/home/basicauth.properties'; ./contrib/prometheus-exporter/bin/solr-exporter -p 9854 -z zoo1:2181,zoo2:2181,zoo3:2181 -f ./contrib/prometheus-exporter/conf/solr-exporter-config.xml -n 8 -s 15"
- volumes:
- - ./solr-exporter/wait-for-http-200.sh:/usr/bin/wait-for-http-200.sh
- - ./solr-exporter/basicauth.properties:/home/basicauth.properties
- depends_on:
- - solr1
- - solr2
- - solr3
-
- prometheus:
- image: prom/prometheus:v2.32.1
- container_name: prometheus
- restart: always
- hostname: prometheus
- healthcheck:
- test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:9090"]
- interval: 5s
- timeout: 10s
- ports:
- - 9090:9090
- command:
- - '--config.file=/etc/prometheus/prometheus.yml'
- volumes:
- - ./prometheus/:/etc/prometheus/
-
- grafana:
- image: grafana/grafana:7.5.17
- container_name: grafana
- restart: unless-stopped
- hostname: grafana
- healthcheck:
- test: ["CMD", "wget", "--tries=1", "--spider", "http://localhost:3000"]
- interval: 5s
- timeout: 10s
- ports:
- - 9091:3000
- volumes:
- - ./grafana/provisioning/:/etc/grafana/provisioning/
- environment:
- - GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- - GF_USERS_ALLOW_SIGN_UP=true
- depends_on:
- - prometheus
-
- jaeger:
- image: jaegertracing/all-in-one:1.39
- container_name: jaeger
- restart: always
- hostname: jaegertracing
- ports:
- - 6831:6831/udp
- - 6832:6832/udp
- - 5778:5778
- - 16686:16686
- - 4317:4317
- - 4318:4318
- - 14250:14250
- - 14268:14268
- - 14269:14269
- - 9411:9411
- volumes:
- - ./grafana/provisioning/:/etc/grafana/provisioning/
- environment:
- - COLLECTOR_ZIPKIN_HOST_PORT=:9411
- - COLLECTOR_OTLP_ENABLED=true
-
keycloak:
- image: chorus-keycloak
container_name: keycloak
+ image: chorus-keycloak
build:
context: ./keycloak
dockerfile: Dockerfile
@@ -310,3 +239,20 @@ services:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=password
- DB_VENDOR=h2
+
+
+ lgtm:
+ container_name: lgtm
+ image: grafana/otel-lgtm:latest
+ ports:
+ - "9091:3000" # Grafana UI
+ - "4317:4317" # OTLP gRPC receiver
+ - "4318:4318" # OTLP HTTP receiver
+ # Come back to this with https://github.com/grafana/docker-otel-lgtm?tab=readme-ov-file#add-custom-dashboards
+ #volumes:
+ # - ./grafana/provisioning/dashboards:/otel-lgtm/grafana/conf/provisioning/dashboards/
+ # - ./grafana/provisioning/datasources:/otel-lgtm/grafana/conf/provisioning/datasources/
+ environment:
+ - GF_SECURITY_ADMIN_USER=admin
+ - GF_SECURITY_ADMIN_PASSWORD=password
+ - GF_USERS_ALLOW_SIGN_UP=true
diff --git a/quickstart.sh b/quickstart.sh
index 3c3498e..726205a 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -57,11 +57,13 @@ check_prerequisites
services="blacklight solr1 solr2 solr3 keycloak"
if $observability; then
- export JAEGER_SAMPLER_PARAM="1"
- services="${services} grafana solr-exporter jaeger"
+ export SOLR_METRICS_OTLP_EXPORTER_ENABLED=true
+ export OTEL_SDK_DISABLED=false
+ services="${services} lgtm"
else
- # Prevents Jaeger in Solr from attempting to send events.
- export JAEGER_SAMPLER_PARAM=
+ # Prevents OpenTelementry in Solr from attempting to send events.
+ export SOLR_METRICS_OTLP_EXPORTER_ENABLED=false
+ export OTEL_SDK_DISABLED=true
fi
if $offline_lab; then
@@ -130,17 +132,15 @@ log_minor "waiting for security.json to be available to all Solr nodes"
log_major "Packaging ecommerce configset."
(cd solr/configsets/ecommerce/conf && zip -r - *) > ./solr/configsets/ecommerce.zip
log_minor "posting ecommerce.zip configset"
-curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/cluster/configs/ecommerce"
+curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/configsets/ecommerce"
log_major "Creating ecommerce collection."
curl --user solr:SolrRocks -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
{
- "create": {
- "name": "ecommerce",
- "config": "ecommerce",
- "numShards": 2,
- "replicationFactor": 1,
- "waitForFinalState": true
- }
+ "name": "ecommerce",
+ "config": "ecommerce",
+ "numShards": 2,
+ "replicationFactor": 1,
+ "waitForFinalState": true
}
'
diff --git a/solr/Dockerfile b/solr/Dockerfile
index 1cd87d4..e7ea666 100644
--- a/solr/Dockerfile
+++ b/solr/Dockerfile
@@ -1,7 +1,7 @@
-FROM solr:9.1.1
+FROM solr:10.0.0
-COPY --chown=solr:solr solr.xml /var/solr/data/
+#COPY --chown=solr:solr solr.xml /var/solr/data/
-COPY ./lib/querqy-solr-5.6.lucene900.0-jar-with-dependencies.jar /opt/querqy/lib/
-COPY ./lib/querqy-embeddings-rewriter-1.0.0-SNAPSHOT.jar /opt/querqy/lib/
-COPY ./lib/querqy-regex-filter-1.1.0-SNAPSHOT.jar /opt/querqy/lib/
+COPY ./lib/querqy-solr-5.6.lucene900.0-jar-with-dependencies.jar /opt/solr-10.0.0/lib
+COPY ./lib/querqy-embeddings-rewriter-1.0.0-SNAPSHOT.jar /opt/solr-10.0.0/lib
+COPY ./lib/querqy-regex-filter-1.1.0-SNAPSHOT.jar /opt/solr-10.0.0/lib
diff --git a/solr/configsets/ecommerce/conf/solrconfig.xml b/solr/configsets/ecommerce/conf/solrconfig.xml
index 8c241ab..3f3b980 100644
--- a/solr/configsets/ecommerce/conf/solrconfig.xml
+++ b/solr/configsets/ecommerce/conf/solrconfig.xml
@@ -8,7 +8,7 @@
-
+
${solr.data.dir:}
@@ -16,7 +16,7 @@
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
- 8.9
+ 10.0
@@ -55,7 +55,7 @@
200
-
+
true
-
+
+
-
+
diff --git a/solr/solr.xml b/solr/solr.xml
deleted file mode 100644
index dcc010b..0000000
--- a/solr/solr.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
- ${solr.max.booleanClauses:1024}
- ${solr.sharedLib:}
- ${solr.modules:}
- ${solr.allowPaths:}
- ${solr.allowUrls:}
-
-
-
- ${host:}
- ${solr.port.advertise:0}
- ${hostContext:solr}
-
- ${genericCoreNodeNames:true}
-
- ${zkClientTimeout:30000}
- ${distribUpdateSoTimeout:600000}
- ${distribUpdateConnTimeout:60000}
- ${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}
- ${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}
- ${distributedClusterStateUpdates:false}
- ${distributedCollectionConfigSetExecution:false}
-
-
-
-
- ${socketTimeout:600000}
- ${connTimeout:60000}
-
-
-
-
-
-
-
-
-