@azure/monitor-opentelemetry-exporter 1.0.0-beta.4 → 1.0.0-beta.7

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 (46) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +11 -13
  3. package/dist/index.js +701 -355
  4. package/dist-esm/src/Declarations/Constants.js +1 -26
  5. package/dist-esm/src/Declarations/Constants.js.map +1 -1
  6. package/dist-esm/src/config.js +2 -4
  7. package/dist-esm/src/config.js.map +1 -1
  8. package/dist-esm/src/export/trace.js +5 -4
  9. package/dist-esm/src/export/trace.js.map +1 -1
  10. package/dist-esm/src/generated/applicationInsightsClient.js +13 -9
  11. package/dist-esm/src/generated/applicationInsightsClient.js.map +1 -1
  12. package/dist-esm/src/generated/applicationInsightsClientContext.js +13 -11
  13. package/dist-esm/src/generated/applicationInsightsClientContext.js.map +1 -1
  14. package/dist-esm/src/generated/models/index.js +47 -1
  15. package/dist-esm/src/generated/models/index.js.map +1 -1
  16. package/dist-esm/src/generated/models/mappers.js +25 -4
  17. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  18. package/dist-esm/src/generated/models/parameters.js +6 -1
  19. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  20. package/dist-esm/src/platform/nodejs/constants.js +1 -1
  21. package/dist-esm/src/platform/nodejs/constants.js.map +1 -1
  22. package/dist-esm/src/platform/nodejs/context/context.js +12 -82
  23. package/dist-esm/src/platform/nodejs/context/context.js.map +1 -1
  24. package/dist-esm/src/platform/nodejs/httpSender.js +23 -4
  25. package/dist-esm/src/platform/nodejs/httpSender.js.map +1 -1
  26. package/dist-esm/src/platform/nodejs/persist/fileAccessControl.js +171 -0
  27. package/dist-esm/src/platform/nodejs/persist/fileAccessControl.js.map +1 -0
  28. package/dist-esm/src/platform/nodejs/persist/fileSystemPersist.js +40 -19
  29. package/dist-esm/src/platform/nodejs/persist/fileSystemPersist.js.map +1 -1
  30. package/dist-esm/src/types.js.map +1 -1
  31. package/dist-esm/src/utils/breezeUtils.js +5 -4
  32. package/dist-esm/src/utils/breezeUtils.js.map +1 -1
  33. package/dist-esm/src/utils/constants/applicationinsights.js +9 -31
  34. package/dist-esm/src/utils/constants/applicationinsights.js.map +1 -1
  35. package/dist-esm/src/utils/eventhub.js +1 -1
  36. package/dist-esm/src/utils/eventhub.js.map +1 -1
  37. package/dist-esm/src/utils/spanUtils.js +253 -100
  38. package/dist-esm/src/utils/spanUtils.js.map +1 -1
  39. package/package.json +37 -24
  40. package/types/monitor-opentelemetry-exporter.d.ts +7 -2
  41. package/dist-esm/src/utils/constants/span/dbAttributes.js +0 -14
  42. package/dist-esm/src/utils/constants/span/dbAttributes.js.map +0 -1
  43. package/dist-esm/src/utils/constants/span/grpcAttributes.js +0 -14
  44. package/dist-esm/src/utils/constants/span/grpcAttributes.js.map +0 -1
  45. package/dist-esm/src/utils/constants/span/httpAttributes.js +0 -24
  46. package/dist-esm/src/utils/constants/span/httpAttributes.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/generated/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,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;aACF;YACD,UA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QAAQ,EAAE;gBACR,cAAc,EAAE,UAAU;gBAC1B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI;gBAClB,cAAc,EAAE,SAAS;gBACzB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;iBAChB;aACF,EACD,YAAY,EAAE;gBACZ,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,cAAc;gBAC9B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,MAAM,EAAE;gBACN,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,QAAQ;gBACxB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,GAAG,EAAE;gBACH,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,KAAK;gBACrB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,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 coreHttp from \"@azure/core-http\";\n\nexport const TelemetryItem: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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: { name: \"Composite\", className: \"TelemetryErrorDetails\" }\n }\n }\n }\n }\n }\n};\n\nexport const TelemetryErrorDetails: coreHttp.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: coreHttp.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 type: {\n name: \"Number\"\n }\n },\n min: {\n serializedName: \"min\",\n type: {\n name: \"Number\"\n }\n },\n max: {\n serializedName: \"max\",\n type: {\n name: \"Number\"\n }\n },\n stdDev: {\n serializedName: \"stdDev\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const TelemetryExceptionDetails: coreHttp.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: { type: { name: \"Composite\", className: \"StackFrame\" } }\n }\n }\n }\n }\n};\n\nexport const StackFrame: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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: { name: \"Composite\", className: \"TelemetryExceptionDetails\" }\n }\n }\n },\n severityLevel: {\n serializedName: \"severityLevel\",\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: coreHttp.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: coreHttp.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: { type: { name: \"Composite\", className: \"MetricDataPoint\" } }\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: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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;AAIH,MAAM,CAAC,MAAM,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;aACF;YACD,UAAU,EAAE;gBACV,YAAY,EAAE,GAAG;gBACjB,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,QAAQ,EAAE;gBACR,WAAW,EAAE;oBACX,SAAS,EAAE,EAAE;iBACd;gBACD,cAAc,EAAE,KAAK;gBACrB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,kBAAkB,EAAE;gBAClB,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI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AAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,cAAc;gBAC9B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,MAAM,EAAE;gBACN,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,QAAQ;gBACxB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,GAAG,EAAE;gBACH,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,KAAK;gBACrB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF,EACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,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"]}
