Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AISKU/Tests/Unit/src/AISKUSize.Tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ function _checkSize(checkType: string, maxSize: number, size: number, isNightly:
}

export class AISKUSizeCheck extends AITestClass {
private readonly MAX_RAW_SIZE = 177;
private readonly MAX_BUNDLE_SIZE = 177;
private readonly MAX_RAW_DEFLATE_SIZE = 71;
private readonly MAX_BUNDLE_DEFLATE_SIZE = 71;
private readonly MAX_RAW_SIZE = 181;
private readonly MAX_BUNDLE_SIZE = 181;
private readonly MAX_RAW_DEFLATE_SIZE = 74;
private readonly MAX_BUNDLE_DEFLATE_SIZE = 74;
private readonly rawFilePath = "../dist/es5/applicationinsights-web.min.js";
// Automatically updated by version scripts
private readonly currentVer = "3.4.2";
Expand Down
29 changes: 21 additions & 8 deletions AISKU/src/AISku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {
IAutoExceptionTelemetry, IChannelControls, IConfig, IConfigDefaults, IConfiguration, ICookieMgr, ICustomProperties, IDependencyTelemetry,
IDiagnosticLogger, IDistributedTraceContext, IDynamicConfigHandler, IEventTelemetry, IExceptionTelemetry, ILoadedPlugin,
IMetricTelemetry, INotificationManager, IOTelApi, IOTelSpanOptions, IPageViewPerformanceTelemetry, IPageViewTelemetry, IPlugin,
IReadableSpan, IRequestHeaders, ISdkStatsNotifCbk, ISpanScope, ITelemetryContext as Common_ITelemetryContext,
ITelemetryInitializerHandler, ITelemetryItem, ITelemetryPlugin, ITelemetryUnloadState, IThrottleInterval, IThrottleLimit,
IThrottleMgrConfig, ITraceApi, ITraceProvider, ITraceTelemetry, IUnloadHook, OTelTimeInput, PropertiesPluginIdentifier, ThrottleMgr,
UnloadHandler, WatcherFunction, _eInternalMessageId, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, cfgDfMerge,
cfgDfValidate, createDynamicConfig, createOTelApi, createProcessTelemetryContext, createSdkStatsNotifCbk, createTraceProvider,
createUniqueNamespace, doPerf, eLoggingSeverity, hasDocument, hasWindow, isArray, isFeatureEnabled, isFunction, isNullOrUndefined,
isReactNative, isString, mergeEvtNamespace, onConfigChange, parseConnectionString, proxyAssign, proxyFunctions,
removePageHideEventListener, removePageUnloadEventListener, useSpan
IReadableSpan, IRequestHeaders, ISdkStatsNotifCbk, ISpanScope, ITelemetryContext as Common_ITelemetryContext, ITelemetryInitializerHandler,
ITelemetryItem, ITelemetryPlugin, ITelemetryUnloadState, IThrottleInterval, IThrottleLimit, IThrottleMgrConfig, ITraceApi, ITraceProvider,
ITraceTelemetry, IUnloadHook, OTelTimeInput, PropertiesPluginIdentifier, ThrottleMgr, UnloadHandler, WatcherFunction,
_eInternalMessageId, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, cfgDfMerge, cfgDfValidate,
createDynamicConfig, createOTelApi, createProcessTelemetryContext, createSdkStatsNotifCbk, createStatsMgr,
createTraceProvider, createUniqueNamespace, doPerf, eLoggingSeverity,
hasDocument, hasWindow, isArray, isFeatureEnabled, isFunction, isNullOrUndefined, isReactNative, isString, mergeEvtNamespace,
onConfigChange, parseConnectionString, proxyAssign, proxyFunctions, removePageHideEventListener, removePageUnloadEventListener, useSpan
} from "@microsoft/applicationinsights-core-js";
import {
AjaxPlugin as DependenciesPlugin, DependencyInitializerFunction, DependencyListenerFunction, IDependencyInitializerHandler,
Expand Down Expand Up @@ -398,6 +398,19 @@ export class AppInsightsSku implements IApplicationInsights<IConfiguration & ICo
// initialize core
_core.initialize(_config, [ _sender, properties, dependencies, _analyticsPlugin, _cfgSyncPlugin], logger, notificationManager);

// Enable SDK Stats collection. The manager reads its configuration directly from the
// single global config (config.stats) and gates itself behind the SDK Stats feature
// flag, routing the resulting events to the distro-owned SDK Stats ingestion endpoint
// (stats.monitor.azure.com). Enabled by default; opt-out via featureOptIn "sdkStats".
if (_core.setStatsMgr) {
let statsMgr = createStatsMgr();
_core.setStatsMgr(statsMgr);
let statsHook = statsMgr.init<IConfiguration & IConfig>(_core);
if (statsHook) {
_core.addUnloadHook(statsHook);
}
}

// Initialize the initial OTel API
_otelApi = _initOTel(_self, "aisku", _onEnd, _onException);

Expand Down
Loading
Loading