Skip to content

Commit f17b2c3

Browse files
committed
adds tracing and diangostings and profiling to environ
1 parent 72c95a9 commit f17b2c3

File tree

1 file changed

+42
-24
lines changed

1 file changed

+42
-24
lines changed

services/docker-compose.yml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@ x-tracing-open-telemetry: &tracing_open_telemetry_environs
1212
TRACING_OPENTELEMETRY_COLLECTOR_PORT: ${TRACING_OPENTELEMETRY_COLLECTOR_PORT}
1313
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE: ${TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE}
1414

15+
x-webserver-diagnostics: &webserver_diagnostics_environs
16+
DIAGNOSTICS_HEALTHCHECK_ENABLED: ${DIAGNOSTICS_HEALTHCHECK_ENABLED}
17+
DIAGNOSTICS_MAX_AVG_LATENCY: ${DIAGNOSTICS_MAX_AVG_LATENCY}
18+
DIAGNOSTICS_MAX_TASK_DELAY: ${DIAGNOSTICS_MAX_TASK_DELAY}
19+
DIAGNOSTICS_SLOW_DURATION_SECS: ${DIAGNOSTICS_SLOW_DURATION_SECS}
20+
21+
1522

1623
services:
1724
api-server:
1825
image: ${DOCKER_REGISTRY:-itisfoundation}/api-server:${DOCKER_IMAGE_TAG:-latest}
1926
init: true
2027
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
2128
environment:
29+
<<: *tracing_open_telemetry_environs
2230
API_SERVER_DEV_FEATURES_ENABLED: ${API_SERVER_DEV_FEATURES_ENABLED}
2331
API_SERVER_LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
2432
API_SERVER_LOG_FILTER_MAPPING: ${LOG_FILTER_MAPPING}
@@ -50,7 +58,6 @@ services:
5058
WEBSERVER_PORT: ${WB_API_WEBSERVER_PORT}
5159
WEBSERVER_SESSION_SECRET_KEY: ${WEBSERVER_SESSION_SECRET_KEY}
5260
API_SERVER_TRACING: ${API_SERVER_TRACING}
53-
<<: *tracing_open_telemetry_environs
5461

5562
deploy:
5663
labels:
@@ -78,6 +85,7 @@ services:
7885
networks:
7986
- autoscaling_subnet
8087
environment:
88+
<<: *tracing_open_telemetry_environs
8189
AUTOSCALING_LOGLEVEL: ${AUTOSCALING_LOGLEVEL}
8290
AUTOSCALING_POLL_INTERVAL: ${AUTOSCALING_POLL_INTERVAL}
8391
AUTOSCALING_DRAIN_NODES_WITH_LABELS: ${AUTOSCALING_DRAIN_NODES_WITH_LABELS}
@@ -136,7 +144,6 @@ services:
136144
REGISTRY_SSL: ${REGISTRY_SSL}
137145
REGISTRY_AUTH: ${REGISTRY_AUTH}
138146
AUTOSCALING_TRACING: ${AUTOSCALING_TRACING}
139-
<<: *tracing_open_telemetry_environs
140147
volumes:
141148
- "/var/run/docker.sock:/var/run/docker.sock"
142149
deploy:
@@ -156,6 +163,7 @@ services:
156163
init: true
157164
hostname: "cat-{{.Node.Hostname}}-{{.Task.Slot}}"
158165
environment:
166+
<<: *tracing_open_telemetry_environs
159167
CATALOG_BACKGROUND_TASK_REST_TIME: ${CATALOG_BACKGROUND_TASK_REST_TIME}
160168
CATALOG_DEV_FEATURES_ENABLED: ${CATALOG_DEV_FEATURES_ENABLED}
161169
CATALOG_LOGLEVEL: ${CATALOG_LOGLEVEL}
@@ -179,7 +187,6 @@ services:
179187
RABBIT_SECURE: ${RABBIT_SECURE}
180188
RABBIT_USER: ${RABBIT_USER}
181189
CATALOG_TRACING: ${CATALOG_TRACING}
182-
<<: *tracing_open_telemetry_environs
183190
networks:
184191
- default
185192

