Describe your environment.
- Python version: 3.11.3
- opencensus-ext-azure version: 1.1.9
- Running environment: Docker container
- Docker image: python:3.11-slim
- Cloud provider: Azure Application Insight
Steps to reproduce.
Running application with AzureEventHandler integrated with Python logging, logging configuration file has the following related structure
"azure_event_handler": {
"level": "INFO",
"formatter": "info",
"()": "opencensus.ext.azure.log_exporter.AzureEventHandler",
"enable_local_storage": 0,
"storage_path": "not_exist"
}
The reason that I want to disable the local storage is because my container has read only system, any writing should be disabled. However, the checking in
|
if options.storage_path is None: |
does not consider whether
enable_local_storage is disable. The root cause is in
|
statsbeat.collect_statsbeat_metrics(self.options) |
which triggers
|
exporter = MetricsExporter( |
and from here, it calls the
process_options function again which will create the temp file.
What is the expected behavior?
No temp file should be created if enable_local_storage is set to False.
What is the actual behavior?
Temp file created even if enable_local_storage is set to False
Describe your environment.
Steps to reproduce.
Running application with AzureEventHandler integrated with Python logging, logging configuration file has the following related structure
The reason that I want to disable the local storage is because my container has read only system, any writing should be disabled. However, the checking in
opencensus-python/contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py
Line 69 in 3a2d8df
enable_local_storageis disable. The root cause is inopencensus-python/contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
Line 267 in 3a2d8df
opencensus-python/contrib/opencensus-ext-azure/opencensus/ext/azure/statsbeat/statsbeat.py
Line 43 in 3a2d8df
process_optionsfunction again which will create the temp file.What is the expected behavior?
No temp file should be created if
enable_local_storageis set to False.What is the actual behavior?
Temp file created even if
enable_local_storageis set to False