diff --git a/contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py b/contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py index f837779e3..c36fea41c 100644 --- a/contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py +++ b/contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py @@ -206,6 +206,9 @@ def log_record_to_envelope(self, record): if (hasattr(record, 'custom_dimensions') and isinstance(record.custom_dimensions, dict)): properties.update(record.custom_dimensions) + elif (hasattr(record, 'extra') and + isinstance(record.extra, dict)): + properties.update(record.extra) if record.exc_info: exctype, _value, tb = record.exc_info @@ -273,6 +276,9 @@ def log_record_to_envelope(self, record): if (hasattr(record, 'custom_dimensions') and isinstance(record.custom_dimensions, dict)): properties.update(record.custom_dimensions) + elif (hasattr(record, 'extra') and + isinstance(record.extra, dict)): + properties.update(record.extra) measurements = {} if (hasattr(record, 'custom_measurements') and