@@ -190,6 +197,7 @@ services:
190197
networks:
191198
- default
192199
environment:
200+
<<: *tracing_open_telemetry_environs
193201
CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DOCKER_IMAGE_TAG: ${CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DOCKER_IMAGE_TAG}
194202
CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DEFAULT_CLUSTER_AUTH: ${CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DEFAULT_CLUSTER_AUTH}
195203
CLUSTERS_KEEPER_DASK_NTHREADS: ${CLUSTERS_KEEPER_DASK_NTHREADS}
@@ -248,14 +256,14 @@ services:
248256
WORKERS_EC2_INSTANCES_SUBNET_ID: ${WORKERS_EC2_INSTANCES_SUBNET_ID}
249257
WORKERS_EC2_INSTANCES_CUSTOM_TAGS: ${WORKERS_EC2_INSTANCES_CUSTOM_TAGS}
250258
CLUSTERS_KEEPER_TRACING: ${CLUSTERS_KEEPER_TRACING}
251-
<<: *tracing_open_telemetry_environs
252259
secrets: *dask_tls_secrets
253260

254261
director:
255262
image: ${DOCKER_REGISTRY:-itisfoundation}/director:${DOCKER_IMAGE_TAG:-latest}
256263
init: true
257264
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
258265
environment:
266+
<<: *tracing_open_telemetry_environs
259267
DIRECTOR_DEFAULT_MAX_MEMORY: ${DIRECTOR_DEFAULT_MAX_MEMORY}
260268
DIRECTOR_DEFAULT_MAX_NANO_CPUS: ${DIRECTOR_DEFAULT_MAX_NANO_CPUS}
261269
DIRECTOR_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS: ${DIRECTOR_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS}
@@ -285,7 +293,6 @@ services:
285293
STORAGE_ENDPOINT: ${STORAGE_ENDPOINT}
286294
SWARM_STACK_NAME: ${SWARM_STACK_NAME}
287295

288-
<<: *tracing_open_telemetry_environs
289296
TRAEFIK_SIMCORE_ZONE: ${TRAEFIK_SIMCORE_ZONE}
290297

291298
volumes:
@@ -303,6 +310,7 @@ services:
303310
init: true
304311
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
305312
environment:
313+
<<: *tracing_open_telemetry_environs
306314
AWS_S3_CLI_S3: ${AWS_S3_CLI_S3}
307315

308316
CATALOG_HOST: ${CATALOG_HOST}
@@ -390,7 +398,6 @@ services:
390398
TRAEFIK_SIMCORE_ZONE: ${TRAEFIK_SIMCORE_ZONE}
391399

392400
DIRECTOR_V2_TRACING: ${DIRECTOR_V2_TRACING}
393-
<<: *tracing_open_telemetry_environs
394401

395402
# WEBSERVER_AUTH_SETTINGS
396403
WEBSERVER_HOST: ${WB_AUTH_WEBSERVER_HOST}
@@ -415,6 +422,7 @@ services:
415422
networks:
416423
- default
417424
environment:
425+
<<: *tracing_open_telemetry_environs
418426
LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
419427
LOG_FILTER_MAPPING: ${LOG_FILTER_MAPPING}
420428
RABBIT_HOST: ${RABBIT_HOST}
@@ -443,7 +451,6 @@ services:
443451
EFS_MOUNTED_PATH: ${EFS_MOUNTED_PATH}
444452
EFS_PROJECT_SPECIFIC_DATA_DIRECTORY: ${EFS_PROJECT_SPECIFIC_DATA_DIRECTORY}
445453
EFS_GUARDIAN_TRACING: ${EFS_GUARDIAN_TRACING}
446-
<<: *tracing_open_telemetry_environs
447454

