Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Fix breaking changes from OT v0.9 #98

Merged
merged 4 commits into from
Jun 17, 2020
Merged

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Jun 17, 2020

Changes all pertain to metrics.
Renamed instruments and different aggregation types.

There is a bug in OT v0.9 that is fixed on master for the LastValueAggregation so observers won't work properly until another release.

@lzchen lzchen requested a review from hectorhdzg as a code owner June 17, 2020 06:19
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2020

Codecov Report

Merging #98 into master will increase coverage by 0.03%.
The diff coverage is 93.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   93.99%   94.02%   +0.03%     
==========================================
  Files          21       21              
  Lines        1132     1138       +6     
  Branches      143      143              
==========================================
+ Hits         1064     1070       +6     
- Misses         39       40       +1     
+ Partials       29       28       -1     
Impacted Files Coverage Δ
azure_monitor/src/azure_monitor/export/__init__.py 100.00% <ø> (+1.25%) ⬆️
...nitor/sdk/auto_collection/live_metrics/exporter.py 64.51% <66.66%> (+0.77%) ⬆️
...monitor/src/azure_monitor/export/trace/__init__.py 97.80% <96.66%> (-2.20%) ⬇️
...nitor/src/azure_monitor/export/metrics/__init__.py 100.00% <100.00%> (ø)
..._monitor/sdk/auto_collection/dependency_metrics.py 100.00% <100.00%> (ø)
...itor/sdk/auto_collection/metrics_span_processor.py 82.50% <100.00%> (ø)
...monitor/sdk/auto_collection/performance_metrics.py 100.00% <100.00%> (ø)
...ure_monitor/sdk/auto_collection/request_metrics.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b559ca9...b27d6b8. Read the comment docs.

@@ -294,7 +298,7 @@ def test_measure_to_envelope(self, logger_mock):
self.assertIsInstance(envelope.data.base_data.metrics[0], DataPoint)
self.assertEqual(envelope.data.base_data.metrics[0].ns, "testdesc")
self.assertEqual(envelope.data.base_data.metrics[0].name, "testname")
self.assertEqual(envelope.data.base_data.metrics[0].value, 0)
self.assertEqual(envelope.data.base_data.metrics[0].value, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the default value 1 now, or why this is different now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App insights does not have a way to process MinMaxSumCount aggregator so I am just using count value as a placeholder for now. Before it was 0 because we ignored that metric type when exporting.


# pylint: disable=too-many-statements
# pylint: disable=too-many-branches
def convert_span_to_envelope(span: Span) -> protocol.Envelope:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any change in this code apart of the location change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope.

@lzchen lzchen merged commit def1ca6 into microsoft:master Jun 17, 2020
@lzchen lzchen deleted the fix-breaking branch June 17, 2020 22:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants