Commit db522b6
feat: Add OpenTelemetry tracing to the Publisher and Subscriber (#2086)
* feat: Initial publish side Open Telemetry support * feat: Publish-side trace context injection * feat: Tests and improvements to publish side OTel tracing * feat: More tests and refactoring for publish-side OpenTelemetry * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Formatting files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Publisher test changes * test: Fix OpenTelemetry test * Feat: Use OpenTelemetry semconv * test: Fix some dependency issues * feat: Test fix * feat: Add comment for setter in builder * Opentelemetry subscribe (#2100) * feat: Add OpenTelemetry tracing to the SubscriberClient * feat: Add link to publisher create span in the subscribe process span * feat: Add Ack/Nack/ModAck RPC spans to the subscribe * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Opentelemetry subscribe (#2101) * feat: Add OpenTelemetry tracing to the SubscriberClient * feat: Add link to publisher create span in the subscribe process span * feat: Add Ack/Nack/ModAck RPC spans to the subscribe * fix: Fix test errors caused by otel changes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Fix build errors in Publisher * test: Ignore org.assertj:assertj-core which is required for OTel testing assertions * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: Add tests for subscriber OTel functions * feat: Changes to OpenTelemetry implementation to add links earlier and prevent methods from being exposed to users * feat: Refactor OpenTelemetry implementation to use a context aware wrapper for the tracer and a PubsubTracer interface * feat: Initialize default no-op PubsubTracer in Publisher and Subscriber * feat: Ensure SubscriberStreamingConnection and MessageDispatcher have default no-op tracers by default for tests * samples: Add OpenTelemetry publisher and subscriber samples * feat: Add additional sampling checks to the Otel implementation * samples: Update pom.xml for samples with Cloud Trace exporter * feat: Make OTel classes/methods package-private and remove non-generic PubsubTracer interface * feat: Lint fixes for Pub/Sub * feat: Use MessagingIncubatingAttributes for gcp_pubsub attribute names * feat: Format OTel changes * Revert "feat: Use MessagingIncubatingAttributes for gcp_pubsub attribute names" This reverts commit 305610e. * feat: trigger build * chore: generate libraries at Mon Sep 30 20:37:03 UTC 2024 * feat: trigger build * feat: Fix file overwrite from bad merge * chore: generate libraries at Mon Sep 30 20:49:40 UTC 2024 * Revert "chore: generate libraries at Mon Sep 30 20:49:40 UTC 2024" This reverts commit 5ebbbf9. * chore: generate libraries at Mon Sep 30 21:03:31 UTC 2024 * Revert "chore: generate libraries at Mon Sep 30 21:03:31 UTC 2024" This reverts commit 23f3a70. * chore: generate libraries at Mon Sep 30 21:14:11 UTC 2024 * feat: Prevent new files for OpenTelemetry from being overwritten * feat: Revert automated file deletion for OpenTelemetry changes * feat: Remove OpenTelemetry samples as the samples use a released library version to run * chore: generate libraries at Mon Sep 30 22:11:14 UTC 2024 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>1 parent c126927 commit db522b6
File tree
16 files changed
+2008
-31
lines changed- .github
- google-cloud-pubsub
- src
- main/java/com/google/cloud/pubsub/v1
- test/java/com/google/cloud/pubsub/v1
- samples
- install-without-bom
- snapshot
- snippets
16 files changed
+2008
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| |||
142 | 154 | | |
143 | 155 | | |
144 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
145 | 172 | | |
146 | 173 | | |
147 | 174 | | |
| |||
174 | 201 | | |
175 | 202 | | |
176 | 203 | | |
| 204 | + | |
177 | 205 | | |
178 | 206 | | |
179 | 207 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
78 | 92 | | |
79 | 93 | | |
80 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
| |||
Lines changed: 76 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| 181 | + | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| |||
217 | 224 | | |
218 | 225 | | |
219 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
220 | 233 | | |
221 | 234 | | |
222 | 235 | | |
| |||
351 | 364 | | |
352 | 365 | | |
353 | 366 | | |
354 | | - | |
355 | 367 | | |
356 | 368 | | |
357 | | - | |
358 | | - | |
| 369 | + | |
359 | 370 | | |
360 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
361 | 376 | | |
362 | 377 | | |
363 | 378 | | |
| |||
390 | 405 | | |
391 | 406 | | |
392 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
393 | 418 | | |
394 | 419 | | |
395 | 420 | | |
396 | | - | |
| 421 | + | |
397 | 422 | | |
398 | 423 | | |
399 | 424 | | |
| |||
457 | 482 | | |
458 | 483 | | |
459 | 484 | | |
| 485 | + | |
460 | 486 | | |
461 | | - | |
| 487 | + | |
| 488 | + | |
462 | 489 | | |
463 | 490 | | |
| 491 | + | |
| 492 | + | |
464 | 493 | | |
465 | 494 | | |
466 | | - | |
| 495 | + | |
| 496 | + | |
467 | 497 | | |
468 | 498 | | |
469 | 499 | | |
470 | | - | |
471 | | - | |
472 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
473 | 503 | | |
474 | 504 | | |
475 | 505 | | |
476 | | - | |
477 | | - | |
478 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
479 | 510 | | |
480 | | - | |
481 | 511 | | |
482 | 512 | | |
483 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
484 | 519 | | |
485 | 520 | | |
486 | 521 | | |
| |||
499 | 534 | | |
500 | 535 | | |
501 | 536 | | |
| 537 | + | |
502 | 538 | | |
503 | 539 | | |
| 540 | + | |
504 | 541 | | |
505 | 542 | | |
506 | 543 | | |
| |||
521 | 558 | | |
522 | 559 | | |
523 | 560 | | |
| 561 | + | |
524 | 562 | | |
| 563 | + | |
525 | 564 | | |
526 | 565 | | |
527 | 566 | | |
| |||
607 | 646 | | |
608 | 647 | | |
609 | 648 | | |
610 | | - | |
611 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
612 | 653 | | |
613 | 654 | | |
614 | 655 | | |
| |||
645 | 686 | | |
646 | 687 | | |
647 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
648 | 693 | | |
649 | 694 | | |
650 | 695 | | |
| |||
715 | 760 | | |
716 | 761 | | |
717 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
718 | 778 | | |
719 | 779 | | |
720 | 780 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
0 commit comments