@microsoft/applicationinsights-core-js 3.4.0-nightlybeta3.2602-27 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/es5/applicationinsights-core-js.cjs.js +997 -114
- package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.js +999 -116
- package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
- package/browser/es5/applicationinsights-core-js.js +999 -116
- package/browser/es5/applicationinsights-core-js.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
- package/dist/es5/index.js +997 -114
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/index.min.js +2 -2
- package/dist/es5/index.min.js.map +1 -1
- package/dist-es5/__DynamicConstants.js +44 -27
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/config/ConfigDefaultHelpers.js +1 -1
- package/dist-es5/config/ConfigDefaults.js +1 -1
- package/dist-es5/config/DynamicConfig.js +1 -1
- package/dist-es5/config/DynamicProperty.js +1 -1
- package/dist-es5/config/DynamicState.js +1 -1
- package/dist-es5/config/DynamicSupport.js +1 -1
- package/dist-es5/constants/Constants.js +1 -1
- package/dist-es5/constants/InternalConstants.js +4 -1
- package/dist-es5/constants/InternalConstants.js.map +1 -1
- package/dist-es5/core/AggregationError.js +1 -1
- package/dist-es5/core/AppInsightsCore.js +13 -13
- package/dist-es5/core/AppInsightsCore.js.map +1 -1
- package/dist-es5/core/AsyncUtils.js +1 -1
- package/dist-es5/core/BaseTelemetryPlugin.js +1 -1
- package/dist-es5/core/CookieMgr.js +1 -1
- package/dist-es5/core/DbgExtensionUtils.js +1 -1
- package/dist-es5/core/InstrumentHooks.js +1 -1
- package/dist-es5/core/NotificationManager.js +1 -1
- package/dist-es5/core/PerfManager.js +1 -1
- package/dist-es5/core/ProcessTelemetryContext.js +3 -3
- package/dist-es5/core/ProcessTelemetryContext.js.map +1 -1
- package/dist-es5/core/ResponseHelpers.js +1 -1
- package/dist-es5/core/SenderPostManager.js +1 -1
- package/dist-es5/core/StatsBeat.js +9 -9
- package/dist-es5/core/StatsBeat.js.map +1 -1
- package/dist-es5/core/TelemetryHelpers.js +3 -3
- package/dist-es5/core/TelemetryHelpers.js.map +1 -1
- package/dist-es5/core/TelemetryInitializerPlugin.js +1 -1
- package/dist-es5/core/UnloadHandlerContainer.js +1 -1
- package/dist-es5/core/UnloadHookContainer.js +3 -3
- package/dist-es5/core/UnloadHookContainer.js.map +1 -1
- package/dist-es5/diagnostics/DiagnosticLogger.js +3 -3
- package/dist-es5/diagnostics/DiagnosticLogger.js.map +1 -1
- package/dist-es5/diagnostics/ThrottleMgr.js +1 -1
- package/dist-es5/enums/EnumHelperFuncs.js +1 -1
- package/dist-es5/enums/W3CTraceFlags.js +1 -1
- package/dist-es5/enums/ai/DependencyTypes.js +1 -1
- package/dist-es5/enums/ai/Enums.js +1 -1
- package/dist-es5/enums/ai/EventsDiscardedReason.js +1 -1
- package/dist-es5/enums/ai/FeatureOptInEnums.js +1 -1
- package/dist-es5/enums/ai/InitActiveStatusEnum.js +1 -1
- package/dist-es5/enums/ai/LoggingEnums.js +1 -1
- package/dist-es5/enums/ai/SendRequestReason.js +1 -1
- package/dist-es5/enums/ai/StatsType.js +1 -1
- package/dist-es5/enums/ai/TelemetryUnloadReason.js +1 -1
- package/dist-es5/enums/ai/TelemetryUpdateReason.js +1 -1
- package/dist-es5/enums/ai/TraceHeadersMode.js +1 -1
- package/dist-es5/enums/ai/UrlRedactionOptions.js +36 -0
- package/dist-es5/enums/ai/UrlRedactionOptions.js.map +1 -0
- package/dist-es5/enums/ext/Enums.js +78 -0
- package/dist-es5/enums/ext/Enums.js.map +1 -0
- package/dist-es5/enums/otel/OTelSamplingDecision.js +1 -1
- package/dist-es5/enums/otel/OTelSpanKind.js +1 -1
- package/dist-es5/enums/otel/OTelSpanStatus.js +1 -1
- package/dist-es5/enums/otel/eAttributeChangeOp.js +1 -1
- package/dist-es5/ext/AppInsightsExtCore.js +98 -0
- package/dist-es5/ext/AppInsightsExtCore.js.map +1 -0
- package/dist-es5/ext/ValueSanitizer.js +260 -0
- package/dist-es5/ext/ValueSanitizer.js.map +1 -0
- package/dist-es5/ext/extSpanUtils.js +312 -0
- package/dist-es5/ext/extSpanUtils.js.map +1 -0
- package/dist-es5/ext/extUtils.js +412 -0
- package/dist-es5/ext/extUtils.js.map +1 -0
- package/dist-es5/index.js +14 -1
- package/dist-es5/index.js.map +1 -1
- package/dist-es5/interfaces/IException.js +1 -1
- package/dist-es5/interfaces/IOTelHrTime.js +1 -1
- package/dist-es5/interfaces/ai/ConnectionString.js +1 -1
- package/dist-es5/interfaces/ai/IAppInsights.js +1 -1
- package/dist-es5/interfaces/ai/IAppInsightsCore.js +1 -1
- package/dist-es5/interfaces/ai/IChannelControls.js +1 -1
- package/dist-es5/interfaces/ai/IChannelControlsHost.js +1 -1
- package/dist-es5/interfaces/ai/IConfig.js +1 -1
- package/dist-es5/interfaces/ai/IConfiguration.js +1 -1
- package/dist-es5/interfaces/ai/ICookieMgr.js +1 -1
- package/dist-es5/interfaces/ai/ICorrelationConfig.js +1 -1
- package/dist-es5/interfaces/ai/IDbgExtension.js +1 -1
- package/dist-es5/interfaces/ai/IDependencyTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IDiagnosticLogger.js +1 -1
- package/dist-es5/interfaces/ai/IDistributedTraceContext.js +1 -1
- package/dist-es5/interfaces/ai/IEventTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IExceptionConfig.js +1 -1
- package/dist-es5/interfaces/ai/IExceptionTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IFeatureOptIn.js +1 -1
- package/dist-es5/interfaces/ai/IInstrumentHooks.js +1 -1
- package/dist-es5/interfaces/ai/IMetricTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/INetworkStatsbeat.js +1 -1
- package/dist-es5/interfaces/ai/INotificationListener.js +1 -1
- package/dist-es5/interfaces/ai/INotificationManager.js +1 -1
- package/dist-es5/interfaces/ai/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IPageViewTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IPartC.js +1 -1
- package/dist-es5/interfaces/ai/IPerfEvent.js +1 -1
- package/dist-es5/interfaces/ai/IPerfManager.js +1 -1
- package/dist-es5/interfaces/ai/IProcessTelemetryContext.js +1 -1
- package/dist-es5/interfaces/ai/IPropertiesPlugin.js +1 -1
- package/dist-es5/interfaces/ai/IRequestContext.js +1 -1
- package/dist-es5/interfaces/ai/IRequestTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/ISenderPostManager.js +1 -1
- package/dist-es5/interfaces/ai/IStatsBeat.js +1 -1
- package/dist-es5/interfaces/ai/IStatsEventData.js +1 -1
- package/dist-es5/interfaces/ai/IStatsMgr.js +1 -1
- package/dist-es5/interfaces/ai/IStorageBuffer.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryContext.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryInitializers.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryItem.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryPlugin.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryPluginChain.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryUnloadState.js +1 -1
- package/dist-es5/interfaces/ai/ITelemetryUpdateState.js +1 -1
- package/dist-es5/interfaces/ai/IThrottleMgr.js +1 -1
- package/dist-es5/interfaces/ai/ITraceParent.js +1 -1
- package/dist-es5/interfaces/ai/ITraceProvider.js +1 -1
- package/dist-es5/interfaces/ai/ITraceTelemetry.js +1 -1
- package/dist-es5/interfaces/ai/IUnloadHook.js +1 -1
- package/dist-es5/interfaces/ai/IUnloadableComponent.js +1 -1
- package/dist-es5/interfaces/ai/IW3cTraceState.js +1 -1
- package/dist-es5/interfaces/ai/IXDomainRequest.js +1 -1
- package/dist-es5/interfaces/ai/IXHROverride.js +1 -1
- package/dist-es5/interfaces/ai/PartAExtensions.js +1 -1
- package/dist-es5/interfaces/ai/context/IApplication.js +1 -1
- package/dist-es5/interfaces/ai/context/IDevice.js +1 -1
- package/dist-es5/interfaces/ai/context/IInternal.js +1 -1
- package/dist-es5/interfaces/ai/context/ILocation.js +1 -1
- package/dist-es5/interfaces/ai/context/IOperatingSystem.js +1 -1
- package/dist-es5/interfaces/ai/context/ISample.js +1 -1
- package/dist-es5/interfaces/ai/context/ISession.js +1 -1
- package/dist-es5/interfaces/ai/context/ISessionManager.js +1 -1
- package/dist-es5/interfaces/ai/context/ITelemetryTrace.js +1 -1
- package/dist-es5/interfaces/ai/context/IUser.js +1 -1
- package/dist-es5/interfaces/ai/context/IWeb.js +1 -1
- package/dist-es5/interfaces/ai/contracts/AvailabilityData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/ContextTagKeys.js +1 -1
- package/dist-es5/interfaces/ai/contracts/DataPointType.js +1 -1
- package/dist-es5/interfaces/ai/contracts/DependencyKind.js +1 -1
- package/dist-es5/interfaces/ai/contracts/DependencySourceType.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IBase.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IDataPoint.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IDomain.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IEventData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IExceptionData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IExceptionDetails.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IMessageData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IMetricData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IPageViewData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IPageViewPerfData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IRemoteDependencyData.js +1 -1
- package/dist-es5/interfaces/ai/contracts/IStackFrame.js +1 -1
- package/dist-es5/interfaces/ai/contracts/SeverityLevel.js +1 -1
- package/dist-es5/interfaces/ai/telemetry/IEnvelope.js +1 -1
- package/dist-es5/interfaces/ai/telemetry/ISerializable.js +1 -1
- package/dist-es5/interfaces/config/IConfigDefaults.js +1 -1
- package/dist-es5/interfaces/config/IDynamicConfigHandler.js +1 -1
- package/dist-es5/interfaces/config/IDynamicPropertyHandler.js +1 -1
- package/dist-es5/interfaces/config/IDynamicWatcher.js +1 -1
- package/dist-es5/interfaces/config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-es5/interfaces/ext/DataModels.js +6 -0
- package/dist-es5/interfaces/ext/DataModels.js.map +1 -0
- package/dist-es5/interfaces/otel/IOTelApi.js +1 -1
- package/dist-es5/interfaces/otel/IOTelApiCtx.js +1 -1
- package/dist-es5/interfaces/otel/IOTelAttributes.js +1 -1
- package/dist-es5/interfaces/otel/attribute/IAttributeContainer.js +1 -1
- package/dist-es5/interfaces/otel/config/IOTelAttributeLimits.js +1 -1
- package/dist-es5/interfaces/otel/config/IOTelConfig.js +1 -1
- package/dist-es5/interfaces/otel/config/IOTelErrorHandlers.js +1 -1
- package/dist-es5/interfaces/otel/config/IOTelSpanLimits.js +1 -1
- package/dist-es5/interfaces/otel/config/IOTelTraceCfg.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelSpan.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelSpanContext.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelSpanCtx.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelSpanOptions.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelSpanStatus.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelTraceApi.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelTraceState.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelTracer.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelTracerOptions.js +1 -1
- package/dist-es5/interfaces/otel/trace/IOTelTracerProvider.js +1 -1
- package/dist-es5/interfaces/otel/trace/IReadableSpan.js +1 -1
- package/dist-es5/internal/EventHelpers.js +5 -5
- package/dist-es5/internal/EventHelpers.js.map +1 -1
- package/dist-es5/internal/attributeHelpers.js +1 -1
- package/dist-es5/internal/commonUtils.js +1 -1
- package/dist-es5/internal/handleErrors.js +1 -1
- package/dist-es5/internal/noopHelpers.js +1 -1
- package/dist-es5/internal/timeHelpers.js +1 -1
- package/dist-es5/otel/api/OTelApi.js +1 -1
- package/dist-es5/otel/api/errors/OTelError.js +1 -1
- package/dist-es5/otel/api/errors/OTelInvalidAttributeError.js +1 -1
- package/dist-es5/otel/api/errors/OTelSpanError.js +1 -1
- package/dist-es5/otel/api/trace/span.js +4 -4
- package/dist-es5/otel/api/trace/span.js.map +1 -1
- package/dist-es5/otel/api/trace/spanContext.js +1 -1
- package/dist-es5/otel/api/trace/traceApi.js +1 -1
- package/dist-es5/otel/api/trace/traceProvider.js +3 -3
- package/dist-es5/otel/api/trace/traceProvider.js.map +1 -1
- package/dist-es5/otel/api/trace/traceState.js +1 -1
- package/dist-es5/otel/api/trace/tracer.js +1 -1
- package/dist-es5/otel/api/trace/tracerProvider.js +1 -1
- package/dist-es5/otel/api/trace/utils.js +1 -1
- package/dist-es5/otel/attribute/SemanticConventions.js +1 -1
- package/dist-es5/otel/attribute/attributeContainer.js +1 -1
- package/dist-es5/telemetry/ConnectionStringParser.js +1 -1
- package/dist-es5/telemetry/RequestResponseHeaders.js +1 -1
- package/dist-es5/telemetry/TelemetryItemCreator.js +1 -1
- package/dist-es5/telemetry/W3cTraceState.js +1 -1
- package/dist-es5/telemetry/ai/Common/Data.js +3 -2
- package/dist-es5/telemetry/ai/Common/Data.js.map +1 -1
- package/dist-es5/telemetry/ai/Common/DataPoint.js +1 -1
- package/dist-es5/telemetry/ai/Common/DataSanitizer.js +1 -1
- package/dist-es5/telemetry/ai/Common/Envelope.js +1 -1
- package/dist-es5/telemetry/ai/DataTypes.js +1 -1
- package/dist-es5/telemetry/ai/EnvelopeTypes.js +1 -1
- package/dist-es5/telemetry/ai/Event.js +1 -1
- package/dist-es5/telemetry/ai/Exception.js +1 -1
- package/dist-es5/telemetry/ai/Metric.js +1 -1
- package/dist-es5/telemetry/ai/PageView.js +1 -1
- package/dist-es5/telemetry/ai/PageViewPerformance.js +1 -1
- package/dist-es5/telemetry/ai/RemoteDependencyData.js +1 -1
- package/dist-es5/telemetry/ai/Trace.js +1 -1
- package/dist-es5/utils/CoreUtils.js +1 -1
- package/dist-es5/utils/DataCacheHelper.js +2 -2
- package/dist-es5/utils/DataCacheHelper.js.map +1 -1
- package/dist-es5/utils/DomHelperFuncs.js +1 -1
- package/dist-es5/utils/EnvUtils.js +16 -5
- package/dist-es5/utils/EnvUtils.js.map +1 -1
- package/dist-es5/utils/HelperFuncs.js +4 -4
- package/dist-es5/utils/HelperFuncs.js.map +1 -1
- package/dist-es5/utils/Offline.js +1 -1
- package/dist-es5/utils/RandomHelper.js +1 -1
- package/dist-es5/utils/StorageHelperFuncs.js +1 -1
- package/dist-es5/utils/TraceParent.js +5 -5
- package/dist-es5/utils/TraceParent.js.map +1 -1
- package/dist-es5/utils/UrlHelperFuncs.js +1 -1
- package/dist-es5/utils/Util.js +4 -4
- package/dist-es5/utils/Util.js.map +1 -1
- package/package.json +75 -78
- package/types/applicationinsights-core-js.d.ts +830 -11
- package/types/applicationinsights-core-js.namespaced.d.ts +829 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.4.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.4.1
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -366,6 +366,25 @@ declare namespace ApplicationInsights {
|
|
|
366
366
|
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
/**
|
|
370
|
+
* @group Classes
|
|
371
|
+
* @group Entrypoint
|
|
372
|
+
*/
|
|
373
|
+
class AppInsightsExtCore<C extends IExtendedConfiguration = IExtendedConfiguration> extends AppInsightsCore<C> {
|
|
374
|
+
constructor();
|
|
375
|
+
/**
|
|
376
|
+
* Initialize the sdk.
|
|
377
|
+
* @param config - The configuration to initialize the SDK.
|
|
378
|
+
* @param extensions - An array of extensions that are to be used by the core.
|
|
379
|
+
*/
|
|
380
|
+
initialize(config: C, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
381
|
+
track(item: IExtendedTelemetryItem | ITelemetryItem): void;
|
|
382
|
+
/**
|
|
383
|
+
* Periodically check logger.queue for
|
|
384
|
+
*/
|
|
385
|
+
pollInternalLogs(eventName?: string): ITimerHandler;
|
|
386
|
+
}
|
|
387
|
+
|
|
369
388
|
const ApplicationInsightsAvailabilityBaseType = "AvailabilityData";
|
|
370
389
|
|
|
371
390
|
const ApplicationInsightsAvailabilityName: string;
|
|
@@ -1200,6 +1219,24 @@ declare namespace ApplicationInsights {
|
|
|
1200
1219
|
[key in keyof E]: E[keyof E];
|
|
1201
1220
|
}) => EnumValue<E>;
|
|
1202
1221
|
|
|
1222
|
+
/**
|
|
1223
|
+
* Create an extended common schema telemetry item from the provided span
|
|
1224
|
+
* @param core - The app insights core instance
|
|
1225
|
+
* @param span - The span to create the telemetry item from
|
|
1226
|
+
* @returns A new extended telemetry item or null if the span kind is not supported
|
|
1227
|
+
*/
|
|
1228
|
+
function createExtendedTelemetryItemFromSpan(core: IAppInsightsCore, span: IReadableSpan): IExtendedTelemetryItem | null;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Create a new guid.
|
|
1232
|
+
* @param style - The style of guid to generated, defaults to Digits
|
|
1233
|
+
* Digits (Default) : 32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000
|
|
1234
|
+
* Braces - 32 digits separated by hyphens, enclosed in braces: \{00000000-0000-0000-0000-000000000000\}
|
|
1235
|
+
* Parentheses - 32 digits separated by hyphens, enclosed in parentheses: (00000000-0000-0000-0000-000000000000)
|
|
1236
|
+
* Numeric - 32 digits: 00000000000000000000000000000000
|
|
1237
|
+
*/
|
|
1238
|
+
function createGuid(style?: GuidStyle): string;
|
|
1239
|
+
|
|
1203
1240
|
/**
|
|
1204
1241
|
* Return a non-recording span based on the provided spanContext using the otelApi instance as the
|
|
1205
1242
|
* owning instance.
|
|
@@ -1861,6 +1898,22 @@ declare namespace ApplicationInsights {
|
|
|
1861
1898
|
W3C_TRACE = 18
|
|
1862
1899
|
}
|
|
1863
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* Enum for property types.
|
|
1903
|
+
*/
|
|
1904
|
+
const enum eEventPropertyType {
|
|
1905
|
+
Unspecified = 0,
|
|
1906
|
+
String = 1,
|
|
1907
|
+
Int32 = 2,
|
|
1908
|
+
UInt32 = 3,
|
|
1909
|
+
Int64 = 4,
|
|
1910
|
+
UInt64 = 5,
|
|
1911
|
+
Double = 6,
|
|
1912
|
+
Bool = 7,
|
|
1913
|
+
Guid = 8,
|
|
1914
|
+
DateTime = 9
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1864
1917
|
/**
|
|
1865
1918
|
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
1866
1919
|
*/
|
|
@@ -1895,6 +1948,29 @@ declare namespace ApplicationInsights {
|
|
|
1895
1948
|
BeaconSendFailure = 6
|
|
1896
1949
|
}
|
|
1897
1950
|
|
|
1951
|
+
const enum _eExtendedInternalMessageId {
|
|
1952
|
+
AuthHandShakeError = 501,
|
|
1953
|
+
AuthRedirectFail = 502,
|
|
1954
|
+
BrowserCannotReadLocalStorage = 503,
|
|
1955
|
+
BrowserCannotWriteLocalStorage = 504,
|
|
1956
|
+
BrowserDoesNotSupportLocalStorage = 505,
|
|
1957
|
+
CannotParseBiBlobValue = 506,
|
|
1958
|
+
CannotParseDataAttribute = 507,
|
|
1959
|
+
CVPluginNotAvailable = 508,
|
|
1960
|
+
DroppedEvent = 509,
|
|
1961
|
+
ErrorParsingAISessionCookie = 510,
|
|
1962
|
+
ErrorProvidedChannels = 511,
|
|
1963
|
+
FailedToGetCookies = 512,
|
|
1964
|
+
FailedToInitializeCorrelationVector = 513,
|
|
1965
|
+
FailedToInitializeSDK = 514,
|
|
1966
|
+
InvalidContentBlob = 515,
|
|
1967
|
+
InvalidCorrelationValue = 516,
|
|
1968
|
+
SessionRenewalDateIsZero = 517,
|
|
1969
|
+
SendPostOnCompleteFailure = 518,
|
|
1970
|
+
PostResponseHandler = 519,
|
|
1971
|
+
SDKNotInitialized = 520
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1898
1974
|
const enum _eInternalMessageId {
|
|
1899
1975
|
BrowserDoesNotSupportLocalStorage = 0,
|
|
1900
1976
|
BrowserCannotReadLocalStorage = 1,
|
|
@@ -2180,6 +2256,136 @@ declare namespace ApplicationInsights {
|
|
|
2180
2256
|
All = 3
|
|
2181
2257
|
}
|
|
2182
2258
|
|
|
2259
|
+
/**
|
|
2260
|
+
* The TraceLevel contains a set of values that specify the trace level for the trace messages.
|
|
2261
|
+
*/
|
|
2262
|
+
const enum eTraceLevel {
|
|
2263
|
+
/**
|
|
2264
|
+
* None.
|
|
2265
|
+
*/
|
|
2266
|
+
NONE = 0,
|
|
2267
|
+
/**
|
|
2268
|
+
* Error trace.
|
|
2269
|
+
*/
|
|
2270
|
+
ERROR = 1,
|
|
2271
|
+
/**
|
|
2272
|
+
* Warning trace.
|
|
2273
|
+
*/
|
|
2274
|
+
WARNING = 2,
|
|
2275
|
+
/**
|
|
2276
|
+
* Information trace.
|
|
2277
|
+
*/
|
|
2278
|
+
INFORMATION = 3
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* Controls how the user can configure which parts of the URL should be redacted. Example, certain query parameters, username and password, etc.
|
|
2283
|
+
*/
|
|
2284
|
+
const enum eUrlRedactionOptions {
|
|
2285
|
+
/**
|
|
2286
|
+
* The default value, will redact the username and password as well as the default set of query parameters
|
|
2287
|
+
*/
|
|
2288
|
+
true = 1,
|
|
2289
|
+
/**
|
|
2290
|
+
* Does not redact username and password or any query parameters, the URL will be left as is. Note: this is not recommended as it may lead
|
|
2291
|
+
* to sensitive data being sent in clear text.
|
|
2292
|
+
*/
|
|
2293
|
+
false = 2,
|
|
2294
|
+
/**
|
|
2295
|
+
* This will append any additional queryParams that the user has provided through redactQueryParams config to the default set i.e to
|
|
2296
|
+
* @defaultValue ["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"].
|
|
2297
|
+
*/
|
|
2298
|
+
appendToDefault = 3,
|
|
2299
|
+
/**
|
|
2300
|
+
* This will replace the default set of query parameters to redact with the query parameters defined in redactQueryParams config, if provided by the user.
|
|
2301
|
+
*/
|
|
2302
|
+
replaceDefault = 4,
|
|
2303
|
+
/**
|
|
2304
|
+
* This will redact username and password in the URL but will not redact any query parameters, even those in the default set.
|
|
2305
|
+
*/
|
|
2306
|
+
usernamePasswordOnly = 5,
|
|
2307
|
+
/**
|
|
2308
|
+
* This will only redact the query parameter in the default set of query parameters to redact. It will not redact username and password.
|
|
2309
|
+
*/
|
|
2310
|
+
queryParamsOnly = 6
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* The eValueKind contains a set of values that specify value kind of the property.
|
|
2315
|
+
* Either PII (Personal Identifiable Information) or customer content.
|
|
2316
|
+
*/
|
|
2317
|
+
const enum eValueKind {
|
|
2318
|
+
/**
|
|
2319
|
+
* No kind.
|
|
2320
|
+
*/
|
|
2321
|
+
NotSet = 0,
|
|
2322
|
+
/**
|
|
2323
|
+
* An LDAP distinguished name. For example, CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM.
|
|
2324
|
+
*/
|
|
2325
|
+
Pii_DistinguishedName = 1,
|
|
2326
|
+
/**
|
|
2327
|
+
* Generic information.
|
|
2328
|
+
*/
|
|
2329
|
+
Pii_GenericData = 2,
|
|
2330
|
+
/**
|
|
2331
|
+
* An IPV4 Internet address. For example, 192.0.2.1.
|
|
2332
|
+
*/
|
|
2333
|
+
Pii_IPV4Address = 3,
|
|
2334
|
+
/**
|
|
2335
|
+
* An IPV6 Internet address. For example, 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
|
|
2336
|
+
*/
|
|
2337
|
+
Pii_IPv6Address = 4,
|
|
2338
|
+
/**
|
|
2339
|
+
* The Subject of an e-mail message.
|
|
2340
|
+
*/
|
|
2341
|
+
Pii_MailSubject = 5,
|
|
2342
|
+
/**
|
|
2343
|
+
* A telephone number.
|
|
2344
|
+
*/
|
|
2345
|
+
Pii_PhoneNumber = 6,
|
|
2346
|
+
/**
|
|
2347
|
+
* A query string.
|
|
2348
|
+
*/
|
|
2349
|
+
Pii_QueryString = 7,
|
|
2350
|
+
/**
|
|
2351
|
+
* An SIP (Session Internet Protocol) address.
|
|
2352
|
+
*/
|
|
2353
|
+
Pii_SipAddress = 8,
|
|
2354
|
+
/**
|
|
2355
|
+
* An e-mail address.
|
|
2356
|
+
*/
|
|
2357
|
+
Pii_SmtpAddress = 9,
|
|
2358
|
+
/**
|
|
2359
|
+
* An user ID.
|
|
2360
|
+
*/
|
|
2361
|
+
Pii_Identity = 10,
|
|
2362
|
+
/**
|
|
2363
|
+
* A URI (Uniform Resource Identifier).
|
|
2364
|
+
*/
|
|
2365
|
+
Pii_Uri = 11,
|
|
2366
|
+
/**
|
|
2367
|
+
* The fully-qualified domain name.
|
|
2368
|
+
*/
|
|
2369
|
+
Pii_Fqdn = 12,
|
|
2370
|
+
/**
|
|
2371
|
+
* Scrubs the last octet in a IPV4 Internet address.
|
|
2372
|
+
* For example: 10.121.227.147 becomes 10.121.227.*
|
|
2373
|
+
*/
|
|
2374
|
+
Pii_IPV4AddressLegacy = 13,
|
|
2375
|
+
/**
|
|
2376
|
+
* Scrubs the last 4 Hextets (last 64-bits) of an IPv6 address
|
|
2377
|
+
*/
|
|
2378
|
+
Pii_IPv6ScrubLastHextets = 14,
|
|
2379
|
+
/**
|
|
2380
|
+
* Drops the value altogether, rather than hashing
|
|
2381
|
+
*/
|
|
2382
|
+
Pii_DropValue = 15,
|
|
2383
|
+
/**
|
|
2384
|
+
* Generic content.
|
|
2385
|
+
*/
|
|
2386
|
+
CustomerContent_GenericContent = 32
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2183
2389
|
class Event_2 implements IEventData, ISerializable {
|
|
2184
2390
|
/**
|
|
2185
2391
|
* @deprecated Use the constant EventEnvelopeType instead.
|
|
@@ -2222,6 +2428,36 @@ declare namespace ApplicationInsights {
|
|
|
2222
2428
|
|
|
2223
2429
|
const EventEnvelopeType: string;
|
|
2224
2430
|
|
|
2431
|
+
/**
|
|
2432
|
+
* The EventLatency contains a set of values that specify the latency with which an event is sent.
|
|
2433
|
+
*/
|
|
2434
|
+
const EventLatency: EnumValue<typeof EventLatencyValue>;
|
|
2435
|
+
|
|
2436
|
+
type EventLatency = number | EventLatencyValue;
|
|
2437
|
+
|
|
2438
|
+
/**
|
|
2439
|
+
* The EventLatency contains a set of values that specify the latency with which an event is sent.
|
|
2440
|
+
*/
|
|
2441
|
+
const enum EventLatencyValue {
|
|
2442
|
+
/**
|
|
2443
|
+
* Normal latency.
|
|
2444
|
+
*/
|
|
2445
|
+
Normal = 1,
|
|
2446
|
+
/**
|
|
2447
|
+
* Cost deferred latency. At the moment this latency is treated as Normal latency.
|
|
2448
|
+
*/
|
|
2449
|
+
CostDeferred = 2,
|
|
2450
|
+
/**
|
|
2451
|
+
* Real time latency.
|
|
2452
|
+
*/
|
|
2453
|
+
RealTime = 3,
|
|
2454
|
+
/**
|
|
2455
|
+
* Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
|
|
2456
|
+
* Added in v3.1.1
|
|
2457
|
+
*/
|
|
2458
|
+
Immediate = 4
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2225
2461
|
/**
|
|
2226
2462
|
* Removes an event handler for the specified event
|
|
2227
2463
|
* @param Object - to remove the event from
|
|
@@ -2257,7 +2493,7 @@ declare namespace ApplicationInsights {
|
|
|
2257
2493
|
type EventPersistence = number | EventPersistenceValue;
|
|
2258
2494
|
|
|
2259
2495
|
/**
|
|
2260
|
-
* The
|
|
2496
|
+
* The EventPersistenceValue contains a set of values that specify the event's persistence.
|
|
2261
2497
|
*/
|
|
2262
2498
|
const enum EventPersistenceValue {
|
|
2263
2499
|
/**
|
|
@@ -2270,6 +2506,13 @@ declare namespace ApplicationInsights {
|
|
|
2270
2506
|
Critical = 2
|
|
2271
2507
|
}
|
|
2272
2508
|
|
|
2509
|
+
/**
|
|
2510
|
+
* Enum for property types.
|
|
2511
|
+
*/
|
|
2512
|
+
const EventPropertyType: EnumValue<typeof eEventPropertyType>;
|
|
2513
|
+
|
|
2514
|
+
type EventPropertyType = number | eEventPropertyType;
|
|
2515
|
+
|
|
2273
2516
|
/**
|
|
2274
2517
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
2275
2518
|
*/
|
|
@@ -2277,6 +2520,34 @@ declare namespace ApplicationInsights {
|
|
|
2277
2520
|
|
|
2278
2521
|
type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
2279
2522
|
|
|
2523
|
+
/**
|
|
2524
|
+
* Define a specific way to send an event synchronously
|
|
2525
|
+
*/
|
|
2526
|
+
const enum EventSendType {
|
|
2527
|
+
/**
|
|
2528
|
+
* Batch and send the event asynchronously, this is the same as either setting the event `sync` flag to false or not setting at all.
|
|
2529
|
+
*/
|
|
2530
|
+
Batched = 0,
|
|
2531
|
+
/**
|
|
2532
|
+
* Attempt to send the event synchronously, this is the same as setting the event `sync` flag to true
|
|
2533
|
+
*/
|
|
2534
|
+
Synchronous = 1,
|
|
2535
|
+
/**
|
|
2536
|
+
* Attempt to send the event synchronously with a preference for the sendBeacon() API.
|
|
2537
|
+
* As per the specification, the payload of the event (when converted to JSON) must not be larger than 64kb,
|
|
2538
|
+
* the sendHook is also not supported or used when sendBeacon.
|
|
2539
|
+
*/
|
|
2540
|
+
SendBeacon = 2,
|
|
2541
|
+
/**
|
|
2542
|
+
* Attempt to send the event synchronously with a preference for the fetch() API with the keepalive flag,
|
|
2543
|
+
* the SDK checks to ensure that the fetch() implementation supports the 'keepalive' flag and if not it
|
|
2544
|
+
* will fallback to either sendBeacon() or a synchronous XHR request.
|
|
2545
|
+
* As per the specification, the payload of the event (when converted to JSON) must not be larger than 64kb.
|
|
2546
|
+
* Note: Not all browsers support the keepalive flag so for those environments the events may still fail
|
|
2547
|
+
*/
|
|
2548
|
+
SyncFetch = 3
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2280
2551
|
/**
|
|
2281
2552
|
* The TelemetryUpdateReason enumeration contains a set of bit-wise values that specify the reason for update request.
|
|
2282
2553
|
*/
|
|
@@ -2361,6 +2632,19 @@ declare namespace ApplicationInsights {
|
|
|
2361
2632
|
|
|
2362
2633
|
const EXP_ATTR_SYNTHETIC_TYPE = "synthetic.type";
|
|
2363
2634
|
|
|
2635
|
+
/**
|
|
2636
|
+
* Pass in the objects to merge as arguments.
|
|
2637
|
+
* @param obj1 - object to merge. Set this argument to 'true' for a deep extend.
|
|
2638
|
+
* @param obj2 - object to merge.
|
|
2639
|
+
* @param obj3 - object to merge.
|
|
2640
|
+
* @param obj4 - object to merge.
|
|
2641
|
+
* @param obj5 - object to merge.
|
|
2642
|
+
* @returns The extended object.
|
|
2643
|
+
*/
|
|
2644
|
+
function extend(obj?: any, obj2?: any, obj3?: any, obj4?: any, obj5?: any): any;
|
|
2645
|
+
|
|
2646
|
+
type _ExtendedInternalMessageId = number | _eExtendedInternalMessageId | _eInternalMessageId;
|
|
2647
|
+
|
|
2364
2648
|
/**
|
|
2365
2649
|
* Defines extended attribute values which may contain nested attributes.
|
|
2366
2650
|
*
|
|
@@ -2379,6 +2663,16 @@ declare namespace ApplicationInsights {
|
|
|
2379
2663
|
SDKExt: string;
|
|
2380
2664
|
};
|
|
2381
2665
|
|
|
2666
|
+
/**
|
|
2667
|
+
* Identifies the full version for the extended SDK
|
|
2668
|
+
*/
|
|
2669
|
+
const ExtFullVersionString: string;
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* Identifies the version for the extended SDK
|
|
2673
|
+
*/
|
|
2674
|
+
const ExtVersion = "4.4.1";
|
|
2675
|
+
|
|
2382
2676
|
const enum FeatureOptInMode {
|
|
2383
2677
|
/**
|
|
2384
2678
|
* not set, completely depends on cdn cfg
|
|
@@ -2413,6 +2707,20 @@ declare namespace ApplicationInsights {
|
|
|
2413
2707
|
Hidden = 4
|
|
2414
2708
|
}
|
|
2415
2709
|
|
|
2710
|
+
type FieldValueSanitizerFunc = (details: IFieldSanitizerDetails) => IEventProperty | null;
|
|
2711
|
+
|
|
2712
|
+
const enum FieldValueSanitizerType {
|
|
2713
|
+
NotSet = 0,
|
|
2714
|
+
String = 1,
|
|
2715
|
+
Number = 2,
|
|
2716
|
+
Boolean = 3,
|
|
2717
|
+
Object = 4,
|
|
2718
|
+
Array = 4096,
|
|
2719
|
+
EventProperty = 8192
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
type FieldValueSanitizerTypes = string | number | boolean | object | string[] | number[] | boolean[] | IEventProperty;
|
|
2723
|
+
|
|
2416
2724
|
/**
|
|
2417
2725
|
* This defines the handler function that is called via the finally when the promise is resolved or rejected
|
|
2418
2726
|
*/
|
|
@@ -2489,6 +2797,12 @@ declare namespace ApplicationInsights {
|
|
|
2489
2797
|
*/
|
|
2490
2798
|
function formatTraceParent(value: ITraceParent): string;
|
|
2491
2799
|
|
|
2800
|
+
/**
|
|
2801
|
+
* Identifies the full version for the extended SDK (legacy constant)
|
|
2802
|
+
* @deprecated Use {@link ExtFullVersionString} instead
|
|
2803
|
+
*/
|
|
2804
|
+
const FullVersionString: string;
|
|
2805
|
+
|
|
2492
2806
|
/**
|
|
2493
2807
|
* generate W3C trace id
|
|
2494
2808
|
*/
|
|
@@ -2500,11 +2814,23 @@ declare namespace ApplicationInsights {
|
|
|
2500
2814
|
*/
|
|
2501
2815
|
function _getAllResponseHeaders(xhr: XMLHttpRequest, isOneDs?: boolean): {};
|
|
2502
2816
|
|
|
2817
|
+
function getCommonSchemaMetaData(value: string | boolean | number | string[] | number[] | boolean[] | undefined, kind: number | undefined, type?: number | undefined): number;
|
|
2818
|
+
|
|
2503
2819
|
/**
|
|
2504
2820
|
* Returns the global console object
|
|
2505
2821
|
*/
|
|
2506
2822
|
function getConsole(): Console | null;
|
|
2507
2823
|
|
|
2824
|
+
/**
|
|
2825
|
+
* Helper to get and decode the cookie value using decodeURIComponent, this is for historical
|
|
2826
|
+
* backward compatibility where the document.cookie value was decoded before parsing.
|
|
2827
|
+
* @param cookieMgr - The cookie manager to use
|
|
2828
|
+
* @param name - The name of the cookie to get
|
|
2829
|
+
* @param decode - A flag to indicate whether the cookie value should be decoded
|
|
2830
|
+
* @returns The decoded cookie value (if available) otherwise an empty string.
|
|
2831
|
+
*/
|
|
2832
|
+
function getCookieValue(cookieMgr: ICookieMgr, name: string, decode?: boolean): string;
|
|
2833
|
+
|
|
2508
2834
|
/**
|
|
2509
2835
|
* Returns the crypto object if it is present otherwise null.
|
|
2510
2836
|
* This helper is used to access the crypto object from the current
|
|
@@ -2541,6 +2867,12 @@ declare namespace ApplicationInsights {
|
|
|
2541
2867
|
|
|
2542
2868
|
function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null;
|
|
2543
2869
|
|
|
2870
|
+
/**
|
|
2871
|
+
* Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value
|
|
2872
|
+
* @param value - The value to determine the type
|
|
2873
|
+
*/
|
|
2874
|
+
function getFieldValueType(value: any): FieldValueSanitizerType;
|
|
2875
|
+
|
|
2544
2876
|
/**
|
|
2545
2877
|
* Get the current global performance manager that will be used with no performance manager is supplied.
|
|
2546
2878
|
* @returns - The current default manager
|
|
@@ -2690,6 +3022,15 @@ declare namespace ApplicationInsights {
|
|
|
2690
3022
|
*/
|
|
2691
3023
|
function getSyntheticType(container: IAttributeContainer): OTelAttributeValue;
|
|
2692
3024
|
|
|
3025
|
+
/**
|
|
3026
|
+
* Gets the tenant id from the tenant token.
|
|
3027
|
+
* @param apiKey - The token from which the tenant id is to be extracted.
|
|
3028
|
+
* @returns The tenant id.
|
|
3029
|
+
*/
|
|
3030
|
+
function getTenantId(apiKey: string | undefined): string;
|
|
3031
|
+
|
|
3032
|
+
let getTime: typeof perfNow;
|
|
3033
|
+
|
|
2693
3034
|
/**
|
|
2694
3035
|
* Get the URL from the attribute container
|
|
2695
3036
|
* @param container - The attribute container to extract the URL from
|
|
@@ -2707,6 +3048,13 @@ declare namespace ApplicationInsights {
|
|
|
2707
3048
|
*/
|
|
2708
3049
|
const getWindow: () => Window;
|
|
2709
3050
|
|
|
3051
|
+
const enum GuidStyle {
|
|
3052
|
+
Numeric = "N",
|
|
3053
|
+
Digits = "D",
|
|
3054
|
+
Braces = "B",
|
|
3055
|
+
Parentheses = "P"
|
|
3056
|
+
}
|
|
3057
|
+
|
|
2710
3058
|
/**
|
|
2711
3059
|
* Handle / report an error.
|
|
2712
3060
|
* When not provided the default is to generally throw an {@link OTelInvalidAttributeError}
|
|
@@ -4006,10 +4354,10 @@ declare namespace ApplicationInsights {
|
|
|
4006
4354
|
*/
|
|
4007
4355
|
expCfg?: IExceptionConfig;
|
|
4008
4356
|
/**
|
|
4009
|
-
* [Optional] A flag to enable or disable
|
|
4357
|
+
* [Optional] A flag to enable or disable redaction for query parameters and username/password.
|
|
4010
4358
|
* @defaultValue true
|
|
4011
4359
|
*/
|
|
4012
|
-
redactUrls?:
|
|
4360
|
+
redactUrls?: UrlRedactionOptions;
|
|
4013
4361
|
/**
|
|
4014
4362
|
* [Optional] Additional query parameters to redact beyond the default set.
|
|
4015
4363
|
* Use this to specify custom parameters that contain sensitive information.
|
|
@@ -5107,6 +5455,29 @@ declare namespace ApplicationInsights {
|
|
|
5107
5455
|
measurements: any;
|
|
5108
5456
|
}
|
|
5109
5457
|
|
|
5458
|
+
/**
|
|
5459
|
+
* An interface used to create an event property value along with tagging it as PII, or customer content.
|
|
5460
|
+
* <b>Caution:</b> Customer content and PII are mutually exclusive. You can use only one of them at a time.
|
|
5461
|
+
* If you use both, then the property will be considered invalid, and therefore won't be sent.
|
|
5462
|
+
*/
|
|
5463
|
+
interface IEventProperty {
|
|
5464
|
+
/**
|
|
5465
|
+
* The value for the property.
|
|
5466
|
+
*/
|
|
5467
|
+
value: string | number | boolean | string[] | number[] | boolean[];
|
|
5468
|
+
/**
|
|
5469
|
+
* [Optional] The value kind associated with property value. The constant enum ValueKind should be used to specify the
|
|
5470
|
+
* different kinds.
|
|
5471
|
+
*/
|
|
5472
|
+
kind?: number;
|
|
5473
|
+
/**
|
|
5474
|
+
* [Optional] The data type for the property. Valid values accepted by onecollector are
|
|
5475
|
+
* "string", "bool", "double", "int64", "datetime", "guid".
|
|
5476
|
+
* The EventPropertyType constant enum should be used to specify the different property type values.
|
|
5477
|
+
*/
|
|
5478
|
+
propertyType?: number;
|
|
5479
|
+
}
|
|
5480
|
+
|
|
5110
5481
|
interface IEventTelemetry extends IPartC {
|
|
5111
5482
|
/**
|
|
5112
5483
|
* @description An event name string
|
|
@@ -5118,6 +5489,46 @@ declare namespace ApplicationInsights {
|
|
|
5118
5489
|
iKey?: string;
|
|
5119
5490
|
}
|
|
5120
5491
|
|
|
5492
|
+
/**
|
|
5493
|
+
* An interface used for telemetry event timings.
|
|
5494
|
+
*/
|
|
5495
|
+
interface IEventTiming {
|
|
5496
|
+
/**
|
|
5497
|
+
* Time when 1DS Core calls track
|
|
5498
|
+
*/
|
|
5499
|
+
trackStart?: number;
|
|
5500
|
+
/**
|
|
5501
|
+
* Array of times when each plugin configured in 1DS calls processTelemetry method
|
|
5502
|
+
*/
|
|
5503
|
+
processTelemetryStart?: {
|
|
5504
|
+
[key: string]: number;
|
|
5505
|
+
};
|
|
5506
|
+
/**
|
|
5507
|
+
* Array of times when a specific channel tried to send the telemetry to configured endpoint
|
|
5508
|
+
*/
|
|
5509
|
+
sendEventStart?: {
|
|
5510
|
+
[key: string]: number;
|
|
5511
|
+
};
|
|
5512
|
+
/**
|
|
5513
|
+
* Array of times when a specific channel received a response from endpoint or request timed out
|
|
5514
|
+
*/
|
|
5515
|
+
sendEventCompleted?: {
|
|
5516
|
+
[key: string]: number;
|
|
5517
|
+
};
|
|
5518
|
+
/**
|
|
5519
|
+
* Array of times when a specific channel started serialization of the telemetry event
|
|
5520
|
+
*/
|
|
5521
|
+
serializationStart?: {
|
|
5522
|
+
[key: string]: number;
|
|
5523
|
+
};
|
|
5524
|
+
/**
|
|
5525
|
+
* Array of times when a specific channel completed serialization of the telemetry event
|
|
5526
|
+
*/
|
|
5527
|
+
serializationCompleted?: {
|
|
5528
|
+
[key: string]: number;
|
|
5529
|
+
};
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5121
5532
|
/**
|
|
5122
5533
|
* Configuration for extra exceptions information sent with the exception telemetry.
|
|
5123
5534
|
* @example
|
|
@@ -5282,6 +5693,83 @@ declare namespace ApplicationInsights {
|
|
|
5282
5693
|
severityLevel?: SeverityLevel | number;
|
|
5283
5694
|
}
|
|
5284
5695
|
|
|
5696
|
+
/**
|
|
5697
|
+
* The IExtendedConfiguration interface holds the configuration details passed to core during initialize.
|
|
5698
|
+
*/
|
|
5699
|
+
interface IExtendedConfiguration extends IConfiguration {
|
|
5700
|
+
/**
|
|
5701
|
+
* [Optional] The property storage override that should be used to store
|
|
5702
|
+
* internal SDK properties, otherwise stored as cookies. It is needed where cookies are not available.
|
|
5703
|
+
*/
|
|
5704
|
+
propertyStorageOverride?: IPropertyStorageOverride;
|
|
5705
|
+
/**
|
|
5706
|
+
* [Optional] A boolean that indicated whether to disable the use of cookies by the 1DS Web SDK. The cookies added by the SDK are
|
|
5707
|
+
* MicrosoftApplicationsTelemetryDeviceId. If cookies are disabled, then session events are not sent unless propertyStorageOverride
|
|
5708
|
+
* is provided to store the values elsewhere.
|
|
5709
|
+
*/
|
|
5710
|
+
disableCookiesUsage?: boolean;
|
|
5711
|
+
/**
|
|
5712
|
+
* [Optional] Name of the Anon cookie. The value will be set in the qsp header to collector requests. Collector will use this value to look for specific cookie to use for anid property.
|
|
5713
|
+
*/
|
|
5714
|
+
anonCookieName?: string;
|
|
5715
|
+
/**
|
|
5716
|
+
* [Optional] Disables additional internal event timings that are added during processing of events, the timings are not sent as part telemetry items to the server
|
|
5717
|
+
*/
|
|
5718
|
+
disableEventTimings?: boolean;
|
|
5719
|
+
/**
|
|
5720
|
+
* [Optional] Enables support for objects with compound keys which indirectly represent an object where the "key" of the object contains a "." as part of it's name.
|
|
5721
|
+
* @example
|
|
5722
|
+
* ```typescript
|
|
5723
|
+
* event: { "somedata.embeddedvalue": 123 }
|
|
5724
|
+
* ```
|
|
5725
|
+
*/
|
|
5726
|
+
enableCompoundKey?: boolean;
|
|
5727
|
+
/**
|
|
5728
|
+
* Add "&w=0" parameter to support UA Parsing when web-workers don't have access to Document.
|
|
5729
|
+
* Default is false
|
|
5730
|
+
*/
|
|
5731
|
+
enableWParam?: boolean;
|
|
5732
|
+
}
|
|
5733
|
+
|
|
5734
|
+
/**
|
|
5735
|
+
* An interface used to create an event, along with its name, properties, type, timestamp, and priority.
|
|
5736
|
+
*/
|
|
5737
|
+
interface IExtendedTelemetryItem extends ITelemetryItem {
|
|
5738
|
+
/**
|
|
5739
|
+
* Properties to be captured about the telemetry item.
|
|
5740
|
+
* Custom properties (alternatively referred to as Part C properties for a Common Schema event) can be
|
|
5741
|
+
* directly added under data.
|
|
5742
|
+
*/
|
|
5743
|
+
data?: {
|
|
5744
|
+
[key: string]: any;
|
|
5745
|
+
};
|
|
5746
|
+
/**
|
|
5747
|
+
* Telemetry properties pertaining to domain about which data is being captured. Example, duration, referrerUri for browser page.
|
|
5748
|
+
* These are alternatively referred to as Part B properties for a Common Schema event.
|
|
5749
|
+
*/
|
|
5750
|
+
baseData?: {
|
|
5751
|
+
[key: string]: any;
|
|
5752
|
+
};
|
|
5753
|
+
/**
|
|
5754
|
+
* An EventLatency value, that specifies the latency for the event.The EventLatency constant should be
|
|
5755
|
+
* used to specify the different latency values.
|
|
5756
|
+
*/
|
|
5757
|
+
latency?: number | EventLatencyValue;
|
|
5758
|
+
/**
|
|
5759
|
+
* [Optional] An EventPersistence value, that specifies the persistence for the event. The EventPersistence constant
|
|
5760
|
+
* should be used to specify the different persistence values.
|
|
5761
|
+
*/
|
|
5762
|
+
persistence?: number | EventPersistenceValue;
|
|
5763
|
+
/**
|
|
5764
|
+
* [Optional] A boolean that specifies whether the event should be sent as a sync request.
|
|
5765
|
+
*/
|
|
5766
|
+
sync?: boolean | EventSendType;
|
|
5767
|
+
/**
|
|
5768
|
+
* [Optional] A timings object.
|
|
5769
|
+
*/
|
|
5770
|
+
timings?: IEventTiming;
|
|
5771
|
+
}
|
|
5772
|
+
|
|
5285
5773
|
interface IFeatureOptIn {
|
|
5286
5774
|
[feature: string]: IFeatureOptInDetails;
|
|
5287
5775
|
}
|
|
@@ -5317,6 +5805,57 @@ declare namespace ApplicationInsights {
|
|
|
5317
5805
|
blockCdnCfg?: boolean;
|
|
5318
5806
|
}
|
|
5319
5807
|
|
|
5808
|
+
/**
|
|
5809
|
+
* This interface defines the object that is passed to any provided FieldValueSanitizerFunc, it provides not only the value to be sanitized but also
|
|
5810
|
+
* some context about the value like it's location within the envelope (serialized object), the format is defined via the
|
|
5811
|
+
* [Common Schema 4.0](https://aka.ms/CommonSchema) specification.
|
|
5812
|
+
*/
|
|
5813
|
+
interface IFieldSanitizerDetails {
|
|
5814
|
+
/**
|
|
5815
|
+
* The path within the event where the value is stored
|
|
5816
|
+
*/
|
|
5817
|
+
path: string;
|
|
5818
|
+
/**
|
|
5819
|
+
* The name of the field with the event path that will store the value
|
|
5820
|
+
*/
|
|
5821
|
+
name: string;
|
|
5822
|
+
/**
|
|
5823
|
+
* Identifies the type of the property value
|
|
5824
|
+
*/
|
|
5825
|
+
type: FieldValueSanitizerType;
|
|
5826
|
+
/**
|
|
5827
|
+
* The value for the property.
|
|
5828
|
+
*/
|
|
5829
|
+
prop: IEventProperty;
|
|
5830
|
+
/**
|
|
5831
|
+
* A reference to the value sanitizer that created the details
|
|
5832
|
+
*/
|
|
5833
|
+
sanitizer: IValueSanitizer;
|
|
5834
|
+
}
|
|
5835
|
+
|
|
5836
|
+
/**
|
|
5837
|
+
* This interface is used during the serialization of individual fields when converting the events into envelope (serialized object) which is sent to the services,
|
|
5838
|
+
* the format is defined via the [Common Schema 4.0](https://aka.ms/CommonSchema) specification. The path and field names used are based
|
|
5839
|
+
* on how the data is serialized to the service (CS 4.0 location) and not specifically the location on the event object you pass into the track methods (unless they are the same).
|
|
5840
|
+
*/
|
|
5841
|
+
interface IFieldValueSanitizerProvider {
|
|
5842
|
+
/**
|
|
5843
|
+
* Does this field value sanitizer handle this path / field combination
|
|
5844
|
+
* @param path - The field path
|
|
5845
|
+
* @param name - The name of the field
|
|
5846
|
+
*/
|
|
5847
|
+
handleField(path: string, name: string): boolean;
|
|
5848
|
+
/**
|
|
5849
|
+
* Get the field sanitizer for this type of field based on the field type, value kind and/or event property type
|
|
5850
|
+
* @param path - The field path
|
|
5851
|
+
* @param name - The name of the field
|
|
5852
|
+
* @param theType - The type of field
|
|
5853
|
+
* @param theKind - The value kind of the field
|
|
5854
|
+
* @param propType - The property type of the field
|
|
5855
|
+
*/
|
|
5856
|
+
getSanitizer(path: string, name: string, theType: FieldValueSanitizerType, theKind?: number, propType?: number): FieldValueSanitizerFunc | null | undefined;
|
|
5857
|
+
}
|
|
5858
|
+
|
|
5320
5859
|
interface IInstrumentCallDetails {
|
|
5321
5860
|
name: string;
|
|
5322
5861
|
inst: any;
|
|
@@ -7524,6 +8063,26 @@ declare namespace ApplicationInsights {
|
|
|
7524
8063
|
readonly context: ITelemetryContext;
|
|
7525
8064
|
}
|
|
7526
8065
|
|
|
8066
|
+
/**
|
|
8067
|
+
* The IPropertyStorageOverride interface provides a custom interface for storing internal SDK properties - otherwise they are
|
|
8068
|
+
* stored as cookies.
|
|
8069
|
+
* You need this interface when you intend to run auto collection for common properties, or when you log a session in
|
|
8070
|
+
* a non browser environment.
|
|
8071
|
+
*/
|
|
8072
|
+
interface IPropertyStorageOverride {
|
|
8073
|
+
/**
|
|
8074
|
+
* A function for passing key value pairs to be stored.
|
|
8075
|
+
* @param key - The key for the key value pair.
|
|
8076
|
+
* @param value - The value for the key value pair.
|
|
8077
|
+
*/
|
|
8078
|
+
setProperty: (key: string, value: string) => void;
|
|
8079
|
+
/**
|
|
8080
|
+
* A function that gets a value for a given key.
|
|
8081
|
+
* @param key - The key for which the value must be fetched.
|
|
8082
|
+
*/
|
|
8083
|
+
getProperty: (key: string) => string;
|
|
8084
|
+
}
|
|
8085
|
+
|
|
7527
8086
|
/**
|
|
7528
8087
|
* Provides an OpenTelemetry compatible Interface for the Open Telemetry Sdk-Trace-Base (1.8.0 and 2.0.0) ReadableSpan type.
|
|
7529
8088
|
*
|
|
@@ -7733,6 +8292,8 @@ declare namespace ApplicationInsights {
|
|
|
7733
8292
|
*/
|
|
7734
8293
|
const isArray: <T = any>(arg: any) => arg is Array<T>;
|
|
7735
8294
|
|
|
8295
|
+
function isArrayValid(value: any[]): boolean;
|
|
8296
|
+
|
|
7736
8297
|
/**
|
|
7737
8298
|
* Helper function to identify if a passed argument is or implements the IAttributeContainer interface
|
|
7738
8299
|
* @param value - The value to check
|
|
@@ -7790,6 +8351,11 @@ declare namespace ApplicationInsights {
|
|
|
7790
8351
|
*/
|
|
7791
8352
|
const isBoolean: (value: any) => value is boolean;
|
|
7792
8353
|
|
|
8354
|
+
/**
|
|
8355
|
+
* Helper to identify whether we are running in a chromium based browser environment
|
|
8356
|
+
*/
|
|
8357
|
+
function isChromium(): boolean;
|
|
8358
|
+
|
|
7793
8359
|
function isCrossOriginError(message: string | Event, url: string, lineNumber: number, columnNumber: number, error: Error | Event): boolean;
|
|
7794
8360
|
|
|
7795
8361
|
/**
|
|
@@ -7813,6 +8379,11 @@ declare namespace ApplicationInsights {
|
|
|
7813
8379
|
|
|
7814
8380
|
function isDistributedTraceContext(obj: any): obj is IDistributedTraceContext;
|
|
7815
8381
|
|
|
8382
|
+
/**
|
|
8383
|
+
* Checks if document object is available
|
|
8384
|
+
*/
|
|
8385
|
+
const isDocumentObjectAvailable: boolean;
|
|
8386
|
+
|
|
7816
8387
|
/**
|
|
7817
8388
|
* internal interface
|
|
7818
8389
|
* Define functions when xhr/xdr/fetch requests are successfully returned. If they are not defined, oncomplete with be called instead
|
|
@@ -8040,6 +8611,13 @@ declare namespace ApplicationInsights {
|
|
|
8040
8611
|
*/
|
|
8041
8612
|
const isFunction: (value: any) => value is Function;
|
|
8042
8613
|
|
|
8614
|
+
/**
|
|
8615
|
+
* Check to see if the value is \> 0
|
|
8616
|
+
* @param value - The value to check
|
|
8617
|
+
* @returns true if \> 0 otherwise false
|
|
8618
|
+
*/
|
|
8619
|
+
function isGreaterThanZero(value: number): boolean;
|
|
8620
|
+
|
|
8043
8621
|
/**
|
|
8044
8622
|
* Identifies whether the current environment appears to be IE
|
|
8045
8623
|
*/
|
|
@@ -8047,6 +8625,13 @@ declare namespace ApplicationInsights {
|
|
|
8047
8625
|
|
|
8048
8626
|
function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
|
|
8049
8627
|
|
|
8628
|
+
/**
|
|
8629
|
+
* Checks if the value is a valid EventLatency.
|
|
8630
|
+
* @param value - The value that needs to be checked.
|
|
8631
|
+
* @returns True if the value is in AWTEventLatency, false otherwise.
|
|
8632
|
+
*/
|
|
8633
|
+
function isLatency(value: EventLatency | undefined): boolean;
|
|
8634
|
+
|
|
8050
8635
|
function isNotNullOrUndefined<T>(value: T): value is T;
|
|
8051
8636
|
|
|
8052
8637
|
/**
|
|
@@ -8329,6 +8914,13 @@ declare namespace ApplicationInsights {
|
|
|
8329
8914
|
*/
|
|
8330
8915
|
function isTypeof(value: any, theType: string): boolean;
|
|
8331
8916
|
|
|
8917
|
+
/**
|
|
8918
|
+
* Checks if Uint8Array are available in the current environment. Safari and Firefox along with
|
|
8919
|
+
* ReactNative are known to not support Uint8Array properly.
|
|
8920
|
+
* @returns True if available, false otherwise.
|
|
8921
|
+
*/
|
|
8922
|
+
function isUint8ArrayAvailable(): boolean;
|
|
8923
|
+
|
|
8332
8924
|
/**
|
|
8333
8925
|
* Checks if the provided value is undefined or contains the string value "undefined",
|
|
8334
8926
|
* if you want to consider the string value as undefined see {@link isStrictUndefined}
|
|
@@ -8405,6 +8997,15 @@ declare namespace ApplicationInsights {
|
|
|
8405
8997
|
*/
|
|
8406
8998
|
function isValidTraceParent(value: ITraceParent): boolean;
|
|
8407
8999
|
|
|
9000
|
+
/**
|
|
9001
|
+
* Checks if value is assigned to the given param.
|
|
9002
|
+
* @param value - The token from which the tenant id is to be extracted.
|
|
9003
|
+
* @returns True/false denoting if value is assigned to the param.
|
|
9004
|
+
*/
|
|
9005
|
+
function isValueAssigned(value: any): boolean;
|
|
9006
|
+
|
|
9007
|
+
function isValueKind(value: number | undefined): boolean;
|
|
9008
|
+
|
|
8408
9009
|
/**
|
|
8409
9010
|
* Identifies if the provided value looks like a distributed trace state instance
|
|
8410
9011
|
* @param value - The value to check
|
|
@@ -8412,6 +9013,11 @@ declare namespace ApplicationInsights {
|
|
|
8412
9013
|
*/
|
|
8413
9014
|
function isW3cTraceState(value: any): value is IW3cTraceState;
|
|
8414
9015
|
|
|
9016
|
+
/**
|
|
9017
|
+
* Checks if window object is available
|
|
9018
|
+
*/
|
|
9019
|
+
const isWindowObjectAvailable: boolean;
|
|
9020
|
+
|
|
8415
9021
|
/**
|
|
8416
9022
|
* Checks if XMLHttpRequest is supported
|
|
8417
9023
|
* @returns True if supported, otherwise false
|
|
@@ -8590,24 +9196,92 @@ declare namespace ApplicationInsights {
|
|
|
8590
9196
|
|
|
8591
9197
|
/**
|
|
8592
9198
|
* Interface for telemetry trace context.
|
|
8593
|
-
* @deprecated Use
|
|
8594
|
-
*
|
|
9199
|
+
* @deprecated Use {@link ITraceHost.getTraceCtx | appInsights.getTraceCtx()} or {@link ITraceHost.getTraceCtx | appInsights.core.getTraceCtx()} instead to get / set the
|
|
9200
|
+
* current trace context. This returns an {@link IDistributedTraceContext} which supports distributed tracing and
|
|
9201
|
+
* allows the core to manage the trace context.
|
|
9202
|
+
*
|
|
9203
|
+
* To replace the entire trace context, use {@link ITraceHost.setTraceCtx | appInsights.core.setTraceCtx()}.
|
|
9204
|
+
*
|
|
9205
|
+
* @see {@link https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-core-js/interfaces/IDistributedTraceContext.html | IDistributedTraceContext Typedoc}
|
|
9206
|
+
* @see {@link https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-core-js/interfaces/ITraceHost.html#getTraceCtx | getTraceCtx Typedoc}
|
|
8595
9207
|
*/
|
|
8596
9208
|
interface ITelemetryTrace {
|
|
8597
9209
|
/**
|
|
8598
|
-
*
|
|
9210
|
+
* The trace ID for this telemetry context. A 32 lowercase hex character string.
|
|
9211
|
+
* @deprecated Use {@link IDistributedTraceContext.traceId} instead via `appInsights.getTraceCtx().traceId`.
|
|
9212
|
+
*
|
|
9213
|
+
* @example
|
|
9214
|
+
* ```typescript
|
|
9215
|
+
* // Old (deprecated)
|
|
9216
|
+
* let traceId = context.telemetryTrace.traceID;
|
|
9217
|
+
*
|
|
9218
|
+
* // New (recommended) - using the standard SKU (AISKU)
|
|
9219
|
+
* let traceCtx = appInsights.getTraceCtx();
|
|
9220
|
+
* let traceId = traceCtx.traceId;
|
|
9221
|
+
* traceCtx.traceId = "00000000000000000000000000000001";
|
|
9222
|
+
*
|
|
9223
|
+
* // Or when using the core directly
|
|
9224
|
+
* let traceCtx = appInsights.core.getTraceCtx();
|
|
9225
|
+
* ```
|
|
8599
9226
|
*/
|
|
8600
9227
|
traceID?: string;
|
|
8601
9228
|
/**
|
|
8602
|
-
*
|
|
9229
|
+
* The parent span ID. A 16 lowercase hex character string.
|
|
9230
|
+
* @deprecated Use {@link IDistributedTraceContext.spanId} instead via `appInsights.getTraceCtx().spanId`.
|
|
9231
|
+
*
|
|
9232
|
+
* @example
|
|
9233
|
+
* ```typescript
|
|
9234
|
+
* // Old (deprecated)
|
|
9235
|
+
* let parentId = context.telemetryTrace.parentID;
|
|
9236
|
+
*
|
|
9237
|
+
* // New (recommended) - using the standard SKU (AISKU)
|
|
9238
|
+
* let traceCtx = appInsights.getTraceCtx();
|
|
9239
|
+
* let spanId = traceCtx.spanId;
|
|
9240
|
+
* traceCtx.spanId = "0000000000000001";
|
|
9241
|
+
*
|
|
9242
|
+
* // Or when using the core directly
|
|
9243
|
+
* let traceCtx = appInsights.core.getTraceCtx();
|
|
9244
|
+
* ```
|
|
8603
9245
|
*/
|
|
8604
9246
|
parentID?: string;
|
|
8605
9247
|
/**
|
|
8606
|
-
* An integer representation of the W3C TraceContext trace-flags.
|
|
9248
|
+
* An integer representation of the W3C TraceContext trace-flags.
|
|
9249
|
+
* @deprecated Use {@link IDistributedTraceContext.traceFlags} instead via `appInsights.getTraceCtx().traceFlags`.
|
|
9250
|
+
*
|
|
9251
|
+
* @example
|
|
9252
|
+
* ```typescript
|
|
9253
|
+
* // Old (deprecated)
|
|
9254
|
+
* let flags = context.telemetryTrace.traceFlags;
|
|
9255
|
+
*
|
|
9256
|
+
* // New (recommended) - using the standard SKU (AISKU)
|
|
9257
|
+
* let traceCtx = appInsights.getTraceCtx();
|
|
9258
|
+
* let flags = traceCtx.traceFlags;
|
|
9259
|
+
* traceCtx.traceFlags = 1; // sampled
|
|
9260
|
+
*
|
|
9261
|
+
* // Or when using the core directly
|
|
9262
|
+
* let traceCtx = appInsights.core.getTraceCtx();
|
|
9263
|
+
* ```
|
|
9264
|
+
*
|
|
9265
|
+
* @see {@link https://www.w3.org/TR/trace-context/#trace-flags | W3C TraceContext trace-flags}
|
|
8607
9266
|
*/
|
|
8608
9267
|
traceFlags?: number;
|
|
8609
9268
|
/**
|
|
8610
|
-
*
|
|
9269
|
+
* The operation/page name for this trace context.
|
|
9270
|
+
* @deprecated Use {@link IDistributedTraceContext.pageName} instead via `appInsights.getTraceCtx().pageName`.
|
|
9271
|
+
*
|
|
9272
|
+
* @example
|
|
9273
|
+
* ```typescript
|
|
9274
|
+
* // Old (deprecated)
|
|
9275
|
+
* let name = context.telemetryTrace.name;
|
|
9276
|
+
*
|
|
9277
|
+
* // New (recommended) - using the standard SKU (AISKU)
|
|
9278
|
+
* let traceCtx = appInsights.getTraceCtx();
|
|
9279
|
+
* let pageName = traceCtx.pageName;
|
|
9280
|
+
* traceCtx.pageName = "my-page";
|
|
9281
|
+
*
|
|
9282
|
+
* // Or when using the core directly
|
|
9283
|
+
* let traceCtx = appInsights.core.getTraceCtx();
|
|
9284
|
+
* ```
|
|
8611
9285
|
*/
|
|
8612
9286
|
name?: string;
|
|
8613
9287
|
}
|
|
@@ -9192,6 +9866,56 @@ declare namespace ApplicationInsights {
|
|
|
9192
9866
|
update(userId?: string): void;
|
|
9193
9867
|
}
|
|
9194
9868
|
|
|
9869
|
+
/**
|
|
9870
|
+
* This interface is used during the serialization of events into envelope (serialized object) which is sent to the services, the format is defined via the
|
|
9871
|
+
* [Common Schema 4.0](https://aka.ms/CommonSchema) specification. The path and field names used are based on how the data is serialized
|
|
9872
|
+
* to the service (CS 4.0 location) and not specifically the location on the event object you pass into the track methods (unless they are the same).
|
|
9873
|
+
*/
|
|
9874
|
+
interface IValueSanitizer {
|
|
9875
|
+
/**
|
|
9876
|
+
* Add a value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name.
|
|
9877
|
+
*/
|
|
9878
|
+
addSanitizer: (sanitizer: IValueSanitizer) => void;
|
|
9879
|
+
/**
|
|
9880
|
+
* Adds a field sanitizer to the evaluation list
|
|
9881
|
+
*/
|
|
9882
|
+
addFieldSanitizer: (fieldSanitizer: IFieldValueSanitizerProvider) => void;
|
|
9883
|
+
/**
|
|
9884
|
+
* Removes the value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name if present.
|
|
9885
|
+
*/
|
|
9886
|
+
rmSanitizer: (theSanitizer: IValueSanitizer) => void;
|
|
9887
|
+
/**
|
|
9888
|
+
* Removes the field sanitizer to the evaluation list if present
|
|
9889
|
+
*/
|
|
9890
|
+
rmFieldSanitizer: (theFieldSanitizer: IFieldValueSanitizerProvider) => void;
|
|
9891
|
+
/**
|
|
9892
|
+
* Does this field value sanitizer handle this path / field combination
|
|
9893
|
+
* @param path - The field path
|
|
9894
|
+
* @param name - The name of the field
|
|
9895
|
+
*/
|
|
9896
|
+
handleField: (path: string, name: string) => boolean;
|
|
9897
|
+
/**
|
|
9898
|
+
* Sanitizes the value. It checks the that the property name and value are valid. It also
|
|
9899
|
+
* checks/populates the correct type and pii of the property value.
|
|
9900
|
+
* @param path - The root path of the property
|
|
9901
|
+
* @param name - The property name.
|
|
9902
|
+
* @param value - The property value or an IEventProperty containing value, type ,pii and customer content.
|
|
9903
|
+
* @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
|
|
9904
|
+
* @returns IEventProperty containing valid name, value, pii and type or null if invalid.
|
|
9905
|
+
*/
|
|
9906
|
+
value: (path: string, name: string, value: FieldValueSanitizerTypes, stringifyObjects?: boolean) => IEventProperty | null;
|
|
9907
|
+
/**
|
|
9908
|
+
* Sanitizes the Property. It checks the that the property name and value are valid. It also
|
|
9909
|
+
* checks/populates the correct type and pii of the property value.
|
|
9910
|
+
* @param path - The root path of the property
|
|
9911
|
+
* @param name - The property name.
|
|
9912
|
+
* @param property - The property value or an IEventProperty containing value, type ,pii and customer content.
|
|
9913
|
+
* @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
|
|
9914
|
+
* @returns IEventProperty containing valid name, value, pii and type or null if invalid.
|
|
9915
|
+
*/
|
|
9916
|
+
property: (path: string, name: string, property: IEventProperty, stringifyObjects?: boolean) => IEventProperty | null;
|
|
9917
|
+
}
|
|
9918
|
+
|
|
9195
9919
|
/**
|
|
9196
9920
|
* Represents a mutable [W3C trace state list](https://www.w3.org/TR/trace-context/#tracestate-header), this is a
|
|
9197
9921
|
* list of key/value pairs that are used to pass trace state information between different tracing systems. The
|
|
@@ -10433,6 +11157,16 @@ declare namespace ApplicationInsights {
|
|
|
10433
11157
|
*/
|
|
10434
11158
|
function sanitizeAttributes(otelApi: IOTelApi, attributes: unknown): IOTelAttributes;
|
|
10435
11159
|
|
|
11160
|
+
/**
|
|
11161
|
+
* Sanitizes the Property. It checks the that the property name and value are valid. It also
|
|
11162
|
+
* checks/populates the correct type and pii of the property value.
|
|
11163
|
+
* @param name - property name - The property name.
|
|
11164
|
+
* @param property - The property value or an IEventProperty containing value,
|
|
11165
|
+
* type ,pii and customer content.
|
|
11166
|
+
* @returns IEventProperty containing valid name, value, pii and type or null if invalid.
|
|
11167
|
+
*/
|
|
11168
|
+
function sanitizeProperty(name: string, property: string | number | boolean | string[] | number[] | boolean[] | object | IEventProperty, stringifyObjects?: boolean): IEventProperty | null;
|
|
11169
|
+
|
|
10436
11170
|
interface scriptsInfo {
|
|
10437
11171
|
url: string;
|
|
10438
11172
|
crossOrigin?: string;
|
|
@@ -10613,6 +11347,8 @@ declare namespace ApplicationInsights {
|
|
|
10613
11347
|
*/
|
|
10614
11348
|
function setObjStringTag<T>(target: T, nameOrFunc: string | (() => string)): T;
|
|
10615
11349
|
|
|
11350
|
+
function setProcessTelemetryTimings(event: ITelemetryItem, identifier: string): void;
|
|
11351
|
+
|
|
10616
11352
|
/**
|
|
10617
11353
|
* Introduce an intermediate prototype to the target object and that sets the toStringTag on that prototype,
|
|
10618
11354
|
* this avoids directly modifying the target object and also allows multiple different "types" to be
|
|
@@ -10942,6 +11678,15 @@ declare namespace ApplicationInsights {
|
|
|
10942
11678
|
|
|
10943
11679
|
const TraceEnvelopeType: string;
|
|
10944
11680
|
|
|
11681
|
+
const TraceLevel: EnumValue<typeof eTraceLevel>;
|
|
11682
|
+
|
|
11683
|
+
type TraceLevel = number | eTraceLevel;
|
|
11684
|
+
|
|
11685
|
+
/**
|
|
11686
|
+
* An enumeration that identifies the transport type that are requested to be used, if the requested
|
|
11687
|
+
* transport is not available ir supported the SDK may choose the first available transport or it
|
|
11688
|
+
* will log a warning to the diagnostic logger.
|
|
11689
|
+
*/
|
|
10945
11690
|
const enum TransportType {
|
|
10946
11691
|
/**
|
|
10947
11692
|
* Use the default available api
|
|
@@ -10999,6 +11744,10 @@ declare namespace ApplicationInsights {
|
|
|
10999
11744
|
|
|
11000
11745
|
function urlParseUrl(url: string): HTMLAnchorElement;
|
|
11001
11746
|
|
|
11747
|
+
const UrlRedactionOptions: EnumValue<typeof eUrlRedactionOptions>;
|
|
11748
|
+
|
|
11749
|
+
type UrlRedactionOptions = boolean | eUrlRedactionOptions;
|
|
11750
|
+
|
|
11002
11751
|
/**
|
|
11003
11752
|
* Execute the callback `fn` function with the passed span as the active span. The callback receives
|
|
11004
11753
|
* an ISpanScope object as its first parameter and the `this` context (when no thisArg is provided).
|
|
@@ -11061,6 +11810,76 @@ declare namespace ApplicationInsights {
|
|
|
11061
11810
|
|
|
11062
11811
|
function utlSetStoragePrefix(storagePrefix: string): void;
|
|
11063
11812
|
|
|
11813
|
+
/**
|
|
11814
|
+
* The ValueKind contains a set of values that specify value kind of the property.
|
|
11815
|
+
* Either PII (Personal Identifiable Information) or customer content.
|
|
11816
|
+
*/
|
|
11817
|
+
const ValueKind: EnumValue<typeof eValueKind>;
|
|
11818
|
+
|
|
11819
|
+
type ValueKind = number | eValueKind;
|
|
11820
|
+
|
|
11821
|
+
class ValueSanitizer implements IValueSanitizer {
|
|
11822
|
+
static getFieldType: typeof getFieldValueType;
|
|
11823
|
+
/**
|
|
11824
|
+
* Clear the current value sanitizer cache.
|
|
11825
|
+
*/
|
|
11826
|
+
clearCache: () => void;
|
|
11827
|
+
/**
|
|
11828
|
+
* Add a value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name.
|
|
11829
|
+
*/
|
|
11830
|
+
addSanitizer: (sanitizer: IValueSanitizer) => void;
|
|
11831
|
+
/**
|
|
11832
|
+
* Adds a field sanitizer to the evaluation list
|
|
11833
|
+
*/
|
|
11834
|
+
addFieldSanitizer: (fieldSanitizer: IFieldValueSanitizerProvider) => void;
|
|
11835
|
+
/**
|
|
11836
|
+
* Removes the value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name if present.
|
|
11837
|
+
*/
|
|
11838
|
+
rmSanitizer: (theSanitizer: IValueSanitizer) => void;
|
|
11839
|
+
/**
|
|
11840
|
+
* Removes the field sanitizer to the evaluation list if present
|
|
11841
|
+
*/
|
|
11842
|
+
rmFieldSanitizer: (theFieldSanitizer: IFieldValueSanitizerProvider) => void;
|
|
11843
|
+
/**
|
|
11844
|
+
* Does this field value sanitizer handle this path / field combination
|
|
11845
|
+
* @param path - The field path
|
|
11846
|
+
* @param name - The name of the field
|
|
11847
|
+
*/
|
|
11848
|
+
handleField: (path: string, name: string) => boolean;
|
|
11849
|
+
/**
|
|
11850
|
+
* Sanitizes the value. It checks the that the property name and value are valid. It also
|
|
11851
|
+
* checks/populates the correct type and pii of the property value.
|
|
11852
|
+
* @param path - The root path of the property
|
|
11853
|
+
* @param name - The property name.
|
|
11854
|
+
* @param value - The property value or an IEventProperty containing value, type ,pii and customer content.
|
|
11855
|
+
* @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
|
|
11856
|
+
* @returns IEventProperty containing valid name, value, pii and type or null if invalid.
|
|
11857
|
+
*/
|
|
11858
|
+
value: (path: string, name: string, value: FieldValueSanitizerTypes, stringifyObjects?: boolean) => IEventProperty | null;
|
|
11859
|
+
/**
|
|
11860
|
+
* Sanitizes the Property. It checks the that the property name and value are valid. It also
|
|
11861
|
+
* checks/populates the correct type and pii of the property value.
|
|
11862
|
+
* @param path - The root path of the property
|
|
11863
|
+
* @param name - The property name.
|
|
11864
|
+
* @param property - The property value or an IEventProperty containing value, type ,pii and customer content.
|
|
11865
|
+
* @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
|
|
11866
|
+
* @returns IEventProperty containing valid name, value, pii and type or null if invalid.
|
|
11867
|
+
*/
|
|
11868
|
+
property: (path: string, name: string, property: IEventProperty, stringifyObjects?: boolean) => IEventProperty | null;
|
|
11869
|
+
/**
|
|
11870
|
+
* Returns whether this ValueSanitizer is empty
|
|
11871
|
+
* @returns `true` if it contains no chained sanitizers or field sanitizers, otherwise `false`
|
|
11872
|
+
*/
|
|
11873
|
+
isEmpty?: () => boolean;
|
|
11874
|
+
constructor(fieldSanitizerProvider?: IFieldValueSanitizerProvider);
|
|
11875
|
+
}
|
|
11876
|
+
|
|
11877
|
+
/**
|
|
11878
|
+
* Identifies the version for the extended SDK (legacy constant)
|
|
11879
|
+
* @deprecated Use {@link ExtVersion} instead
|
|
11880
|
+
*/
|
|
11881
|
+
const Version = "4.4.1";
|
|
11882
|
+
|
|
11064
11883
|
/**
|
|
11065
11884
|
* This is a helper method which will call warnToConsole on the passed logger with the provided message.
|
|
11066
11885
|
* @param logger - The Diagnostic Logger instance to use.
|