Skip to content

Commit 1c520a4

Browse files
committed
address copilot feedback
1 parent 98e1cd6 commit 1c520a4

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/copilot-instructions.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ Add performance measurements for:
207207
**1. To Measure Duration of Async Functions - Use `invokeAsync` wrapper:**
208208

209209
```typescript
210-
import { invokeAsync } from '@azure/msal-common';
211-
import { PerformanceEvents } from '@azure/msal-common';
210+
import { invokeAsync, PerformanceEvents } from '@azure/msal-common';
212211

213212
// Example: Wrapping an async function
214213
const result = await invokeAsync(
@@ -223,7 +222,7 @@ const result = await invokeAsync(
223222
**2. To Measure Duration of Sync Functions - Use `invoke` wrapper:**
224223

225224
```typescript
226-
import { invoke } from '@azure/msal-common';
225+
import { invoke, PerformanceEvents } from '@azure/msal-common';
227226

228227
// Example: Wrapping a sync function
229228
const result = invoke(
@@ -247,17 +246,13 @@ this.performanceClient.addFields({
247246

248247
**4. Adding New Performance Events:**
249248

250-
If you need a new performance event, add it to the `PerformanceEvents` object in `lib/msal-common/src/telemetry/performance/PerformanceEvent.ts`:
251-
249+
If you need a new performance event that will be referenced in msal-common, you may define it in `lib/msal-common/src/telemetry/performance/PerformanceEvents.ts`
250+
If you need a new performance event that will be referenced in msal-browser only, you may define it in `lib/msal-browser/src/telemetry/BrowserPerformanceEvents.ts`:
252251
```typescript
253-
export const PerformanceEvents = {
254-
// ... existing events
255-
256-
/**
257-
* Your new event description
258-
*/
259-
YourNewEventName: "yourNewEventName",
260-
};
252+
/**
253+
* Your new event description
254+
*/
255+
export const YourNewEventName = "yourNewEventName";
261256
```
262257

263258
#### Performance Event Naming Convention

0 commit comments

Comments
 (0)