Skip to content
New issue

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

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

Already on GitHub? # to your account

GO-4844: API Analytics from MW #2095

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jmetrikat
Copy link
Member

@jmetrikat jmetrikat commented Feb 5, 2025

  • Broadcast analyticsEvent to client for all actions taken through API.
  • After a successful request, ensureAnalyticsEvent(code, eventService) sends an event with the code specified in router.go for the corresponding route.
  • Event includes apiAppName param, which is derived from app name tied to api token (app key) used for current request.

@jmetrikat jmetrikat marked this pull request as ready for review February 9, 2025 20:22
Copy link

github-actions bot commented Feb 9, 2025

Previous Coverage 50.7% of statements
New Coverage 50.7% of statements
Patch Coverage 7.0% of changed statements (4/57)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

Copy link

Testomat.io Report 🟢 SMOKE-TEST PASSED
Tests ✔️ 8 tests run
Summary 🟢 8 passed; 🟡 0 skipped
Duration 🕐 12 minutes, 41 seconds
Testomat.io Report 📊 Run #7147232d
Job 🗂️ Smoke Tests / smoke-test
Operating System 🖥️ Linux X64

✅ Passed Tests (8)

  • Revoking an invite link (3 minutes, 1 seconds)
  • User cancels their join request (1 minute, 20 seconds)
  • User deletes the space and rejoins later (1 minute, 37 seconds)
  • Owner changes the rights of a user from Viewer to Editor (1 minute, 47 seconds)
  • Owner approves a join request with Editor permissions (1 minute, 29 seconds)
  • Owner declines a join request (1 minute, 4 seconds)
  • Owner removes a participant from the space (1 minute, 19 seconds)
  • Sync on staging nodes (1 minute, 1 seconds)

@jmetrikat jmetrikat requested a review from Copilot February 26, 2025 17:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

core/api/server/server.go:34

  • [nitpick] The comment for the KeyToToken mapping still refers to a token, but the map now holds ApiSessionEntry objects. Consider updating the comment to accurately reflect the stored type.
KeyToToken map[string]ApiSessionEntry // appKey -> token

"encoding/json"
"log"

"golang.org/x/net/context"
Copy link
Preview

Copilot AI Feb 26, 2025

Choose a reason for hiding this comment

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

For consistency with other parts of the codebase that use the standard library context, consider replacing 'golang.org/x/net/context' with 'context'.

Suggested change
"golang.org/x/net/context"
"context"

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant