Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit a54cd2e

Browse files
authored
storage (#1180)
1 parent 2e08df5 commit a54cd2e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

contrib/opencensus-ext-azure/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+
- Disable storage for statsbeat if storage is disabled for exporter
6+
([#1155](https://github.com/census-instrumentation/opencensus-python/pull/1155))
7+
58
## 1.1.7
69

710
Released 2022-08-18

contrib/opencensus-ext-azure/opencensus/ext/azure/statsbeat/state.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525

2626
def is_statsbeat_enabled():
27-
return not os.environ.get("APPLICATIONINSIGHTS_STATSBEAT_DISABLED_ALL")
27+
disabled = os.environ.get("APPLICATIONINSIGHTS_STATSBEAT_DISABLED_ALL")
28+
return disabled is None or disabled.lower() != "true"
2829

2930

3031
def increment_statsbeat_initial_failure_count():

contrib/opencensus-ext-azure/opencensus/ext/azure/statsbeat/statsbeat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def collect_statsbeat_metrics(options):
4343
exporter = MetricsExporter(
4444
is_stats=True,
4545
connection_string=_get_stats_connection_string(options.endpoint), # noqa: E501
46+
enable_local_storage=options.enable_local_storage,
4647
enable_standard_metrics=False,
4748
export_interval=_STATS_SHORT_EXPORT_INTERVAL, # 15m by default
4849
)

0 commit comments

Comments
 (0)