ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

EnvelopeTelemetry tags type seems wrong

Open GravlLift opened this issue 3 years ago • 4 comments

The type of envelope telemetry seems to be incorrect in the data contracts:

https://github.com/microsoft/ApplicationInsights-node.js/blob/cb098755d5a80c471e342a11e0babae5fd38c04f/Declarations/Contracts/TelemetryTypes/EnvelopeTelemetry.ts#L34-L37

Is that supposed to be Tags | Tags[] or is the tag property really supposed to be both an object and array simultaneously?

GravlLift avatar Sep 30 '22 17:09 GravlLift

@GravlLift looks like contracts are outdated here, tags should be an object like this {[propertyName: string]: string }

hectorhdzg avatar Sep 30 '22 19:09 hectorhdzg

@GravlLift looks like contracts are outdated here, tags should be an object like this {[propertyName: string]: string }

The Tags interface below that mostly matches that format, it's really only the union of the array type that stops this from being accurate.

https://github.com/microsoft/ApplicationInsights-node.js/blob/cb098755d5a80c471e342a11e0babae5fd38c04f/Declarations/Contracts/TelemetryTypes/EnvelopeTelemetry.ts#L61-L66

GravlLift avatar Sep 30 '22 19:09 GravlLift