Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

Changes

  • New files:

    • AppInsightsQueryService: OAuth2 client for App Insights Query API
    • LogQueryDto: Request DTO with kql and timespan fields
  • Modified files:

    • GsController: Add /gs/debug/logs endpoint (requires UserRole.DEBUG)
    • GsService: Add executeLogQuery() with KQL validation
    • Config: Add azure.appInsights.appId configuration
    • IntegrationModule: Register AppInsightsQueryService
    • HttpService: Add mock responses for LOC mode

Configuration

Requires APPINSIGHTS_APP_ID environment variable.

Test plan

  • Verify KQL query execution with valid query
  • Verify blocked patterns are rejected
  • Verify result limit is applied
  • Verify LOC mode returns mock data

Add POST /gs/debug/logs endpoint for KQL queries on Azure Application
Insights. Uses OAuth2 client credentials flow for authentication.

New files:
- AppInsightsQueryService: OAuth2 client for App Insights API
- LogQueryDto: Request DTO for KQL queries

Changes:
- GsController: Add debug/logs endpoint (UserRole.DEBUG)
- GsService: Add executeLogQuery with KQL validation
- Config: Add azure.appInsights.appId
- IntegrationModule: Register AppInsightsQueryService
- HttpService: Add mock responses for LOC mode
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