Commit 43053b4
[serverless] encode lambda error.msg and error.type (#6438)
## Summary of changes
Encodes `error.msg` and `error.type` like the previously encoded
`error.stack`.

Related extension changes:
DataDog/datadog-agent#32231
DataDog/datadog-lambda-extension#500
## Reason for change
Prevents the tracer from throwing an exception due to non-ASCII
characters in these header values.
[[SLES-2001] .NET Datadog Tracer throws exception from AWS Lambda
Function](https://datadoghq.atlassian.net/browse/SLES-2001)
[[SVLS-6041] Having non-ascii characters in a stack trace causes an
exception within the
tracer.](https://datadoghq.atlassian.net/browse/SVLS-6041)
## Implementation details
Encodes the string values to UTF-8 bytes and then to a Base64 string.
## Test coverage
Updated tests to check for encoded values.
## Other details
<!-- Fixes #{issue} -->
<!-- 1 parent 1b9d131 commit 43053b4
File tree
3 files changed
+44
-8
lines changed- tracer
- src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/Lambda
- test
- Datadog.Trace.TestHelpers
- Datadog.Trace.Tests
3 files changed
+44
-8
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
150 | 175 | | |
151 | 176 | | |
152 | 177 | | |
| |||
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| |||
0 commit comments