448455
invitations:
449456
image: ${DOCKER_REGISTRY:-itisfoundation}/invitations:${DOCKER_IMAGE_TAG:-latest}
@@ -452,17 +459,17 @@ services:
452459
networks:
453460
- default
454461
environment:
462+
<<: *tracing_open_telemetry_environs
455463
INVITATIONS_DEFAULT_PRODUCT: ${INVITATIONS_DEFAULT_PRODUCT}
456464
INVITATIONS_LOGLEVEL: ${INVITATIONS_LOGLEVEL}
457465
INVITATIONS_OSPARC_URL: ${INVITATIONS_OSPARC_URL}
458466
INVITATIONS_PASSWORD: ${INVITATIONS_PASSWORD}
459467
INVITATIONS_SECRET_KEY: ${INVITATIONS_SECRET_KEY}
460468
INVITATIONS_SWAGGER_API_DOC_ENABLED: ${INVITATIONS_SWAGGER_API_DOC_ENABLED}
469+
INVITATIONS_TRACING: ${INVITATIONS_TRACING}
461470
INVITATIONS_USERNAME: ${INVITATIONS_USERNAME}
462471
LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
463472
LOG_FILTER_MAPPING: ${LOG_FILTER_MAPPING}
464-
INVITATIONS_TRACING: ${INVITATIONS_TRACING}
465-
<<: *tracing_open_telemetry_environs
466473

467474
payments:
468475
image: ${DOCKER_REGISTRY:-itisfoundation}/payments:${DOCKER_IMAGE_TAG:-latest}
@@ -471,22 +478,26 @@ services:
471478
networks:
472479
- default
473480
environment:
474-
LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
481+
<<: *tracing_open_telemetry_environs
482+
475483
LOG_FILTER_MAPPING: ${LOG_FILTER_MAPPING}
484+
LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
476485
PAYMENTS_ACCESS_TOKEN_EXPIRE_MINUTES: ${PAYMENTS_ACCESS_TOKEN_EXPIRE_MINUTES}
477486
PAYMENTS_ACCESS_TOKEN_SECRET_KEY: ${PAYMENTS_ACCESS_TOKEN_SECRET_KEY}
478487
PAYMENTS_AUTORECHARGE_DEFAULT_MONTHLY_LIMIT: ${PAYMENTS_AUTORECHARGE_DEFAULT_MONTHLY_LIMIT}
479488
PAYMENTS_AUTORECHARGE_DEFAULT_TOP_UP_AMOUNT: ${PAYMENTS_AUTORECHARGE_DEFAULT_TOP_UP_AMOUNT}
480489
PAYMENTS_AUTORECHARGE_ENABLED: ${PAYMENTS_AUTORECHARGE_ENABLED}
481490
PAYMENTS_AUTORECHARGE_MIN_BALANCE_IN_CREDITS: ${PAYMENTS_AUTORECHARGE_MIN_BALANCE_IN_CREDITS}
482491
PAYMENTS_BCC_EMAIL: ${PAYMENTS_BCC_EMAIL}
492+
PAYMENTS_EMAIL: ${PAYMENTS_EMAIL}
483493
PAYMENTS_GATEWAY_API_SECRET: ${PAYMENTS_GATEWAY_API_SECRET}
484494
PAYMENTS_GATEWAY_URL: ${PAYMENTS_GATEWAY_URL}
485495
PAYMENTS_LOGLEVEL: ${PAYMENTS_LOGLEVEL}
486496
PAYMENTS_PASSWORD: ${PAYMENTS_PASSWORD}
487-
PAYMENTS_STRIPE_URL: ${PAYMENTS_STRIPE_URL}
488497
PAYMENTS_STRIPE_API_SECRET: ${PAYMENTS_STRIPE_API_SECRET}
498+
PAYMENTS_STRIPE_URL: ${PAYMENTS_STRIPE_URL}
489499
PAYMENTS_SWAGGER_API_DOC_ENABLED: ${PAYMENTS_SWAGGER_API_DOC_ENABLED}
500+
PAYMENTS_TRACING: ${PAYMENTS_TRACING}
490501
PAYMENTS_USERNAME: ${PAYMENTS_USERNAME}
491502
POSTGRES_DB: ${POSTGRES_DB}
492503
POSTGRES_HOST: ${POSTGRES_HOST}
@@ -500,14 +511,12 @@ services:
500511
RABBIT_USER: ${RABBIT_USER}
501512
RESOURCE_USAGE_TRACKER_HOST: ${RESOURCE_USAGE_TRACKER_HOST}
502513
RESOURCE_USAGE_TRACKER_PORT: ${RESOURCE_USAGE_TRACKER_EXTERNAL_PORT}
503-
PAYMENTS_EMAIL: ${PAYMENTS_EMAIL}
504514
SMTP_HOST: ${SMTP_HOST}
505515
SMTP_PASSWORD: ${SMTP_PASSWORD}
506516
SMTP_PORT: ${SMTP_PORT}
507517
SMTP_PROTOCOL: ${SMTP_PROTOCOL}
508518
SMTP_USERNAME: ${SMTP_USERNAME}
509-
PAYMENTS_TRACING: ${PAYMENTS_TRACING}
510-
<<: *tracing_open_telemetry_environs
519+
511520

