You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `api_base_url` | No | `https://app.last9.io` | Last9 API base URL |
83
-
| `event_name` | No | `deployment` | Name for the deployment event |
98
+
| `env` | **Yes** | - | Deployment environment (e.g. `production`, `staging`). Must match your APM environment label exactly. |
99
+
| `service_name` | No | Repository name | Service name for APM correlation. Must match your APM service name exactly. |
84
100
| `event_state` | No | `stop` | Event state: `start`, `stop`, or `both` |
101
+
| `event_name` | No | `deployment` | Name for the deployment event |
85
102
| `data_source_name` | No | - | Last9 cluster/data source name |
103
+
| `api_base_url` | No | `https://app.last9.io` | Last9 API base URL |
86
104
| `include_github_attributes` | No | `true` | Include GitHub context attributes |
87
-
| `custom_attributes` | No | - | Custom attributes as JSON object |
105
+
| `custom_attributes` | No | - | Additional attributes as JSON object |
88
106
| `max_retry_attempts` | No | `3` | Maximum number of retry attempts |
89
107
| `retry_backoff_ms` | No | `1000` | Initial retry backoff in milliseconds |
90
108
| `max_retry_backoff_ms` | No | `30000` | Maximum retry backoff in milliseconds |
@@ -143,12 +161,22 @@ For more information, see the [Last9 API documentation](https://last9.io/docs/ge
143
161
144
162
See [Usage](#usage) examples above.
145
163
164
+
## APM Dashboard Correlation
165
+
166
+
The `service_name` and `env` attributes must match your APM service labels **exactly** for deployment markers to appear as overlays on Last9 dashboards.
167
+
168
+
- `service_name`: defaults to the repository name if not set
169
+
- `env`: must be provided explicitly (e.g. `production`, `staging`)
170
+
171
+
When they match, deployment markers appear as red vertical lines on your APM charts, making it easy to correlate deployments with changes in latency, error rate, and throughput.
172
+
146
173
## GitHub Context Attributes
147
174
148
175
When `include_github_attributes` is `true` (default), the following attributes are automatically included:
149
176
150
177
- `repository`- Repository full name (e.g., `owner/repo`)
151
-
- `service_name`- Repository name (e.g., `repo`)
178
+
- `service_name`- From `service_name` input (defaults to repo name)
179
+
- `env`- From `env` input
152
180
- `workflow`- Workflow name
153
181
- `run_id`- Workflow run ID
154
182
- `run_number`- Workflow run number
@@ -172,6 +200,7 @@ To prevent deployment failures from blocking your workflow, set `if: always()`:
172
200
with:
173
201
refresh_token: ${{ secrets.LAST9_REFRESH_TOKEN }}
174
202
org_slug: 'your-org-slug'
203
+
env: production
175
204
```
176
205
177
206
## Troubleshooting
@@ -213,13 +242,9 @@ jobs:
213
242
with:
214
243
refresh_token: ${{ secrets.LAST9_REFRESH_TOKEN }}
215
244
org_slug: 'acme'
245
+
service_name: 'api'
246
+
env: production
216
247
event_state: 'start'
217
-
custom_attributes: |
218
-
{
219
-
"environment": "production",
220
-
"namespace": "default",
221
-
"service": "api"
222
-
}
223
248
224
249
- name: Deploy to Kubernetes
225
250
run: kubectl apply -f k8s/
@@ -230,6 +255,8 @@ jobs:
230
255
with:
231
256
refresh_token: ${{ secrets.LAST9_REFRESH_TOKEN }}
232
257
org_slug: 'acme'
258
+
service_name: 'api'
259
+
env: production
233
260
event_state: 'stop'
234
261
```
235
262
@@ -264,13 +291,25 @@ jobs:
264
291
with:
265
292
refresh_token: ${{ secrets.LAST9_REFRESH_TOKEN }}
266
293
org_slug: 'acme'
294
+
env: ${{ inputs.environment }}
267
295
custom_attributes: |
268
296
{
269
-
"environment": "${{ inputs.environment }}",
270
297
"version": "${{ github.sha }}"
271
298
}
272
299
```
273
300
301
+
### Monorepo with Multiple Services
302
+
303
+
```yaml
304
+
- name: Mark payment-service deployment
305
+
uses: last9/deployment-marker-action@v1
306
+
with:
307
+
refresh_token: ${{ secrets.LAST9_REFRESH_TOKEN }}
308
+
org_slug: 'acme'
309
+
service_name: 'payment-service'
310
+
env: production
311
+
```
312
+
274
313
## Contributing
275
314
276
315
Contributions are welcome! Please open an issue or pull request.
0 commit comments