tapimo 0.10.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/App.d.ts +3412 -1968
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js.map +1 -1
  4. package/dist/Webhooks.d.ts +0 -75
  5. package/dist/Webhooks.d.ts.map +1 -1
  6. package/dist/Webhooks.js +1 -143
  7. package/dist/Webhooks.js.map +1 -1
  8. package/dist/admin/App.d.ts +74 -74
  9. package/dist/admin/apps/api-keys.d.ts +4 -4
  10. package/dist/admin/apps/earn-vaults.d.ts +1 -1
  11. package/dist/admin/apps/organizations.d.ts +3 -3
  12. package/dist/admin/apps/verified-tokens.d.ts +74 -74
  13. package/dist/apps/data/App.d.ts +3618 -2954
  14. package/dist/apps/data/App.d.ts.map +1 -1
  15. package/dist/apps/data/App.js +5 -2
  16. package/dist/apps/data/App.js.map +1 -1
  17. package/dist/apps/data/routes/activities.d.ts +1 -1
  18. package/dist/apps/data/routes/activities.d.ts.map +1 -1
  19. package/dist/apps/data/routes/activities.js +55 -27
  20. package/dist/apps/data/routes/activities.js.map +1 -1
  21. package/dist/apps/data/routes/addresses.d.ts +343 -343
  22. package/dist/apps/data/routes/balances.d.ts +11 -11
  23. package/dist/apps/data/routes/blocks.d.ts +5 -5
  24. package/dist/apps/data/routes/coingecko.d.ts +176 -176
  25. package/dist/apps/data/routes/earn.d.ts +4 -4
  26. package/dist/apps/data/routes/exchanges.d.ts +4 -4
  27. package/dist/apps/data/routes/fee-amm.d.ts +26 -26
  28. package/dist/apps/data/routes/indexer.d.ts +34 -34
  29. package/dist/apps/data/routes/receipts.d.ts +236 -236
  30. package/dist/apps/data/routes/tokenlist.d.ts +12 -12
  31. package/dist/apps/data/routes/tokens.d.ts +3 -3
  32. package/dist/apps/data/routes/transactions.d.ts +1 -1
  33. package/dist/apps/data/routes/transfers.d.ts +13 -13
  34. package/dist/apps/data/routes/valuation.d.ts +21 -21
  35. package/dist/apps/data/routes/verified-tokens.d.ts +5 -5
  36. package/dist/apps/data/routes/webhooks.d.ts +1011 -151
  37. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  38. package/dist/apps/data/routes/webhooks.js +124 -737
  39. package/dist/apps/data/routes/webhooks.js.map +1 -1
  40. package/dist/apps/data/routes/zones.d.ts +31 -31
  41. package/dist/apps/funding/routes/deposit-addresses.d.ts +2 -2
  42. package/dist/apps/funding/routes/providers.d.ts +13 -13
  43. package/dist/apps/funding/routes/transfers.d.ts +33 -33
  44. package/dist/apps/management/App.d.ts +793 -16
  45. package/dist/apps/management/App.d.ts.map +1 -1
  46. package/dist/apps/management/routes/api-keys.d.ts +50 -50
  47. package/dist/apps/management/routes/faucet.d.ts +31 -31
  48. package/dist/apps/management/routes/invite-links.d.ts +42 -42
  49. package/dist/apps/management/routes/members.d.ts +79 -79
  50. package/dist/apps/management/routes/projects.d.ts +40 -40
  51. package/dist/apps/management/routes/usage.d.ts +80 -80
  52. package/dist/apps/management/routes/webhooks.d.ts +1031 -59
  53. package/dist/apps/management/routes/webhooks.d.ts.map +1 -1
  54. package/dist/apps/management/routes/webhooks.js +27 -4
  55. package/dist/apps/management/routes/webhooks.js.map +1 -1
  56. package/dist/db/Db.d.ts.map +1 -1
  57. package/dist/db/Db.js +21 -0
  58. package/dist/db/Db.js.map +1 -1
  59. package/dist/db/Schema.d.ts +7 -1
  60. package/dist/db/Schema.d.ts.map +1 -1
  61. package/dist/db/Schema.js +9 -0
  62. package/dist/db/Schema.js.map +1 -1
  63. package/dist/db/tables/webhookQueueEvents.d.ts +3 -1
  64. package/dist/db/tables/webhookQueueEvents.d.ts.map +1 -1
  65. package/dist/db/tables/webhookQueueEvents.js +4 -0
  66. package/dist/db/tables/webhookQueueEvents.js.map +1 -1
  67. package/dist/db/tables/webhookSubscriptions.d.ts +33 -69
  68. package/dist/db/tables/webhookSubscriptions.d.ts.map +1 -1
  69. package/dist/db/tables/webhookSubscriptions.js +63 -100
  70. package/dist/db/tables/webhookSubscriptions.js.map +1 -1
  71. package/dist/internal/MetricSink.d.ts +35 -125
  72. package/dist/internal/MetricSink.d.ts.map +1 -1
  73. package/dist/internal/MetricSink.js +50 -121
  74. package/dist/internal/MetricSink.js.map +1 -1
  75. package/dist/internal/Schema.d.ts +3 -1
  76. package/dist/internal/Schema.d.ts.map +1 -1
  77. package/dist/internal/Schema.js +4 -2
  78. package/dist/internal/Schema.js.map +1 -1
  79. package/dist/internal/WebhookTransfer.d.ts +1 -55
  80. package/dist/internal/WebhookTransfer.d.ts.map +1 -1
  81. package/dist/internal/WebhookTransfer.js +1 -239
  82. package/dist/internal/WebhookTransfer.js.map +1 -1
  83. package/dist/internal/Webhooks.d.ts +83 -44
  84. package/dist/internal/Webhooks.d.ts.map +1 -1
  85. package/dist/internal/Webhooks.js +87 -73
  86. package/dist/internal/Webhooks.js.map +1 -1
  87. package/dist/internal/funding/DepositWebhook.d.ts +25 -0
  88. package/dist/internal/funding/DepositWebhook.d.ts.map +1 -0
  89. package/dist/internal/funding/DepositWebhook.js +74 -0
  90. package/dist/internal/funding/DepositWebhook.js.map +1 -0
  91. package/dist/internal/funding/Reconciliation.d.ts +6 -0
  92. package/dist/internal/funding/Reconciliation.d.ts.map +1 -1
  93. package/dist/internal/funding/Reconciliation.js +42 -10
  94. package/dist/internal/funding/Reconciliation.js.map +1 -1
  95. package/dist/internal/funding/index.d.ts +1 -0
  96. package/dist/internal/funding/index.d.ts.map +1 -1
  97. package/dist/internal/funding/index.js +1 -0
  98. package/dist/internal/funding/index.js.map +1 -1
  99. package/dist/internal/webhookDestinations/slack.d.ts.map +1 -1
  100. package/dist/internal/webhookDestinations/slack.js +16 -0
  101. package/dist/internal/webhookDestinations/slack.js.map +1 -1
  102. package/package.json +1 -1
  103. package/src/App.ts +3 -0
  104. package/src/Client.test-d.ts +22 -1
  105. package/src/Webhooks.ts +1 -220
  106. package/src/apps/data/App.ts +8 -2
  107. package/src/apps/data/routes/activities.test.ts +107 -11
  108. package/src/apps/data/routes/activities.ts +64 -32
  109. package/src/apps/data/routes/webhooks.test.ts +179 -1497
  110. package/src/apps/data/routes/webhooks.ts +150 -974
  111. package/src/apps/management/routes/webhooks.test.ts +79 -1
  112. package/src/apps/management/routes/webhooks.ts +40 -4
  113. package/src/db/Db.test.ts +1 -5
  114. package/src/db/Db.ts +23 -0
  115. package/src/db/Schema.ts +13 -0
  116. package/src/db/tables/organizations.test.ts +5 -2
  117. package/src/db/tables/webhookQueueEvents.ts +7 -1
  118. package/src/db/tables/webhookSubscriptions.ts +89 -138
  119. package/src/internal/MetricSink.test.ts +41 -373
  120. package/src/internal/MetricSink.ts +92 -273
  121. package/src/internal/Schema.test.ts +18 -0
  122. package/src/internal/Schema.ts +13 -2
  123. package/src/internal/WebhookTransfer.ts +1 -351
  124. package/src/internal/Webhooks.test.ts +102 -139
  125. package/src/internal/Webhooks.ts +175 -106
  126. package/src/internal/funding/DepositWebhook.test.ts +131 -0
  127. package/src/internal/funding/DepositWebhook.ts +101 -0
  128. package/src/internal/funding/Reconciliation.test.ts +14 -0
  129. package/src/internal/funding/Reconciliation.ts +161 -86
  130. package/src/internal/funding/index.test.ts +1 -0
  131. package/src/internal/funding/index.ts +1 -0
  132. package/src/internal/webhookDestinations/slack.ts +15 -0
  133. package/src/Webhooks.bench.ts +0 -714
  134. package/src/Webhooks.memory.bench.ts +0 -250
  135. package/src/Webhooks.test.ts +0 -146
