-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
Code to expose this to final user is not part of this PR, currently we need to add the AzureMetricsSpanProcessor to the TracerProvider and instantiate the AutoCollection classes, it will be good to have some initial configuration that take care of this |
|
||
# pylint: disable=too-many-statements | ||
# pylint: disable=too-many-branches | ||
def convert_span_to_envelope(span: Span) -> protocol.Envelope: |
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 move this here?
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.
Need this conversion in LiveMetrics processing, could move to a more appropriate location like utility or something, any suggestion?
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.
Can we leave this in trace and have LiveMetrics just import from trace module?
data.properties["_MS.links"] = json.dumps(links) | ||
# TODO: tracestate, tags | ||
envelope = convert_span_to_envelope(span) | ||
envelope.ikey = self.options.instrumentation_key |
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.
How come we can't set the ikey in the convert
function?
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.
ikey is not available everywhere in the SDK, is currently specific to exporters, validation code is already in there, will need to centralize ikey management to be able to add the ikey in some shared function
Can you add a summary of all the changes in the description (including moving certain files) and also the reasoning behind those changes? |
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 would also be good to document somewhere in a consolidated place exactly what standard metrics are autocollected and what live metrics are autocollected.
azure_monitor/src/azure_monitor/sdk/auto_collection/live_metrics/dependency_metrics.py
Outdated
Show resolved
Hide resolved
azure_monitor/src/azure_monitor/sdk/auto_collection/metrics_span_processor.py
Outdated
Show resolved
Hide resolved
azure_monitor/src/azure_monitor/sdk/auto_collection/metrics_span_processor.py
Show resolved
Hide resolved
azure_monitor/src/azure_monitor/sdk/auto_collection/live_metrics/dependency_metrics.py
Outdated
Show resolved
Hide resolved
azure_monitor/src/azure_monitor/sdk/auto_collection/metrics_span_processor.py
Outdated
Show resolved
Hide resolved
azure_monitor/src/azure_monitor/sdk/auto_collection/metrics_span_processor.py
Outdated
Show resolved
Hide resolved
SpanProcessor used in LiveMetricExporter instead of other way around Updating example
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 91.98% 93.99% +2.00%
==========================================
Files 18 21 +3
Lines 1048 1132 +84
Branches 142 143 +1
==========================================
+ Hits 964 1064 +100
+ Misses 74 39 -35
- Partials 10 29 +19
Continue to review full report at Codecov.
|
No need to differentiate between live and standard metrics in reuqests and dependencies Add logic to stop collecting documents when live metrics are not subscribed Fix issues with LiveMetric document creation
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.
LGTM
Fixes #52