Commit Graph

22 Commits

Author SHA1 Message Date
Paul Wells
eeefaec66e Rename log field pID to participantID (#1452)
* Rename log field "pID" to "participantID" for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add @livekit/protocol and rename pID to participantID

Updated changeset to include @livekit/protocol and renamed log field.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:30:57 -07:00
David Zhao
8b204ac683 add option to force webhooks to be made over IPv4 (#1296)
* add option to force webhooks to be made over IPv4

* include in test

* changeset
2025-11-09 15:22:14 -08:00
Raja Subramanian
aca9f5370a YAML tag webhook filters. (#1249)
* YAML tag webhook filters.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-09 16:13:46 +05:30
Tyler Barrus
5552d643f8 filter webhook (#1243)
* add webhook filter to protobuf and ensure IsAllowed checked
* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-08 15:12:15 -04:00
Raja Subramanian
fff85ca099 EventKey helper that can be provided. (#1231)
Useful to do project scoped keys in cloud.
2025-09-29 11:20:41 +05:30
Benjamin Pracht
9c8b99db90 Allow specifying extra webhooks in egress start requests (#1040) 2025-04-09 15:50:25 -07:00
Raja Subramanian
56615aa7e6 Move WebHookConfig to use location (#1006)
* Move WebHookConfig to use location

* generate

* generated protobuf

* make URLNotifier config

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-11 12:34:00 +05:30
Raja Subramanian
e586a23f4e Support filtering webhook events. (#1001)
* Support filtering webhook events.

* test

* set filter
2025-03-07 23:45:33 +05:30
Raja Subramanian
4102568c88 Per resource webhook queue. (#1000)
* Per resource webhook queue.

With a worker based approach, an event on a resource (like a room) not
being handled could affect other resources (other rooms or ingress or
egress).

To prevent that, do a per resource queue with two kinds of limits
- age of event: when queuing, if the event at the front of the queue
  exceeds a certain limit (default: 5 seconds), the event is dropped
- depth of queue: drop event if the number of queued events exceeds some
  level (default: 200)

To reap the per resource queue, specific end events are tracked and the
resource is added to the reap queue and reaped after a configurable
timeout (default: 5 min). This is to ensure that events happening just
after end event (for example: participant_left happening after
room_finished) are handled without re-creating a new resource.

Also, deprecating `num_dropped` from proto.

Some other bits of notes/challenges:
- Keeping the old URL notifier also. Also, the default notifier is that.
  Can change to the new one before merging this PR if this approach
  looks good.
- Using string compares of event name to detect end. Not great.
- Needs a sweeper to reap the resource queue. I think 5 min default
  timeout to reap should be okay, but maybe there are things that can
  cause re-creation of a resource queue after reaping and those could
  leak? Needs more analysis.
- Storing `context.Context` in resource queue so that it can be used
  during posting to webhook from resource queue go routine. Storing that
  is not great, but we need it for analytics key.

* generated protobuf

* missed files

* generated protobuf

* fix test in data race

* generate

* generated protobuf

* paul feedback

* fixes

* race

* more Paul feedback

* make resource notifier the default

* generated protobuf

* stop

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-07 22:39:59 +05:30
Raja Subramanian
9b6e5d703f Webhook analytics event. (#979)
* Webhook analytics event.

NOTE: Need a frostbyte73/core PR to merge and tag a release
PR pending: https://github.com/frostbyte73/core/pull/5

* sync submit

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-13 10:21:17 +05:30
David Zhao
f3bba12b3e Component support for logger (#436)
* Component support for logger

With the ability to dynamically update log levels per component

* support hierarchical config

* consolidate pion logger to use components
2023-08-03 11:59:04 -07:00
David Zhao
c9e9ae555f Add license headers & NOTICE (#429)
* Add license headers & NOTICE

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-27 16:43:25 -07:00
David Colburn
cadccd5410 update notifier (#374)
* update notifier

* update drop test

* fix draining

* change webhookCheckInterval back
2023-05-09 17:21:13 -07:00
David Zhao
f54aaadb8c Revamped notifier to avoid out of order delivery (#350)
Moving to a structure where each URL occupies their own delivery goroutine.
This avoids blocking of notifications to other URLs.
2023-04-15 01:04:56 -07:00
David Zhao
2956c3424f Improve webhook resilience with retryablehttp (#345) 2023-04-12 16:28:35 -07:00
David Zhao
782f517a6e Use custom mime-type to avoid overeager JSON parsing. (#210)
Middlewares/server frameworks have a tendency of replacing req.body with
parsed JSON object. We do not want this behavior as our Webhook receiver
needs to validate the raw string body against the `Authorization` header
2022-09-19 21:03:55 -07:00
David Zhao
8dff6f89d2 Webhook events for track published (#106)
* Webhook events for track published

* timeout for webhook notifications to avoid hang
2022-03-18 22:24:01 -07:00
lukasIO
3280169f2d add content type header to webhook requests (#44) 2021-11-11 13:08:05 -08:00
David Colburn
4dede7984e Add recording_started webhook, add ctx to notifier (#39)
* add recording_started webhook, add ctx to notifier

* update test
2021-11-08 18:00:12 -06:00
David Colburn
e3e7ce0232 notifier interface, message bus queue (#25)
* notifier interface, message bus queue

* remove ctx

* change name
2021-09-22 15:32:51 -05:00
David Zhao
8d0a9538d3 refactor, removed recording-related webhooks 2021-08-08 22:53:23 -07:00
David Zhao
992c4b2da9 webhook support 2021-08-08 22:17:46 -07:00