Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send analytics events #216

Merged
merged 25 commits into from
Nov 13, 2024
Merged

Send analytics events #216

merged 25 commits into from
Nov 13, 2024

Conversation

biglittlebigben
Copy link
Contributor

No description provided.

@biglittlebigben biglittlebigben requested a review from a team as a code owner October 28, 2024 17:06
@biglittlebigben biglittlebigben marked this pull request as draft October 28, 2024 17:06
@biglittlebigben biglittlebigben marked this pull request as ready for review October 29, 2024 16:58
pkg/sip/types.go Outdated
@@ -60,15 +74,38 @@ const (
type URI struct {
User string
Host string
Port uint16
Copy link
Contributor

Choose a reason for hiding this comment

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

Why adding a separate port, if it's already in Addr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the Host field ends up containing a hostname and port, not an ip address, the Addr argument will be invalid (the preexisting line netip.AddrPortFrom(u.Addr.Addr(), uint16(port)) will return "Invalid AddPort", with no port field if u.Addr.Addr() is invalid).

Copy link
Contributor

Choose a reason for hiding this comment

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

I also thought that it's the case, but it will still work if we test port separately from the address. addrport.IsValid() always returns addrport.Addr().IsValid().

But if you think it's inconvenient to use that separately, we could change the field type to netip.Addr and add a AddrPort/SetAddrPort helper methods.

pkg/sip/types.go Outdated
url := &livekit.SIPUri{
User: u.User,
Host: u.GetHost(),
Port: fmt.Sprintf("%d", u.GetPort()),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will change after updating to livekit/protocol#869

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I'll update

@biglittlebigben biglittlebigben merged commit d1c09b3 into main Nov 13, 2024
3 checks passed
@biglittlebigben biglittlebigben deleted the benjamin/analytics branch November 13, 2024 15:58
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