Skip to content

Commit 5a53e49

Browse files
authored
Merge pull request #281 from jeremydvoss/samples
Removed conn str and added exclude
2 parents d15c427 + dca628c commit 5a53e49

File tree

18 files changed

+22
-51
lines changed

18 files changed

+22
-51
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Update samples
6+
([#281](https://github.com/microsoft/ApplicationInsights-Python/pull/281))
7+
58
## [1.0.0b12](https://github.com/microsoft/ApplicationInsights-Python/releases/tag/v1.0.0b12) - 2023-05-05
69

710
- Remove most configuration for Public Preview

azure-monitor-opentelemetry/samples/logging/correlated_logs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
from azure.monitor.opentelemetry import configure_azure_monitor
1010
from opentelemetry import trace
1111

12-
configure_azure_monitor(
13-
connection_string="<your-connection-string>",
14-
)
12+
configure_azure_monitor()
1513

1614
logger = getLogger(__name__)
1715
tracer = trace.get_tracer(__name__)

azure-monitor-opentelemetry/samples/logging/custom_properties.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
from azure.monitor.opentelemetry import configure_azure_monitor
1010

11-
configure_azure_monitor(
12-
connection_string="<your-connection-string>",
13-
)
11+
configure_azure_monitor()
1412

1513
logger = getLogger(__name__)
1614
logger.setLevel(DEBUG)

azure-monitor-opentelemetry/samples/logging/exception_logs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
from azure.monitor.opentelemetry import configure_azure_monitor
1010

11-
configure_azure_monitor(
12-
connection_string="<your-connection-string>",
13-
)
11+
configure_azure_monitor()
1412

1513
logger = getLogger(__name__)
1614

azure-monitor-opentelemetry/samples/logging/logs_with_traces.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
import flask
1010
from azure.monitor.opentelemetry import configure_azure_monitor
1111

12-
configure_azure_monitor(
13-
connection_string="<your-connection-string>",
14-
)
12+
configure_azure_monitor()
1513

1614
logger = getLogger(__name__)
1715
logger.setLevel(INFO)

azure-monitor-opentelemetry/samples/logging/simple.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
from azure.monitor.opentelemetry import configure_azure_monitor
1010
from opentelemetry.sdk.resources import Resource, ResourceAttributes
1111

12-
configure_azure_monitor(
13-
connection_string="<your-connection-string>",
14-
)
12+
configure_azure_monitor()
1513

1614
logger = getLogger(__name__)
1715

azure-monitor-opentelemetry/samples/metrics/attributes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
from opentelemetry import metrics
66

77
# Configure Azure monitor collection telemetry pipeline
8-
configure_azure_monitor(
9-
connection_string="<your-connection-string>",
10-
)
8+
configure_azure_monitor()
119

1210
attribute_set1 = {"key1": "val1"}
1311
attribute_set2 = {"key2": "val2"}

azure-monitor-opentelemetry/samples/metrics/instruments.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
from opentelemetry.sdk.resources import Resource, ResourceAttributes
99

1010
# Configure Azure monitor collection telemetry pipeline
11-
configure_azure_monitor(
12-
connection_string="<your-connection-string>",
13-
)
11+
configure_azure_monitor()
1412

1513

1614
# Callback functions for observable instruments

azure-monitor-opentelemetry/samples/tracing/db_psycopg2.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
from azure.monitor.opentelemetry import configure_azure_monitor
88

99
# Configure Azure monitor collection telemetry pipeline
10-
configure_azure_monitor(
11-
connection_string="<your-connection-string>",
12-
)
10+
configure_azure_monitor()
1311

1412
# Database calls using the psycopg2 library will be automatically captured
1513
cnx = psycopg2.connect(database="test", user="<user>", password="<password>")

azure-monitor-opentelemetry/samples/tracing/django/sample/example/views.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
from django.http import HttpResponse
99

1010
# Configure Azure monitor collection telemetry pipeline
11-
configure_azure_monitor(
12-
connection_string="<your-connection-string>",
13-
)
11+
configure_azure_monitor()
1412

1513

1614
# Requests sent to the django application will be automatically captured

0 commit comments

Comments
 (0)