-
Notifications
You must be signed in to change notification settings - Fork 16
Implement standard metrics for http dependency telemetry #125
Conversation
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
- Coverage 93.00% 92.96% -0.05%
==========================================
Files 21 21
Lines 1201 1236 +35
Branches 149 153 +4
==========================================
+ Hits 1117 1149 +32
Misses 56 56
- Partials 28 31 +3
Continue to review full report at Codecov.
|
if point.name == "http.client.duration": | ||
point.name = "Dependency duration" | ||
point.kind = protocol.DataPointType.AGGREGATION.value | ||
properties["_MS.MetricId"] = "dependencies/duration" |
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.
Looks like we are getting more AI properties like this one and others, it would be good to have them somewhere as constants to avoid bugs regarding typos
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.
Moving AI properties to a constants file I feel implies that they are a "global" accessible variable. These properties are only relevant to standard metric implementation and so should exist only in that scope (within the metrics file). Perhaps it will be more suitable at the top of the module as constants, but until there are other implementations in other files related to standard metrics, or multiple uses for the constants, I don't see this as much of an improvement.
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.
This is not blocking comment, is up to you to handle this, having the constants in the top of the file let you quickly realize we are using these and in case something change is easier to update
properties["Dependency.Success"] = "True" | ||
except ValueError: | ||
pass | ||
# TODO: Check other properties if url doesn't exist |
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.
What kind of other properties?
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.
Part of #123
Adds the custom properties to a telemetry processor that runs every time a http dependency telemetry is exported.
Implementation taken from the App Insights Dot net SDK.