DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Linear API Integration with Vigilmon

How to Monitor Your Linear API Integration with Vigilmon

Linear is a project management tool with a powerful GraphQL API. If your product integrates with Linear — for issue syncing, webhook processing, or internal tooling — you need to know when that integration fails.

Vigilmon monitors your Linear API-powered endpoints so breakages are detected in seconds, not discovered when your team complains.

What to Monitor

Your Linear Integration Service

If you built a service that handles Linear webhooks or syncs data from Linear, monitor its health endpoint:

https://your-integration.com/api/linear/health
Enter fullscreen mode Exit fullscreen mode

Building a Monitorable Linear Integration

Node.js + Linear SDK

const { LinearClient } = require('@linear/sdk');
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY });

app.get('/api/linear/health', async (req, res) => {
  try {
    const me = await client.viewer;
    res.json({ status: 'ok', integration: 'linear', user: me.name });
  } catch (error) {
    res.status(503).json({ status: 'error', message: error.message });
  }
});
Enter fullscreen mode Exit fullscreen mode

Python with Linear GraphQL

import httpx, os

@app.get("/api/linear/health")
async def linear_health():
    try:
        async with httpx.AsyncClient() as http:
            response = await http.post(
                "https://api.linear.app/graphql",
                headers={"Authorization": os.environ["LINEAR_API_KEY"]},
                json={"query": "{ viewer { id name } }"},
                timeout=5.0
            )
            response.raise_for_status()
        return {"status": "ok", "integration": "linear"}
    except Exception as e:
        raise HTTPException(status_code=503, detail=str(e))
Enter fullscreen mode Exit fullscreen mode

Monitoring Webhook Receivers

For webhook receivers, add a GET health endpoint alongside your POST handler:

app.get('/webhooks/linear/health', (req, res) => {
  res.json({ status: 'ok', webhook: 'linear' });
});

app.post('/webhooks/linear', webhookMiddleware, (req, res) => {
  // Process Linear webhook events
});
Enter fullscreen mode Exit fullscreen mode

Alert Configuration

Configure Slack alerts in Vigilmon for instant team notification when your Linear integration breaks:

  1. Create a Slack incoming webhook
  2. In Vigilmon, go to Alert Channels → Webhooks
  3. Add your Slack webhook URL

Response Time Thresholds

Linear's GraphQL API is typically fast. Recommended Vigilmon thresholds:

Threshold Action
> 1000ms Warning
> 3000ms Alert
HTTP error Immediate alert

Free Tier

5 monitors, 5-minute intervals, email alerts, no credit card required.

Monitor your Linear integration at vigilmon.online.

Top comments (0)