512521
resource-usage-tracker:
513522
image: ${DOCKER_REGISTRY:-itisfoundation}/resource-usage-tracker:${DOCKER_IMAGE_TAG:-latest}
@@ -516,6 +525,8 @@ services:
516525
networks:
517526
- default
518527
environment:
528+
<<: *tracing_open_telemetry_environs
529+
519530
LOG_FORMAT_LOCAL_DEV_ENABLED: ${LOG_FORMAT_LOCAL_DEV_ENABLED}
520531
LOG_FILTER_MAPPING: ${LOG_FILTER_MAPPING}
521532
POSTGRES_DB: ${POSTGRES_DB}
@@ -544,7 +555,7 @@ services:
544555
RESOURCE_USAGE_TRACKER_S3: ${RESOURCE_USAGE_TRACKER_S3}
545556
RESOURCE_USAGE_TRACKER_TRACING: ${RESOURCE_USAGE_TRACKER_TRACING}
546557
RESOURCE_USAGE_TRACKER_PORT: ${RESOURCE_USAGE_TRACKER_PORT}
547-
<<: *tracing_open_telemetry_environs
558+
548559

549560
dynamic-schdlr:
550561
image: ${DOCKER_REGISTRY:-itisfoundation}/dynamic-scheduler:${DOCKER_IMAGE_TAG:-latest}
@@ -554,6 +565,8 @@ services:
554565
- default
555566
- docker-api-network
556567
environment:
568+
<<: *tracing_open_telemetry_environs
569+
557570
CATALOG_HOST: ${CATALOG_HOST}
558571
CATALOG_PORT: ${CATALOG_PORT}
559572
DIRECTOR_V2_HOST: ${DIRECTOR_V2_HOST}
@@ -594,7 +607,6 @@ services:
594607
REDIS_SECURE: ${REDIS_SECURE}
595608
REDIS_USER: ${REDIS_USER}
596609

597-
<<: *tracing_open_telemetry_environs
598610

599611
docker-api-proxy:
600612
image: ${DOCKER_REGISTRY:-itisfoundation}/docker-api-proxy:${DOCKER_IMAGE_TAG:-latest}
@@ -670,6 +682,10 @@ services:
670682
init: true
671683
hostname: "wb-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
672684
environment: &webserver_environment
685+
<<:
686+
- *tracing_open_telemetry_environs
687+
- *webserver_diagnostics_environs
688+
673689
AIODEBUG_SLOW_DURATION_SECS: ${AIODEBUG_SLOW_DURATION_SECS}
674690

675691
SWARM_STACK_NAME: ${SWARM_STACK_NAME}
@@ -714,10 +730,6 @@ services:
714730

715731
# WEBSERVER_DIAGNOSTICS
716732
WEBSERVER_DIAGNOSTICS: ${WEBSERVER_DIAGNOSTICS}
717-
DIAGNOSTICS_HEALTHCHECK_ENABLED: ${DIAGNOSTICS_HEALTHCHECK_ENABLED}
718-
DIAGNOSTICS_MAX_AVG_LATENCY: ${DIAGNOSTICS_MAX_AVG_LATENCY}
719-
DIAGNOSTICS_MAX_TASK_DELAY: ${DIAGNOSTICS_MAX_TASK_DELAY}
720-
DIAGNOSTICS_SLOW_DURATION_SECS: ${DIAGNOSTICS_SLOW_DURATION_SECS}
721733

