Skip to content

Add prom metrics for webhook dispatch.#1095

Merged
boks1971 merged 2 commits intomainfrom
raja_prom
Jun 4, 2025
Merged

Add prom metrics for webhook dispatch.#1095
boks1971 merged 2 commits intomainfrom
raja_prom

Conversation

@boks1971
Copy link
Contributor

@boks1971 boks1971 commented Jun 4, 2025

  1. success/failure/drop counter.
  2. queue length histogram.
    • doing this only for resource_url_notifier which does a per room queue as queue length is easily available. This is the one currently in use.
    • worker pool based notifier will need a change in core package to return a queue length when enqueuing.

1. success/failure/drop counter.
2. queue length histogram.
   - doing this only for resource_url_notifier which does a per room
     queue as queue length is easily available. This is the one
     currently in use.
   - worker pool based notifier will need a change in `core` package to
     return a queue length when enqueuing.
@changeset-bot
Copy link

changeset-bot bot commented Jun 4, 2025

⚠️ No Changeset found

Latest commit: 0171cc4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@boks1971 boks1971 requested a review from a team June 4, 2025 18:37
webhook/stats.go Outdated
Name: "dispatch_total",
ConstLabels: constLabels,
}, []string{"status", "reason"})
prometheus.MustRegister(promWebhookDispatchTotal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

promauto.New* creates and registers metrics with the default registry in the same function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice! will do

@boks1971 boks1971 merged commit 2227c44 into main Jun 4, 2025
7 checks passed
@boks1971 boks1971 deleted the raja_prom branch June 4, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants