Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syedhassaanahmed/app-insights-event-action
A rudimentary GitHub Action that allows you to send events to Azure Application Insights
https://github.com/syedhassaanahmed/app-insights-event-action
Last synced: about 2 months ago
JSON representation
A rudimentary GitHub Action that allows you to send events to Azure Application Insights
- Host: GitHub
- URL: https://github.com/syedhassaanahmed/app-insights-event-action
- Owner: syedhassaanahmed
- License: mit
- Created: 2021-03-07T22:56:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-08T12:39:49.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T10:48:16.779Z (2 months ago)
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# app-insights-event-action
Sometimes a DevOps engineer wants to see changes to the deployment infrastructure on the observability dashboard, so that the changes can be correlated with resource usages or increases in errors. This [composite run steps GitHub Action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action) is a rudimentary attempt to solve that challenge by allowing you to send events to Azure Application Insights. Each event will be sent with some [default GitHub environment variables](https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables). Full example usage of this action can be seen in [this repository](https://github.com/syedhassaanahmed/test-app-insights-event-action).## Usage
```yaml
- name: "AppInsights: Begin Terraform"
uses: syedhassaanahmed/app-insights-event-action@main
with:
instrumentation-key: "${{ secrets.APP_INSIGHTS_KEY }}"
event-name: "begin-provision-azure"- name: "Terraform Apply"
run: terraform apply -auto-approve- name: "AppInsights: End Terraform"
uses: syedhassaanahmed/app-insights-event-action@main
with:
instrumentation-key: "${{ secrets.APP_INSIGHTS_KEY }}"
event-name: "end-provision-azure"
```Here is an example of measuring duration between above 2 events in App Insights
```sql
let events = customEvents
| project timestamp, name, run_number = toint(customDimensions.run_number);
let begins = events | where name == "begin-provision-azure" | project-rename beginTime = timestamp;
let ends = events | where name == "end-provision-azure" | project-rename endTime = timestamp;
begins | join ends on run_number
| project run_number, durationInSeconds = datetime_diff("second", endTime, beginTime)
| order by run_number
| render columnchart
```