@@ -23,7 +23,12 @@ export const body = {
23
23
  required: true,
24
24
  type: {
25
25
  name: "Sequence",
26
- element: { type: { name: "Composite", className: "TelemetryItem" } }
26
+ element: {
27
+ type: {
28
+ name: "Composite",
29
+ className: "TelemetryItem"
30
+ }
31
+ }
27
32
  }
28
33
  }
29
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE;SACrE;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAA0B;IACzC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,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 { OperationParameter, OperationURLParameter } from \"@azure/core-http\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const body: OperationParameter = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n type: {\n name: \"Sequence\",\n element: { type: { name: \"Composite\", className: \"TelemetryItem\" } }\n }\n }\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const host: OperationURLParameter = {\n parameterPath: \"host\",\n mapper: {\n serializedName: \"Host\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE;oBACJ,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,eAAe;iBAC3B;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAA0B;IACzC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,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 { OperationParameter, OperationURLParameter } from \"@azure/core-client\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const body: OperationParameter = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"TelemetryItem\"\n }\n }\n }\n }\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const host: OperationURLParameter = {\n parameterPath: \"host\",\n mapper: {\n serializedName: \"Host\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n"]}
@@ -7,6 +7,6 @@
7
7
  export const SDK_INFO = {
8
8
  NAME: "opentelemetry",
9
9
  RUNTIME: "node",
10
- LANGUAGE: "nodejs"
10
+ LANGUAGE: "nodejs",
11
11
  };
12
12
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,QAAQ;CACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * SDK info\n * @internal\n */\nexport const SDK_INFO = {\n NAME: \"opentelemetry\",\n RUNTIME: \"node\",\n LANGUAGE: \"nodejs\"\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,QAAQ;CACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * SDK info\n * @internal\n */\nexport const SDK_INFO = {\n NAME: \"opentelemetry\",\n RUNTIME: \"node\",\n LANGUAGE: \"nodejs\",\n};\n"]}
@@ -1,112 +1,42 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import * as os from "os";
4
- import * as fs from "fs";
5
- import * as path from "path";
6
- import { diag } from "@opentelemetry/api";
7
4
  import { SDK_INFO } from "@opentelemetry/core";
5
+ import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
6
+ import { KnownContextTagKeys } from "../../../generated";
7
+ import * as ai from "../../../utils/constants/applicationinsights";
8
8
  let instance = null;
9
9
  /**
10
10
  * Azure Telemetry context.
11
11
  * @internal
12
12
  */
