Skip to content

Commit f360b2f

Browse files
authored
Change default storage retention period to 48 hrs (#26960)
1 parent e40e73d commit f360b2f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
- Add validation logic to ApplicationInsightsSampler
88
([#26546](https://github.com/Azure/azure-sdk-for-python/pull/26546))
99
- Change default temporality of metrics to follow OTLP
10-
([#26546](https://github.com/Azure/azure-sdk-for-python/pull/26546))
10+
([#26924](https://github.com/Azure/azure-sdk-for-python/pull/26924))
1111

1212
### Breaking Changes
1313

1414
- Rename local storage configuration, change default path
1515
([#26891](https://github.com/Azure/azure-sdk-for-python/pull/26891))
16+
- Change default storage retention period to 48 hours
17+
([#26960](https://github.com/Azure/azure-sdk-for-python/pull/26960))
1618

1719
### Bugs Fixed
1820

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_storage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(
8383
path,
8484
max_size=50 * 1024 * 1024, # 50MiB
8585
maintenance_period=60, # 1 minute
86-
retention_period=7 * 24 * 60 * 60, # 7 days
86+
retention_period=48 * 60 * 60, # 48 hours
8787
write_timeout=60, # 1 minute,
8888
name=None,
8989
lease_period=60, # 1 minute

sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, **kwargs: Any) -> None:
7979
tempfile.gettempdir(), _AZURE_TEMPDIR_PREFIX, _TEMPDIR_PREFIX + temp_suffix
8080
)
8181
self._storage_directory = kwargs.get('storage_directory', default_storage_directory) # Storage path in which to store retry files.
82-
self._storage_retention_period = kwargs.get('storage_retention_period', 7 * 24 * 60 * 60) # Retention period in seconds
82+
self._storage_retention_period = kwargs.get('storage_retention_period', 48 * 60 * 60) # Retention period in seconds (default 48 hrs)
8383
self._timeout = kwargs.get('timeout', 10.0) # networking timeout in seconds
8484

8585
config = AzureMonitorClientConfiguration(self._endpoint, **kwargs)

0 commit comments

Comments
 (0)