Skip to content

Commit b6cbce7

Browse files
committed
chore: more metrics in test-datadog
1 parent 351633a commit b6cbce7

File tree

1 file changed

+94
-18
lines changed

1 file changed

+94
-18
lines changed

.github/workflows/test-datadog.yml

Lines changed: 94 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,101 @@ jobs:
2727
if [ -n "${{ secrets.DATADOG_API_KEY }}" ]; then
2828
echo "✅ API Key is set, proceeding with test..."
2929
30-
# Prepare the JSON payload (v2 API format) - Testing CI metrics
30+
# Prepare the JSON payload (v2 API format) - Comprehensive CI metrics
31+
timestamp=$(date +%s)
3132
json_payload="{
32-
\"series\": [{
33-
\"metric\": \"test.datadog.integration\",
34-
\"points\": [{\"timestamp\": $(date +%s), \"value\": 42}],
35-
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\"]
36-
}, {
37-
\"metric\": \"test.datadog.simple\",
38-
\"points\": [{\"timestamp\": $(date +%s), \"value\": 100}],
39-
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\"]
40-
}, {
41-
\"metric\": \"github.ci.pipeline.duration\",
42-
\"points\": [{\"timestamp\": $(date +%s), \"value\": 120}],
43-
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test-datadog\"]
44-
}, {
45-
\"metric\": \"github.ci.pipeline.status\",
46-
\"points\": [{\"timestamp\": $(date +%s), \"value\": 1}],
47-
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"status:success\"]
48-
}]
33+
\"series\": [
34+
{
35+
\"metric\": \"test.datadog.integration\",
36+
\"points\": [{\"timestamp\": $timestamp, \"value\": 42}],
37+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\"]
38+
},
39+
{
40+
\"metric\": \"test.datadog.simple\",
41+
\"points\": [{\"timestamp\": $timestamp, \"value\": 100}],
42+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\"]
43+
},
44+
{
45+
\"metric\": \"github.ci.pipeline.duration\",
46+
\"points\": [{\"timestamp\": $timestamp, \"value\": 120}],
47+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test-datadog\"]
48+
},
49+
{
50+
\"metric\": \"github.ci.pipeline.status\",
51+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
52+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"status:success\"]
53+
},
54+
{
55+
\"metric\": \"github.ci.repository.workflow_runs\",
56+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
57+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"repo:${{ github.repository }}\", \"branch:${{ github.ref_name }}\"]
58+
},
59+
{
60+
\"metric\": \"github.ci.job.duration\",
61+
\"points\": [{\"timestamp\": $timestamp, \"value\": 120}],
62+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test-datadog\", \"runner:${{ runner.os }}\"]
63+
},
64+
{
65+
\"metric\": \"lace.ci.build.duration\",
66+
\"points\": [{\"timestamp\": $timestamp, \"value\": 180}],
67+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:build\", \"type:typescript\"]
68+
},
69+
{
70+
\"metric\": \"lace.ci.build.status\",
71+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
72+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:build\", \"status:success\"]
73+
},
74+
{
75+
\"metric\": \"lace.ci.e2e.duration\",
76+
\"points\": [{\"timestamp\": $timestamp, \"value\": 420}],
77+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:e2e\", \"type:playwright\"]
78+
},
79+
{
80+
\"metric\": \"lace.ci.e2e.status\",
81+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
82+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:e2e\", \"status:success\"]
83+
},
84+
{
85+
\"metric\": \"lace.ci.artifact.size\",
86+
\"points\": [{\"timestamp\": $timestamp, \"value\": 52428800}],
87+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:artifact\", \"type:extension\"]
88+
},
89+
{
90+
\"metric\": \"lace.ci.artifact.status\",
91+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
92+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:artifact\", \"status:success\"]
93+
},
94+
{
95+
\"metric\": \"lace.ci.test.unit.duration\",
96+
\"points\": [{\"timestamp\": $timestamp, \"value\": 45}],
97+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test\", \"type:unit\"]
98+
},
99+
{
100+
\"metric\": \"lace.ci.test.unit.status\",
101+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
102+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test\", \"type:unit\", \"status:success\"]
103+
},
104+
{
105+
\"metric\": \"lace.ci.test.integration.duration\",
106+
\"points\": [{\"timestamp\": $timestamp, \"value\": 180}],
107+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test\", \"type:integration\"]
108+
},
109+
{
110+
\"metric\": \"lace.ci.test.integration.status\",
111+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
112+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:test\", \"type:integration\", \"status:success\"]
113+
},
114+
{
115+
\"metric\": \"lace.ci.lint.duration\",
116+
\"points\": [{\"timestamp\": $timestamp, \"value\": 15}],
117+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:lint\", \"type:eslint\"]
118+
},
119+
{
120+
\"metric\": \"lace.ci.lint.status\",
121+
\"points\": [{\"timestamp\": $timestamp, \"value\": 1}],
122+
\"tags\": [\"service:lace-wallet\", \"env:test\", \"workflow:test-datadog\", \"job:lint\", \"type:eslint\", \"status:success\"]
123+
}
124+
]
49125
}"
50126
51127
echo "📤 Sending JSON payload:"

0 commit comments

Comments
 (0)