Commit 4421670
opentelemetry-instrumentation-redis: implement suppression of instrumentation in Redis commands and pipelines (#3955)
* opentelemetry-instrumentation-redis: implement suppression of instrumentation in Redis commands and pipelines
- Added `suppress_instrumentation` context manager to allow selective disabling of instrumentation for Redis commands and pipelines.
- Updated the Redis instrumentation to check if instrumentation is enabled before executing commands.
- Added unit tests to verify the functionality of the suppression feature for both synchronous and asynchronous Redis operations.
* Doc
* Ruff
* Disable too-many-public-methods for tests file
* Update instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py
---------
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>1 parent 03c39cf commit 4421670
File tree
3 files changed
+181
-1
lines changed- instrumentation/opentelemetry-instrumentation-redis
- src/opentelemetry/instrumentation/redis
- tests
3 files changed
+181
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 45 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
113 | 142 | | |
114 | 143 | | |
115 | 144 | | |
| |||
134 | 163 | | |
135 | 164 | | |
136 | 165 | | |
137 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
138 | 170 | | |
139 | 171 | | |
140 | 172 | | |
| |||
196 | 228 | | |
197 | 229 | | |
198 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
199 | 234 | | |
200 | 235 | | |
201 | 236 | | |
| |||
231 | 266 | | |
232 | 267 | | |
233 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
234 | 272 | | |
235 | 273 | | |
236 | 274 | | |
| |||
276 | 314 | | |
277 | 315 | | |
278 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
279 | 320 | | |
280 | 321 | | |
281 | 322 | | |
| |||
307 | 348 | | |
308 | 349 | | |
309 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
310 | 354 | | |
311 | 355 | | |
312 | 356 | | |
| |||
Lines changed: 135 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
404 | 475 | | |
405 | 476 | | |
406 | 477 | | |
| |||
570 | 641 | | |
571 | 642 | | |
572 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
573 | 708 | | |
574 | 709 | | |
575 | 710 | | |
| |||
0 commit comments