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

feat(analytics): Revert api_event metrics and filters back to merchant_id authentication #5821

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

tsdk02
Copy link
Contributor

@tsdk02 tsdk02 commented Sep 6, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Previously modified api_event_metrics and api_event_filters to authenticate through AuthInfo where there are MerchantLevel, ProfileLevel and OrgLevel authentication. (#5729)

But ApiEvents table is not populated with organization_id and profile_id, hence reverting back.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Fix the issues on sandbox analytics related to api_events.

How did you test it?

Spoke with dashboard team and removed the following api endpoints:

  • /analytics/v1/profile/metrics/api_events
  • /analytics/v1/profile/filters/api_events
  • /analytics/v1/org/metrics/api_events
  • /analytics/v1/org/filters/api_events

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@tsdk02 tsdk02 added C-bug Category: Bug A-Analytics labels Sep 6, 2024
@tsdk02 tsdk02 requested a review from a team as a code owner September 6, 2024 05:59
Copy link

semanticdiff-com bot commented Sep 6, 2024

Review changes with SemanticDiff.

Analyzed 8 of 8 files.

Overall, the semantic diff is 23% smaller than the GitHub diff.

Filename Status
✔️ crates/router/src/analytics.rs 6.61% smaller
✔️ crates/analytics/src/lib.rs 82.68% smaller
✔️ crates/analytics/src/api_event/core.rs 35.38% smaller
✔️ crates/analytics/src/api_event/filters.rs 33.86% smaller
✔️ crates/analytics/src/api_event/metrics.rs 83.91% smaller
✔️ crates/analytics/src/api_event/metrics/api_count.rs 32.33% smaller
✔️ crates/analytics/src/api_event/metrics/latency.rs 32.33% smaller
✔️ crates/analytics/src/api_event/metrics/status_code_count.rs 32.33% smaller

@tsdk02 tsdk02 self-assigned this Sep 6, 2024
@tsdk02 tsdk02 requested a review from racnan September 6, 2024 09:57
@ThisIsMani
Copy link
Contributor

Make sure FE has also reverted the changes.
@lsampras, @tsdk02.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Sep 10, 2024
Merged via the queue into main with commit 283154d Sep 10, 2024
22 checks passed
@Gnanasundari24 Gnanasundari24 deleted the revert-analytics-events-apis branch September 10, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(analytics): Revert api_event metrics and filters back to merchant_id authentication
4 participants