Webhook Events
Webhook events are the core of EdLog's monitoring system. Send events from your applications, CI/CD pipelines, monitoring tools, or any system that can make HTTP requests.
Event Structure
All webhook events follow a consistent envelope structure with required and optional fields:
Required Fields
| Field | Type | Description |
|---|---|---|
project_key |
string | Unique identifier for the project |
type |
string | Event category (e.g., deployment, uptime, error, metric) |
name |
string | Event name (e.g., deploy_started, http_check) |
timestamp |
ISO8601 | When the event occurred |
attributes |
object | Custom key-value pairs with event data |
Optional Fields
| Field | Type | Description |
|---|---|---|
channel |
string | Sub-channel (e.g., github, hatchbox, ci) |
severity |
enum | info | warn | error | critical |
correlation_id |
string | Links related events in workflows |
source |
string | Host or service sending the event |
labels |
array | User-defined tags |
Sending Events
Endpoint
POST /api/v1/webhooks
Example Request
curl -X POST https://your-edlog-domain.com/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_key": "api-server",
"type": "deployment",
"name": "deploy_finished",
"timestamp": "2024-01-15T10:30:00Z",
"severity": "info",
"channel": "github",
"correlation_id": "deploy-123",
"attributes": {
"version": "v2.1.0",
"environment": "production",
"deployed_by": "john.doe",
"commit_sha": "abc123def",
"duration_seconds": 145,
"status": "success"
},
"labels": ["production", "api", "automated"]
}'
Success Response
{
"status": "success",
"event_id": "evt_1234567890",
"processed_at": "2024-01-15T10:30:01Z",
"tiles_affected": 2
}
Common Event Types
Deployment Events
Type: deployment
deploy_started- Deployment begandeploy_finished- Deployment succeededdeploy_failed- Deployment faileddeploy_rolled_back- Rollback executed
Common attributes:
- • version
- • environment
- • deployed_by
- • commit_sha
- • duration_seconds
Uptime Events
Type: uptime
http_check- HTTP endpoint checkping_check- ICMP ping checkservice_check- Service health checkssl_check- SSL certificate check
Common attributes:
- • url
- • status_code
- • response_time_ms
- • is_up
- • error_message
Error Events
Type: error
exception- Application exceptioncrash- Process crashwarning- Warning conditionalert- Alert triggered
Common attributes:
- • error_class
- • error_message
- • stack_trace
- • user_id
- • request_url
Metric Events
Type: metric
cpu_usage- CPU utilizationmemory_usage- Memory usagedisk_usage- Disk spacecustom_metric- Custom metric
Common attributes:
- • value
- • unit
- • threshold
- • host
- • tags
Best Practices
-
✓
Use correlation IDs - Link related events (e.g., all events in a deployment pipeline)
-
✓
Include timestamps - Always use accurate timestamps, not server receipt time
-
✓
Be consistent - Use the same event names and attribute keys across your systems
-
✓
Add context - Include relevant attributes that help debug issues
-
✓
Use severity levels - Help prioritize alerts and filter noise
-
✓
Batch when possible - Send multiple events in one request for efficiency
Batch Events
Send multiple events in a single request for better performance:
{
"events": [
{
"project_key": "api-server",
"type": "metric",
"name": "cpu_usage",
"timestamp": "2024-01-15T10:30:00Z",
"attributes": {
"value": 45.2,
"unit": "percent"
}
},
{
"project_key": "api-server",
"type": "metric",
"name": "memory_usage",
"timestamp": "2024-01-15T10:30:00Z",
"attributes": {
"value": 1024,
"unit": "MB"
}
}
]
}
Limit: Maximum 100 events per batch request.