Skip to content

[OPS] Add Application Insights alert for LinkedIn token refresh failures #59

@artcava

Description

@artcava

Overview

Add a dedicated Application Insights alert rule that fires when LinkedInTokenRefresherFunction logs an error, ensuring immediate notification if the auto-refresh fails and manual intervention is needed before the token expires.

Depends on: #58

Tasks

  • Create alert rule in Application Insights targeting LinkedInTokenRefresher function errors:
traces
| where timestamp > ago(2h)
| where message contains "LinkedIn token refresh"
| where severityLevel >= 3
  • Configure action group: email notification to cavallo.marco@gmail.com
  • Alert severity: Sev 1 – Error (token expiry is a hard blocker for LinkedIn publishing)
  • Evaluation frequency: every 5 minutes, lookback window: 2 hours
  • Add Bicep snippet to docs/monitoring.md for IaC reproducibility
  • Test alert by manually triggering a failure (e.g., temporarily invalidating the refresh token in Key Vault)

Acceptance Criteria

  • Email received within 10 minutes of a refresh failure
  • Alert auto-resolves when next successful refresh occurs
  • Bicep snippet documented in docs/monitoring.md

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions