Skip to content

Commit d35d87c

Browse files
Changes for ingress observability support (#1392)
- Add projectID explicitly to GetIngressInfoResponse as we cannot send it in headers on a response - move ingressobs.Reporter to protocol - Remove the unused KillIngressSession RPC - Random fmt fixes by the protobuf linter included in my editor... --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 97f05ae commit d35d87c

File tree

11 files changed

+431
-270
lines changed

11 files changed

+431
-270
lines changed

.changeset/heavy-scissors-hear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/protocol": patch
3+
---
4+
5+
Changes for ingress observability support

observability/ingressobs/gen_reporter.go

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

observability/ingressobs/gen_reporter_noop.go

Lines changed: 87 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

observability/ingressobs/gen_source.go

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

observability/reporter.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/livekit/protocol/observability/agentsobs"
55
"github.com/livekit/protocol/observability/egressobs"
66
"github.com/livekit/protocol/observability/gatewayobs"
7+
"github.com/livekit/protocol/observability/ingressobs"
78
"github.com/livekit/protocol/observability/roomobs"
89
"github.com/livekit/protocol/observability/telephonycallobs"
910
"github.com/livekit/protocol/observability/telephonyobs"
@@ -18,7 +19,7 @@ type Reporter interface {
1819
Telephony() telephonyobs.Reporter
1920
Connector() any // any is a placeholder for the connector type
2021
Egress() egressobs.Reporter
21-
Ingress() any
22+
Ingress() ingressobs.Reporter
2223
GatewayMetrics() any // any is a placeholder for the gateway metrics type
2324
TelephonyCall() telephonycallobs.Reporter
2425
Close()
@@ -54,8 +55,8 @@ func (reporter) Egress() egressobs.Reporter {
5455
return egressobs.NewNoopReporter()
5556
}
5657

57-
func (reporter) Ingress() any {
58-
return nil
58+
func (reporter) Ingress() ingressobs.Reporter {
59+
return ingressobs.NewNoopReporter()
5960
}
6061

6162
func (reporter) GatewayMetrics() any {

protobufs/rpc/ingress.proto

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ service IngressInternal {
3131
option (psrpc.options).multi = true;
3232
option (psrpc.options).topics = true;
3333
};
34-
35-
rpc KillIngressSession(KillIngressSessionRequest) returns (google.protobuf.Empty) {
36-
option (psrpc.options) = {
37-
topics: true
38-
topic_params: {
39-
names: ["ingress_id", "resource_id"]
40-
typed: false
41-
}
42-
};
43-
};
4434
}
4535

4636
service IngressHandler {

protobufs/rpc/io.proto

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ message GetIngressInfoResponse {
6666
livekit.IngressInfo info = 1;
6767
string token = 2;
6868
string ws_url = 3;
69+
string project_id = 6;
6970
map<string, string> logging_fields = 4;
7071
map<string, string> feature_flags = 5;
7172
}
@@ -77,20 +78,20 @@ message UpdateIngressStateRequest {
7778
}
7879

7980
message GetSIPTrunkAuthenticationRequest {
80-
string sip_call_id = 6 [deprecated=true];
81+
string sip_call_id = 6 [deprecated = true];
8182

8283
// What Number is calling
83-
string from = 2 [deprecated=true];
84+
string from = 2 [deprecated = true];
8485
// What Host is calling
85-
string from_host = 7 [deprecated=true];
86+
string from_host = 7 [deprecated = true];
8687

8788
// What Number was called
88-
string to = 3 [deprecated=true];
89+
string to = 3 [deprecated = true];
8990
// What Host was called
90-
string to_host = 5 [deprecated=true];
91+
string to_host = 5 [deprecated = true];
9192

9293
// What is the IP address of the called number
93-
string src_address = 4 [deprecated=true];
94+
string src_address = 4 [deprecated = true];
9495

9596
SIPCall call = 8;
9697

@@ -107,7 +108,7 @@ message GetSIPTrunkAuthenticationResponse {
107108
(logger.redact) = true,
108109
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
109110
];
110-
bool drop = 3;
111+
bool drop = 3;
111112
// Trunk used to fulfill this request
112113
string sip_trunk_id = 4;
113114
// Used in Cloud only
@@ -121,22 +122,22 @@ message GetSIPTrunkAuthenticationResponse {
121122
}
122123

123124
message EvaluateSIPDispatchRulesRequest {
124-
string sip_call_id = 8 [deprecated=true];
125-
string sip_participant_id = 1 [deprecated=true];
125+
string sip_call_id = 8 [deprecated = true];
126+
string sip_participant_id = 1 [deprecated = true];
126127
// Trunk from the auth response, if any
127128
string sip_trunk_id = 10;
128129

129130
// What Number is calling
130-
string calling_number = 2 [deprecated=true];
131+
string calling_number = 2 [deprecated = true];
131132

132133
// What Host is calling
133-
string calling_host = 11 [deprecated=true];
134+
string calling_host = 11 [deprecated = true];
134135

135136
// What Number was called
136-
string called_number = 3 [deprecated=true];
137+
string called_number = 3 [deprecated = true];
137138

138139
// What is the IP address of the called number
139-
string src_address = 4 [deprecated=true];
140+
string src_address = 4 [deprecated = true];
140141

141142
// What pin has been entered if any
142143
string pin = 5;
@@ -145,7 +146,7 @@ message EvaluateSIPDispatchRulesRequest {
145146
bool no_pin = 6;
146147

147148
// What Host was called
148-
string called_host = 7 [deprecated=true];
149+
string called_host = 7 [deprecated = true];
149150

150151
// Extra participant attributes added for this call.
151152
// Usually include provider-specific metadata.
@@ -181,7 +182,7 @@ message EvaluateSIPDispatchRulesResponse {
181182
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
182183
];
183184

184-
bool request_pin = 3 [deprecated=true]; // see result
185+
bool request_pin = 3 [deprecated = true]; // see result
185186

186187
// optional token that should be used when creating LiveKit participant
187188
string token = 4 [
@@ -246,7 +247,7 @@ message UpdateSIPCallStateRequest {
246247
livekit.SIPCallInfo call_info = 1;
247248
livekit.SIPTransferInfo transfer_info = 2;
248249

249-
// NEXT ID: 3
250+
// NEXT ID: 3
250251
}
251252

252253
message RecordCallContextRequest {
@@ -256,7 +257,7 @@ message RecordCallContextRequest {
256257
}
257258

258259
enum SIPDispatchResult {
259-
LEGACY_ACCEPT_OR_PIN = 0; // check request_pin field
260+
LEGACY_ACCEPT_OR_PIN = 0; // check request_pin field
260261
ACCEPT = 1;
261262
REQUEST_PIN = 2;
262263
REJECT = 3;
@@ -271,11 +272,11 @@ enum SIPTrunkAuthenticationError {
271272

272273
message SIPCall {
273274
string lk_call_id = 1;
274-
string source_ip = 2; // source ip (without port)
275-
livekit.SIPUri address = 3; // address in the request line (INVITE)
276-
livekit.SIPUri from = 4; // From header
277-
livekit.SIPUri to = 5; // To header
278-
repeated livekit.SIPUri via = 6; // Via headers
279-
string sip_call_id = 7; // SIP protocol generated call ID
280-
string project_id = 8; // LiveKit project ID (Cloud only)
275+
string source_ip = 2; // source ip (without port)
276+
livekit.SIPUri address = 3; // address in the request line (INVITE)
277+
livekit.SIPUri from = 4; // From header
278+
livekit.SIPUri to = 5; // To header
279+
repeated livekit.SIPUri via = 6; // Via headers
280+
string sip_call_id = 7; // SIP protocol generated call ID
281+
string project_id = 8; // LiveKit project ID (Cloud only)
281282
}

0 commit comments

Comments
 (0)