Skip to content

Commit

Permalink
tortoiseorm: use a list for instrumented packages
Browse files Browse the repository at this point in the history
Use a list to express that the tortoiseorm instrumentation targets
projects that both tortoiseorm AND pydantic installed.
So that tortoiseorm instrumentation is installed only if both packages
are found by opentelemetry-bootstrap.
  • Loading branch information
xrmx committed May 27, 2024
1 parent a1f09e9 commit 69125d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-asyncio` Check for __name__ attribute in the coroutine
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
- `opentelemetry-util-http` Preserve brackets around literal IPv6 hosts ([#2552](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2552))
- `opentelemetry-instrumentation` On bootstrap don't install tortoise orm instrumentation if pydantic is found
([#2409](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2409))


## Version 1.24.0/0.45b0 (2024-03-28)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ dependencies = [

[project.optional-dependencies]
instruments = [
"tortoise-orm >= 0.17.0",
"pydantic >= 1.10.2"
["tortoise-orm >= 0.17.0", "pydantic >= 1.10.2"],
]

[project.entry-points.opentelemetry_instrumentor]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,7 @@
"instrumentation": "opentelemetry-instrumentation-tornado==0.46b0.dev",
},
{
"library": "tortoise-orm >= 0.17.0",
"instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.46b0.dev",
},
{
"library": "pydantic >= 1.10.2",
"library": ["tortoise-orm >= 0.17.0", "pydantic >= 1.10.2"],
"instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.46b0.dev",
},
{
Expand Down

0 comments on commit 69125d1

Please sign in to comment.