@azure/monitor-opentelemetry-exporter 1.0.0-beta.32 → 1.0.0-beta.33

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.
Files changed (180) hide show
  1. package/dist/commonjs/Declarations/Constants.d.ts +5 -0
  2. package/dist/commonjs/Declarations/Constants.d.ts.map +1 -1
  3. package/dist/commonjs/Declarations/Constants.js +6 -1
  4. package/dist/commonjs/Declarations/Constants.js.map +1 -1
  5. package/dist/commonjs/export/base.js +25 -14
  6. package/dist/commonjs/export/base.js.map +1 -1
  7. package/dist/commonjs/export/log.js +5 -4
  8. package/dist/commonjs/export/log.js.map +1 -1
  9. package/dist/commonjs/export/metric.js +5 -4
  10. package/dist/commonjs/export/metric.js.map +1 -1
  11. package/dist/commonjs/export/statsbeat/customerStatsbeat.d.ts +125 -0
  12. package/dist/commonjs/export/statsbeat/customerStatsbeat.d.ts.map +1 -0
  13. package/dist/commonjs/export/statsbeat/customerStatsbeat.js +480 -0
  14. package/dist/commonjs/export/statsbeat/customerStatsbeat.js.map +1 -0
  15. package/dist/commonjs/export/statsbeat/longIntervalStatsbeatMetrics.js +35 -11
  16. package/dist/commonjs/export/statsbeat/longIntervalStatsbeatMetrics.js.map +1 -1
  17. package/dist/commonjs/export/statsbeat/networkStatsbeatMetrics.js +52 -21
  18. package/dist/commonjs/export/statsbeat/networkStatsbeatMetrics.js.map +1 -1
  19. package/dist/commonjs/export/statsbeat/statsbeatExporter.d.ts +7 -0
  20. package/dist/commonjs/export/statsbeat/statsbeatExporter.d.ts.map +1 -1
  21. package/dist/commonjs/export/statsbeat/statsbeatExporter.js +25 -5
  22. package/dist/commonjs/export/statsbeat/statsbeatExporter.js.map +1 -1
  23. package/dist/commonjs/export/statsbeat/statsbeatMetrics.js +6 -8
  24. package/dist/commonjs/export/statsbeat/statsbeatMetrics.js.map +1 -1
  25. package/dist/commonjs/export/statsbeat/types.d.ts +52 -0
  26. package/dist/commonjs/export/statsbeat/types.d.ts.map +1 -1
  27. package/dist/commonjs/export/statsbeat/types.js +75 -1
  28. package/dist/commonjs/export/statsbeat/types.js.map +1 -1
  29. package/dist/commonjs/export/trace.js +6 -5
  30. package/dist/commonjs/export/trace.js.map +1 -1
  31. package/dist/commonjs/generated/applicationInsightsClient.js +9 -4
  32. package/dist/commonjs/generated/applicationInsightsClient.js.map +1 -1
  33. package/dist/commonjs/generated/models/mappers.js +145 -68
  34. package/dist/commonjs/generated/models/mappers.js.map +1 -1
  35. package/dist/commonjs/index.d.ts +2 -1
  36. package/dist/commonjs/index.d.ts.map +1 -1
  37. package/dist/commonjs/index.js +5 -3
  38. package/dist/commonjs/index.js.map +1 -1
  39. package/dist/commonjs/platform/nodejs/baseSender.d.ts +1 -0
  40. package/dist/commonjs/platform/nodejs/baseSender.d.ts.map +1 -1
  41. package/dist/commonjs/platform/nodejs/baseSender.js +74 -28
  42. package/dist/commonjs/platform/nodejs/baseSender.js.map +1 -1
  43. package/dist/commonjs/platform/nodejs/context/context.d.ts +0 -1
  44. package/dist/commonjs/platform/nodejs/context/context.d.ts.map +1 -1
  45. package/dist/commonjs/platform/nodejs/context/context.js +4 -8
  46. package/dist/commonjs/platform/nodejs/context/context.js.map +1 -1
  47. package/dist/commonjs/platform/nodejs/httpSender.js +11 -4
  48. package/dist/commonjs/platform/nodejs/httpSender.js.map +1 -1
  49. package/dist/commonjs/platform/nodejs/index.d.ts +1 -0
  50. package/dist/commonjs/platform/nodejs/index.d.ts.map +1 -1
  51. package/dist/commonjs/platform/nodejs/index.js +1 -0
  52. package/dist/commonjs/platform/nodejs/index.js.map +1 -1
  53. package/dist/commonjs/platform/nodejs/persist/fileAccessControl.js +7 -7
  54. package/dist/commonjs/platform/nodejs/persist/fileAccessControl.js.map +1 -1
  55. package/dist/commonjs/platform/nodejs/persist/fileSystemPersist.d.ts +9 -1
  56. package/dist/commonjs/platform/nodejs/persist/fileSystemPersist.d.ts.map +1 -1
  57. package/dist/commonjs/platform/nodejs/persist/fileSystemPersist.js +37 -16
  58. package/dist/commonjs/platform/nodejs/persist/fileSystemPersist.js.map +1 -1
  59. package/dist/commonjs/{sampling.d.ts → sampling/percentageSampler.d.ts} +2 -3
  60. package/dist/commonjs/sampling/percentageSampler.d.ts.map +1 -0
  61. package/dist/commonjs/{sampling.js → sampling/percentageSampler.js} +6 -39
  62. package/dist/commonjs/sampling/percentageSampler.js.map +1 -0
  63. package/dist/commonjs/sampling/rateLimitedSampler.d.ts +58 -0
  64. package/dist/commonjs/sampling/rateLimitedSampler.d.ts.map +1 -0
  65. package/dist/commonjs/sampling/rateLimitedSampler.js +118 -0
  66. package/dist/commonjs/sampling/rateLimitedSampler.js.map +1 -0
  67. package/dist/commonjs/sampling/samplingUtils.d.ts +17 -0
  68. package/dist/commonjs/sampling/samplingUtils.d.ts.map +1 -0
  69. package/dist/commonjs/sampling/samplingUtils.js +94 -0
  70. package/dist/commonjs/sampling/samplingUtils.js.map +1 -0
  71. package/dist/commonjs/tsdoc-metadata.json +11 -11
  72. package/dist/commonjs/utils/common.js +2 -3
  73. package/dist/commonjs/utils/common.js.map +1 -1
  74. package/dist/commonjs/utils/connectionStringParser.js +3 -3
  75. package/dist/commonjs/utils/connectionStringParser.js.map +1 -1
  76. package/dist/commonjs/utils/constants/applicationinsights.d.ts +1 -1
  77. package/dist/commonjs/utils/constants/applicationinsights.js +1 -1
  78. package/dist/commonjs/utils/constants/applicationinsights.js.map +1 -1
  79. package/dist/commonjs/utils/eventhub.js +5 -2
  80. package/dist/commonjs/utils/eventhub.js.map +1 -1
  81. package/dist/commonjs/utils/logUtils.js +10 -9
  82. package/dist/commonjs/utils/logUtils.js.map +1 -1
  83. package/dist/commonjs/utils/metricUtils.d.ts.map +1 -1
  84. package/dist/commonjs/utils/metricUtils.js +6 -6
  85. package/dist/commonjs/utils/metricUtils.js.map +1 -1
  86. package/dist/commonjs/utils/spanUtils.d.ts.map +1 -1
  87. package/dist/commonjs/utils/spanUtils.js +13 -11
  88. package/dist/commonjs/utils/spanUtils.js.map +1 -1
  89. package/dist/esm/Declarations/Constants.d.ts +5 -0
  90. package/dist/esm/Declarations/Constants.d.ts.map +1 -1
  91. package/dist/esm/Declarations/Constants.js +5 -0
  92. package/dist/esm/Declarations/Constants.js.map +1 -1
  93. package/dist/esm/export/base.js +25 -14
  94. package/dist/esm/export/base.js.map +1 -1
  95. package/dist/esm/export/log.js +5 -4
  96. package/dist/esm/export/log.js.map +1 -1
  97. package/dist/esm/export/metric.js +5 -4
  98. package/dist/esm/export/metric.js.map +1 -1
  99. package/dist/esm/export/statsbeat/customerStatsbeat.d.ts +125 -0
  100. package/dist/esm/export/statsbeat/customerStatsbeat.d.ts.map +1 -0
  101. package/dist/esm/export/statsbeat/customerStatsbeat.js +475 -0
  102. package/dist/esm/export/statsbeat/customerStatsbeat.js.map +1 -0
  103. package/dist/esm/export/statsbeat/longIntervalStatsbeatMetrics.js +35 -11
  104. package/dist/esm/export/statsbeat/longIntervalStatsbeatMetrics.js.map +1 -1
  105. package/dist/esm/export/statsbeat/networkStatsbeatMetrics.js +52 -21
  106. package/dist/esm/export/statsbeat/networkStatsbeatMetrics.js.map +1 -1
  107. package/dist/esm/export/statsbeat/statsbeatExporter.d.ts +7 -0
  108. package/dist/esm/export/statsbeat/statsbeatExporter.d.ts.map +1 -1
  109. package/dist/esm/export/statsbeat/statsbeatExporter.js +25 -5
  110. package/dist/esm/export/statsbeat/statsbeatExporter.js.map +1 -1
  111. package/dist/esm/export/statsbeat/statsbeatMetrics.js +6 -8
  112. package/dist/esm/export/statsbeat/statsbeatMetrics.js.map +1 -1
  113. package/dist/esm/export/statsbeat/types.d.ts +52 -0
  114. package/dist/esm/export/statsbeat/types.d.ts.map +1 -1
  115. package/dist/esm/export/statsbeat/types.js +73 -0
  116. package/dist/esm/export/statsbeat/types.js.map +1 -1
  117. package/dist/esm/export/trace.js +6 -5
  118. package/dist/esm/export/trace.js.map +1 -1
  119. package/dist/esm/generated/applicationInsightsClient.js +9 -4
  120. package/dist/esm/generated/applicationInsightsClient.js.map +1 -1
  121. package/dist/esm/generated/models/mappers.js +145 -68
  122. package/dist/esm/generated/models/mappers.js.map +1 -1
  123. package/dist/esm/index.d.ts +2 -1
  124. package/dist/esm/index.d.ts.map +1 -1
  125. package/dist/esm/index.js +2 -1
  126. package/dist/esm/index.js.map +1 -1
  127. package/dist/esm/platform/nodejs/baseSender.d.ts +1 -0
  128. package/dist/esm/platform/nodejs/baseSender.d.ts.map +1 -1
  129. package/dist/esm/platform/nodejs/baseSender.js +76 -30
  130. package/dist/esm/platform/nodejs/baseSender.js.map +1 -1
  131. package/dist/esm/platform/nodejs/context/context.d.ts +0 -1
  132. package/dist/esm/platform/nodejs/context/context.d.ts.map +1 -1
  133. package/dist/esm/platform/nodejs/context/context.js +4 -8
  134. package/dist/esm/platform/nodejs/context/context.js.map +1 -1
  135. package/dist/esm/platform/nodejs/httpSender.js +11 -4
  136. package/dist/esm/platform/nodejs/httpSender.js.map +1 -1
  137. package/dist/esm/platform/nodejs/index.d.ts +1 -0
  138. package/dist/esm/platform/nodejs/index.d.ts.map +1 -1
  139. package/dist/esm/platform/nodejs/index.js +1 -0
  140. package/dist/esm/platform/nodejs/index.js.map +1 -1
  141. package/dist/esm/platform/nodejs/persist/fileAccessControl.js +7 -7
  142. package/dist/esm/platform/nodejs/persist/fileAccessControl.js.map +1 -1
  143. package/dist/esm/platform/nodejs/persist/fileSystemPersist.d.ts +9 -1
  144. package/dist/esm/platform/nodejs/persist/fileSystemPersist.d.ts.map +1 -1
  145. package/dist/esm/platform/nodejs/persist/fileSystemPersist.js +37 -16
  146. package/dist/esm/platform/nodejs/persist/fileSystemPersist.js.map +1 -1
  147. package/dist/esm/{sampling.d.ts → sampling/percentageSampler.d.ts} +2 -3
  148. package/dist/esm/sampling/percentageSampler.d.ts.map +1 -0
  149. package/dist/esm/{sampling.js → sampling/percentageSampler.js} +6 -39
  150. package/dist/esm/sampling/percentageSampler.js.map +1 -0
  151. package/dist/esm/sampling/rateLimitedSampler.d.ts +58 -0
  152. package/dist/esm/sampling/rateLimitedSampler.d.ts.map +1 -0
  153. package/dist/esm/sampling/rateLimitedSampler.js +114 -0
  154. package/dist/esm/sampling/rateLimitedSampler.js.map +1 -0
  155. package/dist/esm/sampling/samplingUtils.d.ts +17 -0
  156. package/dist/esm/sampling/samplingUtils.d.ts.map +1 -0
  157. package/dist/esm/sampling/samplingUtils.js +89 -0
  158. package/dist/esm/sampling/samplingUtils.js.map +1 -0
  159. package/dist/esm/utils/common.js +2 -3
  160. package/dist/esm/utils/common.js.map +1 -1
  161. package/dist/esm/utils/connectionStringParser.js +3 -3
  162. package/dist/esm/utils/connectionStringParser.js.map +1 -1
  163. package/dist/esm/utils/constants/applicationinsights.d.ts +1 -1
  164. package/dist/esm/utils/constants/applicationinsights.js +1 -1
  165. package/dist/esm/utils/constants/applicationinsights.js.map +1 -1
  166. package/dist/esm/utils/eventhub.js +5 -2
  167. package/dist/esm/utils/eventhub.js.map +1 -1
  168. package/dist/esm/utils/logUtils.js +10 -9
  169. package/dist/esm/utils/logUtils.js.map +1 -1
  170. package/dist/esm/utils/metricUtils.d.ts.map +1 -1
  171. package/dist/esm/utils/metricUtils.js +6 -6
  172. package/dist/esm/utils/metricUtils.js.map +1 -1
  173. package/dist/esm/utils/spanUtils.d.ts.map +1 -1
  174. package/dist/esm/utils/spanUtils.js +13 -11
  175. package/dist/esm/utils/spanUtils.js.map +1 -1
  176. package/package.json +6 -6
  177. package/dist/commonjs/sampling.d.ts.map +0 -1
  178. package/dist/commonjs/sampling.js.map +0 -1
  179. package/dist/esm/sampling.d.ts.map +0 -1
  180. package/dist/esm/sampling.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/generated/models/mappers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIU,QAAA,aAAa,GAA+B;IACvD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,eAAe;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QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;iBACtE;aACF,EACD,YAAY,EAAE;gBACZ,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE;oBACJ,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;iBACpC;aACF,GACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const TelemetryItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryItem\",\n modelProperties: {\n version: {\n defaultValue: 1,\n serializedName: \"ver\",\n type: {\n name: \"Number\",\n },\n },\n name: {\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n time: {\n serializedName: \"time\",\n required: true,\n type: {\n name: \"DateTime\",\n },\n },\n sampleRate: {\n defaultValue: 100,\n serializedName: \"sampleRate\",\n type: {\n name: \"Number\",\n },\n },\n sequence: {\n constraints: {\n MaxLength: 64,\n },\n serializedName: \"seq\",\n type: {\n name: \"String\",\n },\n },\n instrumentationKey: {\n serializedName: \"iKey\",\n type: {\n name: \"String\",\n },\n },\n tags: {\n serializedName: \"tags\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } },\n },\n },\n data: {\n serializedName: \"data\",\n type: {\n name: \"Composite\",\n className: \"MonitorBase\",\n },\n },\n },\n },\n};\n\nexport const MonitorBase: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MonitorBase\",\n modelProperties: {\n baseType: {\n serializedName: \"baseType\",\n type: {\n name: \"String\",\n },\n },\n baseData: {\n serializedName: \"baseData\",\n type: {\n name: \"Composite\",\n className: \"MonitorDomain\",\n },\n },\n },\n },\n};\n\nexport const MonitorDomain: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MonitorDomain\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n version: {\n defaultValue: 2,\n serializedName: \"ver\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const TrackResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TrackResponse\",\n modelProperties: {\n itemsReceived: {\n serializedName: \"itemsReceived\",\n type: {\n name: \"Number\",\n },\n },\n itemsAccepted: {\n serializedName: \"itemsAccepted\",\n type: {\n name: \"Number\",\n },\n },\n errors: {\n serializedName: \"errors\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"TelemetryErrorDetails\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const TelemetryErrorDetails: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryErrorDetails\",\n modelProperties: {\n index: {\n serializedName: \"index\",\n type: {\n name: \"Number\",\n },\n },\n statusCode: {\n serializedName: \"statusCode\",\n type: {\n name: \"Number\",\n },\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const MetricDataPoint: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MetricDataPoint\",\n modelProperties: {\n namespace: {\n constraints: {\n MaxLength: 256,\n },\n serializedName: \"ns\",\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n dataPointType: {\n serializedName: \"kind\",\n type: {\n name: \"String\",\n },\n },\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n count: {\n serializedName: \"count\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n min: {\n serializedName: \"min\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n max: {\n serializedName: \"max\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n stdDev: {\n serializedName: \"stdDev\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const TelemetryExceptionDetails: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionDetails\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n type: {\n name: \"Number\",\n },\n },\n outerId: {\n serializedName: \"outerId\",\n type: {\n name: \"Number\",\n },\n },\n typeName: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"typeName\",\n type: {\n name: \"String\",\n },\n },\n message: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n hasFullStack: {\n defaultValue: true,\n serializedName: \"hasFullStack\",\n type: {\n name: \"Boolean\",\n },\n },\n stack: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"stack\",\n type: {\n name: \"String\",\n },\n },\n parsedStack: {\n serializedName: \"parsedStack\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"StackFrame\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const StackFrame: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"StackFrame\",\n modelProperties: {\n level: {\n serializedName: \"level\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n method: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"method\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n assembly: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"assembly\",\n type: {\n name: \"String\",\n },\n },\n fileName: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"fileName\",\n type: {\n name: \"String\",\n },\n },\n line: {\n serializedName: \"line\",\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const AvailabilityData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AvailabilityData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n serializedName: \"success\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n runLocation: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"runLocation\",\n type: {\n name: \"String\",\n },\n },\n message: {\n constraints: {\n MaxLength: 8192,\n },\n serializedName: \"message\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const TelemetryEventData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryEventData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n name: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const TelemetryExceptionData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n exceptions: {\n serializedName: \"exceptions\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionDetails\",\n },\n },\n },\n },\n severityLevel: {\n serializedName: \"severityLevel\",\n nullable: true,\n type: {\n name: \"String\",\n },\n },\n problemId: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"problemId\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const MessageData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MessageData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n message: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n severityLevel: {\n serializedName: \"severityLevel\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const MetricsData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MetricsData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n metrics: {\n serializedName: \"metrics\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"MetricDataPoint\",\n },\n },\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n },\n },\n};\n\nexport const PageViewData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PageViewData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n type: {\n name: \"String\",\n },\n },\n referredUri: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"referredUri\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const PageViewPerfData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PageViewPerfData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n type: {\n name: \"String\",\n },\n },\n perfTotal: {\n serializedName: \"perfTotal\",\n type: {\n name: \"String\",\n },\n },\n networkConnect: {\n serializedName: \"networkConnect\",\n type: {\n name: \"String\",\n },\n },\n sentRequest: {\n serializedName: \"sentRequest\",\n type: {\n name: \"String\",\n },\n },\n receivedResponse: {\n serializedName: \"receivedResponse\",\n type: {\n name: \"String\",\n },\n },\n domProcessing: {\n serializedName: \"domProcessing\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const RemoteDependencyData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RemoteDependencyData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n resultCode: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"resultCode\",\n type: {\n name: \"String\",\n },\n },\n data: {\n constraints: {\n MaxLength: 8192,\n },\n serializedName: \"data\",\n type: {\n name: \"String\",\n },\n },\n type: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"type\",\n type: {\n name: \"String\",\n },\n },\n target: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"target\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n defaultValue: true,\n serializedName: \"success\",\n type: {\n name: \"Boolean\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const RequestData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RequestData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n defaultValue: true,\n serializedName: \"success\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n responseCode: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"responseCode\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n source: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"source\",\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/generated/models/mappers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIU,QAAA,aAAa,GAA+B;IACvD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,eAAe;QAC1B,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,KAAK;gBACrB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;iBACjB;a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n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const TelemetryItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryItem\",\n modelProperties: {\n version: {\n defaultValue: 1,\n serializedName: \"ver\",\n type: {\n name: \"Number\",\n },\n },\n name: {\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n time: {\n serializedName: \"time\",\n required: true,\n type: {\n name: \"DateTime\",\n },\n },\n sampleRate: {\n defaultValue: 100,\n serializedName: \"sampleRate\",\n type: {\n name: \"Number\",\n },\n },\n sequence: {\n constraints: {\n MaxLength: 64,\n },\n serializedName: \"seq\",\n type: {\n name: \"String\",\n },\n },\n instrumentationKey: {\n serializedName: \"iKey\",\n type: {\n name: \"String\",\n },\n },\n tags: {\n serializedName: \"tags\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } },\n },\n },\n data: {\n serializedName: \"data\",\n type: {\n name: \"Composite\",\n className: \"MonitorBase\",\n },\n },\n },\n },\n};\n\nexport const MonitorBase: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MonitorBase\",\n modelProperties: {\n baseType: {\n serializedName: \"baseType\",\n type: {\n name: \"String\",\n },\n },\n baseData: {\n serializedName: \"baseData\",\n type: {\n name: \"Composite\",\n className: \"MonitorDomain\",\n },\n },\n },\n },\n};\n\nexport const MonitorDomain: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MonitorDomain\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n version: {\n defaultValue: 2,\n serializedName: \"ver\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const TrackResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TrackResponse\",\n modelProperties: {\n itemsReceived: {\n serializedName: \"itemsReceived\",\n type: {\n name: \"Number\",\n },\n },\n itemsAccepted: {\n serializedName: \"itemsAccepted\",\n type: {\n name: \"Number\",\n },\n },\n errors: {\n serializedName: \"errors\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"TelemetryErrorDetails\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const TelemetryErrorDetails: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryErrorDetails\",\n modelProperties: {\n index: {\n serializedName: \"index\",\n type: {\n name: \"Number\",\n },\n },\n statusCode: {\n serializedName: \"statusCode\",\n type: {\n name: \"Number\",\n },\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const MetricDataPoint: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MetricDataPoint\",\n modelProperties: {\n namespace: {\n constraints: {\n MaxLength: 256,\n },\n serializedName: \"ns\",\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n dataPointType: {\n serializedName: \"kind\",\n type: {\n name: \"String\",\n },\n },\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n count: {\n serializedName: \"count\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n min: {\n serializedName: \"min\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n max: {\n serializedName: \"max\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n stdDev: {\n serializedName: \"stdDev\",\n nullable: true,\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const TelemetryExceptionDetails: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionDetails\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n type: {\n name: \"Number\",\n },\n },\n outerId: {\n serializedName: \"outerId\",\n type: {\n name: \"Number\",\n },\n },\n typeName: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"typeName\",\n type: {\n name: \"String\",\n },\n },\n message: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n hasFullStack: {\n defaultValue: true,\n serializedName: \"hasFullStack\",\n type: {\n name: \"Boolean\",\n },\n },\n stack: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"stack\",\n type: {\n name: \"String\",\n },\n },\n parsedStack: {\n serializedName: \"parsedStack\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"StackFrame\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const StackFrame: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"StackFrame\",\n modelProperties: {\n level: {\n serializedName: \"level\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n method: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"method\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n assembly: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"assembly\",\n type: {\n name: \"String\",\n },\n },\n fileName: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"fileName\",\n type: {\n name: \"String\",\n },\n },\n line: {\n serializedName: \"line\",\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const AvailabilityData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AvailabilityData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n serializedName: \"success\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n runLocation: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"runLocation\",\n type: {\n name: \"String\",\n },\n },\n message: {\n constraints: {\n MaxLength: 8192,\n },\n serializedName: \"message\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const TelemetryEventData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryEventData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n name: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const TelemetryExceptionData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n exceptions: {\n serializedName: \"exceptions\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"TelemetryExceptionDetails\",\n },\n },\n },\n },\n severityLevel: {\n serializedName: \"severityLevel\",\n nullable: true,\n type: {\n name: \"String\",\n },\n },\n problemId: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"problemId\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const MessageData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MessageData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n message: {\n constraints: {\n MaxLength: 32768,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n severityLevel: {\n serializedName: \"severityLevel\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const MetricsData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MetricsData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n metrics: {\n serializedName: \"metrics\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"MetricDataPoint\",\n },\n },\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n },\n },\n};\n\nexport const PageViewData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PageViewData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n type: {\n name: \"String\",\n },\n },\n referredUri: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"referredUri\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const PageViewPerfData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PageViewPerfData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n type: {\n name: \"String\",\n },\n },\n perfTotal: {\n serializedName: \"perfTotal\",\n type: {\n name: \"String\",\n },\n },\n networkConnect: {\n serializedName: \"networkConnect\",\n type: {\n name: \"String\",\n },\n },\n sentRequest: {\n serializedName: \"sentRequest\",\n type: {\n name: \"String\",\n },\n },\n receivedResponse: {\n serializedName: \"receivedResponse\",\n type: {\n name: \"String\",\n },\n },\n domProcessing: {\n serializedName: \"domProcessing\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const RemoteDependencyData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RemoteDependencyData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n resultCode: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"resultCode\",\n type: {\n name: \"String\",\n },\n },\n data: {\n constraints: {\n MaxLength: 8192,\n },\n serializedName: \"data\",\n type: {\n name: \"String\",\n },\n },\n type: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"type\",\n type: {\n name: \"String\",\n },\n },\n target: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"target\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n defaultValue: true,\n serializedName: \"success\",\n type: {\n name: \"Boolean\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n\nexport const RequestData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RequestData\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n ...MonitorDomain.type.modelProperties,\n id: {\n constraints: {\n MaxLength: 512,\n },\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n name: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"name\",\n type: {\n name: \"String\",\n },\n },\n duration: {\n serializedName: \"duration\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n success: {\n defaultValue: true,\n serializedName: \"success\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n responseCode: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"responseCode\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n source: {\n constraints: {\n MaxLength: 1024,\n },\n serializedName: \"source\",\n type: {\n name: \"String\",\n },\n },\n url: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"url\",\n type: {\n name: \"String\",\n },\n },\n properties: {\n serializedName: \"properties\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" }, constraints: { MaxLength: 8192 } },\n },\n },\n measurements: {\n serializedName: \"measurements\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } },\n },\n },\n },\n },\n};\n"]}
@@ -1,4 +1,5 @@
1
- export { ApplicationInsightsSampler } from "./sampling.js";
1
+ export { ApplicationInsightsSampler } from "./sampling/percentageSampler.js";
2
+ export { RateLimitedSampler } from "./sampling/rateLimitedSampler.js";
2
3
  export { AzureMonitorBaseExporter } from "./export/base.js";
3
4
  export { AzureMonitorTraceExporter } from "./export/trace.js";
4
5
  export { AzureMonitorMetricExporter } from "./export/metric.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -2,9 +2,11 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AI_OPERATION_NAME = exports.ServiceApiVersion = exports.AzureMonitorLogExporter = exports.AzureMonitorMetricExporter = exports.AzureMonitorTraceExporter = exports.AzureMonitorBaseExporter = exports.ApplicationInsightsSampler = void 0;
6
- var sampling_js_1 = require("./sampling.js");
7
- Object.defineProperty(exports, "ApplicationInsightsSampler", { enumerable: true, get: function () { return sampling_js_1.ApplicationInsightsSampler; } });
5
+ exports.AI_OPERATION_NAME = exports.ServiceApiVersion = exports.AzureMonitorLogExporter = exports.AzureMonitorMetricExporter = exports.AzureMonitorTraceExporter = exports.AzureMonitorBaseExporter = exports.RateLimitedSampler = exports.ApplicationInsightsSampler = void 0;
6
+ var percentageSampler_js_1 = require("./sampling/percentageSampler.js");
7
+ Object.defineProperty(exports, "ApplicationInsightsSampler", { enumerable: true, get: function () { return percentageSampler_js_1.ApplicationInsightsSampler; } });
8
+ var rateLimitedSampler_js_1 = require("./sampling/rateLimitedSampler.js");
9
+ Object.defineProperty(exports, "RateLimitedSampler", { enumerable: true, get: function () { return rateLimitedSampler_js_1.RateLimitedSampler; } });
8
10
  var base_js_1 = require("./export/base.js");
9
11
  Object.defineProperty(exports, "AzureMonitorBaseExporter", { enumerable: true, get: function () { return base_js_1.AzureMonitorBaseExporter; } });
10
12
  var trace_js_1 = require("./export/trace.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAA2D;AAAlD,yHAAA,0BAA0B,OAAA;AACnC,4CAA4D;AAAnD,mHAAA,wBAAwB,OAAA;AACjC,8CAA8D;AAArD,qHAAA,yBAAyB,OAAA;AAClC,gDAAgE;AAAvD,uHAAA,0BAA0B,OAAA;AACnC,0CAA0D;AAAjD,iHAAA,uBAAuB,OAAA;AAEhC,4DAAgE;AAAvD,iHAAA,iBAAiB,OAAA;AAE1B,4DAAgE;AAAvD,iHAAA,iBAAiB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { ApplicationInsightsSampler } from \"./sampling.js\";\nexport { AzureMonitorBaseExporter } from \"./export/base.js\";\nexport { AzureMonitorTraceExporter } from \"./export/trace.js\";\nexport { AzureMonitorMetricExporter } from \"./export/metric.js\";\nexport { AzureMonitorLogExporter } from \"./export/log.js\";\nexport { AzureMonitorExporterOptions } from \"./config.js\";\nexport { ServiceApiVersion } from \"./Declarations/Constants.js\";\nexport { ApplicationInsightsClientOptionalParams } from \"./generated/models/index.js\";\nexport { AI_OPERATION_NAME } from \"./Declarations/Constants.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wEAA6E;AAApE,kIAAA,0BAA0B,OAAA;AACnC,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA;AAC3B,4CAA4D;AAAnD,mHAAA,wBAAwB,OAAA;AACjC,8CAA8D;AAArD,qHAAA,yBAAyB,OAAA;AAClC,gDAAgE;AAAvD,uHAAA,0BAA0B,OAAA;AACnC,0CAA0D;AAAjD,iHAAA,uBAAuB,OAAA;AAEhC,4DAAgE;AAAvD,iHAAA,iBAAiB,OAAA;AAE1B,4DAAgE;AAAvD,iHAAA,iBAAiB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { ApplicationInsightsSampler } from \"./sampling/percentageSampler.js\";\nexport { RateLimitedSampler } from \"./sampling/rateLimitedSampler.js\";\nexport { AzureMonitorBaseExporter } from \"./export/base.js\";\nexport { AzureMonitorTraceExporter } from \"./export/trace.js\";\nexport { AzureMonitorMetricExporter } from \"./export/metric.js\";\nexport { AzureMonitorLogExporter } from \"./export/log.js\";\nexport { AzureMonitorExporterOptions } from \"./config.js\";\nexport { ServiceApiVersion } from \"./Declarations/Constants.js\";\nexport { ApplicationInsightsClientOptionalParams } from \"./generated/models/index.js\";\nexport { AI_OPERATION_NAME } from \"./Declarations/Constants.js\";\n"]}
@@ -11,6 +11,7 @@ export declare abstract class BaseSender {
11
11
  private numConsecutiveRedirects;
12
12
  private retryTimer;
13
13
  private networkStatsbeatMetrics;
14
+ private customerStatsbeatMetrics;
14
15
  private longIntervalStatsbeatMetrics;
15
16
  private statsbeatFailureCount;
16
17
  private batchSendRetryIntervalMs;
@@ -1 +1 @@
1
- {"version":3,"file":"baseSender.d.ts","sourceRoot":"","sources":["../../../../src/platform/nodejs/baseSender.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQxD,OAAO,KAAK,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,0BAA0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+11,26 @@ const longIntervalStatsbeatMetrics_js_1 = require("../../export/statsbeat/longIn
11
11
  const types_js_1 = require("../../export/statsbeat/types.js");
12
12
  const breezeUtils_js_1 = require("../../utils/breezeUtils.js");
13
13
  const Constants_js_1 = require("../../Declarations/Constants.js");
14
- const DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS = 60000;
14
+ const customerStatsbeat_js_1 = require("../../export/statsbeat/customerStatsbeat.js");
15
+ const DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS = 60_000;
15
16
  /**
16
17
  * Base sender class
17
18
  * @internal
18
19
  */
19
20
  class BaseSender {
21
+ persister;
22
+ numConsecutiveRedirects;
23
+ retryTimer;
24
+ networkStatsbeatMetrics;
25
+ customerStatsbeatMetrics;
26
+ longIntervalStatsbeatMetrics;
27
+ statsbeatFailureCount = 0;
28
+ batchSendRetryIntervalMs = DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS;
29
+ isStatsbeatSender;
30
+ disableOfflineStorage;
20
31
  constructor(options) {
21
- this.statsbeatFailureCount = 0;
22
- this.batchSendRetryIntervalMs = DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS;
23
32
  this.numConsecutiveRedirects = 0;
24
33
  this.disableOfflineStorage = options.exporterOptions.disableOfflineStorage || false;
25
- this.persister = new index_js_1.FileSystemPersist(options.instrumentationKey, options.exporterOptions);
26
34
  if (options.trackStatsbeat) {
27
35
  this.networkStatsbeatMetrics = networkStatsbeatMetrics_js_1.NetworkStatsbeatMetrics.getInstance({
28
36
  instrumentationKey: options.instrumentationKey,
@@ -34,7 +42,15 @@ class BaseSender {
34
42
  endpointUrl: options.endpointUrl,
35
43
  disableOfflineStorage: this.disableOfflineStorage,
36
44
  });
45
+ if (process.env[Constants_js_1.ENV_APPLICATIONINSIGHTS_STATSBEAT_ENABLED_PREVIEW]) {
46
+ this.customerStatsbeatMetrics = customerStatsbeat_js_1.CustomerStatsbeatMetrics.getInstance({
47
+ instrumentationKey: options.instrumentationKey,
48
+ endpointUrl: options.endpointUrl,
49
+ disableOfflineStorage: this.disableOfflineStorage,
50
+ });
51
+ }
37
52
  }
53
+ this.persister = new index_js_1.FileSystemPersist(options.instrumentationKey, options.exporterOptions, this.customerStatsbeatMetrics);
38
54
  this.retryTimer = null;
39
55
  this.isStatsbeatSender = options.isStatsbeatSender || false;
40
56
  }
@@ -42,7 +58,6 @@ class BaseSender {
42
58
  * Export envelopes
43
59
  */
44
60
  async exportEnvelopes(envelopes) {
45
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46
61
  api_1.diag.info(`Exporting ${envelopes.length} envelope(s)`);
47
62
  if (envelopes.length < 1) {
48
63
  return { code: core_1.ExportResultCode.SUCCESS };
@@ -64,7 +79,8 @@ class BaseSender {
64
79
  }
65
80
  // If we are not exporting statsbeat and statsbeat is not disabled -- count success
66
81
  if (!this.isStatsbeatSender) {
67
- (_a = this.networkStatsbeatMetrics) === null || _a === void 0 ? void 0 : _a.countSuccess(duration);
82
+ this.networkStatsbeatMetrics?.countSuccess(duration);
83
+ this.customerStatsbeatMetrics?.countSuccessfulItems(envelopes);
68
84
  }
69
85
  return { code: core_1.ExportResultCode.SUCCESS };
70
86
  }
@@ -72,7 +88,8 @@ class BaseSender {
72
88
  // Failed -- persist failed data
73
89
  if (statusCode === 429 || statusCode === 439) {
74
90
  if (!this.isStatsbeatSender) {
75
- (_b = this.networkStatsbeatMetrics) === null || _b === void 0 ? void 0 : _b.countThrottle(statusCode);
91
+ this.networkStatsbeatMetrics?.countThrottle(statusCode);
92
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);
76
93
  }
77
94
  return {
78
95
  code: core_1.ExportResultCode.SUCCESS,
@@ -82,28 +99,44 @@ class BaseSender {
82
99
  api_1.diag.info(result);
83
100
  const breezeResponse = JSON.parse(result);
84
101
  const filteredEnvelopes = [];
102
+ // Create a list of successful envelopes by filtering out the failed ones for customer statsbeat
103
+ const successfulEnvelopes = [...envelopes];
85
104
  // If we have a partial success, count the succeeded envelopes
86
105
  if (breezeResponse.itemsAccepted > 0 && statusCode === 206 && !this.isStatsbeatSender) {
87
- (_c = this.networkStatsbeatMetrics) === null || _c === void 0 ? void 0 : _c.countSuccess(duration);
106
+ this.networkStatsbeatMetrics?.countSuccess(duration);
88
107
  }
89
108
  // Figure out if we need to either retry or count failures
90
109
  if (breezeResponse.errors) {
91
110
  breezeResponse.errors.forEach((error) => {
111
+ // Mark as undefined so we don't process them in countSuccessfulEnvelopes
112
+ successfulEnvelopes[error.index] = undefined;
113
+ // Add to retry list if status code is retriable
92
114
  if (error.statusCode && (0, breezeUtils_js_1.isRetriable)(error.statusCode)) {
93
115
  filteredEnvelopes.push(envelopes[error.index]);
94
116
  }
95
117
  });
96
118
  }
119
+ // If we have a partial success, count the succeeded envelopes
120
+ if (breezeResponse.itemsAccepted > 0) {
121
+ // Count only the successful envelopes (non-undefined)
122
+ if (!this.isStatsbeatSender) {
123
+ this.networkStatsbeatMetrics?.countSuccess(duration);
124
+ this.customerStatsbeatMetrics?.countSuccessfulItems(envelopes);
125
+ }
126
+ }
97
127
  if (filteredEnvelopes.length > 0) {
98
128
  if (!this.isStatsbeatSender) {
99
- (_d = this.networkStatsbeatMetrics) === null || _d === void 0 ? void 0 : _d.countRetry(statusCode);
129
+ this.networkStatsbeatMetrics?.countRetry(statusCode);
130
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);
100
131
  }
101
132
  // calls resultCallback(ExportResult) based on result of persister.push
102
133
  return await this.persist(filteredEnvelopes);
103
134
  }
104
135
  // Failed -- not retriable
105
136
  if (!this.isStatsbeatSender) {
106
- (_e = this.networkStatsbeatMetrics) === null || _e === void 0 ? void 0 : _e.countFailure(duration, statusCode);
137
+ this.networkStatsbeatMetrics?.countFailure(duration, statusCode);
138
+ // Count dropped items for customer statsbeat for non-retriable status codes
139
+ this.customerStatsbeatMetrics?.countDroppedItems(successfulEnvelopes.filter(Boolean), statusCode);
107
140
  }
108
141
  return {
109
142
  code: core_1.ExportResultCode.FAILED,
@@ -112,7 +145,8 @@ class BaseSender {
112
145
  else {
113
146
  // calls resultCallback(ExportResult) based on result of persister.push
114
147
  if (!this.isStatsbeatSender) {
115
- (_f = this.networkStatsbeatMetrics) === null || _f === void 0 ? void 0 : _f.countRetry(statusCode);
148
+ this.networkStatsbeatMetrics?.countRetry(statusCode);
149
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);
116
150
  }
117
151
  return await this.persist(envelopes);
118
152
  }
@@ -122,11 +156,13 @@ class BaseSender {
122
156
  if (this.networkStatsbeatMetrics && !this.isStatsbeatSender) {
123
157
  if (statusCode) {
124
158
  this.networkStatsbeatMetrics.countFailure(duration, statusCode);
159
+ this.customerStatsbeatMetrics?.countDroppedItems(envelopes, statusCode);
125
160
  }
126
161
  }
127
162
  else {
128
163
  // Handles all other status codes or client exceptions for Statsbeat
129
164
  this.incrementStatsbeatFailure();
165
+ this.customerStatsbeatMetrics?.countDroppedItems(envelopes, types_js_1.DropCode.CLIENT_EXCEPTION);
130
166
  }
131
167
  return {
132
168
  code: core_1.ExportResultCode.FAILED,
@@ -155,7 +191,8 @@ class BaseSender {
155
191
  else {
156
192
  const redirectError = new Error("Circular redirect");
157
193
  if (!this.isStatsbeatSender) {
158
- (_g = this.networkStatsbeatMetrics) === null || _g === void 0 ? void 0 : _g.countException(redirectError);
194
+ this.networkStatsbeatMetrics?.countException(redirectError);
195
+ this.customerStatsbeatMetrics?.countDroppedItems(envelopes, types_js_1.DropCode.CLIENT_EXCEPTION, redirectError.message);
159
196
  }
160
197
  return { code: core_1.ExportResultCode.FAILED, error: redirectError };
161
198
  }
@@ -163,7 +200,8 @@ class BaseSender {
163
200
  else if (restError.statusCode &&
164
201
  (0, breezeUtils_js_1.isRetriable)(restError.statusCode) &&
165
202
  !this.isStatsbeatSender) {
166
- (_h = this.networkStatsbeatMetrics) === null || _h === void 0 ? void 0 : _h.countRetry(restError.statusCode);
203
+ this.networkStatsbeatMetrics?.countRetry(restError.statusCode);
204
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, restError.statusCode);
167
205
  return this.persist(envelopes);
168
206
  }
169
207
  else if (restError.statusCode === 400 &&
@@ -179,19 +217,22 @@ class BaseSender {
179
217
  this.incrementStatsbeatFailure();
180
218
  return { code: core_1.ExportResultCode.SUCCESS };
181
219
  }
182
- if (this.isRetriableRestError(restError)) {
183
- if (restError.statusCode && !this.isStatsbeatSender) {
184
- (_j = this.networkStatsbeatMetrics) === null || _j === void 0 ? void 0 : _j.countRetry(restError.statusCode);
220
+ // For retriable REST errors
221
+ if (this.isRetriableRestError(restError) && !this.isStatsbeatSender) {
222
+ if (this.customerStatsbeatMetrics?.isTimeoutError(restError) && !this.isStatsbeatSender) {
223
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, types_js_1.RetryCode.CLIENT_TIMEOUT, "timeout_exception");
224
+ api_1.diag.error("Request timed out. Error message:", restError.message);
185
225
  }
186
- if (!this.isStatsbeatSender) {
187
- api_1.diag.error("Retrying due to transient client side error. Error message:", restError.message);
226
+ else if (restError.statusCode) {
227
+ this.networkStatsbeatMetrics?.countRetry(restError.statusCode);
228
+ this.customerStatsbeatMetrics?.countRetryItems(envelopes, restError.statusCode);
188
229
  }
230
+ api_1.diag.error("Retrying due to transient client side error. Error message:", restError.message);
189
231
  return this.persist(envelopes);
190
232
  }
233
+ // For non-retriable REST errors or client exceptions
191
234
  if (!this.isStatsbeatSender) {
192
- (_k = this.networkStatsbeatMetrics) === null || _k === void 0 ? void 0 : _k.countException(restError);
193
- }
194
- if (!this.isStatsbeatSender) {
235
+ this.networkStatsbeatMetrics?.countException(restError);
195
236
  api_1.diag.error("Envelopes could not be exported and are not retriable. Error message:", restError.message);
196
237
  }
197
238
  return { code: core_1.ExportResultCode.FAILED, error: restError };
@@ -201,7 +242,6 @@ class BaseSender {
201
242
  * Persist envelopes to disk
202
243
  */
203
244
  async persist(envelopes) {
204
- var _a;
205
245
  try {
206
246
  const success = await this.persister.push(envelopes);
207
247
  return success
@@ -213,7 +253,10 @@ class BaseSender {
213
253
  }
214
254
  catch (ex) {
215
255
  if (!this.isStatsbeatSender) {
216
- (_a = this.networkStatsbeatMetrics) === null || _a === void 0 ? void 0 : _a.countWriteFailure();
256
+ this.networkStatsbeatMetrics?.countWriteFailure();
257
+ if (this.disableOfflineStorage && envelopes) {
258
+ this.customerStatsbeatMetrics?.countDroppedItems(envelopes, types_js_1.DropCode.CLIENT_STORAGE_DISABLED);
259
+ }
217
260
  }
218
261
  return { code: core_1.ExportResultCode.FAILED, error: ex };
219
262
  }
@@ -231,24 +274,27 @@ class BaseSender {
231
274
  * Shutdown statsbeat metrics
232
275
  */
233
276
  shutdownStatsbeat() {
234
- var _a;
235
277
  if (this.networkStatsbeatMetrics) {
236
278
  this.networkStatsbeatMetrics.shutdown();
237
279
  }
238
- (_a = this.longIntervalStatsbeatMetrics) === null || _a === void 0 ? void 0 : _a.shutdown();
280
+ if (this.longIntervalStatsbeatMetrics) {
281
+ this.longIntervalStatsbeatMetrics?.shutdown();
282
+ }
283
+ if (this.customerStatsbeatMetrics) {
284
+ this.customerStatsbeatMetrics.shutdown();
285
+ }
239
286
  this.statsbeatFailureCount = 0;
240
287
  }
241
288
  async sendFirstPersistedFile() {
242
- var _a;
289
+ const envelopes = (await this.persister.shift());
243
290
  try {
244
- const envelopes = (await this.persister.shift());
245
291
  if (envelopes) {
246
292
  await this.send(envelopes);
247
293
  }
248
294
  }
249
295
  catch (err) {
250
296
  if (!this.isStatsbeatSender) {
251
- (_a = this.networkStatsbeatMetrics) === null || _a === void 0 ? void 0 : _a.countReadFailure();
297
+ this.networkStatsbeatMetrics?.countReadFailure();
252
298
  }
253
299
  api_1.diag.warn(`Failed to fetch persisted file`, err);
254
300
  }
@@ -1 +1 @@
1
- {"version":3,"file":"baseSender.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/baseSender.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4CAA0C;AAG1C,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AAI,CAAC,uBAAuB,0CAAE,gBAAgB,EAAE,CAAC;YACnD,CAAC;YACD,UAAI,CAAC,IAAI,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,KAAgB;QAC3C,MAAM,cAAc,GAAa,MAAM,CAAC,MAAM,CAAC,sCAAuB,CAAC,CAAC;QACxE,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC/D,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA/QD,gCA+QC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { diag } from \"@opentelemetry/api\";\nimport type { PersistentStorage, SenderResult } from \"../../types.js\";\nimport type { AzureMonitorExporterOptions } from \"../../config.js\";\nimport { FileSystemPersist } from \"./persist/index.js\";\nimport type { ExportResult } from \"@opentelemetry/core\";\nimport { ExportResultCode } from \"@opentelemetry/core\";\nimport { NetworkStatsbeatMetrics } from \"../../export/statsbeat/networkStatsbeatMetrics.js\";\nimport { LongIntervalStatsbeatMetrics } from \"../../export/statsbeat/longIntervalStatsbeatMetrics.js\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { MAX_STATSBEAT_FAILURES, isStatsbeatShutdownStatus } from \"../../export/statsbeat/types.js\";\nimport type { BreezeResponse } from \"../../utils/breezeUtils.js\";\nimport { isRetriable } from \"../../utils/breezeUtils.js\";\nimport type { TelemetryItem as Envelope } from \"../../generated/index.js\";\nimport { RetriableRestErrorTypes } from \"../../Declarations/Constants.js\";\n\nconst DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS = 60_000;\n\n/**\n * Base sender class\n * @internal\n */\nexport abstract class BaseSender {\n private readonly persister: PersistentStorage;\n private numConsecutiveRedirects: number;\n private retryTimer: NodeJS.Timeout | null;\n private networkStatsbeatMetrics: NetworkStatsbeatMetrics | undefined;\n private longIntervalStatsbeatMetrics;\n private statsbeatFailureCount: number = 0;\n private batchSendRetryIntervalMs: number = DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS;\n private isStatsbeatSender: boolean;\n private disableOfflineStorage: boolean;\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n trackStatsbeat: boolean;\n exporterOptions: AzureMonitorExporterOptions;\n aadAudience?: string;\n isStatsbeatSender?: boolean;\n }) {\n this.numConsecutiveRedirects = 0;\n this.disableOfflineStorage = options.exporterOptions.disableOfflineStorage || false;\n this.persister = new FileSystemPersist(options.instrumentationKey, options.exporterOptions);\n if (options.trackStatsbeat) {\n this.networkStatsbeatMetrics = NetworkStatsbeatMetrics.getInstance({\n instrumentationKey: options.instrumentationKey,\n endpointUrl: options.endpointUrl,\n disableOfflineStorage: this.disableOfflineStorage,\n });\n this.longIntervalStatsbeatMetrics = LongIntervalStatsbeatMetrics.getInstance({\n instrumentationKey: options.instrumentationKey,\n endpointUrl: options.endpointUrl,\n disableOfflineStorage: this.disableOfflineStorage,\n });\n }\n this.retryTimer = null;\n this.isStatsbeatSender = options.isStatsbeatSender || false;\n }\n\n abstract send(payload: unknown[]): Promise<SenderResult>;\n abstract shutdown(): Promise<void>;\n abstract handlePermanentRedirect(location: string | undefined): void;\n\n /**\n * Export envelopes\n */\n public async exportEnvelopes(envelopes: Envelope[]): Promise<ExportResult> {\n diag.info(`Exporting ${envelopes.length} envelope(s)`);\n\n if (envelopes.length < 1) {\n return { code: ExportResultCode.SUCCESS };\n }\n\n try {\n const startTime = new Date().getTime();\n const { result, statusCode } = await this.send(envelopes);\n const endTime = new Date().getTime();\n const duration = endTime - startTime;\n this.numConsecutiveRedirects = 0;\n\n if (statusCode === 200) {\n // Success -- @todo: start retry timer\n if (!this.retryTimer) {\n this.retryTimer = setTimeout(() => {\n this.retryTimer = null;\n this.sendFirstPersistedFile();\n }, this.batchSendRetryIntervalMs);\n this.retryTimer.unref();\n }\n // If we are not exporting statsbeat and statsbeat is not disabled -- count success\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countSuccess(duration);\n }\n return { code: ExportResultCode.SUCCESS };\n } else if (statusCode && isRetriable(statusCode)) {\n // Failed -- persist failed data\n if (statusCode === 429 || statusCode === 439) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countThrottle(statusCode);\n }\n return {\n code: ExportResultCode.SUCCESS,\n };\n }\n if (result) {\n diag.info(result);\n const breezeResponse = JSON.parse(result) as BreezeResponse;\n const filteredEnvelopes: Envelope[] = [];\n // If we have a partial success, count the succeeded envelopes\n if (breezeResponse.itemsAccepted > 0 && statusCode === 206 && !this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countSuccess(duration);\n }\n // Figure out if we need to either retry or count failures\n if (breezeResponse.errors) {\n breezeResponse.errors.forEach((error) => {\n if (error.statusCode && isRetriable(error.statusCode)) {\n filteredEnvelopes.push(envelopes[error.index]);\n }\n });\n }\n if (filteredEnvelopes.length > 0) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countRetry(statusCode);\n }\n // calls resultCallback(ExportResult) based on result of persister.push\n return await this.persist(filteredEnvelopes);\n }\n // Failed -- not retriable\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countFailure(duration, statusCode);\n }\n return {\n code: ExportResultCode.FAILED,\n };\n } else {\n // calls resultCallback(ExportResult) based on result of persister.push\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countRetry(statusCode);\n }\n return await this.persist(envelopes);\n }\n } else {\n // Failed -- not retriable\n if (this.networkStatsbeatMetrics && !this.isStatsbeatSender) {\n if (statusCode) {\n this.networkStatsbeatMetrics.countFailure(duration, statusCode);\n }\n } else {\n // Handles all other status codes or client exceptions for Statsbeat\n this.incrementStatsbeatFailure();\n }\n return {\n code: ExportResultCode.FAILED,\n };\n }\n } catch (error: any) {\n const restError = error as RestError;\n if (\n restError.statusCode &&\n (restError.statusCode === 307 || // Temporary redirect\n restError.statusCode === 308)\n ) {\n // Permanent redirect\n this.numConsecutiveRedirects++;\n // To prevent circular redirects\n if (this.numConsecutiveRedirects < 10) {\n if (restError.response && restError.response.headers) {\n const location = restError.response.headers.get(\"location\");\n if (location) {\n // Update sender URL\n this.handlePermanentRedirect(location);\n // Send to redirect endpoint as HTTPs library doesn't handle redirect automatically\n return this.exportEnvelopes(envelopes);\n }\n }\n } else {\n const redirectError = new Error(\"Circular redirect\");\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countException(redirectError);\n }\n return { code: ExportResultCode.FAILED, error: redirectError };\n }\n } else if (\n restError.statusCode &&\n isRetriable(restError.statusCode) &&\n !this.isStatsbeatSender\n ) {\n this.networkStatsbeatMetrics?.countRetry(restError.statusCode);\n return this.persist(envelopes);\n } else if (\n restError.statusCode === 400 &&\n restError.message.includes(\"Invalid instrumentation key\")\n ) {\n // Invalid instrumentation key, shutdown statsbeat, fail silently\n this.shutdownStatsbeat();\n return { code: ExportResultCode.SUCCESS };\n } else if (\n restError.statusCode &&\n this.isStatsbeatSender &&\n isStatsbeatShutdownStatus(restError.statusCode)\n ) {\n // If the status code is a shutdown status code for statsbeat, shutdown statsbeat and fail silently\n this.incrementStatsbeatFailure();\n return { code: ExportResultCode.SUCCESS };\n }\n if (this.isRetriableRestError(restError)) {\n if (restError.statusCode && !this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countRetry(restError.statusCode);\n }\n if (!this.isStatsbeatSender) {\n diag.error(\n \"Retrying due to transient client side error. Error message:\",\n restError.message,\n );\n }\n return this.persist(envelopes);\n }\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countException(restError);\n }\n if (!this.isStatsbeatSender) {\n diag.error(\n \"Envelopes could not be exported and are not retriable. Error message:\",\n restError.message,\n );\n }\n return { code: ExportResultCode.FAILED, error: restError };\n }\n }\n\n /**\n * Persist envelopes to disk\n */\n private async persist(envelopes: unknown[]): Promise<ExportResult> {\n try {\n const success = await this.persister.push(envelopes);\n return success\n ? { code: ExportResultCode.SUCCESS }\n : {\n code: ExportResultCode.FAILED,\n error: new Error(\"Failed to persist envelope in disk.\"),\n };\n } catch (ex: any) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countWriteFailure();\n }\n return { code: ExportResultCode.FAILED, error: ex };\n }\n }\n\n /**\n * Disable collection of statsbeat metrics after max failures\n */\n private incrementStatsbeatFailure(): void {\n this.statsbeatFailureCount++;\n if (this.statsbeatFailureCount > MAX_STATSBEAT_FAILURES) {\n this.shutdownStatsbeat();\n }\n }\n\n /**\n * Shutdown statsbeat metrics\n */\n private shutdownStatsbeat(): void {\n if (this.networkStatsbeatMetrics) {\n this.networkStatsbeatMetrics.shutdown();\n }\n this.longIntervalStatsbeatMetrics?.shutdown();\n this.statsbeatFailureCount = 0;\n }\n\n private async sendFirstPersistedFile(): Promise<void> {\n try {\n const envelopes = (await this.persister.shift()) as Envelope[] | null;\n if (envelopes) {\n await this.send(envelopes);\n }\n } catch (err: any) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countReadFailure();\n }\n diag.warn(`Failed to fetch persisted file`, err);\n }\n }\n\n private isRetriableRestError(error: RestError): boolean {\n const restErrorTypes: string[] = Object.values(RetriableRestErrorTypes);\n if (error && error.code && restErrorTypes.includes(error.code)) {\n return true;\n }\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"baseSender.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/baseSender.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4CAA0C;AAG1C,iDAAuD;AAEvD,8CAAuD;AACvD,kGAA4F;AAC5F,4GAAsG;AAEtG,8DAKyC;AAEzC,+DAAyD;AAEzD,kEAGyC;AACzC,sFAAuF;AAEvF,MAAM,oCAAoC,GAAG,MAAM,CAAC;AAEpD;;;GAGG;AACH,MAAsB,UAAU;IACb,SAAS,CAAoB;IACtC,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C;IACf,CAAC;CACF;AA9UD,gCA8UC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { diag } from \"@opentelemetry/api\";\nimport type { PersistentStorage, SenderResult } from \"../../types.js\";\nimport type { AzureMonitorExporterOptions } from \"../../config.js\";\nimport { FileSystemPersist } from \"./persist/index.js\";\nimport type { ExportResult } from \"@opentelemetry/core\";\nimport { ExportResultCode } from \"@opentelemetry/core\";\nimport { NetworkStatsbeatMetrics } from \"../../export/statsbeat/networkStatsbeatMetrics.js\";\nimport { LongIntervalStatsbeatMetrics } from \"../../export/statsbeat/longIntervalStatsbeatMetrics.js\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport {\n DropCode,\n RetryCode,\n MAX_STATSBEAT_FAILURES,\n isStatsbeatShutdownStatus,\n} from \"../../export/statsbeat/types.js\";\nimport type { BreezeResponse } from \"../../utils/breezeUtils.js\";\nimport { isRetriable } from \"../../utils/breezeUtils.js\";\nimport type { TelemetryItem as Envelope } from \"../../generated/index.js\";\nimport {\n ENV_APPLICATIONINSIGHTS_STATSBEAT_ENABLED_PREVIEW,\n RetriableRestErrorTypes,\n} from \"../../Declarations/Constants.js\";\nimport { CustomerStatsbeatMetrics } from \"../../export/statsbeat/customerStatsbeat.js\";\n\nconst DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS = 60_000;\n\n/**\n * Base sender class\n * @internal\n */\nexport abstract class BaseSender {\n private readonly persister: PersistentStorage;\n private numConsecutiveRedirects: number;\n private retryTimer: NodeJS.Timeout | null;\n private networkStatsbeatMetrics: NetworkStatsbeatMetrics | undefined;\n private customerStatsbeatMetrics: CustomerStatsbeatMetrics | undefined;\n private longIntervalStatsbeatMetrics;\n private statsbeatFailureCount: number = 0;\n private batchSendRetryIntervalMs: number = DEFAULT_BATCH_SEND_RETRY_INTERVAL_MS;\n private isStatsbeatSender: boolean;\n private disableOfflineStorage: boolean;\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n trackStatsbeat: boolean;\n exporterOptions: AzureMonitorExporterOptions;\n aadAudience?: string;\n isStatsbeatSender?: boolean;\n }) {\n this.numConsecutiveRedirects = 0;\n this.disableOfflineStorage = options.exporterOptions.disableOfflineStorage || false;\n if (options.trackStatsbeat) {\n this.networkStatsbeatMetrics = NetworkStatsbeatMetrics.getInstance({\n instrumentationKey: options.instrumentationKey,\n endpointUrl: options.endpointUrl,\n disableOfflineStorage: this.disableOfflineStorage,\n });\n this.longIntervalStatsbeatMetrics = LongIntervalStatsbeatMetrics.getInstance({\n instrumentationKey: options.instrumentationKey,\n endpointUrl: options.endpointUrl,\n disableOfflineStorage: this.disableOfflineStorage,\n });\n if (process.env[ENV_APPLICATIONINSIGHTS_STATSBEAT_ENABLED_PREVIEW]) {\n this.customerStatsbeatMetrics = CustomerStatsbeatMetrics.getInstance({\n instrumentationKey: options.instrumentationKey,\n endpointUrl: options.endpointUrl,\n disableOfflineStorage: this.disableOfflineStorage,\n });\n }\n }\n this.persister = new FileSystemPersist(\n options.instrumentationKey,\n options.exporterOptions,\n this.customerStatsbeatMetrics,\n );\n this.retryTimer = null;\n this.isStatsbeatSender = options.isStatsbeatSender || false;\n }\n\n abstract send(payload: unknown[]): Promise<SenderResult>;\n abstract shutdown(): Promise<void>;\n abstract handlePermanentRedirect(location: string | undefined): void;\n\n /**\n * Export envelopes\n */\n public async exportEnvelopes(envelopes: Envelope[]): Promise<ExportResult> {\n diag.info(`Exporting ${envelopes.length} envelope(s)`);\n\n if (envelopes.length < 1) {\n return { code: ExportResultCode.SUCCESS };\n }\n\n try {\n const startTime = new Date().getTime();\n const { result, statusCode } = await this.send(envelopes);\n const endTime = new Date().getTime();\n const duration = endTime - startTime;\n this.numConsecutiveRedirects = 0;\n\n if (statusCode === 200) {\n // Success -- @todo: start retry timer\n if (!this.retryTimer) {\n this.retryTimer = setTimeout(() => {\n this.retryTimer = null;\n this.sendFirstPersistedFile();\n }, this.batchSendRetryIntervalMs);\n this.retryTimer.unref();\n }\n // If we are not exporting statsbeat and statsbeat is not disabled -- count success\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countSuccess(duration);\n this.customerStatsbeatMetrics?.countSuccessfulItems(envelopes);\n }\n return { code: ExportResultCode.SUCCESS };\n } else if (statusCode && isRetriable(statusCode)) {\n // Failed -- persist failed data\n if (statusCode === 429 || statusCode === 439) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countThrottle(statusCode);\n this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);\n }\n return {\n code: ExportResultCode.SUCCESS,\n };\n }\n if (result) {\n diag.info(result);\n const breezeResponse = JSON.parse(result) as BreezeResponse;\n const filteredEnvelopes: Envelope[] = [];\n // Create a list of successful envelopes by filtering out the failed ones for customer statsbeat\n const successfulEnvelopes: Envelope[] = [...envelopes];\n\n // If we have a partial success, count the succeeded envelopes\n if (breezeResponse.itemsAccepted > 0 && statusCode === 206 && !this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countSuccess(duration);\n }\n // Figure out if we need to either retry or count failures\n if (breezeResponse.errors) {\n breezeResponse.errors.forEach((error) => {\n // Mark as undefined so we don't process them in countSuccessfulEnvelopes\n successfulEnvelopes[error.index] = undefined as unknown as Envelope;\n\n // Add to retry list if status code is retriable\n if (error.statusCode && isRetriable(error.statusCode)) {\n filteredEnvelopes.push(envelopes[error.index]);\n }\n });\n }\n\n // If we have a partial success, count the succeeded envelopes\n if (breezeResponse.itemsAccepted > 0) {\n // Count only the successful envelopes (non-undefined)\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countSuccess(duration);\n this.customerStatsbeatMetrics?.countSuccessfulItems(envelopes);\n }\n }\n if (filteredEnvelopes.length > 0) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countRetry(statusCode);\n this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);\n }\n // calls resultCallback(ExportResult) based on result of persister.push\n return await this.persist(filteredEnvelopes);\n }\n // Failed -- not retriable\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countFailure(duration, statusCode);\n // Count dropped items for customer statsbeat for non-retriable status codes\n this.customerStatsbeatMetrics?.countDroppedItems(\n successfulEnvelopes.filter(Boolean),\n statusCode,\n );\n }\n return {\n code: ExportResultCode.FAILED,\n };\n } else {\n // calls resultCallback(ExportResult) based on result of persister.push\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countRetry(statusCode);\n this.customerStatsbeatMetrics?.countRetryItems(envelopes, statusCode);\n }\n return await this.persist(envelopes);\n }\n } else {\n // Failed -- not retriable\n if (this.networkStatsbeatMetrics && !this.isStatsbeatSender) {\n if (statusCode) {\n this.networkStatsbeatMetrics.countFailure(duration, statusCode);\n this.customerStatsbeatMetrics?.countDroppedItems(envelopes, statusCode);\n }\n } else {\n // Handles all other status codes or client exceptions for Statsbeat\n this.incrementStatsbeatFailure();\n this.customerStatsbeatMetrics?.countDroppedItems(envelopes, DropCode.CLIENT_EXCEPTION);\n }\n return {\n code: ExportResultCode.FAILED,\n };\n }\n } catch (error: any) {\n const restError = error as RestError;\n if (\n restError.statusCode &&\n (restError.statusCode === 307 || // Temporary redirect\n restError.statusCode === 308)\n ) {\n // Permanent redirect\n this.numConsecutiveRedirects++;\n // To prevent circular redirects\n if (this.numConsecutiveRedirects < 10) {\n if (restError.response && restError.response.headers) {\n const location = restError.response.headers.get(\"location\");\n if (location) {\n // Update sender URL\n this.handlePermanentRedirect(location);\n // Send to redirect endpoint as HTTPs library doesn't handle redirect automatically\n return this.exportEnvelopes(envelopes);\n }\n }\n } else {\n const redirectError = new Error(\"Circular redirect\");\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countException(redirectError);\n this.customerStatsbeatMetrics?.countDroppedItems(\n envelopes,\n DropCode.CLIENT_EXCEPTION,\n redirectError.message,\n );\n }\n return { code: ExportResultCode.FAILED, error: redirectError };\n }\n } else if (\n restError.statusCode &&\n isRetriable(restError.statusCode) &&\n !this.isStatsbeatSender\n ) {\n this.networkStatsbeatMetrics?.countRetry(restError.statusCode);\n this.customerStatsbeatMetrics?.countRetryItems(envelopes, restError.statusCode);\n return this.persist(envelopes);\n } else if (\n restError.statusCode === 400 &&\n restError.message.includes(\"Invalid instrumentation key\")\n ) {\n // Invalid instrumentation key, shutdown statsbeat, fail silently\n this.shutdownStatsbeat();\n return { code: ExportResultCode.SUCCESS };\n } else if (\n restError.statusCode &&\n this.isStatsbeatSender &&\n isStatsbeatShutdownStatus(restError.statusCode)\n ) {\n // If the status code is a shutdown status code for statsbeat, shutdown statsbeat and fail silently\n this.incrementStatsbeatFailure();\n return { code: ExportResultCode.SUCCESS };\n }\n\n // For retriable REST errors\n if (this.isRetriableRestError(restError) && !this.isStatsbeatSender) {\n if (this.customerStatsbeatMetrics?.isTimeoutError(restError) && !this.isStatsbeatSender) {\n this.customerStatsbeatMetrics?.countRetryItems(\n envelopes,\n RetryCode.CLIENT_TIMEOUT,\n \"timeout_exception\",\n );\n diag.error(\"Request timed out. Error message:\", restError.message);\n } else if (restError.statusCode) {\n this.networkStatsbeatMetrics?.countRetry(restError.statusCode);\n this.customerStatsbeatMetrics?.countRetryItems(envelopes, restError.statusCode);\n }\n diag.error(\n \"Retrying due to transient client side error. Error message:\",\n restError.message,\n );\n return this.persist(envelopes);\n }\n // For non-retriable REST errors or client exceptions\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countException(restError);\n diag.error(\n \"Envelopes could not be exported and are not retriable. Error message:\",\n restError.message,\n );\n }\n return { code: ExportResultCode.FAILED, error: restError };\n }\n }\n\n /**\n * Persist envelopes to disk\n */\n private async persist(envelopes: unknown[]): Promise<ExportResult> {\n try {\n const success = await this.persister.push(envelopes);\n return success\n ? { code: ExportResultCode.SUCCESS }\n : {\n code: ExportResultCode.FAILED,\n error: new Error(\"Failed to persist envelope in disk.\"),\n };\n } catch (ex: any) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countWriteFailure();\n if (this.disableOfflineStorage && envelopes) {\n this.customerStatsbeatMetrics?.countDroppedItems(\n envelopes as Envelope[],\n DropCode.CLIENT_STORAGE_DISABLED,\n );\n }\n }\n return { code: ExportResultCode.FAILED, error: ex };\n }\n }\n\n /**\n * Disable collection of statsbeat metrics after max failures\n */\n private incrementStatsbeatFailure(): void {\n this.statsbeatFailureCount++;\n if (this.statsbeatFailureCount > MAX_STATSBEAT_FAILURES) {\n this.shutdownStatsbeat();\n }\n }\n\n /**\n * Shutdown statsbeat metrics\n */\n private shutdownStatsbeat(): void {\n if (this.networkStatsbeatMetrics) {\n this.networkStatsbeatMetrics.shutdown();\n }\n if (this.longIntervalStatsbeatMetrics) {\n this.longIntervalStatsbeatMetrics?.shutdown();\n }\n if (this.customerStatsbeatMetrics) {\n this.customerStatsbeatMetrics.shutdown();\n }\n this.statsbeatFailureCount = 0;\n }\n\n private async sendFirstPersistedFile(): Promise<void> {\n const envelopes = (await this.persister.shift()) as Envelope[] | null;\n try {\n if (envelopes) {\n await this.send(envelopes);\n }\n } catch (err: any) {\n if (!this.isStatsbeatSender) {\n this.networkStatsbeatMetrics?.countReadFailure();\n }\n diag.warn(`Failed to fetch persisted file`, err);\n }\n }\n\n private isRetriableRestError(error: RestError): boolean {\n const restErrorTypes: string[] = Object.values(RetriableRestErrorTypes);\n if (error && error.code && restErrorTypes.includes(error.code)) {\n return true;\n }\n return false;\n }\n}\n"]}
@@ -9,7 +9,6 @@ export declare class Context {
9
9
  static opentelemetryVersion: string | null;
10
10
  static nodeVersion: string;
11
11
  constructor();
12
- private _loadDeviceContext;
13
12
  private _loadInternalContext;
14
13
  private _getVersion;
15
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/platform/nodejs/context/context.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAS9C;;;GAGG;AACH,qBAAa,OAAO;IACX,IAAI,EAAE,IAAI,CAAC;IAElB,OAAc,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/C,OAAc,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzD,OAAc,WAAW,EAAE,MAAM,CAAM;;IAQvC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,WAAW;CASpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/platform/nodejs/context/context.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAS9C;;;GAGG;AACH,qBAAa,OAAO;IACX,IAAI,EAAE,IAAI,CAAC;IAElB,OAAc,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/C,OAAc,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzD,OAAc,WAAW,EAAE,MAAM,CAAM;;IAOvC,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,WAAW;CASpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC"}