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

Setup metrics export #12

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,7 @@ dmypy.json
.pyre/
.rasa/
models/

.config/
.keras/
augmentation_data/
25 changes: 25 additions & 0 deletions collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317

exporters:
debug:

prometheus:
endpoint: 0.0.0.0:8889

otlp/jaeger:
endpoint: jaeger:4317
tls:
insecure: true

service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp/jaeger]
metrics:
receivers: [otlp]
exporters: [debug, prometheus]
8 changes: 5 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ pipeline:
- name: KeywordIntentClassifier
- name: NLUCommandAdapter
- name: LLMCommandGenerator
trace_prompt_tokens: true
llm:
model_name: gpt-4
request_timeout: 7

policies:
- name: rasa.core.policies.flow_policy.FlowPolicy
- name: rasa_plus.ml.EnterpriseSearchPolicy
- name: rasa_plus.ml.IntentlessPolicy
- name: FlowPolicy
- name: EnterpriseSearchPolicy
- name: IntentlessPolicy

# - name: RulePolicy
assistant_id: 20240219-110701-dichotomic-inference
65 changes: 65 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: '3.8'

services:

prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--enable-feature=otlp-write-receiver'
ports:
- "9090:9090"

grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana

jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "6831:6831/udp"
- "14269:14269"
- "4317"
# healthcheck:
# test: ["CMD", "curl", "http://localhost:14269"]
# interval: 15s
# timeout: 10s
# retries: 5
# start_period: 15s
environment:
- COLLECTOR_OTLP_ENABLED=true

assistant:
image: rasa-private:rasa-private-dev
volumes:
- .:/app
command:
- 'inspect'
ports:
- "5005:5005"
env_file:
- .env
depends_on:
otlp-collector:
condition: service_started

otlp-collector:
image: otel/opentelemetry-collector:latest
volumes:
- ./collector-config.yaml:/etc/otelcol/config.yaml
ports:
- "4317:4317" # otlp grpc receiver
- "8888:8888" # Prometheus' metrics exposed by the collector
- "8889:8889" # Prometheus exporter configured metrics
depends_on:
jaeger:
condition: service_started

volumes:
grafana_data:
14 changes: 13 additions & 1 deletion endpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,16 @@ action_endpoint:
# queue: queue
#
nlg:
type: rasa_plus.ml.ContextualResponseRephraser
type: rephrase

tracing:
type: otlp
endpoint: otlp-collector:4317
insecure: true
service_name: rasa

metrics:
type: otlp
endpoint: otlp-collector:4317
insecure: true
service_name: rasa
7 changes: 7 additions & 0 deletions prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
scrape_configs:
- job_name: 'test-app'
scrape_interval: 5s
scrape_timeout: 3s
static_configs:
- targets: ['otlp-collector:8888']
- targets: ['otlp-collector:8889']