DORA Metrics Quick Start Guide
Get up and running with DevGrid DORA metrics in under 10 minutes.
Prerequisites
Before you begin, you'll need:
- DevGrid Account - Sign up at devgrid.io
- API Key - Generate one from your DevGrid account settings
- Application Entity - Create at least one application/service entity in DevGrid
- Entity ID - Note the
shortIdoridof your application entity
Step 1: Get Your API Key
- Log in to DevGrid
- Navigate to Settings → API Keys
- Click Generate New API Key
- Copy and save your API key securely (you won't see it again)
- Store it as an environment variable:
export DEVGRID_API_KEY="your-api-key-here"
Step 2: Identify Your Application Entity
- In DevGrid, go to Applications or Entities
- Find the application you want to track
- Note the Entity ID (or Short ID)
- Store it as an environment variable:
export DEVGRID_ENTITY_ID="your-entity-id-here"
Step 3: Send Your First Deployment Event
Use this curl command to send a test deployment event:
curl -X POST https://prod.api.devgrid.io/events \
-H "x-api-key: $DEVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"type": "event-deploy",
"timestamp": "2025-10-29T18:30:00Z",
"entityId": "'"$DEVGRID_ENTITY_ID"'",
"attributes": {
"env": "production",
"status": "success",
"build_id": "test-build-001",
"build_commit_sha": "a1b2c3d4e5f6789",
"description": "Test deployment from Quick Start guide",
"initiator": "[email protected]"
}
}
]
}'Expected Response
If successful, you'll receive a response like this:
{
"success": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "event-deploy",
"entityId": "your-entity-id",
"blueprintId": "04252f20-4000-470a-a1eb-88bf5bb648d2",
"timestamp": "2025-10-29T18:30:00Z",
"accountId": "your-account-id",
"attributes": {
"env": "production",
"status": "success",
"build_id": "test-build-001",
"build_commit_sha": "a1b2c3d4e5f6789",
"description": "Test deployment from Quick Start guide",
"initiator": "[email protected]"
},
"createdAt": "2025-10-29T18:30:15Z"
}
],
"failures": []
}Common Errors
401 Unauthorized
{
"message": "Unauthorized"
}→ Check that your API key is correct and included in the x-api-key header
400 Bad Request - Entity Not Found
{
"success": [],
"failures": [
{
"event": {...},
"reason": "Entity not found"
}
]
}→ Verify your entityId exists in DevGrid
400 Bad Request - Invalid Format
{
"success": [],
"failures": [
{
"event": {...},
"reason": "Invalid event type"
}
]
}→ Make sure type is exactly "event-deploy" (not "deployment" or "deploy")
Step 4: Verify Your Event
- Log in to DevGrid
- Navigate to your application
- Check the Events tab or Metrics dashboard
- You should see your deployment event appear
Note: Metrics are calculated daily at UTC midnight, so you may need to wait until the next day to see deployment frequency, lead time, etc.
Step 5: Integrate with Your CI/CD Pipeline
Now that you've verified the API works, integrate it into your deployment pipeline:
For GitHub Actions:
- name: Send Deployment Event
run: |
curl -X POST https://prod.api.devgrid.io/events \
-H "x-api-key: ${{ secrets.DEVGRID_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"events": [{
"type": "event-deploy",
"entityId": "${{ vars.DEVGRID_ENTITY_ID }}",
"attributes": {
"env": "production",
"status": "success",
"build_id": "${{ github.run_id }}",
"build_commit_sha": "${{ github.sha }}",
"build_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"initiator": "${{ github.actor }}"
}
}]
}'See CI/CD Integration Examples for more platforms.
Step 6: Configure Additional Integrations
To unlock all DORA metrics, you'll need to configure additional integrations:
For Lead Time for Change
- Connect your GitHub/GitLab/Bitbucket account
- DevGrid will automatically pull commit and PR data
- Ensure
build_commit_shain your deployment events matches actual commit SHAs
For Change Failure Rate
- Connect your incident management system (ServiceNow, PagerDuty, etc.)
- Add
change_idto deployment events - Link incidents to deployments in your incident system
- See ServiceNow Integration Guide
For Mean Time to Restore
- Connect your incident management system
- DevGrid will calculate MTTR from incident open/close timestamps
Environment URLs
- Development/Staging:
https://api.dev.devgrid.io/events - Production:
https://prod.api.devgrid.io/events
Choose the appropriate endpoint based on your DevGrid account environment.
Updated 3 months ago
