Application Insights Instrumentation

Application Insights Instrumentation

Instruments an ASP.NET Core, Node.js or Python web app to send telemetry to Azure Application Insights, choosing auto or manual setup by hosting.

Skill files8 files

examples/

references/

scripts/

SKILL.md49 lines
1
---
2
name: appinsights-instrumentation
3
description: 'Instrument a webapp to send useful telemetry data to Azure App Insights'
4
---
5
6
# AppInsights instrumentation
7
8
This skill enables sending telemetry data of a webapp to Azure App Insights for better observability of the app's health.
9
10
## When to use this skill
11
12
Use this skill when the user wants to enable telemetry for their webapp.
13
14
## Prerequisites
15
16
The app in the workspace must be one of these kinds
17
18
- An ASP.NET Core app hosted in Azure
19
- A Node.js app hosted in Azure
20
21
## Guidelines
22
23
### Collect context information
24
25
Find out the (programming language, application framework, hosting) tuple of the application the user is trying to add telemetry support in. This determines how the application can be instrumented. Read the source code to make an educated guess. Confirm with the user on anything you don't know. You must always ask the user where the application is hosted (e.g. on a personal computer, in an Azure App Service as code, in an Azure App Service as container, in an Azure Container App, etc.).
26
27
### Prefer auto-instrument if possible
28
29
If the app is a C# ASP.NET Core app hosted in Azure App Service, use [AUTO guide](references/AUTO.md) to help user auto-instrument the app.
30
31
### Manually instrument
32
33
Manually instrument the app by creating the AppInsights resource and update the app's code.
34
35
#### Create AppInsights resource
36
37
Use one of the following options that fits the environment.
38
39
- Add AppInsights to existing Bicep template. See [examples/appinsights.bicep](examples/appinsights.bicep) for what to add. This is the best option if there are existing Bicep template files in the workspace.
40
- Use Azure CLI. See [scripts/appinsights.ps1](scripts/appinsights.ps1) for what Azure CLI command to execute to create the App Insights resource.
41
42
No matter which option you choose, recommend the user to create the App Insights resource in a meaningful resource group that makes managing resources easier. A good candidate will be the same resource group that contains the resources for the hosted app in Azure.
43
44
#### Modify application code
45
46
- If the app is an ASP.NET Core app, see [ASPNETCORE guide](references/ASPNETCORE.md) for how to modify the C# code.
47
- If the app is a Node.js app, see [NODEJS guide](references/NODEJS.md) for how to modify the JavaScript/TypeScript code.
48
- If the app is a Python app, see [PYTHON guide](references/PYTHON.md) for how to modify the Python code.
49

© Microsoft Corporation · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,228 prompts

More by @OpenSourceBuffGuy

See all
Rain Doesn't Pause the City prompt image

Rain Doesn't Pause the City

Creates a cinematic blue-hour city street in heavy rain with a lone young woman in a hooded jacket, neon signs, a yellow taxi and teal-and-amber grading.

image-prompt, json-prompt, portrait, woman, cinematic, rain, cityscape, night-scene, neon, blue-hour, street-photography, photorealistic, moody, film-grain, bokeh, motion-blur, muted-colors, film-noir, vertical-format, nano-banana, long-form, structured-output, reflections

Schoolgirl bullied in library turns supernatural fighter prompt image

Schoolgirl bullied in library turns supernatural fighter

Directs a 30-second live-action Korean supernatural fight scene in a school library, with timed beats, dialogue, air-burst martial arts effects and a physics lock.

video-prompt, martial-arts, action, horror, gothic, visual-effects, transformation, timed-beats, multi-shot, handheld, lip-sync, photorealistic, cinematic, reference-image, face-reference, character-consistency, korea, camera-movement, guardrails, seedance, long-form

Prototyping Methodology Expert prompt image

Prototyping Methodology Expert

Recommends the right prototyping method and fidelity for your idea, with a build plan, user testing protocol and iteration criteria to validate assumptions.

system-prompt, expert-advice, innovation, startup, product-management, user-research, ui-ux, planner, for-founders, for-product-managers, for-designers, xml-tags, guided-interview, structured-output, agile, estimation, risk-management, iterative-refinement, consulting, long-form, prototyping

Reviews

Loading reviews…

Discussion

Loading comments…