Commit b92c9c0
feat: add http.route attribute to open telemetry on requests (#640)
* feat: add http.route attribute to open telemetry on requests
* expanded tests to include some coverage of existing otel instrumentation
* Potential fix for pull request finding 'Missing Dispose call on local IDisposable'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/http/httpClient/HttpClientRequestAdapterObservabilityTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix HttpResponseMessage disposal in Moq test setups (#645)
* Initial plan
* Fix HttpResponseMessage disposal issues in all observability tests
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Wrap HttpResponseMessage instantiation with lambda in Moq ReturnsAsync (#644)
* Initial plan
* Fix HttpResponseMessage disposal in all ReturnsAsync calls
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Fix HttpResponseMessage disposal in mock test setups (#642)
* Initial plan
* Fix HttpResponseMessage disposal in remaining test methods
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Fix HttpResponseMessage disposal in mock test setups (#643)
* Initial plan
* Fix HttpResponseMessage disposal issues in observability tests
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Fix mock response content-type in observability tests (#646)
* Initial plan
* Fix empty catch blocks by adding proper content-type to mock responses
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* chore: seals the test class because it implements IDisposable
* Fix observability test setup to use correct content type (#647)
* Initial plan
* Fix empty catch blocks by adding explanatory comments
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Fix test setup to avoid exceptions instead of silencing them
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* chore: removes try catch from tests
* Deduplicate baseUrlPlaceholder constant in GetNormalizedHttpRoute (#648)
* Initial plan
* Deduplicate baseUrlPlaceholder constant definition
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* chore: fixes tests definitions
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
* chore: formatting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
* Mark IDisposable test classes as sealed (#649)
* Initial plan
* refactor: mark IDisposable test classes as sealed
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* cleaned up tests to theories and fixed missing query string cases
---------
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>1 parent 40e97f6 commit b92c9c0
9 files changed
Lines changed: 515 additions & 6 deletions
File tree
- src/http/httpClient
- tests/http/httpClient
- Middleware
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
119 | 210 | | |
120 | 211 | | |
121 | 212 | | |
| |||
0 commit comments