Commit 7617031
Fix instrumentation of SQLAlchemy when using sqlalchemy.engine_from_config (open-telemetry#2816)
* wrap sqlalchemy.engine.create.create_engine
sqlalchemy.engine_from_config directly calls create_engine imported from that path; if we don't
wrap that copy of the `create_engine` call then engines created via engine_from_config are not
instrumented.
* add changelog entry
* Update CHANGELOG.md
Co-authored-by: Emídio Neto <[email protected]>
* Update instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py
Co-authored-by: Tammy Baylis <[email protected]>
* make some monkey-patching conditional on the version of SQLAlchemy
* lint
* fix changelog
Signed-off-by: emdneto <[email protected]>
* Update CHANGELOG.md
---------
Signed-off-by: emdneto <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Shalev Roda <[email protected]>
Co-authored-by: Tammy Baylis <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>1 parent 9e83e25 commit 7617031
File tree
3 files changed
+27
-0
lines changed- instrumentation/opentelemetry-instrumentation-sqlalchemy
- src/opentelemetry/instrumentation/sqlalchemy
- tests
3 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
| |||
224 | 236 | | |
225 | 237 | | |
226 | 238 | | |
| 239 | + | |
| 240 | + | |
227 | 241 | | |
228 | 242 | | |
229 | 243 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
185 | 196 | | |
186 | 197 | | |
187 | 198 | | |
| |||
0 commit comments