13
13
  export class Context {
14
- constructor(
15
- /**
16
- * Path to this module's `package.json` relative to
17
- * `Context.ROOT_PATH`
18
- */
19
- _exporterPrefix = "./",
20
- /**
21
- * Path to end user application folder which contains `package.json`
22
- * relative to `Context.ROOT_PATH`
23
- */
24
- _appPrefix = "../../../") {
25
- this._exporterPrefix = _exporterPrefix;
26
- this._appPrefix = _appPrefix;
14
+ constructor() {
27
15
  this.tags = {};
28
- this._loadApplicationContext();
29
16
  this._loadDeviceContext();
30
17
  this._loadInternalContext();
31
18
  }
32
- _loadApplicationContext() {
33
- if (Object.keys(Context.appVersion).length === 0) {
34
- // note: this should return the host package.json
35
- let packageJson = null;
36
- const packageJsonPath = path.resolve(__dirname, Context.JS_NODE_PREFIX, this._appPrefix, Context.ROOT_PATH, "./package.json");
37
- const packageJsonPathTsNode = path.resolve(__dirname, this._appPrefix, Context.ROOT_PATH, "./package.json");
38
- Context.appVersion[packageJsonPath] = "unknown";
39
- try {
40
- packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
41
- }
42
- catch (_) {
43
- try {
44
- packageJson = JSON.parse(fs.readFileSync(packageJsonPathTsNode, "utf8"));
45
- }
46
- catch (exception) {
47
- diag.warn("Failed to load Application version", exception);
48
- }
49
- }
50
- if (packageJson && typeof packageJson.version === "string") {
51
- Context.appVersion[packageJsonPath] = packageJson.version;
52
- }
53
- this.tags["ai.application.ver"] = Context.appVersion[packageJsonPath];
54
- }
55
- }
56
19
  _loadDeviceContext() {
57
- this.tags["ai.device.id"] = "";
58
- this.tags["ai.device.osVersion"] = os && `${os.type()} ${os.release()}`;
59
- // not yet supported tags
60
- this.tags["ai.device.osArchitecture"] = os && os.arch();
61
- this.tags["ai.device.osPlatform"] = os && os.platform();
20
+ this.tags[KnownContextTagKeys.AiDeviceOsVersion] = os && `${os.type()} ${os.release()}`;
62
21
  }
63
22
  _loadInternalContext() {
64
- if (!Context.sdkVersion) {
65
- let packageJson = null;
66
- const { node } = process.versions;
67
- [Context.nodeVersion] = node.split(".");
68
- // note: this should return the sdk package.json
69
- const packageJsonPath = path.resolve(__dirname, Context.JS_NODE_PREFIX, this._exporterPrefix, Context.ROOT_PATH, "./package.json");
70
- const packageJsonPathTsNode = path.resolve(__dirname, this._exporterPrefix, Context.ROOT_PATH, "./package.json");
71
- Context.sdkVersion = "unknown";
72
- try {
73
- packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
74
- }
75
- catch (_) {
76
- try {
77
- packageJson = JSON.parse(fs.readFileSync(packageJsonPathTsNode, "utf8"));
78
- }
79
- catch (exception) {
80
- diag.warn("Failed to load Exporter version", exception);
81
- throw exception;
82
- }
83
- }
84
- if (packageJson && typeof packageJson.version === "string") {
85
- Context.sdkVersion = packageJson.version;
86
- }
87
- }
88
- this.tags["ai.internal.sdkVersion"] = `node${Context.nodeVersion}:ot${SDK_INFO.VERSION}:ext${Context.sdkVersion}`;
23
+ const { node } = process.versions;
24
+ [Context.nodeVersion] = node.split(".");
25
+ Context.opentelemetryVersion = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_VERSION];
26
+ Context.sdkVersion = ai.packageVersion;
27
+ this.tags[KnownContextTagKeys.AiInternalSdkVersion] = `node${Context.nodeVersion}:otel${Context.opentelemetryVersion}:ext${Context.sdkVersion}`;
89
28
  }
90
29
  }
91
- Context.appVersion = {};
92
30
  Context.sdkVersion = null;
93
31
  Context.opentelemetryVersion = null;
94
32
  Context.nodeVersion = "";
95
- /**
96
- * Add extra ../ to access on environments not using ts-node
97
- */
98
- Context.JS_NODE_PREFIX = "../";
99
- /**
100
- * Path to azure-opentelemetry-exporter
101
- */
102
- Context.ROOT_PATH = "../../../../";
103
33
  /**
104
34
  * Singleton Context instance.
105
35
  * @internal
106
36
  */