@@ -473,7 +473,7 @@ describe('requests', () => {
473
473
  })
474
474
 
475
475
  describe('webhooks', () => {
476
- test('records recovery, poll-cycle, poll-stage, and failed-tick telemetry with bounded tags', () => {
476
+ test('records scan pipeline blocks, backlog, and finality lag', () => {
477
477
  const events: MetricEvent[] = []
478
478
  const metrics = Metrics.from({
479
479
  count(name, value, tags) {
@@ -483,205 +483,67 @@ describe('webhooks', () => {
483
483
  gauge(name, value, tags) {
484
484
  events.push({ name, tags, type: 'gauge', value })
485
485
  },
486
- histogram(name, value, tags) {
487
- events.push({ name, tags, type: 'histogram', value })
488
- },
486
+ histogram() {},
489
487
  })
490
488
  const sink = MetricSink.webhooks(metrics)
491
489
 
492
- sink.record({
493
- chainId: 4217,
494
- dequeuedAt: 1_300,
495
- enqueuedAt: 1_100,
496
- trigger: 'alarm',
497
- type: 'webhook:head-recovery',
498
- })
499
- sink.record({
500
- chainId: 4217,
501
- lagBlocks: 2,
502
- type: 'webhook:head-progress',
503
- })
504
- sink.record({
505
- chainId: 4217,
506
- delayMs: 200,
507
- trigger: 'direct',
508
- type: 'webhook:poll-start',
509
- })
510
- sink.record({
511
- chainId: 4217,
512
- outcome: 'ok',
513
- requestedBoundaryAdvanceBlocks: 10,
514
- trigger: 'direct',
515
- type: 'webhook:poll-cycle',
516
- })
517
- sink.record({
518
- chainId: 4217,
519
- failure: 'remote',
520
- stage: 'finish',
521
- trigger: 'direct',
522
- type: 'webhook:poll-failure',
523
- })
524
- sink.record({
525
- chainId: 4217,
526
- durationMs: 42,
527
- eventType: 'token:transfer',
528
- outcome: 'ok',
529
- stage: 'scan',
530
- type: 'webhook:poll',
531
- })
532
- sink.record({
533
- cursorLagBlocks: 7,
534
- meta: { chainId: 4217, durationMs: 50, outcome: 'error' },
535
- result: undefined,
536
- type: 'webhook:tick',
537
- })
490
+ sink.record({ chainId: 42431, deferred: false, matches: 3, origin: 'socket', outcome: 'dispatched', type: 'webhook:scan-block', workMs: 12 }) // prettier-ignore
491
+ sink.record({ chainId: 42431, deferred: true, matches: 0, origin: 'poll', outcome: 'deferred', type: 'webhook:scan-block', workMs: 3 }) // prettier-ignore
492
+ sink.record({ chainId: 42431, oldestPendingAgeMs: 5_000, pendingCount: 2, type: 'webhook:scan-backlog', watermarkLagBlocks: 7 }) // prettier-ignore
493
+ sink.record({ chainId: 42431, lagBlocks: 1, type: 'webhook:scan-finality' })
538
494
 
539
- expect(events).toMatchInlineSnapshot(`
540
- [
541
- {
542
- "name": "webhook_head_recovery_queue_count",
543
- "tags": {
544
- "chain_id": "4217",
545
- "trigger": "alarm",
546
- },
547
- "type": "count",
548
- "value": 1,
549
- },
550
- {
551
- "name": "webhook_head_recovery_queue_wait_ms",
552
- "tags": {
553
- "chain_id": "4217",
554
- "trigger": "alarm",
555
- },
556
- "type": "histogram",
557
- "value": 200,
558
- },
559
- {
560
- "name": "webhook_head_progress_lag_blocks",
561
- "tags": {
562
- "chain_id": "4217",
563
- },
564
- "type": "gauge",
565
- "value": 2,
566
- },
567
- {
568
- "name": "webhook_poll_start_count",
569
- "tags": {
570
- "chain_id": "4217",
571
- "trigger": "direct",
572
- },
573
- "type": "count",
574
- "value": 1,
575
- },
576
- {
577
- "name": "webhook_poll_start_delay_ms",
578
- "tags": {
579
- "chain_id": "4217",
580
- "trigger": "direct",
581
- },
582
- "type": "histogram",
583
- "value": 200,
584
- },
585
- {
586
- "name": "webhook_poll_cycle_count",
587
- "tags": {
588
- "chain_id": "4217",
589
- "outcome": "ok",
590
- "trigger": "direct",
591
- },
592
- "type": "count",
593
- "value": 1,
594
- },
595
- {
596
- "name": "webhook_poll_requested_boundary_advance_blocks",
597
- "tags": {
598
- "chain_id": "4217",
599
- "outcome": "ok",
600
- "trigger": "direct",
601
- },
602
- "type": "histogram",
603
- "value": 10,
604
- },
605
- {
606
- "name": "webhook_poll_failure_count",
607
- "tags": {
608
- "chain_id": "4217",
609
- "failure": "remote",
610
- "stage": "finish",
611
- "trigger": "direct",
612
- },
613
- "type": "count",
614
- "value": 1,
615
- },
616
- {
617
- "name": "webhook_poller_stage_duration_ms",
618
- "tags": {
619
- "chain_id": "4217",
620
- "event_type": "token:transfer",
621
- "outcome": "ok",
622
- "stage": "scan",
623
- },
624
- "type": "histogram",
625
- "value": 42,
626
- },
627
- {
628
- "name": "webhook_poller_tick_count",
629
- "tags": {
630
- "chain_id": "4217",
631
- "outcome": "error",
632
- },
633
- "type": "count",
634
- "value": 1,
635
- },
636
- {
637
- "name": "webhook_poller_tick_duration_ms",
638
- "tags": {
639
- "chain_id": "4217",
640
- "outcome": "error",
641
- },
642
- "type": "histogram",
643
- "value": 50,
644
- },
645
- {
646
- "name": "webhook_subscription_cursor_lag_blocks",
647
- "tags": {
648
- "chain_id": "4217",
649
- },
650
- "type": "gauge",
651
- "value": 7,
652
- },
653
- ]
654
- `)
495
+ expect(events.map(({ name, tags, value }) => `${name}=${value} ${JSON.stringify(tags)}`))
496
+ .toMatchInlineSnapshot(`
497
+ [
498
+ "webhook_scan_block_count=1 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
499
+ "webhook_scan_match_count=3 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
500
+ "webhook_scan_block_count=1 {"chain_id":"42431","origin":"poll","outcome":"deferred"}",
501
+ "webhook_scan_pending_count=2 {"chain_id":"42431"}",
502
+ "webhook_scan_oldest_pending_age_ms=5000 {"chain_id":"42431"}",
503
+ "webhook_scan_watermark_lag_blocks=7 {"chain_id":"42431"}",
504
+ "webhook_scan_finality_lag_blocks=1 {"chain_id":"42431"}",
505
+ ]
506
+ `)
655
507
  })
656
508
 
657
- test('records scan pipeline blocks, backlog, and finality lag', () => {
509
+ test('records scan timing spans and per-step attribution', () => {
658
510
  const events: MetricEvent[] = []
659
511
  const metrics = Metrics.from({
660
512
  count(name, value, tags) {
661
513
  events.push({ name, tags, type: 'count', value })
662
514
  },
663
515
  flush() {},
664
- gauge(name, value, tags) {
665
- events.push({ name, tags, type: 'gauge', value })
516
+ gauge() {},
517
+ histogram(name, value, tags) {
518
+ events.push({ name, tags, type: 'histogram', value })
666
519
  },
667
- histogram() {},
668
520
  })
669
521
  const sink = MetricSink.webhooks(metrics)
670
522
 
671
- sink.record({ chainId: 42431, matches: 3, origin: 'socket', outcome: 'dispatched', type: 'webhook:scan-block' }) // prettier-ignore
672
- sink.record({ chainId: 42431, matches: 0, origin: 'poll', outcome: 'deferred', type: 'webhook:scan-block' }) // prettier-ignore
673
- sink.record({ chainId: 42431, oldestPendingAgeMs: 5_000, pendingCount: 2, type: 'webhook:scan-backlog' }) // prettier-ignore
674
- sink.record({ chainId: 42431, lagBlocks: 1, type: 'webhook:scan-finality' })
523
+ sink.record({ chainId: 42431, deferred: false, matches: 1, observationLagMs: 600, origin: 'socket', outcome: 'dispatched', queueWaitMs: 900, scanLagMs: 1_500, type: 'webhook:scan-block', workMs: 400 }) // prettier-ignore
524
+ // A replay carries no observation, so only the block-derived spans exist.
525
+ sink.record({ chainId: 42431, deferred: false, matches: 0, origin: 'replay', outcome: 'empty', scanLagMs: 30_000_000, type: 'webhook:scan-block', workMs: 250 }) // prettier-ignore
526
+ // Batch totals: the count is what makes 180ms across two calls readable
527
+ // as a per-invocation mean rather than a slow single read.
528
+ sink.record({ chainId: 42431, count: 2, durationMs: 180, step: 'finalized_rpc', type: 'webhook:scan-step' }) // prettier-ignore
529
+ sink.record({ chainId: 42431, count: 1, durationMs: 95, step: 'subscription_read', type: 'webhook:scan-step' }) // prettier-ignore
675
530
 
676
531
  expect(events.map(({ name, tags, value }) => `${name}=${value} ${JSON.stringify(tags)}`))
677
532
  .toMatchInlineSnapshot(`
678
533
  [
679
534
  "webhook_scan_block_count=1 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
680
- "webhook_scan_match_count=3 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
681
- "webhook_scan_block_count=1 {"chain_id":"42431","origin":"poll","outcome":"deferred"}",
682
- "webhook_scan_pending_count=2 {"chain_id":"42431"}",
683
- "webhook_scan_oldest_pending_age_ms=5000 {"chain_id":"42431"}",
684
- "webhook_scan_finality_lag_blocks=1 {"chain_id":"42431"}",
535
+ "webhook_scan_match_count=1 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
536
+ "webhook_scan_work_ms=400 {"chain_id":"42431","origin":"socket","outcome":"dispatched"}",
537
+ "webhook_scan_queue_wait_ms=900 {"chain_id":"42431","origin":"socket","outcome":"dispatched","deferred":"false"}",
538
+ "webhook_scan_observation_lag_ms=600 {"chain_id":"42431","origin":"socket"}",
539
+ "webhook_scan_lag_ms=1500 {"chain_id":"42431"}",
540
+ "webhook_scan_block_count=1 {"chain_id":"42431","origin":"replay","outcome":"empty"}",
541
+ "webhook_scan_work_ms=250 {"chain_id":"42431","origin":"replay","outcome":"empty"}",
542
+ "webhook_scan_lag_ms=30000000 {"chain_id":"42431"}",
543
+ "webhook_scan_step_duration_ms=180 {"chain_id":"42431","step":"finalized_rpc"}",
544
+ "webhook_scan_step_count=2 {"chain_id":"42431","step":"finalized_rpc"}",
545
+ "webhook_scan_step_duration_ms=95 {"chain_id":"42431","step":"subscription_read"}",
546
+ "webhook_scan_step_count=1 {"chain_id":"42431","step":"subscription_read"}",
685
547
  ]
686
548
  `)
687
549
  })
@@ -741,200 +603,6 @@ describe('webhooks', () => {
741
603
  `)
742
604
  })
743
605
 
744
- test('records scan boundaries with bounded workload dimensions', () => {
745
- const events: MetricEvent[] = []
746
- const metrics = Metrics.from({
747
- count(name, value, tags) {
748
- events.push({ name, tags, type: 'count', value })
749
- },
750
- flush() {},
751
- gauge() {},
752
- histogram(name, value, tags) {
753
- events.push({ name, tags, type: 'histogram', value })
754
- },
755
- })
756
- const sink = MetricSink.webhooks(metrics)
757
-
758
- sink.record({
759
- chainId: 4217,
760
- concurrency: 8,
761
- eventType: 'log:emitted',
762
- maxWindowBlocks: 1_000,
763
- phase: 'start',
764
- rpcMethod: 'eth_getLogs',
765
- subscriptionCount: 8,
766
- subscriptionLimit: 256,
767
- totalWindowBlocks: 8_000,
768
- type: 'webhook:poll-scan',
769
- })
770
- sink.record({
771
- chainId: 4217,
772
- concurrency: 8,
773
- durationMs: 250,
774
- eventType: 'log:emitted',
775
- failedSubscriptions: 1,
776
- matchedItems: 700,
777
- maxWindowBlocks: 1_000,
778
- outcome: 'error',
779
- phase: 'complete',
780
- rpcMethod: 'eth_getLogs',
781
- subscriptionCount: 8,
782
- subscriptionLimit: 256,
783
- totalWindowBlocks: 8_000,
784
- type: 'webhook:poll-scan',
785
- })
786
-
787
- expect(events.map(({ name, tags, value }) => ({ name, tags, value }))).toMatchInlineSnapshot(`
788
- [
789
- {
790
- "name": "webhook_poller_scan_checkpoint_count",
791
- "tags": {
792
- "chain_id": "4217",
793
- "event_type": "log:emitted",
794
- "phase": "start",
795
- },
796
- "value": 1,
797
- },
798
- {
799
- "name": "webhook_poller_scan_concurrency",
800
- "tags": {
801
- "chain_id": "4217",
802
- "event_type": "log:emitted",
803
- "phase": "start",
804
- },
805
- "value": 8,
806
- },
807
- {
808
- "name": "webhook_poller_scan_subscription_count",
809
- "tags": {
810
- "chain_id": "4217",
811
- "event_type": "log:emitted",
812
- "phase": "start",
813
- },
814
- "value": 8,
815
- },
816
- {
817
- "name": "webhook_poller_scan_subscription_limit",
818
- "tags": {
819
- "chain_id": "4217",
820
- "event_type": "log:emitted",
821
- "phase": "start",
822
- },
823
- "value": 256,
824
- },
825
- {
826
- "name": "webhook_poller_scan_max_window_blocks",
827
- "tags": {
828
- "chain_id": "4217",
829
- "event_type": "log:emitted",
830
- "phase": "start",
831
- },
832
- "value": 1000,
833
- },
834
- {
835
- "name": "webhook_poller_scan_total_window_blocks",
836
- "tags": {
837
- "chain_id": "4217",
838
- "event_type": "log:emitted",
839
- "phase": "start",
840
- },
841
- "value": 8000,
842
- },
843
- {
844
- "name": "webhook_poller_scan_checkpoint_count",
845
- "tags": {
846
- "chain_id": "4217",
847
- "event_type": "log:emitted",
848
- "phase": "complete",
849
- },
850
- "value": 1,
851
- },
852
- {
853
- "name": "webhook_poller_scan_concurrency",
854
- "tags": {
855
- "chain_id": "4217",
856
- "event_type": "log:emitted",
857
- "phase": "complete",
858
- },
859
- "value": 8,
860
- },
861
- {
862
- "name": "webhook_poller_scan_subscription_count",
863
- "tags": {
864
- "chain_id": "4217",
865
- "event_type": "log:emitted",
866
- "phase": "complete",
867
- },
868
- "value": 8,
869
- },
870
- {
871
- "name": "webhook_poller_scan_subscription_limit",
872
- "tags": {
873
- "chain_id": "4217",
874
- "event_type": "log:emitted",
875
- "phase": "complete",
876
- },
877
- "value": 256,
878
- },
879
- {
880
- "name": "webhook_poller_scan_max_window_blocks",
881
- "tags": {
882
- "chain_id": "4217",
883
- "event_type": "log:emitted",
884
- "phase": "complete",
885
- },
886
- "value": 1000,
887
- },
888
- {
889
- "name": "webhook_poller_scan_total_window_blocks",
890
- "tags": {
891
- "chain_id": "4217",
892
- "event_type": "log:emitted",
893
- "phase": "complete",
894
- },
895
- "value": 8000,
896
- },
897
- {
898
- "name": "webhook_poller_scan_duration_ms",
899
- "tags": {
900
- "chain_id": "4217",
901
- "event_type": "log:emitted",
902
- "phase": "complete",
903
- },
904
- "value": 250,
905
- },
906
- {
907
- "name": "webhook_poller_scan_failed_subscription_count",
908
- "tags": {
909
- "chain_id": "4217",
910
- "event_type": "log:emitted",
911
- "phase": "complete",
912
- },
913
- "value": 1,
914
- },
915
- {
916
- "name": "webhook_poller_scan_matched_item_count",
917
- "tags": {
918
- "chain_id": "4217",
919
- "event_type": "log:emitted",
920
- "phase": "complete",
921
- },
922
- "value": 700,
923
- },
924
- {
925
- "name": "webhook_poller_rpc_scan_count",
926
- "tags": {
927
- "chain_id": "4217",
928
- "event_type": "log:emitted",
929
- "outcome": "error",
930
- "rpc_method": "eth_getLogs",
931
- },
932
- "value": 1,
933
- },
934
- ]
935
- `)
936
- })
937
-
938
606
  test('records delivery stages without subscription identity', () => {
939
607
  const events: MetricEvent[] = []
940
608
  const metrics = Metrics.from({