722734
# WEBSERVER_DIRECTOR_V2
723735
DIRECTOR_V2_HOST: ${DIRECTOR_V2_HOST}
@@ -819,7 +831,6 @@ services:
819831
STUDIES_DEFAULT_SERVICE_THUMBNAIL: ${STUDIES_DEFAULT_SERVICE_THUMBNAIL}
820832

821833
WEBSERVER_TRACING: ${WEBSERVER_TRACING}
822-
<<: *tracing_open_telemetry_environs
823834

824835
# WEBSERVER_PROJECTS
825836
WEBSERVER_PROJECTS: ${WEBSERVER_PROJECTS}
@@ -1009,6 +1020,8 @@ services:
10091020
init: true
10101021
hostname: "gc-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
10111022
environment:
1023+
<<:
1024+
- *tracing_open_telemetry_environs
10121025

10131026
# WEBSERVER_DIRECTOR_V2
10141027
DIRECTOR_V2_HOST: ${DIRECTOR_V2_HOST}
@@ -1091,7 +1104,6 @@ services:
10911104
WEBSERVER_STUDIES_DISPATCHER: ${WB_GC_STUDIES_DISPATCHER}
10921105
WEBSERVER_TAGS: ${WB_GC_TAGS}
10931106
WEBSERVER_TRACING: ${WB_GC_TRACING}
1094-
<<: *tracing_open_telemetry_environs
10951107
WEBSERVER_USERS: ${WB_GC_USERS}
10961108
WEBSERVER_WALLETS: ${WB_GC_WALLETS}
10971109

@@ -1104,9 +1116,12 @@ services:
11041116
init: true
11051117
hostname: "auth-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
11061118
environment:
1119+
<<:
1120+
- *webserver_diagnostics_environs
1121+
- *tracing_open_telemetry_environs
1122+
11071123
WEBSERVER_APP_FACTORY_NAME: WEBSERVER_AUTHZ_APP_FACTORY
11081124
WEBSERVER_LOGLEVEL: ${WB_AUTH_LOGLEVEL}
1109-
WEBSERVER_PROFILING: ${WB_AUTH_PROFILING}
11101125

11111126
GUNICORN_CMD_ARGS: ${WEBSERVER_GUNICORN_CMD_ARGS}
11121127

@@ -1118,6 +1133,9 @@ services:
11181133
POSTGRES_PORT: ${POSTGRES_PORT}
11191134
POSTGRES_USER: ${POSTGRES_USER}
11201135

1136+
# WEBSERVER_DIAGNOSTICS
1137+
WEBSERVER_DIAGNOSTICS: ${WB_AUTH_DIAGNOSTICS}
1138+
11211139
# WEBSERVER_REST
11221140
REST_SWAGGER_API_DOC_ENABLED: 0
11231141

@@ -1150,6 +1168,7 @@ services:
11501168
WEBSERVER_LOGIN: "null"
11511169
WEBSERVER_NOTIFICATIONS: 0
11521170
WEBSERVER_PAYMENTS: "null"
1171+
WEBSERVER_PROFILING: ${WB_AUTH_PROFILING}
11531172
WEBSERVER_PRODUCTS: 1
11541173
WEBSERVER_PROJECTS: "null"
11551174
WEBSERVER_PUBLICATIONS: 0
@@ -1164,7 +1183,6 @@ services:
11641183
WEBSERVER_STUDIES_DISPATCHER: "null"
11651184
WEBSERVER_TAGS: 0
11661185
WEBSERVER_TRACING: ${WB_AUTH_TRACING}
1167-
<<: *tracing_open_telemetry_environs
11681186
WEBSERVER_USERS: "null"
11691187
networks:
11701188
- default

0 commit comments

Comments
 (0)