107
- export function getInstance(exporterPrefix, appPrefix) {
37
+ export function getInstance() {
108
38
  if (!instance) {
109
- instance = new Context(exporterPrefix, appPrefix);
39
+ instance = new Context();
110
40
  }
111
41
  return instance;
112
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/platform/nodejs/context/context.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAO/C,IAAI,QAAQ,GAAmB,IAAI,CAAC;AAEpC;;;GAGG;AACH,MAAM,OAAO,OAAO;IAqBlB;IACE;;;OAGG;IACK,kBAAkB,IAAI;IAC9B;;;OAGG;IACK,aAAa,WAAW;QALxB,oBAAe,GAAf,eAAe,CAAO;QAKtB,eAAU,GAAV,UAAU,CAAc;QAEhC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QAEf,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAEO,uBAAuB;QAC7B,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAChD,iDAAiD;YACjD,IAAI,WAAW,GAAuB,IAAI,CAAC;YAC3C,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAClC,SAAS,EACT,OAAO,CAAC,cAAc,EACtB,IAAI,CAAC,UAAU,EACf,OAAO,CAAC,SAAS,EACjB,gBAAgB,CACjB,CAAC;YACF,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CACxC,SAAS,EACT,IAAI,CAAC,UAAU,EACf,OAAO,CAAC,SAAS,EACjB,gBAAgB,CACjB,CAAC;YAEF,OAAO,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;AAE3C,mBAAW,GAAW,EAAE,CAAC;AAEvC;;GAEG;AACqB,sBAAc,GAAG,KAAK,CAAC;AAE/C;;GAEG;AACqB,iBAAS,GAAG,cAAc,CAAC;AAgHrD;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,cAAuB,EAAE,SAAkB;IACrE,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,IAAI,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;KACnD;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"os\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { diag } from \"@opentelemetry/api\";\nimport { SDK_INFO } from \"@opentelemetry/core\";\n\nimport { ContextTagKeys } from \"../../../generated\";\nimport { Tags } from \"../../../types\";\n\ntype PackageJson = { version: string };\n\nlet instance: Context | null = null;\n\n/**\n * Azure Telemetry context.\n * @internal\n */\nexport class Context {\n public tags: Tags;\n\n public static appVersion: { [path: string]: string } = {};\n\n public static sdkVersion: string | null = null;\n\n public static opentelemetryVersion: string | null = null;\n\n public static nodeVersion: string = \"\";\n\n /**\n * Add extra ../ to access on environments not using ts-node\n */\n private static readonly JS_NODE_PREFIX = \"../\";\n\n /**\n * Path to azure-opentelemetry-exporter\n */\n private static readonly ROOT_PATH = \"../../../../\";\n\n constructor(\n /**\n * Path to this module's `package.json` relative to\n * `Context.ROOT_PATH`\n */\n private _exporterPrefix = \"./\",\n /**\n * Path to end user application folder which contains `package.json`\n * relative to `Context.ROOT_PATH`\n */\n private _appPrefix = \"../../../\"\n ) {\n this.tags = {};\n\n this._loadApplicationContext();\n this._loadDeviceContext();\n this._loadInternalContext();\n }\n\n private _loadApplicationContext(): void {\n if (Object.keys(Context.appVersion).length === 0) {\n // note: this should return the host package.json\n let packageJson: PackageJson | null = null;\n const packageJsonPath = path.resolve(\n __dirname,\n Context.JS_NODE_PREFIX,\n this._appPrefix,\n Context.ROOT_PATH,\n \"./package.json\"\n );\n const packageJsonPathTsNode = path.resolve(\n __dirname,\n this._appPrefix,\n Context.ROOT_PATH,\n \"./package.json\"\n );\n\n Context.appVersion[packageJsonPath] = \"unknown\";\n\n try {\n packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as PackageJson;\n } catch (_) {\n try {\n packageJson = JSON.parse(fs.readFileSync(packageJsonPathTsNode, \"utf8\")) as PackageJson;\n } catch (exception) {\n diag.warn(\"Failed to load Application version\", exception);\n }\n }\n\n if (packageJson && typeof packageJson.version === \"string\") {\n Context.appVersion[packageJsonPath] = packageJson.version;\n }\n\n this.tags[\"ai.application.ver\"] = Context.appVersion[packageJsonPath];\n }\n }\n\n private _loadDeviceContext(): void {\n this.tags[\"ai.device.id\"] = \"\";\n this.tags[\"ai.device.osVersion\"] = os && `${os.type()} ${os.release()}`;\n\n // not yet supported tags\n this.tags[\"ai.device.osArchitecture\" as ContextTagKeys] = os && os.arch();\n this.tags[\"ai.device.osPlatform\" as ContextTagKeys] = os && os.platform();\n }\n\n private _loadInternalContext(): void {\n if (!Context.sdkVersion) {\n let packageJson: { version: string } | null = null;\n const { node } = process.versions;\n [Context.nodeVersion] = node.split(\".\");\n\n // note: this should return the sdk package.json\n const packageJsonPath = path.resolve(\n __dirname,\n Context.JS_NODE_PREFIX,\n this._exporterPrefix,\n Context.ROOT_PATH,\n \"./package.json\"\n );\n const packageJsonPathTsNode = path.resolve(\n __dirname,\n this._exporterPrefix,\n Context.ROOT_PATH,\n \"./package.json\"\n );\n\n Context.sdkVersion = \"unknown\";\n try {\n packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as PackageJson;\n } catch (_) {\n try {\n packageJson = JSON.parse(fs.readFileSync(packageJsonPathTsNode, \"utf8\")) as PackageJson;\n } catch (exception) {\n diag.warn(\"Failed to load Exporter version\", exception);\n throw exception;\n }\n }\n\n if (packageJson && typeof packageJson.version === \"string\") {\n Context.sdkVersion = packageJson.version;\n }\n }\n\n this.tags[\n \"ai.internal.sdkVersion\"\n ] = `node${Context.nodeVersion}:ot${SDK_INFO.VERSION}:ext${Context.sdkVersion}`;\n }\n}\n\n/**\n * Singleton Context instance.\n * @internal\n */\nexport function getInstance(exporterPrefix?: string, appPrefix?: string): Context {\n if (!instance) {\n instance = new Context(exporterPrefix, appPrefix);\n }\n return instance;\n}\n"]}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/platform/nodejs/context/context.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,8CAA8C,CAAC;AAGnE,IAAI,QAAQ,GAAmB,IAAI,CAAC;AAEpC;;;GAGG;AACH,MAAM,OAAO,OAAO;IASlB;QACE,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAEO,kBAAkB;QACxB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;IAC1F,CAAC;IAEO,oBAAoB;QAC1B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,CAAC,oBAAoB,GAAG,QAAQ,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,CAAC;QAC1F,OAAO,CAAC,UAAU,GAAG,EAAE,CAAC,cAAc,CAAC;QACvC,IAAI,CAAC,IAAI,CACP,mBAAmB,CAAC,oBAAoB,CACzC,GAAG,OAAO,OAAO,CAAC,WAAW,QAAQ,OAAO,CAAC,oBAAoB,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;IAChG,CAAC;;AAxBa,kBAAU,GAAkB,IAAI,CAAC;AAEjC,4BAAoB,GAAkB,IAAI,CAAC;AAE3C,mBAAW,GAAW,EAAE,CAAC;AAuBzC;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;KAC1B;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"os\";\nimport { SDK_INFO } from \"@opentelemetry/core\";\nimport { SemanticResourceAttributes } from \"@opentelemetry/semantic-conventions\";\n\nimport { KnownContextTagKeys } from \"../../../generated\";\nimport * as ai from \"../../../utils/constants/applicationinsights\";\nimport { Tags } from \"../../../types\";\n\nlet instance: Context | null = null;\n\n/**\n * Azure Telemetry context.\n * @internal\n */\nexport class Context {\n public tags: Tags;\n\n public static sdkVersion: string | null = null;\n\n public static opentelemetryVersion: string | null = null;\n\n public static nodeVersion: string = \"\";\n\n constructor() {\n this.tags = {};\n this._loadDeviceContext();\n this._loadInternalContext();\n }\n\n private _loadDeviceContext(): void {\n this.tags[KnownContextTagKeys.AiDeviceOsVersion] = os && `${os.type()} ${os.release()}`;\n }\n\n private _loadInternalContext(): void {\n const { node } = process.versions;\n [Context.nodeVersion] = node.split(\".\");\n Context.opentelemetryVersion = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_VERSION];\n Context.sdkVersion = ai.packageVersion;\n this.tags[\n KnownContextTagKeys.AiInternalSdkVersion\n ] = `node${Context.nodeVersion}:otel${Context.opentelemetryVersion}:ext${Context.sdkVersion}`;\n }\n}\n\n/**\n * Singleton Context instance.\n * @internal\n */\nexport function getInstance(): Context {\n if (!instance) {\n instance = new Context();\n }\n return instance;\n}\n"]}
@@ -2,7 +2,9 @@
2
2
  // Licensed under the MIT license.
