This commit is contained in:
Leighton Chen 2023-08-15 10:18:32 -07:00
Родитель a70f8373f7
Коммит b4cf6dbd87
3 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -4,6 +4,8 @@
- Unpin OTel SDK/API version
([#310](https://github.com/microsoft/ApplicationInsights-Python/pull/310))
- Replace custom log processor exporter interval env var with OT SDK env var
([#310](https://github.com/microsoft/ApplicationInsights-Python/pull/310))
## [1.0.0b15](https://github.com/microsoft/ApplicationInsights-Python/releases/tag/v1.0.0b15) - 2023-07-17

Просмотреть файл

@ -113,14 +113,11 @@ def _setup_tracing(configurations: Dict[str, ConfigurationValue]):
def _setup_logging(configurations: Dict[str, ConfigurationValue]):
# TODO: Remove after upgrading to OTel SDK 1.18
logging_export_interval_ms = configurations[LOGGING_EXPORT_INTERVAL_MS_ARG]
logger_provider = LoggerProvider()
set_logger_provider(logger_provider)
log_exporter = AzureMonitorLogExporter(**configurations)
log_record_processor = BatchLogRecordProcessor(
log_exporter,
schedule_delay_millis=logging_export_interval_ms,
)
get_logger_provider().add_log_record_processor(log_record_processor)
handler = LoggingHandler(logger_provider=get_logger_provider())

Просмотреть файл

@ -21,7 +21,6 @@ DISABLE_LOGGING_ARG = "disable_logging"
DISABLE_METRICS_ARG = "disable_metrics"
DISABLE_TRACING_ARG = "disable_tracing"
DISABLED_INSTRUMENTATIONS_ARG = "disabled_instrumentations"
LOGGING_EXPORT_INTERVAL_MS_ARG = "logging_export_interval_ms"
SAMPLING_RATIO_ARG = "sampling_ratio"