push neon reactor
This commit is contained in:
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import type { UserIdentity } from './TelemetryTypes.js';
|
||||
export interface ScenarioTracker {
|
||||
complete(properties?: Record<string, unknown>): void;
|
||||
completeWithError(properties?: Record<string, unknown>): void;
|
||||
fail(error?: unknown, properties?: Record<string, unknown>): void;
|
||||
}
|
||||
export interface ILogger {
|
||||
/**
|
||||
* Log an activity (info-severity) event.
|
||||
* @param name Operation name — promoted to the `operation_Name` column in 1DS.
|
||||
* @param properties Optional bag of telemetry properties.
|
||||
* @param eventName Override the canonical 1DS event name. Defaults to `PowerAppsClient.Activity`.
|
||||
* **Avoid using this parameter** — it exists for infrastructure-level telemetry (e.g. HttpClient)
|
||||
* that needs a distinct event name. Most callers should omit it.
|
||||
*/
|
||||
trackActivityEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
/**
|
||||
* Log a verbose (debug-severity) event.
|
||||
* @param name Operation name — promoted to the `operation_Name` column in 1DS.
|
||||
* @param properties Optional bag of telemetry properties.
|
||||
* @param eventName Override the canonical 1DS event name. Defaults to `PowerAppsClient.Activity`.
|
||||
* **Avoid using this parameter** — it exists for infrastructure-level telemetry (e.g. HttpClient)
|
||||
* that needs a distinct event name. Most callers should omit it.
|
||||
*/
|
||||
trackVerboseEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
/**
|
||||
* Log an error-severity event.
|
||||
* @param name Operation name — promoted to the `operation_Name` column in 1DS.
|
||||
* @param properties Optional bag of telemetry properties.
|
||||
* @param eventName Override the canonical 1DS event name. Defaults to `PowerAppsClient.Error`.
|
||||
* **Avoid using this parameter** — it exists for infrastructure-level telemetry (e.g. HttpClient)
|
||||
* that needs a distinct event name. Most callers should omit it.
|
||||
*/
|
||||
trackErrorEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
trackScenario(name: string, properties?: Record<string, unknown>): ScenarioTracker;
|
||||
setDefaultProperty(name: string, value: string): void;
|
||||
identifyUser(identity: UserIdentity): void;
|
||||
get sessionId(): string | undefined;
|
||||
set sessionId(value: string);
|
||||
flush(): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=ILogger.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ILogger.d.ts","sourceRoot":"","sources":["../../src/telemetry/ILogger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrD,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,OAAO;IACtB;;;;;;;OAOG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjG;;;;;;;OAOG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChG;;;;;;;OAOG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9F,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAAC;IACnF,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtD,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3C,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IACpC,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE;IAC7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=ILogger.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ILogger.js","sourceRoot":"","sources":["../../src/telemetry/ILogger.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
||||
Generated
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import type { ILogger, ScenarioTracker } from './ILogger.js';
|
||||
import type { LoggerConfig, UserIdentity } from './TelemetryTypes.js';
|
||||
/**
|
||||
* Structured logger with canonical event names, severity filtering,
|
||||
* sequence numbering, and scenario tracking.
|
||||
* No-op safe when no provider is given.
|
||||
*/
|
||||
export declare class Logger implements ILogger {
|
||||
private readonly provider?;
|
||||
private readonly minSeverity;
|
||||
private sequence;
|
||||
constructor(config?: LoggerConfig);
|
||||
trackActivityEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
trackVerboseEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
trackErrorEvent(name: string, properties?: Record<string, unknown>, eventName?: string): void;
|
||||
trackScenario(name: string, properties?: Record<string, unknown>): ScenarioTracker;
|
||||
setDefaultProperty(name: string, value: string): void;
|
||||
identifyUser(identity: UserIdentity): void;
|
||||
get sessionId(): string | undefined;
|
||||
set sessionId(value: string);
|
||||
flush(): Promise<void>;
|
||||
private shouldLog;
|
||||
private emit;
|
||||
}
|
||||
//# sourceMappingURL=Logger.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/telemetry/Logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,KAAK,EAEV,YAAY,EAEZ,YAAY,EACb,MAAM,kBAAkB,CAAC;AAU1B;;;;GAIG;AACH,qBAAa,MAAO,YAAW,OAAO;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAK;gBAET,MAAM,CAAC,EAAE,YAAY;IAKjC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAIhG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAI/F,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7F,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe;IA2ClF,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrD,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAI1C,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAI1B;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,IAAI;CAoBb"}
|
||||
Generated
Vendored
+123
@@ -0,0 +1,123 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import { generateGuid } from '../utils/GuidUtils.js';
|
||||
import { stringifyError } from './stringifyError.js';
|
||||
import { ScenarioResults, TelemetryEventNames } from './TelemetryTypes.js';
|
||||
const severityOrder = {
|
||||
verbose: 0,
|
||||
info: 1,
|
||||
warning: 2,
|
||||
error: 3,
|
||||
};
|
||||
/**
|
||||
* Structured logger with canonical event names, severity filtering,
|
||||
* sequence numbering, and scenario tracking.
|
||||
* No-op safe when no provider is given.
|
||||
*/
|
||||
export class Logger {
|
||||
provider;
|
||||
minSeverity;
|
||||
sequence = 0;
|
||||
constructor(config) {
|
||||
this.provider = config?.provider;
|
||||
this.minSeverity = config?.provider?.minSeverity ?? 'verbose';
|
||||
}
|
||||
trackActivityEvent(name, properties, eventName) {
|
||||
this.emit('info', eventName ?? TelemetryEventNames.Activity, name, properties);
|
||||
}
|
||||
trackVerboseEvent(name, properties, eventName) {
|
||||
this.emit('verbose', eventName ?? TelemetryEventNames.Activity, name, properties);
|
||||
}
|
||||
trackErrorEvent(name, properties, eventName) {
|
||||
this.emit('error', eventName ?? TelemetryEventNames.Error, name, properties);
|
||||
}
|
||||
trackScenario(name, properties) {
|
||||
const startTime = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
||||
const scenarioGuid = generateGuid();
|
||||
const scenarioProps = { ...properties, scenarioName: name, scenarioGuid };
|
||||
this.emit('info', TelemetryEventNames.StartScenario, name, scenarioProps);
|
||||
return {
|
||||
complete: (extraProps) => {
|
||||
const duration = (typeof performance !== 'undefined' ? performance.now() : Date.now()) - startTime;
|
||||
this.emit('info', TelemetryEventNames.EndScenario, name, {
|
||||
...scenarioProps,
|
||||
...extraProps,
|
||||
scenarioResult: ScenarioResults.Success,
|
||||
duration,
|
||||
});
|
||||
},
|
||||
completeWithError: (extraProps) => {
|
||||
const duration = (typeof performance !== 'undefined' ? performance.now() : Date.now()) - startTime;
|
||||
this.emit('warning', TelemetryEventNames.EndScenario, name, {
|
||||
...scenarioProps,
|
||||
...extraProps,
|
||||
scenarioResult: ScenarioResults.SuccessWithErrors,
|
||||
duration,
|
||||
});
|
||||
},
|
||||
fail: (error, extraProps) => {
|
||||
const duration = (typeof performance !== 'undefined' ? performance.now() : Date.now()) - startTime;
|
||||
this.emit('error', TelemetryEventNames.EndScenario, name, {
|
||||
...scenarioProps,
|
||||
...extraProps,
|
||||
scenarioResult: ScenarioResults.Failed,
|
||||
error: error !== undefined ? stringifyError(error) : undefined,
|
||||
duration,
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
setDefaultProperty(name, value) {
|
||||
this.provider?.setDefaultProperty(name, value);
|
||||
}
|
||||
identifyUser(identity) {
|
||||
this.provider?.identifyUser(identity);
|
||||
}
|
||||
get sessionId() {
|
||||
return this.provider?.sessionId;
|
||||
}
|
||||
set sessionId(value) {
|
||||
if (this.provider) {
|
||||
this.provider.sessionId = value;
|
||||
}
|
||||
}
|
||||
async flush() {
|
||||
await this.provider?.flush();
|
||||
}
|
||||
shouldLog(severity) {
|
||||
return severityOrder[severity] >= severityOrder[this.minSeverity];
|
||||
}
|
||||
emit(severity, eventName, operationName, properties) {
|
||||
if (!this.provider || !this.shouldLog(severity))
|
||||
return;
|
||||
const flatProps = flattenProperties(properties);
|
||||
flatProps.operationName = operationName;
|
||||
this.provider.track({
|
||||
eventName,
|
||||
timestamp: new Date().toISOString(),
|
||||
severity,
|
||||
sequenceNumber: ++this.sequence,
|
||||
duration: typeof flatProps.duration === 'number' ? flatProps.duration : undefined,
|
||||
properties: flatProps,
|
||||
});
|
||||
}
|
||||
}
|
||||
/** Convert Record<string, unknown> to Record<string, string | number | boolean> by JSON-stringifying non-primitives. */
|
||||
function flattenProperties(properties) {
|
||||
const result = {};
|
||||
if (!properties)
|
||||
return result;
|
||||
for (const [key, value] of Object.entries(properties)) {
|
||||
if (value === undefined)
|
||||
continue;
|
||||
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
||||
result[key] = value;
|
||||
}
|
||||
else {
|
||||
result[key] = JSON.stringify(value);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//# sourceMappingURL=Logger.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../src/telemetry/Logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,aAAa,GAAsC;IACvD,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,CAAC;CACT,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,MAAM;IACA,QAAQ,CAAsB;IAC9B,WAAW,CAAoB;IACxC,QAAQ,GAAG,CAAC,CAAC;IAErB,YAAY,MAAqB;QAC/B,IAAI,CAAC,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,MAAM,EAAE,QAAQ,EAAE,WAAW,IAAI,SAAS,CAAC;IAChE,CAAC;IAED,kBAAkB,CAAC,IAAY,EAAE,UAAoC,EAAE,SAAkB;QACvF,IAAI,CAAC,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IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YACzF,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||
Generated
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import type { ITelemetryProvider, OneDsTelemetryProviderConfig, TelemetryEnvelope, TelemetryEvent, TelemetrySeverity, UserIdentity } from './TelemetryTypes.js';
|
||||
export declare class OneDsTelemetryProvider implements ITelemetryProvider {
|
||||
private readonly appName;
|
||||
private readonly clientType;
|
||||
private readonly clusterCategory;
|
||||
private readonly core;
|
||||
private readonly defaultProperties;
|
||||
private readonly propertyColumnMap;
|
||||
readonly minSeverity: TelemetrySeverity;
|
||||
private _sessionId;
|
||||
private userIdentity?;
|
||||
constructor(config: OneDsTelemetryProviderConfig);
|
||||
/**
|
||||
* Register a telemetry initializer that runs on every envelope before send.
|
||||
* Use this to add Part A Common Schema extensions (ext.app, ext.web, ext.os, etc.)
|
||||
* that require platform-specific APIs (e.g. browser info, OS info).
|
||||
*/
|
||||
addTelemetryInitializer(initializer: (envelope: TelemetryEnvelope) => void): void;
|
||||
track(event: TelemetryEvent): void;
|
||||
flush(): Promise<void>;
|
||||
teardown(): Promise<void>;
|
||||
get sessionId(): string;
|
||||
set sessionId(value: string);
|
||||
identifyUser(identity: UserIdentity): void;
|
||||
setDefaultProperty(name: string, value: string): void;
|
||||
}
|
||||
//# sourceMappingURL=OneDsTelemetryProvider.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"OneDsTelemetryProvider.d.ts","sourceRoot":"","sources":["../../src/telemetry/OneDsTelemetryProvider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAE5B,iBAAiB,EACjB,cAAc,EAEd,iBAAiB,EACjB,YAAY,EACb,MAAM,kBAAkB,CAAC;AA0F1B,qBAAa,sBAAuB,YAAW,kBAAkB;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkB;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA8B;IAChE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAe;gBAExB,MAAM,EAAE,4BAA4B;IA0ChD;;;;OAIG;IACH,uBAAuB,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAIjF,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAkDlC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQzB,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAE1B;IAED,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAI1C,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAGtD"}
|
||||
Generated
Vendored
+207
@@ -0,0 +1,207 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import { AppInsightsCore, } from '@microsoft/1ds-core-js';
|
||||
import { PostChannel } from '@microsoft/1ds-post-js';
|
||||
/** 1DS Aria project IDs shared by the webplayer and CLI. */
|
||||
const AriaProjectIds = {
|
||||
Production: '5c3a61f48d7c4522912765ae7465ab5c-fb3d6606-fe59-4d6b-9bb1-5e993d889672-7138',
|
||||
NonProduction: '3fb21f3df5c44380bf452fd710f4d50c-0e3f82aa-6d27-41d8-b727-c96b28f99992-7504',
|
||||
Mooncake: '1c1d139788f74386bd95e752dd781371-04b4424b-e5c1-46ae-8312-28e9fa5832c0-6923',
|
||||
GccModerate: '0d7685a948a140789ac92933d3dc2d87-2dd0c1ce-8f10-41f0-a70a-2f9e51a851c8-6823',
|
||||
GccHigh: 'd31229fb23b0406790b9332e5f465dfc-a6b19a0e-170d-4570-bda5-f35e3668e162-7067',
|
||||
DoD: '41cc10dad35043adbcdace2896484ab4-5ebbc1d6-04c9-486d-a6b6-e5963cd778da-7542',
|
||||
};
|
||||
/**
|
||||
* Default property-to-column promotion map matching the webplayer convention.
|
||||
* Properties matching these keys are promoted to top-level data columns;
|
||||
* the rest go into the customDimensions JSON blob.
|
||||
*/
|
||||
const DefaultPropertyToColumn = {
|
||||
apiId: 'apiId',
|
||||
appSequenceNumber: 'appSequenceNumber',
|
||||
duration: 'duration',
|
||||
environmentId: 'environmentId',
|
||||
httpMethod: 'httpMethod',
|
||||
httpStatus: 'httpStatus',
|
||||
operationName: 'operation_Name',
|
||||
playerAppId: 'playerAppId',
|
||||
scenarioGuid: 'scenarioGuid',
|
||||
scenarioName: 'scenarioName',
|
||||
scenarioResult: 'scenarioResult',
|
||||
serverLocation: 'serverLocation',
|
||||
url: 'url',
|
||||
webPlayerUrl: 'webPlayerUrl',
|
||||
};
|
||||
function resolveInstrumentationKey(clusterCategory) {
|
||||
switch (clusterCategory) {
|
||||
case 'prod':
|
||||
case 'firstrelease':
|
||||
case 'ex':
|
||||
case 'rx':
|
||||
return AriaProjectIds.Production;
|
||||
case 'mooncake':
|
||||
return AriaProjectIds.Mooncake;
|
||||
case 'gov':
|
||||
return AriaProjectIds.GccModerate;
|
||||
case 'high':
|
||||
return AriaProjectIds.GccHigh;
|
||||
case 'dod':
|
||||
return AriaProjectIds.DoD;
|
||||
default:
|
||||
return AriaProjectIds.NonProduction;
|
||||
}
|
||||
}
|
||||
function resolveCollectorUrl(clusterCategory, telemetryLocation = 'global') {
|
||||
switch (clusterCategory) {
|
||||
case 'mooncake':
|
||||
return 'https://collector.azure.cn/OneCollector/1.0/';
|
||||
case 'gov':
|
||||
case 'high':
|
||||
return 'https://tb.events.data.microsoft.com/OneCollector/1.0/';
|
||||
case 'dod':
|
||||
return 'https://pf.events.data.microsoft.com/OneCollector/1.0/';
|
||||
case 'ex':
|
||||
return 'https://collector.azure.eaglex.ic.gov/OneCollector/1.0/';
|
||||
case 'rx':
|
||||
return 'https://collector.azure.microsoft.scloud/OneCollector/1.0/';
|
||||
default:
|
||||
if (telemetryLocation === 'eu') {
|
||||
return 'https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/';
|
||||
}
|
||||
return 'https://us-mobile.events.data.microsoft.com/OneCollector/1.0/';
|
||||
}
|
||||
}
|
||||
function resolveAppName(clusterCategory) {
|
||||
switch (clusterCategory) {
|
||||
case 'local':
|
||||
case 'dev':
|
||||
case 'test':
|
||||
case 'preprod':
|
||||
return 'powerappsclientnonprod';
|
||||
default:
|
||||
return 'powerappsclient';
|
||||
}
|
||||
}
|
||||
export class OneDsTelemetryProvider {
|
||||
appName;
|
||||
clientType;
|
||||
clusterCategory;
|
||||
core;
|
||||
defaultProperties = {};
|
||||
propertyColumnMap;
|
||||
minSeverity;
|
||||
_sessionId;
|
||||
userIdentity;
|
||||
constructor(config) {
|
||||
this._sessionId = crypto.randomUUID();
|
||||
this.appName = resolveAppName(config.clusterCategory);
|
||||
this.clientType = config.clientType;
|
||||
this.clusterCategory = config.clusterCategory;
|
||||
this.minSeverity = config.minSeverity ?? 'info';
|
||||
// Merge default promotion map with consumer overrides (overrides win)
|
||||
this.propertyColumnMap = { ...DefaultPropertyToColumn, ...config.propertyColumnMap };
|
||||
if (config.commonProperties) {
|
||||
Object.assign(this.defaultProperties, config.commonProperties);
|
||||
}
|
||||
const postChannel = new PostChannel();
|
||||
const instrumentationKey = config.instrumentationKey ?? resolveInstrumentationKey(config.clusterCategory);
|
||||
const collectorUrl = resolveCollectorUrl(config.clusterCategory, config.telemetryLocation);
|
||||
const coreConfig = {
|
||||
instrumentationKey,
|
||||
channels: [[postChannel]],
|
||||
endpointUrl: collectorUrl,
|
||||
};
|
||||
if (config.channelConfig) {
|
||||
coreConfig.extensionConfig = {
|
||||
[postChannel.identifier]: config.channelConfig,
|
||||
};
|
||||
}
|
||||
this.core = new AppInsightsCore();
|
||||
this.core.initialize(coreConfig, []);
|
||||
// Request IP masking — the 1DS collector attaches client IP by default;
|
||||
// HASH_IDENTIFIERS_FLAG (0x100000) tells it to mask/hash the IP server-side.
|
||||
this.core.addTelemetryInitializer((envelope) => {
|
||||
const ext = (envelope.ext = envelope.ext ?? {});
|
||||
const utc = (ext.utc = ext.utc ?? {});
|
||||
utc.eventFlags = (utc.eventFlags || 0) | 0x100000;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Register a telemetry initializer that runs on every envelope before send.
|
||||
* Use this to add Part A Common Schema extensions (ext.app, ext.web, ext.os, etc.)
|
||||
* that require platform-specific APIs (e.g. browser info, OS info).
|
||||
*/
|
||||
addTelemetryInitializer(initializer) {
|
||||
this.core.addTelemetryInitializer(initializer);
|
||||
}
|
||||
track(event) {
|
||||
const allProperties = {
|
||||
...this.defaultProperties,
|
||||
...event.properties,
|
||||
};
|
||||
// Build data object with fixed columns matching webplayer convention
|
||||
const data = {
|
||||
app_Name: this.appName,
|
||||
clientType: this.clientType,
|
||||
clusterCategory: this.clusterCategory,
|
||||
device_Id: 'browser',
|
||||
event_Name: event.eventName,
|
||||
sequenceNumber: event.sequenceNumber,
|
||||
session_Id: this._sessionId,
|
||||
severity: event.severity,
|
||||
timestamp: event.timestamp,
|
||||
};
|
||||
// User identity promoted to top-level columns directly
|
||||
if (this.userIdentity) {
|
||||
data.objectId = this.userIdentity.objectId;
|
||||
data.tenantId = this.userIdentity.tenantId;
|
||||
}
|
||||
if (event.duration !== undefined) {
|
||||
data.duration = event.duration;
|
||||
}
|
||||
// Promote properties matching the column map to top-level data fields
|
||||
// Properties are kept in allProperties so they also appear in customDimensions
|
||||
for (const [propKey, columnName] of Object.entries(this.propertyColumnMap)) {
|
||||
if (propKey in allProperties) {
|
||||
data[columnName] = allProperties[propKey];
|
||||
}
|
||||
}
|
||||
// Serialize remaining properties as customDimensions
|
||||
data.customDimensions = JSON.stringify(allProperties);
|
||||
const item = {
|
||||
name: 'event',
|
||||
time: event.timestamp,
|
||||
baseType: 'custom',
|
||||
data,
|
||||
};
|
||||
this.core.track(item);
|
||||
}
|
||||
flush() {
|
||||
return new Promise((resolve) => {
|
||||
this.core.flush(true, () => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
teardown() {
|
||||
return new Promise((resolve) => {
|
||||
this.core.unload(true, () => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
get sessionId() {
|
||||
return this._sessionId;
|
||||
}
|
||||
set sessionId(value) {
|
||||
this._sessionId = value;
|
||||
}
|
||||
identifyUser(identity) {
|
||||
this.userIdentity = identity;
|
||||
}
|
||||
setDefaultProperty(name, value) {
|
||||
this.defaultProperties[name] = value;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=OneDsTelemetryProvider.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
Generated
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
import type { ClusterCategory } from '../types/ClusterCategory.js';
|
||||
export type TelemetrySeverity = 'verbose' | 'info' | 'warning' | 'error';
|
||||
/** Canonical 1DS event names matching webplayer conventions. */
|
||||
export declare const TelemetryEventNames: {
|
||||
readonly Activity: "PowerAppsClient.Activity";
|
||||
readonly Error: "PowerAppsClient.Error";
|
||||
readonly StartScenario: "PowerAppsClient.StartScenario";
|
||||
readonly EndScenario: "PowerAppsClient.EndScenario";
|
||||
};
|
||||
export declare const ScenarioResults: {
|
||||
readonly Success: "Success";
|
||||
readonly Failed: "Failed";
|
||||
readonly SuccessWithErrors: "SuccessWithErrors";
|
||||
};
|
||||
export interface TelemetryEvent {
|
||||
eventName: string;
|
||||
timestamp: string;
|
||||
severity: TelemetrySeverity;
|
||||
sequenceNumber: number;
|
||||
duration?: number;
|
||||
properties: Record<string, string | number | boolean>;
|
||||
}
|
||||
export type PropertyColumnMap = Record<string, string>;
|
||||
/** Telemetry data residency location. EU routes to eu-mobile collector. */
|
||||
export type TelemetryLocation = 'global' | 'eu';
|
||||
export interface UserIdentity {
|
||||
tenantId: string;
|
||||
objectId: string;
|
||||
}
|
||||
export interface LoggerConfig {
|
||||
provider?: ITelemetryProvider;
|
||||
}
|
||||
export interface ITelemetryProvider {
|
||||
track(event: TelemetryEvent): void;
|
||||
flush(): Promise<void>;
|
||||
teardown?(): Promise<void>;
|
||||
get sessionId(): string;
|
||||
set sessionId(value: string);
|
||||
identifyUser(identity: UserIdentity): void;
|
||||
setDefaultProperty(name: string, value: string): void;
|
||||
/** Optional minimum severity the provider accepts. Used by Logger for filtering. */
|
||||
readonly minSeverity?: TelemetrySeverity;
|
||||
}
|
||||
/**
|
||||
* Structural type for the 1DS telemetry envelope passed to telemetry initializers.
|
||||
* Decouples consumers from the internal `ITelemetryItem` type.
|
||||
*/
|
||||
export interface TelemetryEnvelope {
|
||||
name?: string;
|
||||
time?: string;
|
||||
data?: Record<string, unknown>;
|
||||
ext?: Record<string, Record<string, unknown>>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface OneDsTelemetryProviderConfig {
|
||||
/** Client type identifier promoted to the top-level `clientType` column (e.g. 'HostSdk', 'WebPlayer'). */
|
||||
clientType: string;
|
||||
clusterCategory: ClusterCategory;
|
||||
/**
|
||||
* 1DS instrumentation key (Aria project ID).
|
||||
* When omitted, resolved automatically from `clusterCategory`.
|
||||
*/
|
||||
instrumentationKey?: string;
|
||||
/** Minimum severity to send to 1DS. Default: 'info' (skips verbose). */
|
||||
minSeverity?: TelemetrySeverity;
|
||||
/** Data residency location. Default: 'global'. Set to 'eu' for European environments. */
|
||||
telemetryLocation?: TelemetryLocation;
|
||||
commonProperties?: Record<string, string>;
|
||||
propertyColumnMap?: PropertyColumnMap;
|
||||
channelConfig?: Record<string, unknown>;
|
||||
}
|
||||
//# sourceMappingURL=TelemetryTypes.d.ts.map
|
||||
CodeApp_NeonReactor/node_modules/@microsoft/power-apps-common/dist/telemetry/TelemetryTypes.d.ts.map
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TelemetryTypes.d.ts","sourceRoot":"","sources":["../../src/telemetry/TelemetryTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzE,gEAAgE;AAChE,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACvD;AAED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G;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC"}
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
/** Canonical 1DS event names matching webplayer conventions. */
|
||||
export const TelemetryEventNames = {
|
||||
Activity: 'PowerAppsClient.Activity',
|
||||
Error: 'PowerAppsClient.Error',
|
||||
StartScenario: 'PowerAppsClient.StartScenario',
|
||||
EndScenario: 'PowerAppsClient.EndScenario',
|
||||
};
|
||||
export const ScenarioResults = {
|
||||
Success: 'Success',
|
||||
Failed: 'Failed',
|
||||
SuccessWithErrors: 'SuccessWithErrors',
|
||||
};
|
||||
//# sourceMappingURL=TelemetryTypes.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TelemetryTypes.js","sourceRoot":"","sources":["../../src/telemetry/TelemetryTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,0BAA0B;IACpC,KAAK,EAAE,uBAAuB;IAC9B,aAAa,EAAE,+BAA+B;IAC9C,WAAW,EAAE,6BAA6B;CAClC,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC"}
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
export type { ILogger, ScenarioTracker } from './ILogger.js';
|
||||
export { Logger } from './Logger.js';
|
||||
export { OneDsTelemetryProvider } from './OneDsTelemetryProvider.js';
|
||||
export { stringifyError } from './stringifyError.js';
|
||||
export type { ITelemetryProvider, LoggerConfig, OneDsTelemetryProviderConfig, PropertyColumnMap, TelemetryEnvelope, TelemetryEvent, TelemetryLocation, TelemetrySeverity, UserIdentity, } from './TelemetryTypes.js';
|
||||
export { ScenarioResults, TelemetryEventNames } from './TelemetryTypes.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
export { Logger } from './Logger.js';
|
||||
export { OneDsTelemetryProvider } from './OneDsTelemetryProvider.js';
|
||||
export { stringifyError } from './stringifyError.js';
|
||||
export { ScenarioResults, TelemetryEventNames } from './TelemetryTypes.js';
|
||||
//# sourceMappingURL=index.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYlD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
export declare function stringifyError(error: unknown): string;
|
||||
//# sourceMappingURL=stringifyError.d.ts.map
|
||||
CodeApp_NeonReactor/node_modules/@microsoft/power-apps-common/dist/telemetry/stringifyError.d.ts.map
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringifyError.d.ts","sourceRoot":"","sources":["../../src/telemetry/stringifyError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGrD"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
export function stringifyError(error) {
|
||||
if (error instanceof Error)
|
||||
return error.message;
|
||||
return String(error);
|
||||
}
|
||||
//# sourceMappingURL=stringifyError.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringifyError.js","sourceRoot":"","sources":["../../src/telemetry/stringifyError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IACjD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
||||
Reference in New Issue
Block a user