3
3
  import url from "url";
4
4
  import { diag } from "@opentelemetry/api";
5
- import { ApplicationInsightsClient } from "../../generated";
5
+ import { bearerTokenAuthenticationPolicy, redirectPolicyName } from "@azure/core-rest-pipeline";
6
+ import { ApplicationInsightsClient, } from "../../generated";
7
+ const applicationInsightsResource = "https://monitor.azure.com//.default";
6
8
  /**
7
9
  * Exporter HTTP sender class
8
10
  * @internal
@@ -12,9 +14,18 @@ export class HttpSender {
12
14
  this._exporterOptions = _exporterOptions;
13
15
  // Build endpoint using provided configuration or default values
14
16
  this._appInsightsClientOptions = {
15
- host: this._exporterOptions.endpointUrl
17
+ host: this._exporterOptions.endpointUrl,
16
18
  };
17
19
  this._appInsightsClient = new ApplicationInsightsClient(Object.assign({}, this._appInsightsClientOptions));
20
+ // Handle redirects in HTTP Sender
21
+ this._appInsightsClient.pipeline.removePolicy({ name: redirectPolicyName });
22
+ if (this._exporterOptions.aadTokenCredential) {
23
+ let scopes = [applicationInsightsResource];
24
+ this._appInsightsClient.pipeline.addPolicy(bearerTokenAuthenticationPolicy({
25
+ credential: this._exporterOptions.aadTokenCredential,
26
+ scopes: scopes,
27
+ }));
28
+ }
18
29
  }
19
30
  /**
20
31
  * Send Azure envelopes
@@ -22,9 +33,17 @@ export class HttpSender {
22
33
  */
