-
Notifications
You must be signed in to change notification settings - Fork 144
[Preview] Adding support for Standard Metrics #1002
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
Conversation
| private _httpRequestDone(metric: IHttpStandardMetric) { | ||
| // Done could be called multiple times, only process metric once | ||
| if (!metric.isProcessed) { | ||
| metric.isProcessed = true; |
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.
Curious as to why and how _httpRequestDone is called multiple times for the same request?
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.
It could be called multiple times for specific cases, like request timeout, abort, etc.
| if (this._metricHandler?.isStandardMetricsEnabled) { | ||
| let exceptionDimensions: IMetricExceptionDimensions = { | ||
| cloudRoleInstance: envelope.tags[KnownContextTagKeys.AiCloudRoleInstance], | ||
| cloudRoleName: envelope.tags[KnownContextTagKeys.AiCloudRole] |
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.
Another field client/type might be needed. Curious did you look into what this dimension represents?
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.
I was not aware of the existence of that dimension, currently only enabling what we had before
|
|
||
| private static _instance: HttpMetricsInstrumentation; | ||
| private _nodeVersion: string; | ||
| public totalRequestCount: number = 0; |
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.
Why do we need to keep track of these totals? Are you planning to replace performance counters with this instrumentation?
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.
Perfomance counters are currently calculated using these, is still not very clear how perf counters would be handled in OpenTelemetry so having this functionality in the meantime
|
Exporter related changes: Azure/azure-sdk-for-js#22886 |
Added duration metrics for server/client in internal MetricsInstrumentation
Exceptions and traces standard metrics continue to work as before
Added SpanProcessor to add extra properties in spans