Integrations
EdLog integrates with popular CI/CD tools, monitoring systems, and deployment platforms. Use these pre-built integrations to start sending events quickly.
GitHub Actions
Add EdLog tracking to your GitHub Actions workflows:
name: Deploy with EdLog
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Notify EdLog - Start
run: |
curl -X POST ${{ secrets.EDLOG_URL }}/api/v1/webhooks \
-H "Authorization: Bearer ${{ secrets.EDLOG_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"project_key": "my-app",
"type": "deployment",
"name": "deploy_started",
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
"channel": "github",
"attributes": {
"version": "${{ github.sha }}",
"branch": "${{ github.ref_name }}",
"actor": "${{ github.actor }}"
}
}'
# Your deployment steps here
- name: Notify EdLog - Success
if: success()
run: # Similar curl command with deploy_finished
GitLab CI
Integrate EdLog with GitLab CI/CD pipelines:
.edlog_notify:
script:
- |
curl -X POST ${EDLOG_URL}/api/v1/webhooks \
-H "Authorization: Bearer ${EDLOG_API_KEY}" \
-H "Content-Type: application/json" \
-d "{
\"project_key\": \"${CI_PROJECT_NAME}\",
\"type\": \"deployment\",
\"name\": \"${EVENT_NAME}\",
\"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",
\"channel\": \"gitlab\",
\"attributes\": {
\"version\": \"${CI_COMMIT_SHA}\",
\"branch\": \"${CI_COMMIT_REF_NAME}\",
\"pipeline_id\": \"${CI_PIPELINE_ID}\"
}
}"
deploy:
stage: deploy
before_script:
- EVENT_NAME=deploy_started
- !reference [.edlog_notify, script]
script:
- # Your deployment commands
after_script:
- EVENT_NAME=deploy_finished
- !reference [.edlog_notify, script]
Docker
Send events from Docker containers:
# Add to your Dockerfile
RUN apt-get update && apt-get install -y curl
# Or use in docker-compose.yml
version: '3'
services:
app:
image: myapp
environment:
- EDLOG_URL=https://edlog.example.com
- EDLOG_API_KEY=${EDLOG_API_KEY}
command: |
sh -c '
curl -X POST ${EDLOG_URL}/api/v1/webhooks \
-H "Authorization: Bearer ${EDLOG_API_KEY}" \
-H "Content-Type: application/json" \
-d "{
\"project_key\": \"docker-app\",
\"type\": \"deployment\",
\"name\": \"container_started\",
\"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",
\"attributes\": {
\"container_id\": \"$(hostname)\",
\"image\": \"myapp:latest\"
}
}" &&
exec your-app-command
'
Kubernetes
Use init containers or lifecycle hooks to send events:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
template:
spec:
initContainers:
- name: edlog-notify
image: curlimages/curl
env:
- name: EDLOG_URL
valueFrom:
secretKeyRef:
name: edlog-config
key: url
- name: EDLOG_API_KEY
valueFrom:
secretKeyRef:
name: edlog-config
key: api-key
command: ["/bin/sh"]
args:
- -c
- |
curl -X POST ${EDLOG_URL}/api/v1/webhooks \
-H "Authorization: Bearer ${EDLOG_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"project_key": "k8s-app",
"type": "deployment",
"name": "pod_starting",
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
"attributes": {
"namespace": "'$NAMESPACE'",
"pod": "'$HOSTNAME'"
}
}'
containers:
- name: app
image: my-app:latest
Terraform
Track infrastructure changes with Terraform:
# terraform/modules/edlog/main.tf
resource "null_resource" "edlog_notify" {
triggers = {
always_run = timestamp()
}
provisioner "local-exec" {
command = <<-EOT
curl -X POST ${var.edlog_url}/api/v1/webhooks \
-H "Authorization: Bearer ${var.edlog_api_key}" \
-H "Content-Type: application/json" \
-d '{
"project_key": "${var.project_key}",
"type": "infrastructure",
"name": "${var.event_name}",
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'",
"attributes": {
"terraform_version": "'$(terraform version -json | jq -r .terraform_version)'",
"workspace": "'$(terraform workspace show)'",
"action": "${var.action}"
}
}'
EOT
}
}
# Usage
module "notify_start" {
source = "./modules/edlog"
edlog_url = var.edlog_url
edlog_api_key = var.edlog_api_key
project_key = "infrastructure"
event_name = "terraform_apply_started"
action = "apply"
}
Monitoring Tools
Prometheus Alertmanager
Configure webhook receiver:
receivers:
- name: edlog
webhook_configs:
- url: https://edlog.example.com/api/v1/webhooks
http_config:
bearer_token: YOUR_API_KEY
Grafana
Add webhook notification channel:
- • Type: Webhook
- • URL: Your EdLog webhook URL
- • HTTP Method: POST
- • Add Authorization header
Datadog
Use webhooks integration:
- • Configure webhook in Integrations
- • Add to monitor notifications
- • Use @webhook-edlog mention
New Relic
Set up webhook notification:
- • Add webhook destination
- • Configure custom headers
- • Map payload fields
Building Custom Integrations
Create your own integration by following these steps:
- Identify Events: Determine what events you want to track
- Map Fields: Transform your data to EdLog's event structure
- Add Authentication: Store API key securely
- Send Events: Use HTTP client to POST to webhook endpoint
- Handle Errors: Implement retry logic for failed requests
- Test: Verify events appear in EdLog dashboard
Need Help?
Can't find the integration you need? We can help you build a custom integration.