@microsoft/applicationinsights-react-js 3.2.4 → 3.2.5-nightly.2203-02

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.
@@ -1157,14 +1157,23 @@
1157
1157
  },
1158
1158
  {
1159
1159
  "kind": "Content",
1160
- "text": ", componentName: string) => () => void"
1160
+ "text": ", componentName: string, customProperties?: "
1161
+ },
1162
+ {
1163
+ "kind": "Reference",
1164
+ "text": "ICustomProperties",
1165
+ "canonicalReference": "@microsoft/applicationinsights-core-js!ICustomProperties:interface"
1166
+ },
1167
+ {
1168
+ "kind": "Content",
1169
+ "text": ") => () => void"
1161
1170
  }
1162
1171
  ],
1163
1172
  "releaseTag": "Public",
1164
1173
  "name": "useTrackMetric",
1165
1174
  "variableTypeTokenRange": {
1166
1175
  "startIndex": 1,
1167
- "endIndex": 4
1176
+ "endIndex": 6
1168
1177
  }
1169
1178
  },
1170
1179
  {
@@ -88,7 +88,7 @@ export const useAppInsightsContext: () => ReactPlugin;
88
88
  export function useTrackEvent<T>(reactPlugin: ReactPlugin, eventName: string, eventData: T, skipFirstRun?: boolean): AIReactCustomEvent<T>;
89
89
 
90
90
  // @public (undocumented)
91
- export const useTrackMetric: (reactPlugin: ReactPlugin, componentName: string) => () => void;
91
+ export const useTrackMetric: (reactPlugin: ReactPlugin, componentName: string, customProperties?: ICustomProperties) => () => void;
92
92
 
93
93
  // @public
94
94
  export function withAITracking<P>(reactPlugin: ReactPlugin, Component: React_2.ComponentType<P>, componentName?: string, className?: string): React_2.ComponentClass<P>;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights react plugin, 3.2.4
2
+ * Microsoft Application Insights react plugin, 3.2.5-nightly.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  *
@@ -101,7 +101,7 @@ declare namespace ApplicationInsights {
101
101
 
102
102
  function useTrackEvent<T>(reactPlugin: ReactPlugin, eventName: string, eventData: T, skipFirstRun?: boolean): AIReactCustomEvent<T>;
103
103
 
104
- const useTrackMetric: (reactPlugin: ReactPlugin, componentName: string) => () => void;
104
+ const useTrackMetric: (reactPlugin: ReactPlugin, componentName: string, customProperties?: ICustomProperties) => () => void;
105
105
 
106
106
  /**
107
107
  * Higher-order component function to hook Application Insights tracking
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.2.4
2
+ * Application Insights JavaScript SDK - React Plugin, 3.2.5-nightly.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -2076,7 +2076,7 @@
2076
2076
  trackedData.idleCount * trackedData.idleTimeout) /
2077
2077
  1000);
2078
2078
  }
2079
- var useComponentTracking = function (reactPlugin, componentName) {
2079
+ var useComponentTracking = function (reactPlugin, componentName, customProperties) {
2080
2080
  var tracking = React.useRef({
2081
2081
  hookTimestamp: dateNow(),
2082
2082
  firstActiveTimestamp: 0,
@@ -2115,7 +2115,7 @@
2115
2115
  name: "React Component Engaged Time (seconds)",
2116
2116
  sampleCount: 1
2117
2117
  };
2118
- var additionalProperties = { "Component Name": componentName };
2118
+ var additionalProperties = __assignFn({ "Component Name": componentName }, customProperties);
2119
2119
  reactPlugin.trackMetric(metricData, additionalProperties);
2120
2120
  };
2121
2121
  }, []);