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

🎨 Tracing: Add more autoinstrumentation, enhance setup_tracing() - DON'T DELETE PR BRANCH #6561

Merged
merged 143 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
5160d11
Fix aiohttp server autoinstrumentation with a hack
mrnicegyu11 Sep 18, 2024
c777852
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Sep 18, 2024
aa730ed
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Sep 19, 2024
61366a3
minor: fix typo
mrnicegyu11 Oct 2, 2024
d1a70da
🎨 backend pulls inputs before iframe is displayed (#6392)
GitHK Sep 19, 2024
77e54ce
🚨🐛 Mitigate dy-service file upload bug: Increase traefik timeouts (#6…
mrnicegyu11 Sep 19, 2024
b44eb75
✨ [Frontend] Force reload ``no-cache`` (#6397)
odeimaiz Sep 19, 2024
ed2db58
🐛⚗️Prometheus instrumentation incorrectly setup (#6398)
sanderegg Sep 19, 2024
51edfa8
✨E2E: increase timeout for video streaming and improve a bit logs abo…
sanderegg Sep 20, 2024
26aa165
🎨Clusters keeper/use ssm (🚨change in private clusters) (#6361)
sanderegg Sep 20, 2024
9ebe05b
♻️CI: autoscaling mypy takes longer and longer. (#6417)
sanderegg Sep 20, 2024
060c9cb
🐛 Improved Error Handling for Missing Billing Details (#6418)
pcrespov Sep 21, 2024
ffba5ae
🎨 Enhances Product parsing to strip whitespaces in host_regex (#6419)
pcrespov Sep 23, 2024
2e287ab
🐛 [Frontend] Fix: Share and Leave Study (#6401)
odeimaiz Sep 23, 2024
a876819
✨ [Frontend] Workspaces & Folders: Merge Workspace header and Folder …
odeimaiz Sep 23, 2024
fcc7b78
🎨 [Frontend] Access Full TIP (#6423)
odeimaiz Sep 23, 2024
0a11c8e
🐛 [Frontend] Do not list/request ``/frontend/`` service's pricing pla…
odeimaiz Sep 23, 2024
e5b9664
Bump actions/setup-node from 4.0.3 to 4.0.4 (#6425)
dependabot[bot] Sep 23, 2024
2129de4
🎨 Persistent logs when GC removes services (#6403)
GitHK Sep 24, 2024
84119ba
🎨 The user can remove themselves from the project/workspace. (#6415)
matusdrobuliak66 Sep 24, 2024
aa0b57c
♻️ Maintenance: removing old folders (#6383)
matusdrobuliak66 Sep 24, 2024
83b3152
🎨 improve DB foreign key dependencies (🗃️) (#6428)
matusdrobuliak66 Sep 24, 2024
529122e
✨ `dynamic-scheduler` pushes service state to the frontend (⚠️ devops…
GitHK Sep 24, 2024
5457f0d
🐛 [Frontend] Fix: Do not listen to output related backend updates if …
odeimaiz Sep 24, 2024
0b7f87e
✅ e2e: new workflow to test `tiplite` (#6388)
pcrespov Sep 24, 2024
83c79c6
🎨 [Frontend] App mode: Scrollable Instructions (#6430)
odeimaiz Sep 24, 2024
a712acc
🎨 publish port events to frontend (#6396)
GitHK Sep 25, 2024
8a8319f
🔒️ Strip credentials form image VCS (#6433)
GitHK Sep 25, 2024
699e05b
⬆️ Sep tests and tooling upgrade (#6431)
mrnicegyu11 Oct 2, 2024
aaee3b2
✅ fixes check on full version (#6445)
pcrespov Sep 25, 2024
aa87f17
🐛 Fixes flaky tests in service-library test_deferred_tasks.py (#6439)
GitHK Sep 25, 2024
97ccf19
🐛 [Frontend] Announcements: allow in ribbon only (#6440)
odeimaiz Sep 25, 2024
76e96c7
🎨 improve error handling on pricing plans (#6436)
matusdrobuliak66 Sep 25, 2024
02a7908
🐛[FrontEnd] Better error handling of invalid pre-registration data (#…
pcrespov Sep 25, 2024
6b7f9f8
e2e: fixes wrong sequence in classic tip (#6450)
pcrespov Sep 25, 2024
e2a6bdc
🎨 improve tip e2e test (#6448)
matusdrobuliak66 Sep 25, 2024
32bedc7
🐛 Fixes issue with parsing logs polluting sidecar logs (#6442)
GitHK Sep 26, 2024
bd45d6b
🎨 [Frontend] TIP: Rebranding (#6446)
odeimaiz Sep 26, 2024
b6ca20a
Adding favicon for all devices (#6447)
jsaq007 Sep 26, 2024
f01b218
🎨 [Frontend] Unify ``border-radius`` (#6451)
odeimaiz Sep 26, 2024
3200fe2
🐛 fix tip e2e test (#6458)
matusdrobuliak66 Sep 27, 2024
925b817
🎨 adding `folder_id` to project resource (#6460)
matusdrobuliak66 Sep 27, 2024
7dab0e1
✅ e2e: Final touches to tip testing (#6459)
pcrespov Sep 27, 2024
afce906
✅ e2e: Fixes typo in tests (#6468)
pcrespov Sep 30, 2024
c0ba01a
✨ [Frontend] Keep View Mode in localStorage (#6463)
odeimaiz Sep 30, 2024
54e8174
🎨 [Frontend] Move multiple studies at once (#6457)
odeimaiz Sep 30, 2024
d74fa86
✨ New repository helpers on asyncpg (#6465)
pcrespov Sep 30, 2024
eca803b
♻️ Preparations in webserver to integrate asyncpg engine (#6466)
pcrespov Sep 30, 2024
cd9b335
✨ introduce `/projects:search` full search (#6464)
matusdrobuliak66 Sep 30, 2024
d34ac48
🎨 Frees up space on runner for `[build] docker images` part of the CI…
GitHK Oct 1, 2024
4cf5278
🐛🎨 Fixes unhandled config error and new log helpers for better troubl…
pcrespov Oct 1, 2024
a90d033
🎨 [Frontend] S4L: Include deprecated versions in plus button, they sh…
odeimaiz Oct 1, 2024
38ea07a
🐛 [Frontend] Guided Tours: point to visible selector or skip (#6481)
odeimaiz Oct 1, 2024
5560acd
🔨📝 Misc improvements in tooling and doc (#6478)
pcrespov Oct 1, 2024
6c46d46
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 2, 2024
8f06a87
Add verbose comment for special call to add midleware
mrnicegyu11 Oct 2, 2024
89d9a1d
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 2, 2024
68c6aef
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 2, 2024
6588f3b
🐛 [Frontend] Move grouped nodes (#6486)
odeimaiz Oct 2, 2024
0f1ef1d
🎨 [Frontend] Handle LongRunningTask errors better (#6485)
odeimaiz Oct 2, 2024
e3cfd8b
🐛 [Frontend] Fix for Folders disabled scenario (#6488)
odeimaiz Oct 3, 2024
b7065d9
🐛 archiving_utils creates deterministic zip archives (#6472)
GitHK Oct 3, 2024
b936411
🐛 Fixes duplicates in tags listings and new `priority` to enforce ord…
pcrespov Oct 3, 2024
2dfed79
✨Releases public-api 0.7 (#6489)
pcrespov Oct 4, 2024
1b728af
♻️ Polished and modernised agent service ⚠️ (#6452)
GitHK Oct 4, 2024
783bb1d
🎨 improve project full search (#6483)
matusdrobuliak66 Oct 4, 2024
f4dc38b
🎨 efs improvements (group extra properties) 🗃️ (#6493)
matusdrobuliak66 Oct 7, 2024
f074e42
🐛 Front-end: fixes PO center widget (#6496)
pcrespov Oct 7, 2024
3ca168d
🎨 Adds authentication for new style dynamic services and platform ven…
GitHK Oct 8, 2024
8b34d98
🎨 Expose env var to raise timeout of downloading/uploading data to an…
GitHK Oct 8, 2024
26e7fd6
🔨 New sql script template to remove readonly user (#6500)
pcrespov Oct 8, 2024
475fd13
🐛 Fixes bad formatting while handling missing configuration errors (#…
pcrespov Oct 8, 2024
9c8d0ec
♻️ increase e2e tip test timeout (#6504)
matusdrobuliak66 Oct 9, 2024
4d27c32
🎨 EFS Guardian: adding size monitoring (#6502)
matusdrobuliak66 Oct 10, 2024
42682d5
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 14, 2024
3ad20a7
Add middleware test
mrnicegyu11 Oct 14, 2024
d98371d
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 14, 2024
cf3eaa0
refactors test
pcrespov Oct 14, 2024
c3371b5
moves environs
pcrespov Oct 14, 2024
a29b33a
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 15, 2024
2134327
Adress pylint
mrnicegyu11 Oct 15, 2024
645cd72
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 17, 2024
c6775d7
Add autoinstrumentation
mrnicegyu11 Oct 18, 2024
b1bd7e1
WIP
mrnicegyu11 Oct 18, 2024
40580b8
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 18, 2024
c8b8798
Fix director-v0 devel mode
mrnicegyu11 Oct 18, 2024
8699445
wip
mrnicegyu11 Oct 18, 2024
a3e4da8
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 18, 2024
72f6530
Update packages/service-library/src/servicelib/aiohttp/tracing.py
mrnicegyu11 Oct 21, 2024
e80cec7
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 21, 2024
ad200c5
@sanderegg suggestions fixes
mrnicegyu11 Oct 21, 2024
1e27f5c
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 21, 2024
ca7480a
@pcrespov change requests
mrnicegyu11 Oct 21, 2024
7944713
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 21, 2024
d65f32d
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 22, 2024
ac37bbb
Mypy fixes
mrnicegyu11 Oct 22, 2024
d98cb95
mypy fixes
mrnicegyu11 Oct 22, 2024
fd0e91e
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 22, 2024
bcf9519
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 22, 2024
63469da
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 23, 2024
6fccbee
🎨 [Frontend] Make the Workspace UI element more distinguishable (#6576)
odeimaiz Oct 23, 2024
8097004
🎨 [Frontend] Small screens: Let them go (#6390)
odeimaiz Oct 23, 2024
8160031
🐛 [Frontend] Fix: Download logs with newlines (Firefox) (#6583)
odeimaiz Oct 23, 2024
e08c6d7
🐛Maintenance: upgrade faststream dependency (#6586)
sanderegg Oct 23, 2024
f553d49
🐛Deferred tasks: set default log level of messages in Faststream brok…
sanderegg Oct 24, 2024
045e167
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 25, 2024
a57b960
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 25, 2024
a23b97c
Fix director-v0
mrnicegyu11 Oct 25, 2024
9e8e794
Remove debugging info from opentelemetry collector
mrnicegyu11 Oct 25, 2024
6f36530
Drop heathcheck and PING traces
mrnicegyu11 Oct 25, 2024
bf04849
Add a bit of random catalog instrumentation
mrnicegyu11 Oct 25, 2024
39edb41
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
fd3dc3a
Disable telemetry in autosclaing unittests
mrnicegyu11 Oct 28, 2024
43f2426
Fix EFS service tests
mrnicegyu11 Oct 28, 2024
58247fa
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
eb3150d
Try to fix rabbitmq test failure - x-death
mrnicegyu11 Oct 28, 2024
7ea7a33
Disable tracing in autoscaling test
mrnicegyu11 Oct 28, 2024
9f918bb
Remove aiopika autoinstrumentation
mrnicegyu11 Oct 28, 2024
e5a486e
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
415a098
Revert "Drop heathcheck and PING traces"
mrnicegyu11 Oct 28, 2024
a8eb8a7
Revert "Add a bit of random catalog instrumentation"
mrnicegyu11 Oct 28, 2024
57f430a
Fix: use processors in opentelemetry
mrnicegyu11 Oct 28, 2024
48b03fa
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
e572471
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
126c1dd
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 28, 2024
d5c37c7
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
8750016
fix typo
mrnicegyu11 Oct 29, 2024
7ba1da4
Remove aio-pika instrumentation, test package auto detection
mrnicegyu11 Oct 29, 2024
a6303b3
Merge remote-tracking branch 'upstream/master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
a7d5651
mypy fixes
mrnicegyu11 Oct 29, 2024
708c4f9
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
ee3e33e
typecheck fixes
mrnicegyu11 Oct 29, 2024
5ee83a9
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
36bc383
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
70635aa
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
a27ba56
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 29, 2024
3d61124
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 30, 2024
6fcdb46
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 30, 2024
489aaf3
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 30, 2024
7a36882
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Oct 30, 2024
edf3ea7
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Nov 1, 2024
fc36beb
Try to fix tests
mrnicegyu11 Nov 1, 2024
ef9338c
Merge branch 'master' into 2024/fix/tracing
mrnicegyu11 Nov 5, 2024
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
1 change: 1 addition & 0 deletions packages/aws-library/requirements/_base.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ aiocache
arrow
pydantic[email]
types-aiobotocore[ec2,s3,ssm]
opentelemetry-instrumentation-botocore
sh
19 changes: 18 additions & 1 deletion packages/aws-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ arrow==1.3.0
# -r requirements/../../../packages/service-library/requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/service-library/requirements/_base.in
# -r requirements/_base.in
async-timeout==4.0.3
# via redis
attrs==24.2.0
# via
# aiohttp
Expand Down Expand Up @@ -127,7 +129,10 @@ opentelemetry-api==1.27.0
# opentelemetry-exporter-otlp-proto-grpc
# opentelemetry-exporter-otlp-proto-http
# opentelemetry-instrumentation
# opentelemetry-instrumentation-botocore
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
# opentelemetry-propagator-aws-xray
# opentelemetry-sdk
# opentelemetry-semantic-conventions
opentelemetry-exporter-otlp==1.27.0
Expand All @@ -141,9 +146,18 @@ opentelemetry-exporter-otlp-proto-grpc==1.27.0
opentelemetry-exporter-otlp-proto-http==1.27.0
# via opentelemetry-exporter-otlp
opentelemetry-instrumentation==0.48b0
# via opentelemetry-instrumentation-requests
# via
# opentelemetry-instrumentation-botocore
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
opentelemetry-instrumentation-botocore==0.48b0
# via -r requirements/_base.in
opentelemetry-instrumentation-redis==0.48b0
# via -r requirements/../../../packages/service-library/requirements/_base.in
opentelemetry-instrumentation-requests==0.48b0
# via -r requirements/../../../packages/service-library/requirements/_base.in
opentelemetry-propagator-aws-xray==1.0.2
# via opentelemetry-instrumentation-botocore
opentelemetry-proto==1.27.0
# via
# opentelemetry-exporter-otlp-proto-common
Expand All @@ -156,6 +170,8 @@ opentelemetry-sdk==1.27.0
# opentelemetry-exporter-otlp-proto-http
opentelemetry-semantic-conventions==0.48b0
# via
# opentelemetry-instrumentation-botocore
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
# opentelemetry-sdk
opentelemetry-util-http==0.48b0
Expand Down Expand Up @@ -297,6 +313,7 @@ wrapt==1.16.0
# aiobotocore
# deprecated
# opentelemetry-instrumentation
# opentelemetry-instrumentation-redis
yarl==1.12.1
# via
# aio-pika
Expand Down
1 change: 1 addition & 0 deletions packages/postgres-database/requirements/_base.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
alembic
pydantic
sqlalchemy[postgresql_psycopg2binary,postgresql_asyncpg] # SEE extras in https://github.com/sqlalchemy/sqlalchemy/blob/main/setup.cfg#L43
opentelemetry-instrumentation-asyncpg
yarl
25 changes: 25 additions & 0 deletions packages/postgres-database/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ async-timeout==4.0.3
# via asyncpg
asyncpg==0.29.0
# via sqlalchemy
deprecated==1.2.14
# via
# opentelemetry-api
# opentelemetry-semantic-conventions
greenlet==3.1.1
# via sqlalchemy
idna==3.10
# via yarl
importlib-metadata==8.4.0
# via opentelemetry-api
mako==1.3.5
# via
# -c requirements/../../../requirements/constraints.txt
Expand All @@ -16,12 +22,25 @@ markupsafe==2.1.5
# via mako
multidict==6.1.0
# via yarl
opentelemetry-api==1.27.0
# via
# opentelemetry-instrumentation
# opentelemetry-instrumentation-asyncpg
# opentelemetry-semantic-conventions
opentelemetry-instrumentation==0.48b0
# via opentelemetry-instrumentation-asyncpg
opentelemetry-instrumentation-asyncpg==0.48b0
# via -r requirements/_base.in
opentelemetry-semantic-conventions==0.48b0
# via opentelemetry-instrumentation-asyncpg
psycopg2-binary==2.9.9
# via sqlalchemy
pydantic==1.10.18
# via
# -c requirements/../../../requirements/constraints.txt
# -r requirements/_base.in
setuptools==75.2.0
# via opentelemetry-instrumentation
sqlalchemy==1.4.54
# via
# -c requirements/../../../requirements/constraints.txt
Expand All @@ -31,5 +50,11 @@ typing-extensions==4.12.2
# via
# alembic
# pydantic
wrapt==1.16.0
# via
# deprecated
# opentelemetry-instrumentation
yarl==1.12.1
# via -r requirements/_base.in
zipp==3.20.2
# via importlib-metadata
6 changes: 4 additions & 2 deletions packages/postgres-database/requirements/_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ pyyaml==6.0.2
# pre-commit
ruff==0.6.7
# via -r requirements/../../../requirements/devenv.txt
setuptools==75.1.0
# via pip-tools
setuptools==75.2.0
# via
# -c requirements/_base.txt
# pip-tools
tomlkit==0.13.2
# via pylint
typing-extensions==4.12.2
Expand Down
1 change: 1 addition & 0 deletions packages/service-library/requirements/_base.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ faststream
opentelemetry-api
opentelemetry-exporter-otlp
opentelemetry-instrumentation-requests
opentelemetry-instrumentation-redis
opentelemetry-sdk
psutil
pydantic
Expand Down
11 changes: 10 additions & 1 deletion packages/service-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ arrow==1.3.0
# via
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/_base.in
async-timeout==4.0.3
# via redis
attrs==24.2.0
# via
# aiohttp
Expand Down Expand Up @@ -93,6 +95,7 @@ opentelemetry-api==1.27.0
# opentelemetry-exporter-otlp-proto-grpc
# opentelemetry-exporter-otlp-proto-http
# opentelemetry-instrumentation
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
# opentelemetry-sdk
# opentelemetry-semantic-conventions
Expand All @@ -107,7 +110,11 @@ opentelemetry-exporter-otlp-proto-grpc==1.27.0
opentelemetry-exporter-otlp-proto-http==1.27.0
# via opentelemetry-exporter-otlp
opentelemetry-instrumentation==0.48b0
# via opentelemetry-instrumentation-requests
# via
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
opentelemetry-instrumentation-redis==0.48b0
# via -r requirements/_base.in
opentelemetry-instrumentation-requests==0.48b0
# via -r requirements/_base.in
opentelemetry-proto==1.27.0
Expand All @@ -122,6 +129,7 @@ opentelemetry-sdk==1.27.0
# opentelemetry-exporter-otlp-proto-http
opentelemetry-semantic-conventions==0.48b0
# via
# opentelemetry-instrumentation-redis
# opentelemetry-instrumentation-requests
# opentelemetry-sdk
opentelemetry-util-http==0.48b0
Expand Down Expand Up @@ -219,6 +227,7 @@ wrapt==1.16.0
# via
# deprecated
# opentelemetry-instrumentation
# opentelemetry-instrumentation-redis
yarl==1.12.1
# via
# aio-pika
Expand Down
2 changes: 2 additions & 0 deletions packages/service-library/requirements/_test.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
# testing

asgi_lifespan
botocore
coverage
docker
faker
flaky
numpy
openapi-spec-validator
pillow
pip
pytest
pytest-aiohttp
pytest-asyncio
Expand Down
8 changes: 8 additions & 0 deletions packages/service-library/requirements/_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ attrs==24.2.0
# jsonschema
# pytest-docker
# referencing
botocore==1.35.50
# via -r requirements/_test.in
certifi==2024.8.30
# via
# -c requirements/../../../requirements/constraints.txt
Expand Down Expand Up @@ -91,6 +93,8 @@ idna==3.10
# yarl
iniconfig==2.0.0
# via pytest
jmespath==1.0.1
# via botocore
jsonschema==4.23.0
# via
# -c requirements/_aiohttp.txt
Expand Down Expand Up @@ -141,6 +145,8 @@ pathable==0.4.3
# jsonschema-path
pillow==10.4.0
# via -r requirements/_test.in
pip==24.3.1
# via -r requirements/_test.in
pluggy==1.5.0
# via pytest
pprintpp==0.4.0
Expand Down Expand Up @@ -188,6 +194,7 @@ pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
# via
# -c requirements/_base.txt
# botocore
# faker
python-dotenv==1.0.1
# via -r requirements/_test.in
Expand Down Expand Up @@ -263,6 +270,7 @@ urllib3==2.2.3
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_aiohttp.txt
# -c requirements/_base.txt
# botocore
# docker
# requests
yarl==1.12.1
Expand Down
6 changes: 4 additions & 2 deletions packages/service-library/requirements/_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ packaging==24.1
# build
pathspec==0.12.1
# via black
pip==24.2
# via pip-tools
pip==24.3.1
# via
# -c requirements/_test.txt
# pip-tools
pip-tools==7.4.1
# via -r requirements/../../../requirements/devenv.txt
platformdirs==4.3.6
Expand Down
50 changes: 42 additions & 8 deletions packages/service-library/src/servicelib/aiohttp/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,39 @@
from opentelemetry.instrumentation.aiohttp_server import (
middleware as aiohttp_server_opentelemetry_middleware, # pylint:disable=no-name-in-module
)
from opentelemetry.instrumentation.aiopg import ( # pylint:disable=no-name-in-module
AiopgInstrumentor,
)
from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from servicelib.logging_utils import log_context
from settings_library.tracing import TracingSettings

_logger = logging.getLogger(__name__)
try:
from opentelemetry.instrumentation.botocore import ( # type: ignore[import-not-found]
BotocoreInstrumentor,
)

HAS_BOTOCORE = True
except ImportError:
HAS_BOTOCORE = False
try:
from opentelemetry.instrumentation.aiopg import AiopgInstrumentor

HAS_AIOPG = True
except ImportError:
HAS_AIOPG = False
try:
from opentelemetry.instrumentation.requests import RequestsInstrumentor

HAS_REQUESTS = True
except ImportError:
HAS_REQUESTS = False


def setup_tracing(
app: web.Application,
tracing_settings: TracingSettings,
service_name: str,
instrument_aiopg: bool = False, # noqa: FBT001, FBT002
) -> None:
"""
Sets up this service for a distributed tracing system (opentelemetry)
Expand Down Expand Up @@ -91,6 +107,24 @@ def setup_tracing(

# Instrument aiohttp client
AioHttpClientInstrumentor().instrument()
if instrument_aiopg:
AiopgInstrumentor().instrument()
RequestsInstrumentor().instrument()
if HAS_AIOPG:
with log_context(
_logger,
logging.INFO,
msg="Attempting to add aio-pg opentelemetry autoinstrumentation...",
):
AiopgInstrumentor().instrument()
if HAS_BOTOCORE:
with log_context(
_logger,
logging.INFO,
msg="Attempting to add botocore opentelemetry autoinstrumentation...",
):
BotocoreInstrumentor().instrument()
if HAS_REQUESTS:
with log_context(
_logger,
logging.INFO,
msg="Attempting to add requests opentelemetry autoinstrumentation...",
):
RequestsInstrumentor().instrument()
Loading
Loading