23
34
  async send(envelopes) {
24
35
  var _a;
36
+ let options = {};
25
37
  try {
26
- const { _response: res } = await this._appInsightsClient.track(envelopes);
27
- return { statusCode: res.status, result: (_a = res.bodyAsText) !== null && _a !== void 0 ? _a : "" };
38
+ let response;
39
+ function onResponse(rawResponse, flatResponse) {
40
+ response = rawResponse;
41
+ if (options.onResponse) {
42
+ options.onResponse(rawResponse, flatResponse);
43
+ }
44
+ }
45
+ await this._appInsightsClient.track(envelopes, Object.assign(Object.assign({}, options), { onResponse }));
46
+ return { statusCode: response === null || response === void 0 ? void 0 : response.status, result: (_a = response === null || response === void 0 ? void 0 : response.bodyAsText) !== null && _a !== void 0 ? _a : "" };
28
47
  }
29
48
  catch (e) {
30
49
  throw e;
@@ -1 +1 @@
1
- {"version":3,"file":"httpSender.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/httpSender.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAEL,yBAAyB,EAE1B,MAAM,iBAAiB,CAAC;AAGzB;;;GAGG;AACH,MAAM,OAAO,UAAU;IAIrB,YAAoB,gBAA6C;QAA7C,qBAAgB,GAAhB,gBAAgB,CAA6B;QAC/D,gEAAgE;QAChE,IAAI,CAAC,yBAAyB,GAAG;YAC/B,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,WAAW;SACxC,CAAC;QAEF,IAAI,CAAC,kBAAkB,GAAG,IAAI,yBAAyB,mBAClD,IAAI,CAAC,yBAAyB,EACjC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,SAAqB;;QAC9B,IAAI;YACF,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC1E,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAA,GAAG,CAAC,UAAU,mCAAI,EAAE,EAAE,CAAC;SACjE;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,CAAC;SACT;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACxC,CAAC;IAED,uBAAuB,CAAC,QAA4B;QAClD,IAAI,QAAQ,EAAE;YACZ,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;aACzD;SACF;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport url from \"url\";\nimport { diag } from \"@opentelemetry/api\";\nimport { Sender, SenderResult } from \"../../types\";\nimport {\n TelemetryItem as Envelope,\n ApplicationInsightsClient,\n ApplicationInsightsClientOptionalParams\n} from \"../../generated\";\nimport { AzureExporterInternalConfig } from \"../../config\";\n\n/**\n * Exporter HTTP sender class\n * @internal\n */\nexport class HttpSender implements Sender {\n private readonly _appInsightsClient: ApplicationInsightsClient;\n private _appInsightsClientOptions: ApplicationInsightsClientOptionalParams;\n\n constructor(private _exporterOptions: AzureExporterInternalConfig) {\n // Build endpoint using provided configuration or default values\n this._appInsightsClientOptions = {\n host: this._exporterOptions.endpointUrl\n };\n\n this._appInsightsClient = new ApplicationInsightsClient({\n ...this._appInsightsClientOptions\n });\n }\n\n /**\n * Send Azure envelopes\n * @internal\n */\n async send(envelopes: Envelope[]): Promise<SenderResult> {\n try {\n const { _response: res } = await this._appInsightsClient.track(envelopes);\n return { statusCode: res.status, result: res.bodyAsText ?? \"\" };\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Shutdown sender\n * @internal\n */\n async shutdown(): Promise<void> {\n diag.info(\"HttpSender shutting down\");\n }\n\n handlePermanentRedirect(location: string | undefined) {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this._appInsightsClient.host = \"https://\" + locUrl.host;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"httpSender.js","sourceRoot":"","sources":["../../../../src/platform/nodejs/httpSender.ts"],"names":[],"mappings":"AA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tB,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;iBAC/C;YACH,CAAC;YACD,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,SAAS,kCACxC,OAAO,KACV,UAAU,IACV,CAAC;YAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,EAAE,MAAM,EAAE,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,mCAAI,EAAE,EAAE,CAAC;SAC7E;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,CAAC;SACT;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACxC,CAAC;IAED,uBAAuB,CAAC,QAA4B;QAClD,IAAI,QAAQ,EAAE;YACZ,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;gBACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;aACzD;SACF;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport url from \"url\";\nimport { diag } from \"@opentelemetry/api\";\nimport { FullOperationResponse } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy, redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport { Sender, SenderResult } from \"../../types\";\nimport {\n TelemetryItem as Envelope,\n ApplicationInsightsClient,\n ApplicationInsightsClientOptionalParams,\n TrackOptionalParams,\n} from \"../../generated\";\nimport { AzureExporterInternalConfig } from \"../../config\";\n\nconst applicationInsightsResource = \"https://monitor.azure.com//.default\";\n\n/**\n * Exporter HTTP sender class\n * @internal\n */\nexport class HttpSender implements Sender {\n private readonly _appInsightsClient: ApplicationInsightsClient;\n private _appInsightsClientOptions: ApplicationInsightsClientOptionalParams;\n\n constructor(private _exporterOptions: AzureExporterInternalConfig) {\n // Build endpoint using provided configuration or default values\n this._appInsightsClientOptions = {\n host: this._exporterOptions.endpointUrl,\n };\n this._appInsightsClient = new ApplicationInsightsClient({\n ...this._appInsightsClientOptions,\n });\n // Handle redirects in HTTP Sender\n this._appInsightsClient.pipeline.removePolicy({ name: redirectPolicyName });\n\n if (this._exporterOptions.aadTokenCredential) {\n let scopes: string[] = [applicationInsightsResource];\n this._appInsightsClient.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential: this._exporterOptions.aadTokenCredential,\n scopes: scopes,\n })\n );\n }\n }\n\n /**\n * Send Azure envelopes\n * @internal\n */\n async send(envelopes: Envelope[]): Promise<SenderResult> {\n let options: TrackOptionalParams = {};\n try {\n let response: FullOperationResponse | undefined;\n function onResponse(rawResponse: FullOperationResponse, flatResponse: unknown): void {\n response = rawResponse;\n if (options.onResponse) {\n options.onResponse(rawResponse, flatResponse);\n }\n }\n await this._appInsightsClient.track(envelopes, {\n ...options,\n onResponse,\n });\n\n return { statusCode: response?.status, result: response?.bodyAsText ?? \"\" };\n } catch (e) {\n throw e;\n }\n }\n\n /**\n * Shutdown sender\n * @internal\n */\n async shutdown(): Promise<void> {\n diag.info(\"HttpSender shutting down\");\n }\n\n handlePermanentRedirect(location: string | undefined) {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this._appInsightsClient.host = \"https://\" + locUrl.host;\n }\n }\n }\n}\n"]}