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: authentication analytics #4684

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

vsrivatsa-juspay
Copy link
Contributor

@vsrivatsa-juspay vsrivatsa-juspay commented May 17, 2024

Type of Change

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

Description

Modified authentication analytics queries to query api_events

Additional Changes

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

Motivation and Context

How did you test it?

curl --location 'localhost:8080/analytics/v1/metrics/auth_events' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--data '[
    {
        "timeSeries": {
            "granularity": "G_ONEDAY"
        },
        "timeRange": {
            "startTime": "2024-01-13T18:30:00Z",
            "endTime": "2024-04-30T18:30:00Z"
        },
        "metrics": [
            "three_ds_sdk_count",
            "authentication_attempt_count",
            "authentication_success_count",
            "challenge_flow_count",
            "frictionless_flow_count",
            "challenge_attempt_count",
            "challenge_success_count",
            "frictionless_success_count",
        ]
    }
]'
{
    "queryData": [
        {
            "three_ds_sdk_count": 3,
            "authentication_attempt_count": 3,
            "authentication_success_count": 3,
            "challenge_flow_count": 2,
            "frictionless_flow_count": 1,
            "challenge_attempt_count": 2,
            "challenge_success_count": 2,
            "frictionless_success_count": 1,
            "time_bucket": "2024-01-19T00:00:00Z"
        }
    ],
    "metaData": [
        {
            "current_time_range": {
                "start_time": "2024-01-13T18:30:00.000Z",
                "end_time": "2024-04-30T18:30:00.000Z"
            }
        }
    ]
}

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

closes #4252

@vsrivatsa-juspay vsrivatsa-juspay requested a review from a team as a code owner May 17, 2024 12:19
@vsrivatsa-juspay vsrivatsa-juspay force-pushed the feat/authentication_analytics_2 branch from 8b97be7 to 4575661 Compare May 17, 2024 12:20
@vsrivatsa-juspay vsrivatsa-juspay self-assigned this May 17, 2024
@vsrivatsa-juspay vsrivatsa-juspay linked an issue May 17, 2024 that may be closed by this pull request
2 tasks
@vsrivatsa-juspay vsrivatsa-juspay added low-risk label to track PRs which might have less impact on hyperswitch after merge S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 17, 2024
@vsrivatsa-juspay vsrivatsa-juspay changed the title Feat/authentication analytics feat: authentication analytics May 17, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue May 23, 2024
Merged via the queue into main with commit 5e5eb5f May 23, 2024
25 checks passed
@likhinbopanna likhinbopanna deleted the feat/authentication_analytics_2 branch May 23, 2024 10:27
@SanchithHegde SanchithHegde removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed low-risk label to track PRs which might have less impact on hyperswitch after merge labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Authentication Analytics
6 participants