-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Monitor][Codegen] Use generated TelemetryItem (as Envelope) #11280
Changes from 14 commits
1b274fb
e060a90
0e2cfb6
c1ca84a
f6c4960
0cd137b
0cfe500
c461b7a
5c91421
f6743cb
8d9f34d
dcaa767
acbaf4b
18d5098
424b62b
f8844d6
dcf8656
de79268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ export interface TelemetryItem { | |
/** | ||
* Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z. | ||
*/ | ||
time: Date; | ||
time: string; | ||
/** | ||
* Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items. | ||
*/ | ||
|
@@ -65,9 +65,13 @@ export interface MonitorBase { | |
*/ | ||
export interface MonitorDomain { | ||
/** | ||
* Ignored value. | ||
* Describes unknown properties. The value of an unknown property can be of "any" type. | ||
*/ | ||
test?: string; | ||
[property: string]: any; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This means anything that mixes in with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can go away once autorest supports |
||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
} | ||
|
||
/** | ||
|
@@ -205,10 +209,6 @@ export interface StackFrame { | |
* Instances of AvailabilityData represent the result of executing an availability test. | ||
*/ | ||
export type AvailabilityData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service. | ||
*/ | ||
|
@@ -247,10 +247,6 @@ export type AvailabilityData = MonitorDomain & { | |
* Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name. | ||
*/ | ||
export type TelemetryEventData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Event name. Keep it low cardinality to allow proper grouping and useful metrics. | ||
*/ | ||
|
@@ -269,14 +265,10 @@ export type TelemetryEventData = MonitorDomain & { | |
* An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application. | ||
*/ | ||
export type TelemetryExceptionData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Exception chain - list of inner exceptions. | ||
*/ | ||
exceptions?: TelemetryExceptionDetails[]; | ||
exceptions: TelemetryExceptionDetails[]; | ||
/** | ||
* Severity level. Mostly used to indicate exception severity level when it is reported by logging library. | ||
*/ | ||
|
@@ -296,13 +288,9 @@ export type TelemetryExceptionData = MonitorDomain & { | |
}; | ||
|
||
/** | ||
* Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements. | ||
* Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into instances of this type. The message does not have measurements. | ||
*/ | ||
export type MessageData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Trace message | ||
*/ | ||
|
@@ -325,10 +313,6 @@ export type MessageData = MonitorDomain & { | |
* An instance of the Metric item is a list of measurements (single data points) and/or aggregations. | ||
*/ | ||
export type MetricsData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used. | ||
*/ | ||
|
@@ -343,10 +327,6 @@ export type MetricsData = MonitorDomain & { | |
* An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView. | ||
*/ | ||
export type PageViewData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Identifier of a page view instance. Used for correlation between page view and other telemetry items. | ||
*/ | ||
|
@@ -381,10 +361,6 @@ export type PageViewData = MonitorDomain & { | |
* An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request. | ||
*/ | ||
export type PageViewPerfData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Identifier of a page view instance. Used for correlation between page view and other telemetry items. | ||
*/ | ||
|
@@ -435,10 +411,6 @@ export type PageViewPerfData = MonitorDomain & { | |
* An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint. | ||
*/ | ||
export type RemoteDependencyData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Identifier of a dependency call instance. Used for correlation with the request telemetry item corresponding to this dependency call. | ||
*/ | ||
|
@@ -452,7 +424,7 @@ export type RemoteDependencyData = MonitorDomain & { | |
*/ | ||
resultCode?: string; | ||
/** | ||
* Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters. | ||
* Command initiated by this dependency call. Examples are SQL statement and HTTP URL with all query parameters. | ||
*/ | ||
data?: string; | ||
/** | ||
|
@@ -468,7 +440,7 @@ export type RemoteDependencyData = MonitorDomain & { | |
*/ | ||
duration: string; | ||
/** | ||
* Indication of successfull or unsuccessfull call. | ||
* Indication of successful or unsuccessful call. | ||
*/ | ||
success?: boolean; | ||
/** | ||
|
@@ -482,13 +454,9 @@ export type RemoteDependencyData = MonitorDomain & { | |
}; | ||
|
||
/** | ||
* An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView. | ||
* An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results. | ||
*/ | ||
export type RequestData = MonitorDomain & { | ||
/** | ||
* Schema version | ||
*/ | ||
version: number; | ||
/** | ||
* Identifier of a request call instance. Used for correlation between request and other telemetry items. | ||
*/ | ||
|
@@ -502,7 +470,7 @@ export type RequestData = MonitorDomain & { | |
*/ | ||
duration: string; | ||
/** | ||
* Indication of successfull or unsuccessfull call. | ||
* Indication of successful or unsuccessful call. | ||
*/ | ||
success: boolean; | ||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we really mean to make this a string and not a Date? Usually Date is easier to work with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Have you gotten dates to be cross-lang interoperable in other client SDKs? Maybe the mapper/serializer could handle mapping Date to string?
https://github.com/Azure/azure-rest-api-specs/blob/27cc07ddd294d98e05cb301e07a72378df9f87e8/specification/applicationinsights/data-plane/Monitor.Exporters/preview/2020-09-15_Preview/swagger.json#L850-L853
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it work if you do something like this?