Skip to content

Commit d96fd85

Browse files
authored
Add Local Storage for OpenCensus Python SDK
1 parent 1dd6b87 commit d96fd85

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

articles/azure-monitor/app/data-retention-privacy.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,18 @@ By default `%TEMP%/appInsights-node{INSTRUMENTATION KEY}` is used for persisting
172172

173173
The folder prefix `appInsights-node` can be overridden by changing the runtime value of the static variable `Sender.TEMPDIR_PREFIX` found in [Sender.ts](https://github.com/Microsoft/ApplicationInsights-node.js/blob/7a1ecb91da5ea0febf5ceab13d6a4bf01a63933d/Library/Sender.ts#L384).
174174

175+
### OpenCensus Python
175176

177+
By default OpenCensus Python SDK uses the current user folder `%username%/.opencensus/.azure/`. Permissions to access this folder are restricted to the current user and Administrators. (See [implementation](https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/opencensus-ext-azure/opencensus/ext/azure/common/storage.py) here.) The folder with your persisted data will be named after the Python file that generated the telemetry.
178+
179+
You may change the location of your storage file by passing in the `storage_path` parameter in the constructor of the exporter you are using.
180+
181+
```python
182+
AzureLogHandler(
183+
connection_string='InstrumentationKey=00000000-0000-0000-0000-000000000000',
184+
storage_path='<your-path-here>',
185+
)
186+
```
176187

177188
## How do I send data to Application Insights using TLS 1.2?
178189

0 commit comments

Comments
 (0)