From b95bbab061496788caac1bd807c670e2a5494e9f Mon Sep 17 00:00:00 2001 From: Leighton Date: Mon, 22 Jun 2020 09:50:59 -0700 Subject: [PATCH 1/9] proxies --- azure_monitor/CHANGELOG.md | 2 ++ .../src/azure_monitor/export/__init__.py | 1 + azure_monitor/src/azure_monitor/options.py | 11 ++++++++++- azure_monitor/tests/test_base_exporter.py | 5 +++++ azure_monitor/tests/test_options.py | 18 ++++++++++++++++++ 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/azure_monitor/CHANGELOG.md b/azure_monitor/CHANGELOG.md index 2c0131e..fc5111d 100644 --- a/azure_monitor/CHANGELOG.md +++ b/azure_monitor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Implement proxies in exporter configuration +- ([#92](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/92)) - Remove dependency metrics from auto-collection - ([#92](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/92)) diff --git a/azure_monitor/src/azure_monitor/export/__init__.py b/azure_monitor/src/azure_monitor/export/__init__.py index 6de99d8..66fd28f 100644 --- a/azure_monitor/src/azure_monitor/export/__init__.py +++ b/azure_monitor/src/azure_monitor/export/__init__.py @@ -121,6 +121,7 @@ def _transmit(self, envelopes: typing.List[Envelope]) -> ExportResult: "Content-Type": "application/json; charset=utf-8", }, timeout=self.options.timeout, + proxies=json.loads(self.options.proxies), ) except Exception as ex: logger.warning("Transient client side error: %s.", ex) diff --git a/azure_monitor/src/azure_monitor/options.py b/azure_monitor/src/azure_monitor/options.py index 739ad37..1199372 100644 --- a/azure_monitor/src/azure_monitor/options.py +++ b/azure_monitor/src/azure_monitor/options.py @@ -27,6 +27,7 @@ class ExporterOptions(BaseObject): Args: connection_string: Azure Connection String. instrumentation_key: Azure Instrumentation Key. + proxies: Proxies to pass Azure Monitor request through. storage_maintenance_period: Local storage maintenance interval in seconds. storage_max_size: Local storage maximum size in bytes. storage_path: Local storage file path. @@ -36,8 +37,8 @@ class ExporterOptions(BaseObject): __slots__ = ( "connection_string", - "endpoint", "instrumentation_key", + "proxies", "storage_maintenance_period", "storage_max_size", "storage_path", @@ -49,6 +50,7 @@ def __init__( self, connection_string: str = None, instrumentation_key: str = None, + proxies: typing.Dict[str, str] = None, storage_maintenance_period: int = 60, storage_max_size: int = 50 * 1024 * 1024, storage_path: str = None, @@ -64,6 +66,7 @@ def __init__( ) self.connection_string = connection_string self.instrumentation_key = instrumentation_key + self.proxies = proxies self.storage_maintenance_period = storage_maintenance_period self.storage_max_size = storage_max_size self.storage_path = storage_path @@ -74,6 +77,7 @@ def __init__( self._validate_instrumentation_key() def _initialize(self) -> None: + # connection string and ikey code_cs = parse_connection_string(self.connection_string) code_ikey = self.instrumentation_key env_cs = parse_connection_string( @@ -103,6 +107,11 @@ def _initialize(self) -> None: ) self.endpoint = endpoint + "/v2/track" + # proxies + if self.proxies is None: + self.proxies = '{}' + + def _validate_instrumentation_key(self) -> None: """Validates the instrumentation key used for Azure Monitor. An instrumentation key cannot be null or empty. An instrumentation key diff --git a/azure_monitor/tests/test_base_exporter.py b/azure_monitor/tests/test_base_exporter.py index 5907939..6f039cb 100644 --- a/azure_monitor/tests/test_base_exporter.py +++ b/azure_monitor/tests/test_base_exporter.py @@ -66,6 +66,7 @@ def test_constructor(self): """Test the constructor.""" base = BaseExporter( instrumentation_key="4321abcd-5678-4efa-8abc-1234567890ab", + proxies='{"https":"https://test-proxy.com"}', storage_maintenance_period=2, storage_max_size=3, storage_path=os.path.join(TEST_FOLDER, self.id()), @@ -77,6 +78,10 @@ def test_constructor(self): base.options.instrumentation_key, "4321abcd-5678-4efa-8abc-1234567890ab", ) + self.assertEqual( + base.options.proxies, + '{"https":"https://test-proxy.com"}', + ) self.assertEqual(base.options.storage_maintenance_period, 2) self.assertEqual(base.options.storage_max_size, 3) self.assertEqual(base.options.storage_retention_period, 4) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index 89b4368..3df8cd8 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -241,6 +241,24 @@ def test_process_options_endpoint_default(self): options.endpoint, "https://dc.services.visualstudio.com/v2/track" ) + def test_process_options_proxies_default(self): + options = ExporterOptions() + options.proxies = "{}" + common.process_options(options) + + self.assertEqual(options.proxies, "{}") + + def test_process_options_proxies_set_proxies(self): + options = ExporterOptions() + options.connection_string = None + options.proxies = '{"https": "https://test-proxy.com"}' + common.process_options(options) + + self.assertEqual( + options.proxies, + '{"https": "https://test-proxy.com"}' + ) + def test_parse_connection_string_invalid(self): self.assertRaises( ValueError, lambda: ExporterOptions(connection_string="asd") From e6eb689926fd98551716b367e6b7da668dae9550 Mon Sep 17 00:00:00 2001 From: Leighton Date: Mon, 22 Jun 2020 09:56:40 -0700 Subject: [PATCH 2/9] lint --- azure_monitor/CHANGELOG.md | 2 +- azure_monitor/src/azure_monitor/options.py | 4 ++-- azure_monitor/tests/test_base_exporter.py | 3 +-- azure_monitor/tests/test_options.py | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/azure_monitor/CHANGELOG.md b/azure_monitor/CHANGELOG.md index fc5111d..5cd23bd 100644 --- a/azure_monitor/CHANGELOG.md +++ b/azure_monitor/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased - Implement proxies in exporter configuration -- ([#92](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/92)) +- ([#101](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/101)) - Remove dependency metrics from auto-collection - ([#92](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/92)) diff --git a/azure_monitor/src/azure_monitor/options.py b/azure_monitor/src/azure_monitor/options.py index 1199372..064cc1d 100644 --- a/azure_monitor/src/azure_monitor/options.py +++ b/azure_monitor/src/azure_monitor/options.py @@ -37,6 +37,7 @@ class ExporterOptions(BaseObject): __slots__ = ( "connection_string", + "endpoint", "instrumentation_key", "proxies", "storage_maintenance_period", @@ -109,8 +110,7 @@ def _initialize(self) -> None: # proxies if self.proxies is None: - self.proxies = '{}' - + self.proxies = "{}" def _validate_instrumentation_key(self) -> None: """Validates the instrumentation key used for Azure Monitor. diff --git a/azure_monitor/tests/test_base_exporter.py b/azure_monitor/tests/test_base_exporter.py index 6f039cb..4b0647d 100644 --- a/azure_monitor/tests/test_base_exporter.py +++ b/azure_monitor/tests/test_base_exporter.py @@ -79,8 +79,7 @@ def test_constructor(self): "4321abcd-5678-4efa-8abc-1234567890ab", ) self.assertEqual( - base.options.proxies, - '{"https":"https://test-proxy.com"}', + base.options.proxies, '{"https":"https://test-proxy.com"}', ) self.assertEqual(base.options.storage_maintenance_period, 2) self.assertEqual(base.options.storage_max_size, 3) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index 3df8cd8..0cdce46 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -255,8 +255,7 @@ def test_process_options_proxies_set_proxies(self): common.process_options(options) self.assertEqual( - options.proxies, - '{"https": "https://test-proxy.com"}' + options.proxies, '{"https": "https://test-proxy.com"}' ) def test_parse_connection_string_invalid(self): From 74cac2e707c633e0fd571e96c8775f2d8915e1c6 Mon Sep 17 00:00:00 2001 From: Leighton Date: Mon, 22 Jun 2020 10:01:53 -0700 Subject: [PATCH 3/9] fix tests --- azure_monitor/tests/test_options.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index 0cdce46..a948c06 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -242,18 +242,19 @@ def test_process_options_endpoint_default(self): ) def test_process_options_proxies_default(self): - options = ExporterOptions() - options.proxies = "{}" - common.process_options(options) - + options = ExporterOptions( + connection_string=None, + instrumentation_key=self._valid_instrumentation_key, + proxies='{}' + ) self.assertEqual(options.proxies, "{}") def test_process_options_proxies_set_proxies(self): - options = ExporterOptions() - options.connection_string = None - options.proxies = '{"https": "https://test-proxy.com"}' - common.process_options(options) - + options = ExporterOptions( + connection_string=None, + instrumentation_key=self._valid_instrumentation_key, + proxies='{"https": "https://test-proxy.com"}' + ) self.assertEqual( options.proxies, '{"https": "https://test-proxy.com"}' ) From 90d4d8fd5a2b477ee5e69e162135a68ad285811d Mon Sep 17 00:00:00 2001 From: Leighton Date: Mon, 22 Jun 2020 10:06:56 -0700 Subject: [PATCH 4/9] lint --- azure_monitor/tests/test_options.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index a948c06..7507a01 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -245,7 +245,7 @@ def test_process_options_proxies_default(self): options = ExporterOptions( connection_string=None, instrumentation_key=self._valid_instrumentation_key, - proxies='{}' + proxies="{}", ) self.assertEqual(options.proxies, "{}") @@ -253,7 +253,7 @@ def test_process_options_proxies_set_proxies(self): options = ExporterOptions( connection_string=None, instrumentation_key=self._valid_instrumentation_key, - proxies='{"https": "https://test-proxy.com"}' + proxies='{"https": "https://test-proxy.com"}', ) self.assertEqual( options.proxies, '{"https": "https://test-proxy.com"}' From c284309598176526a9aa5c3b43f4c5887c4ee9da Mon Sep 17 00:00:00 2001 From: Leighton Date: Wed, 24 Jun 2020 13:12:34 -0700 Subject: [PATCH 5/9] fix type --- azure_monitor/setup.cfg | 4 ++-- azure_monitor/src/azure_monitor/export/__init__.py | 2 +- azure_monitor/tests/test_base_exporter.py | 4 ++-- azure_monitor/tests/test_options.py | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/azure_monitor/setup.cfg b/azure_monitor/setup.cfg index 3728d63..b0f48bb 100644 --- a/azure_monitor/setup.cfg +++ b/azure_monitor/setup.cfg @@ -28,8 +28,8 @@ package_dir= =src packages=find_namespace: install_requires = - opentelemetry-api == 0.9b0 - opentelemetry-sdk == 0.9b0 + opentelemetry-api == 0.10b0 + opentelemetry-sdk == 0.10b0 psutil >= 5.6.3 requests ~= 2.0 diff --git a/azure_monitor/src/azure_monitor/export/__init__.py b/azure_monitor/src/azure_monitor/export/__init__.py index 584f40d..3c2501e 100644 --- a/azure_monitor/src/azure_monitor/export/__init__.py +++ b/azure_monitor/src/azure_monitor/export/__init__.py @@ -122,7 +122,7 @@ def _transmit(self, envelopes: typing.List[Envelope]) -> ExportResult: "Content-Type": "application/json; charset=utf-8", }, timeout=self.options.timeout, - proxies=json.loads(self.options.proxies), + proxies=self.options.proxies, ) except requests.Timeout: logger.warning( diff --git a/azure_monitor/tests/test_base_exporter.py b/azure_monitor/tests/test_base_exporter.py index adb6770..bbebd2b 100644 --- a/azure_monitor/tests/test_base_exporter.py +++ b/azure_monitor/tests/test_base_exporter.py @@ -67,7 +67,7 @@ def test_constructor(self): """Test the constructor.""" base = BaseExporter( instrumentation_key="4321abcd-5678-4efa-8abc-1234567890ab", - proxies='{"https":"https://test-proxy.com"}', + proxies={"https":"https://test-proxy.com"}, storage_maintenance_period=2, storage_max_size=3, storage_path=os.path.join(TEST_FOLDER, self.id()), @@ -80,7 +80,7 @@ def test_constructor(self): "4321abcd-5678-4efa-8abc-1234567890ab", ) self.assertEqual( - base.options.proxies, '{"https":"https://test-proxy.com"}', + base.options.proxies, {"https":"https://test-proxy.com"}, ) self.assertEqual(base.options.storage_maintenance_period, 2) self.assertEqual(base.options.storage_max_size, 3) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index 7507a01..8039080 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -245,18 +245,18 @@ def test_process_options_proxies_default(self): options = ExporterOptions( connection_string=None, instrumentation_key=self._valid_instrumentation_key, - proxies="{}", + proxies={}, ) - self.assertEqual(options.proxies, "{}") + self.assertEqual(options.proxies, {}) def test_process_options_proxies_set_proxies(self): options = ExporterOptions( connection_string=None, instrumentation_key=self._valid_instrumentation_key, - proxies='{"https": "https://test-proxy.com"}', + proxies={"https": "https://test-proxy.com"}, ) self.assertEqual( - options.proxies, '{"https": "https://test-proxy.com"}' + options.proxies, {"https": "https://test-proxy.com"} ) def test_parse_connection_string_invalid(self): From 866b0f8c9fa3013d592a9b0ea1bd9897b9852c27 Mon Sep 17 00:00:00 2001 From: Leighton Date: Wed, 24 Jun 2020 13:17:50 -0700 Subject: [PATCH 6/9] update version --- .../auto_collection/live_metrics/test_exporter.py | 12 ++++++------ azure_monitor/tests/metrics/test_metrics.py | 10 +++++----- azure_monitor/tests/test_base_exporter.py | 4 ++-- azure_monitor/tests/test_options.py | 4 +--- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py b/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py index 21b1f90..673fab3 100644 --- a/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py +++ b/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py @@ -14,7 +14,7 @@ ) from opentelemetry.sdk.metrics.export import MetricRecord, MetricsExportResult from opentelemetry.sdk.metrics.export.aggregate import ( - CounterAggregator, + SumAggregator, MinMaxSumCountAggregator, ValueObserverAggregator, ) @@ -79,7 +79,7 @@ def test_constructor(self): def test_export(self): """Test export.""" record = MetricRecord( - self._test_metric, self._test_labels, CounterAggregator() + self._test_metric, self._test_labels, SumAggregator() ) exporter = LiveMetricsExporter( instrumentation_key=self._instrumentation_key, @@ -96,7 +96,7 @@ def test_export(self): def test_export_failed(self): record = MetricRecord( - self._test_metric, self._test_labels, CounterAggregator() + self._test_metric, self._test_labels, SumAggregator() ) exporter = LiveMetricsExporter( instrumentation_key=self._instrumentation_key, @@ -113,7 +113,7 @@ def test_export_failed(self): def test_export_exception(self): record = MetricRecord( - self._test_metric, self._test_labels, CounterAggregator() + self._test_metric, self._test_labels, SumAggregator() ) exporter = LiveMetricsExporter( instrumentation_key=self._instrumentation_key, @@ -148,7 +148,7 @@ def test_live_metric_envelope_observer(self): self.assertEqual(envelope.metrics[0].weight, 1) def test_live_metric_envelope_counter(self): - aggregator = CounterAggregator() + aggregator = SumAggregator() aggregator.update(123) aggregator.take_checkpoint() record = MetricRecord(self._test_metric, self._test_labels, aggregator) @@ -184,7 +184,7 @@ def test_live_metric_envelope_value_recorder(self): self.assertEqual(envelope.metrics[0].weight, 1) def test_live_metric_envelope_documents(self): - aggregator = CounterAggregator() + aggregator = SumAggregator() aggregator.update(123) aggregator.take_checkpoint() record = MetricRecord(self._test_metric, self._test_labels, aggregator) diff --git a/azure_monitor/tests/metrics/test_metrics.py b/azure_monitor/tests/metrics/test_metrics.py index a6c9ea1..c37e641 100644 --- a/azure_monitor/tests/metrics/test_metrics.py +++ b/azure_monitor/tests/metrics/test_metrics.py @@ -14,7 +14,7 @@ ) from opentelemetry.sdk.metrics.export import MetricRecord, MetricsExportResult from opentelemetry.sdk.metrics.export.aggregate import ( - CounterAggregator, + SumAggregator, MinMaxSumCountAggregator, ValueObserverAggregator, ) @@ -109,7 +109,7 @@ def test_constructor(self): ) def test_export(self, mte, transmit): record = MetricRecord( - CounterAggregator(), self._test_labels, self._test_metric + SumAggregator(), self._test_labels, self._test_metric ) exporter = self._exporter mte.return_value = Envelope() @@ -125,7 +125,7 @@ def test_export(self, mte, transmit): ) def test_export_failed_retryable(self, mte, transmit): record = MetricRecord( - CounterAggregator(), self._test_labels, self._test_metric + SumAggregator(), self._test_labels, self._test_metric ) exporter = self._exporter transmit.return_value = ExportResult.FAILED_RETRYABLE @@ -145,7 +145,7 @@ def test_export_failed_retryable(self, mte, transmit): ) def test_export_exception(self, mte, transmit, logger_mock): record = MetricRecord( - CounterAggregator(), self._test_labels, self._test_metric + SumAggregator(), self._test_labels, self._test_metric ) exporter = self._exporter mte.return_value = Envelope() @@ -159,7 +159,7 @@ def test_metric_to_envelope_none(self): self.assertIsNone(exporter._metric_to_envelope(None)) def test_metric_to_envelope(self): - aggregator = CounterAggregator() + aggregator = SumAggregator() aggregator.update(123) aggregator.take_checkpoint() record = MetricRecord(self._test_metric, self._test_labels, aggregator) diff --git a/azure_monitor/tests/test_base_exporter.py b/azure_monitor/tests/test_base_exporter.py index bbebd2b..d197d47 100644 --- a/azure_monitor/tests/test_base_exporter.py +++ b/azure_monitor/tests/test_base_exporter.py @@ -67,7 +67,7 @@ def test_constructor(self): """Test the constructor.""" base = BaseExporter( instrumentation_key="4321abcd-5678-4efa-8abc-1234567890ab", - proxies={"https":"https://test-proxy.com"}, + proxies={"https": "https://test-proxy.com"}, storage_maintenance_period=2, storage_max_size=3, storage_path=os.path.join(TEST_FOLDER, self.id()), @@ -80,7 +80,7 @@ def test_constructor(self): "4321abcd-5678-4efa-8abc-1234567890ab", ) self.assertEqual( - base.options.proxies, {"https":"https://test-proxy.com"}, + base.options.proxies, {"https": "https://test-proxy.com"}, ) self.assertEqual(base.options.storage_maintenance_period, 2) self.assertEqual(base.options.storage_max_size, 3) diff --git a/azure_monitor/tests/test_options.py b/azure_monitor/tests/test_options.py index 8039080..1cee999 100644 --- a/azure_monitor/tests/test_options.py +++ b/azure_monitor/tests/test_options.py @@ -255,9 +255,7 @@ def test_process_options_proxies_set_proxies(self): instrumentation_key=self._valid_instrumentation_key, proxies={"https": "https://test-proxy.com"}, ) - self.assertEqual( - options.proxies, {"https": "https://test-proxy.com"} - ) + self.assertEqual(options.proxies, {"https": "https://test-proxy.com"}) def test_parse_connection_string_invalid(self): self.assertRaises( From e795e7c4b2222124a9f38d746bd020570ae66093 Mon Sep 17 00:00:00 2001 From: Leighton Date: Wed, 24 Jun 2020 13:20:43 -0700 Subject: [PATCH 7/9] lint --- azure_monitor/examples/traces/server.py | 2 +- .../tests/auto_collection/live_metrics/test_exporter.py | 2 +- azure_monitor/tests/metrics/test_metrics.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure_monitor/examples/traces/server.py b/azure_monitor/examples/traces/server.py index 51039c8..8f3c9a9 100644 --- a/azure_monitor/examples/traces/server.py +++ b/azure_monitor/examples/traces/server.py @@ -3,6 +3,7 @@ # pylint: disable=import-error # pylint: disable=no-member # pylint: disable=no-name-in-module +import flask import requests from opentelemetry import trace from opentelemetry.ext.flask import FlaskInstrumentor @@ -10,7 +11,6 @@ from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchExportSpanProcessor -import flask from azure_monitor import AzureMonitorSpanExporter # The preferred tracer implementation must be set, as the opentelemetry-api diff --git a/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py b/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py index 673fab3..c480a0d 100644 --- a/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py +++ b/azure_monitor/tests/auto_collection/live_metrics/test_exporter.py @@ -14,8 +14,8 @@ ) from opentelemetry.sdk.metrics.export import MetricRecord, MetricsExportResult from opentelemetry.sdk.metrics.export.aggregate import ( - SumAggregator, MinMaxSumCountAggregator, + SumAggregator, ValueObserverAggregator, ) diff --git a/azure_monitor/tests/metrics/test_metrics.py b/azure_monitor/tests/metrics/test_metrics.py index c37e641..0f8f5ff 100644 --- a/azure_monitor/tests/metrics/test_metrics.py +++ b/azure_monitor/tests/metrics/test_metrics.py @@ -14,8 +14,8 @@ ) from opentelemetry.sdk.metrics.export import MetricRecord, MetricsExportResult from opentelemetry.sdk.metrics.export.aggregate import ( - SumAggregator, MinMaxSumCountAggregator, + SumAggregator, ValueObserverAggregator, ) from opentelemetry.sdk.util import ns_to_iso_str From 89668883ddebf93960389575029f3a7d06e5e401 Mon Sep 17 00:00:00 2001 From: Leighton Date: Wed, 24 Jun 2020 13:25:56 -0700 Subject: [PATCH 8/9] lint --- azure_monitor/examples/traces/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure_monitor/examples/traces/server.py b/azure_monitor/examples/traces/server.py index 8f3c9a9..51039c8 100644 --- a/azure_monitor/examples/traces/server.py +++ b/azure_monitor/examples/traces/server.py @@ -3,7 +3,6 @@ # pylint: disable=import-error # pylint: disable=no-member # pylint: disable=no-name-in-module -import flask import requests from opentelemetry import trace from opentelemetry.ext.flask import FlaskInstrumentor @@ -11,6 +10,7 @@ from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchExportSpanProcessor +import flask from azure_monitor import AzureMonitorSpanExporter # The preferred tracer implementation must be set, as the opentelemetry-api From 7adca485fccb2ec3b2cea94faa2162226234a629 Mon Sep 17 00:00:00 2001 From: Leighton Date: Wed, 24 Jun 2020 13:31:46 -0700 Subject: [PATCH 9/9] fix changelog --- azure_monitor/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure_monitor/CHANGELOG.md b/azure_monitor/CHANGELOG.md index 79b79ad..efd4f8a 100644 --- a/azure_monitor/CHANGELOG.md +++ b/azure_monitor/CHANGELOG.md @@ -2,12 +2,12 @@ ## Unreleased -- Implement proxies in exporter configuration -- ([#101](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/101)) - Remove dependency metrics from auto-collection ([#92](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/92)) - Change default local storage directory ([#100](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/100)) +- Implement proxies in exporter configuration + ([#101](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/101)) - Remove request failed per second metrics from auto-collection ([#102](https://github.com/microsoft/opentelemetry-azure-monitor-python/pull/102))