Get up and running with the Developer Telemetry DevLake plugin in 5 minutes.
⚠️ VERSION COMPATIBILITY: Pre-built binaries are version-specific. If you get a version mismatch error, use Option B.
# Download from GitHub releases
wget https://github.com/irfanuddinahmad/dev-telemetry-devlake-plugin/releases/latest/download/developer_telemetry.so
# Copy to DevLake plugins directory
mkdir -p /path/to/devlake/backend/bin/plugins/developer_telemetry/
cp developer_telemetry.so /path/to/devlake/backend/bin/plugins/developer_telemetry/
# Restart DevLake
cd /path/to/devlake/backend
export DEVLAKE_PLUGINS=developer_telemetry
./bin/lake# Navigate to your DevLake installation
cd /path/to/devlake/backend
# Copy plugin source
cp -r /path/to/dev-telemetry-devlake-plugin/plugins/developer_telemetry plugins/
# Build against your DevLake version
DEVLAKE_PLUGINS=developer_telemetry scripts/build-plugins.sh
# Start DevLake
export DEVLAKE_PLUGINS=developer_telemetry
./bin/lakecurl -X POST http://localhost:8080/plugins/developer_telemetry/connections \
-H "Content-Type: application/json" \
-d '{
"name": "My Development Team",
"endpoint": "http://localhost:8080",
"secretToken": "my-secret-token-12345"
}'Expected response:
{
"id": 1,
"name": "My Development Team",
"endpoint": "http://localhost:8080",
"createdAt": "2026-02-12T10:00:00Z",
"updatedAt": "2026-02-12T10:00:00Z"
}curl http://localhost:8080/plugins/developer_telemetry/connections/1curl -X POST http://localhost:8080/plugins/developer_telemetry/connections/1/report \
-H "Content-Type: application/json" \
-H "Authorization: Bearer my-secret-token-12345" \
-d '{
"date": "2026-02-12",
"developer": "alice.smith",
"email": "alice@company.com",
"name": "Alice Smith",
"hostname": "alice-macbook",
"metrics": {
"active_hours": 7,
"tools_used": ["vscode", "git", "docker", "npm"],
"commands": {
"git": 45,
"npm": 23,
"docker": 12
},
"projects": ["backend-api", "frontend-app", "docs"]
}
}'Expected response:
{
"success": true,
"message": "telemetry data received successfully"
}Connect to your database and run:
-- View all developer metrics
SELECT * FROM _tool_developer_metrics;
-- Get today's activity
SELECT
developer_id,
active_hours,
tools_used,
project_context
FROM _tool_developer_metrics
WHERE date = CURDATE();
-- Get developer summary for the week
SELECT
developer_id,
COUNT(*) as days_active,
SUM(active_hours) as total_hours,
AVG(active_hours) as avg_hours
FROM _tool_developer_metrics
WHERE date >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
GROUP BY developer_id;You can safely re-send data for the same developer and date - it will update:
curl -X POST http://localhost:8080/plugins/developer_telemetry/connections/1/report \
-H "Content-Type: application/json" \
-H "Authorization: Bearer my-secret-token-12345" \
-d '{
"date": "2026-02-12",
"developer": "alice.smith",
"email": "alice.updated@company.com",
"name": "Alice Smith",
"hostname": "alice-new-macbook",
"metrics": {
"active_hours": 8,
"tools_used": ["vscode", "git"],
"commands": {
"git": 60
},
"projects": ["backend-api-v2"]
}
}'The record will be updated, not duplicated!
Build a simple collector that runs on developers' machines:
Python Example (collector.py):
#!/usr/bin/env python3
import requests
import json
from datetime import date
import os
import socket
CONNECTION_ID = 1
TOKEN = "my-secret-token-12345"
DEVLAKE_URL = "http://localhost:8080"
def collect_metrics():
# Customize this to collect actual metrics
return {
"date": str(date.today()),
"developer": os.getenv("USER"),
"email": f"{os.getenv('USER')}@company.com",
"name": "Developer Name",
"hostname": socket.gethostname(),
"metrics": {
"active_hours": 8,
"tools_used": ["python", "vscode", "git"],
"commands": {"python": 30, "git": 20},
"projects": ["my-project"]
}
}
def send_telemetry():
data = collect_metrics()
url = f"{DEVLAKE_URL}/plugins/developer_telemetry/connections/{CONNECTION_ID}/report"
response = requests.post(
url,
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer {TOKEN}"
},
json=data
)
if response.status_code == 200:
print("✅ Telemetry sent successfully!")
else:
print(f"❌ Error: {response.text}")
if __name__ == "__main__":
send_telemetry()Run it:
chmod +x collector.py
./collector.pyAdd to crontab to run daily at 6 PM:
0 18 * * * /path/to/collector.pyCreate a VS Code extension that tracks:
- Active coding time
- File types worked on
- Extensions used
- Commands executed
Send this data to DevLake daily.
Make sure DevLake is running:
curl http://localhost:8080/pluginsCheck your token matches the connection:
# Get connection details
curl http://localhost:8080/plugins/developer_telemetry/connections/1Verify database is accessible:
mysql -h 127.0.0.1 -P 3306 -u devlake -p devlake_testSee the docs/examples directory for:
- Shell script collector
- Node.js collector
- Go collector
- VS Code extension template
- CI/CD integration examples
Need help? Check: