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 with 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 Jun 6, 2024
1 parent da04459 commit fc66e45
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 @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
- `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.25.0/0.46b0 (2024-05-31)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ dependencies = [

[tool.opentelemetry-bootstrap]
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.47b0.dev",
},
{
"library": "tortoise-orm >= 0.17.0",
"instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.47b0.dev",
},
{
"library": "pydantic >= 1.10.2",
"library": ["tortoise-orm >= 0.17.0", "pydantic >= 1.10.2"],
"instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.47b0.dev",
},
{
Expand Down

0 comments on commit fc66e45

Please sign in to comment.