Skip to content

Commit 9386241

Browse files
authored
Fix sphinx issues for azure-monitor-opentelemetry and exporter (#33716)
1 parent 52981f9 commit 9386241

File tree

5 files changed

+37
-28
lines changed

5 files changed

+37
-28
lines changed

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ def from_connection_string(
8383
cls, conn_str: str, **kwargs: Any
8484
) -> "AzureMonitorLogExporter":
8585
"""
86-
Create an AzureMonitorLogExporter from a connection string.
87-
88-
This is the recommended way of instantation if a connection string is passed in explicitly.
89-
If a user wants to use a connection string provided by environment variable, the constructor
90-
of the exporter can be called directly.
91-
92-
:param str conn_str: The connection string to be used for authentication.
93-
:keyword str api_version: The service API version used. Defaults to latest.
94-
:returns an instance of ~AzureMonitorLogExporter
95-
:rtype ~azure.monitor.opentelemetry.exporter.AzureMonitorLogExporter
86+
Create an AzureMonitorLogExporter from a connection string. This is the
87+
recommended way of instantiation if a connection string is passed in
88+
explicitly. If a user wants to use a connection string provided by
89+
environment variable, the constructor of the exporter can be called
90+
directly.
91+
92+
:param str conn_str: The connection string to be used for
93+
authentication.
94+
:keyword str api_version: The service API version used. Defaults to
95+
latest.
96+
:return: an instance of ~AzureMonitorLogExporter
97+
:rtype: ~azure.monitor.opentelemetry.exporter.AzureMonitorLogExporter
9698
"""
9799
return cls(connection_string=conn_str, **kwargs)
98100

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/metrics/_exporter.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,18 @@ def from_connection_string(
147147
cls, conn_str: str, **kwargs: Any
148148
) -> "AzureMonitorMetricExporter":
149149
"""
150-
Create an AzureMonitorMetricExporter from a connection string.
151-
152-
This is the recommended way of instantation if a connection string is passed in explicitly.
153-
If a user wants to use a connection string provided by environment variable, the constructor
154-
of the exporter can be called directly.
155-
156-
:param str conn_str: The connection string to be used for authentication.
157-
:keyword str api_version: The service API version used. Defaults to latest.
150+
Create an AzureMonitorMetricExporter from a connection string. This is
151+
the recommended way of instantiation if a connection string is passed in
152+
explicitly. If a user wants to use a connection string provided by
153+
environment variable, the constructor of the exporter can be called
154+
directly.
155+
156+
:param str conn_str: The connection string to be used for
157+
authentication.
158+
:keyword str api_version: The service API version used. Defaults to
159+
latest.
158160
:return: An instance of ~AzureMonitorMetricExporter
159-
:rtype ~azure.monitor.opentelemetry.exporter.AzureMonitorMetricExporter
161+
:rtype: ~azure.monitor.opentelemetry.exporter.AzureMonitorMetricExporter
160162
"""
161163
return cls(connection_string=conn_str, **kwargs)
162164

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,18 @@ def _should_collect_otel_resource_metric(self):
150150
# pylint: disable=docstring-keyword-should-match-keyword-only
151151
@classmethod
152152
def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "AzureMonitorTraceExporter":
153-
"""Create an AzureMonitorTraceExporter from a connection string.
154-
155-
This is the recommended way of instantation if a connection string is passed in explicitly.
156-
If a user wants to use a connection string provided by environment variable, the constructor
157-
of the exporter can be called directly.
158-
159-
:param str conn_str: The connection string to be used for authentication.
160-
:keyword str api_version: The service API version used. Defaults to latest.
161-
:returns an instance of ~AzureMonitorTraceExporter
153+
"""
154+
Create an AzureMonitorTraceExporter from a connection string. This is
155+
the recommended way of instantiation if a connection string is passed in
156+
explicitly. If a user wants to use a connection string provided by
157+
environment variable, the constructor of the exporter can be called
158+
directly.
159+
160+
:param str conn_str: The connection string to be used for
161+
authentication.
162+
:keyword str api_version: The service API version used. Defaults to
163+
latest.
164+
:return: an instance of ~AzureMonitorTraceExporter
162165
:rtype: ~azure.monitor.opentelemetry.exporter.AzureMonitorTraceExporter
163166
"""
164167
return cls(connection_string=conn_str, **kwargs)

sdk/monitor/azure-monitor-opentelemetry-exporter/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mypy = true
33
pyright = false
44
type_check_samples = false
55
verifytypes = false
6+
strict_sphinx = true

sdk/monitor/azure-monitor-opentelemetry/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pyright = false
55
mypy = false
66
pylint = true
77
bandit = true
8+
strict_sphinx = true

0 commit comments

Comments
 (0)