Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 7778b88

Browse files
authored
fix typename data drop (#1234)
1 parent 432a378 commit 7778b88

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/opencensus-ext-azure/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Fix missing/None fields in `ExceptionDetails`
66
([#1232](https://github.com/census-instrumentation/opencensus-python/pull/1232))
7+
- Fix missing/None typeName field in `ExceptionDetails`
8+
([#1234](https://github.com/census-instrumentation/opencensus-python/pull/1234))
79

810
## 1.1.11
911

contrib/opencensus-ext-azure/opencensus/ext/azure/trace_exporter/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ def span_data_to_envelope(self, sd):
102102
stack_trace = sd.attributes.get(STACKTRACE, [])
103103
if not hasattr(stack_trace, '__iter__'):
104104
stack_trace = []
105+
type_name = sd.attributes.get(ERROR_NAME, 'Exception')
105106
exc_env = Envelope(**envelope)
106107
exc_env.name = 'Microsoft.ApplicationInsights.Exception'
107108
data = ExceptionData(
108109
exceptions=[{
109110
'id': 1,
110111
'outerId': 0,
111-
'typeName': sd.attributes.get(ERROR_NAME, ''),
112+
'typeName': type_name,
112113
'message': message,
113114
'hasFullStack': STACKTRACE in sd.attributes,
114115
'parsedStack': stack_trace

0 commit comments

Comments
 (0)