Skip to content

Commit

Permalink
Merge pull request #469 from FgForrest/dev
Browse files Browse the repository at this point in the history
Optimization patch - request for rerunning performance tests
  • Loading branch information
novoj authored Feb 12, 2024
2 parents 6457583 + 30b6c87 commit efafa74
Show file tree
Hide file tree
Showing 501 changed files with 18,503 additions and 4,851 deletions.
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion docker/evita-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,14 @@ api:
gui:
enabled: ${api.endpoints.lab.gui.enabled:true}
readOnly: ${api.endpoints.lab.gui.readOnly:false}
preconfiguredConnections: !include ${api.endpoints.lab.gui.preconfiguredConnections:null}
preconfiguredConnections: !include ${api.endpoints.lab.gui.preconfiguredConnections:null}
observability:
enabled: ${api.endpoints.observability.enabled:true}
host: ${api.endpoints.observability.host:localhost:5557}
exposedHost: ${api.endpoints.observability.exposedHost:null}
tlsEnabled: ${api.endpoints.observability.tlsEnabled:false}
allowedOrigins: ${api.endpoints.observability.allowedOrigins:null}
tracing:
endpoint: ${api.endpoints.observability.tracing.endpoint:null}
protocol: ${api.endpoints.observability.tracing.protocol:null}
allowedEvents: !include ${api.endpoints.observability.allowedEvents:null}
33 changes: 33 additions & 0 deletions docker/observability/collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
receivers:
otlp:
protocols:
http:
include_metadata: true
cors:
allowed_origins:
- "*"
allowed_headers:
- "*"
max_age: 7200
filelog:
include: [ "/tmp/evita-temp/*.log" ]
start_at: beginning

exporters:
otlp:
endpoint: tempo:4317
tls:
insecure: true
logging:
loglevel: debug
loki:
endpoint: "http://loki:3100"

service:
pipelines:
traces:
receivers: [ otlp ]
exporters: [ otlp, logging ]
logs:
receivers: [ filelog ]
exporters: [ loki ]
63 changes: 63 additions & 0 deletions docker/observability/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3.7"

services:
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus.yml
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- --config.file=/etc/prometheus.yml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage

grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- ./grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor

otel-collector:
image: otel/opentelemetry-collector-contrib:latest
command: [ "--config=/etc/otel-collector.yaml" ]
ports:
- "4318:4318"
volumes:
- ./collector-config.yaml:/etc/otel-collector.yaml

promtail:
image: grafana/promtail:latest
volumes:
- ./promtail-config.yaml:/etc/promtail/config.yaml
- /tmp/evita-temp/evita_server.log:/var/log/logfile.log

# To eventually offload to Tempo...
tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
- /tmp/evita-temp:/tmp/evita-temp
ports:
#- "14268" # jaeger ingest
- "3200:3200" # tempo
- "4317:4317" # otlp grpc
#- "4318" # otlp http
#- "9411" # zipkin

loki:
image: grafana/loki:latest
ports:
- "3100:3100"
volumes:
- ./loki-config.yaml:/etc/loki/config.yaml
40 changes: 40 additions & 0 deletions docker/observability/grafana-datasource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
uid: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
basicAuth: false
isDefault: false
version: 1
editable: true
jsonData:
httpMethod: GET
- name: Tempo
type: tempo
access: proxy
orgId: 1
url: http://tempo:3200
basicAuth: false
isDefault: true
version: 1
editable: true
apiVersion: 1
uid: tempo
jsonData:
httpMethod: GET
serviceMap:
datasourceUid: prometheus
- name: loki
type: loki
access: proxy
orgId: 1
url: http://loki:3100
basicAuth: false
isDefault: false
version: 1
editable: true
apiVersion: 1
32 changes: 32 additions & 0 deletions docker/observability/loki-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
auth_enabled: false

server:
http_listen_port: 3100

ingester:
lifecycler:
address: 127.0.0.1
ring:
kvstore:
store: inmemory
replication_factor: 1
chunk_idle_period: 1h
max_transfer_retries: 0

schema_config:
configs:
- from: 2020-10-24
store: boltdb_shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h

storage_config:
boltdb_shipper:
active_index_directory: /loki/index
cache_location: /loki/cache
shared_store: filesystem
filesystem:
directory: /loki/chunks
12 changes: 12 additions & 0 deletions docker/observability/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
metrics_path: /observability/metrics
static_configs:
- targets: ['host.docker.internal:5557']
- job_name: tempo
static_configs:
- targets: [ 'tempo:3200' ]
33 changes: 33 additions & 0 deletions docker/observability/promtail-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
server:
http_listen_port: 9080
grpc_listen_port: 0

positions:
filename: /tmp/positions.yaml

clients:
- url: http://loki:3100/loki/api/v1/push

scrape_configs:
- job_name: json-logs
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/logfile.log

pipeline_stages:
- json:
expressions:
time: timestamp
message: message
level: level
trace_id: trace_id
client_id: client_id
- timestamp:
source: time
format: RFC3339
- labels:
level: ""
request_id: ""
56 changes: 56 additions & 0 deletions docker/observability/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
stream_over_http_enabled: true
server:
http_listen_port: 3200
log_level: info

query_frontend:
search:
duration_slo: 5s
throughput_bytes_slo: 1.073741824e+09
trace_by_id:
duration_slo: 5s

distributor:
receivers: # this configuration will listen on all ports and protocols that tempo is capable of.
jaeger: # the receives all come from the OpenTelemetry collector. more configuration information can
protocols: # be found there: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver
thrift_http: #
grpc: # for a production deployment you should only enable the receivers you need!
thrift_binary:
thrift_compact:
zipkin:
otlp:
protocols:
grpc:
opencensus:

ingester:
max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally

compactor:
compaction:
block_retention: 1h # overall Tempo trace retention. set for demo purposes

metrics_generator:
registry:
external_labels:
source: tempo
cluster: docker-compose
storage:
path: /tmp/tempo/generator/wal
remote_write:
- url: http://prometheus:9090/api/v1/write
send_exemplars: true

storage:
trace:
backend: local # backend configuration to use
wal:
path: /tmp/tempo/wal # where to store the the wal locally
local:
path: /tmp/tempo/blocks

overrides:
defaults:
metrics_generator:
processors: [service-graphs, span-metrics] # enables metrics generator
Loading

0 comments on commit efafa74

Please sign in to comment.