Comments (3)
Hey @ambrusha, could you provide reproduction code to help us diagnose the issue?
from dd-sdk-ios.
Please take a look on this example
testDatadog.zip
I can not replicate the case when HTTPheaders
become empty... but when I use po
on breakpoint inside private func _intercept(task: URLSessionTask, additionalFirstPartyHosts: FirstPartyHosts?)
you can see that on the line line of code task
will get same requests...
As for my example, you can find that task.currentRequest?.url?.absoluteString
and the string from created request are different and the difference is in last symbol /
.
Also it's not a crasher, so if you have ability, please move it to appropriate place.
If you need more details, I'm happy to answer in a Datadog slack.
from dd-sdk-ios.
Thanks for sample code.
I see the issue with currentRequest
and originalRequest
originalRequest
(lldb) po task.originalRequest
▿ Optional<URLRequest>
▿ some : https://docs.datadoghq.com
▿ url : Optional<URL>
▿ some : https://docs.datadoghq.com
- _url : https://docs.datadoghq.com
- cachePolicy : 0
- timeoutInterval : 60.0
- mainDocumentURL : nil
- networkServiceType : __C.NSURLRequestNetworkServiceType
- allowsCellularAccess : true
▿ httpMethod : Optional<String>
- some : "GET"
▿ allHTTPHeaderFields : Optional<Dictionary<String, String>>
- some : 0 elements
- httpBody : nil
- httpBodyStream : nil
- httpShouldHandleCookies : true
- httpShouldUsePipelining : false
currentRequest
(lldb) po task.currentRequest
▿ Optional<URLRequest>
▿ some : https://docs.datadoghq.com
▿ url : Optional<URL>
▿ some : https://docs.datadoghq.com
- _url : https://docs.datadoghq.com
- cachePolicy : 0
- timeoutInterval : 60.0
- mainDocumentURL : nil
- networkServiceType : __C.NSURLRequestNetworkServiceType
- allowsCellularAccess : true
▿ httpMethod : Optional<String>
- some : "GET"
▿ allHTTPHeaderFields : Optional<Dictionary<String, String>>
▿ some : 12 elements
▿ 0 : 2 elements
- key : "app-version"
- value : "1.5"
▿ 1 : 2 elements
- key : "device-screen-width"
- value : "UIScreen.nativeWidth"
▿ 2 : 2 elements
- key : "device-category"
- value : "UIDevice.deviceCategory"
▿ 3 : 2 elements
- key : "device-id"
- value : "60ED20D8-640F-4732-A814-95E70A86127B"
▿ 4 : 2 elements
- key : "device-screen-height"
- value : "UIScreen.nativeHeight"
▿ 5 : 2 elements
- key : "device-model"
- value : "UIDevice.deviceModel"
▿ 6 : 2 elements
- key : "x-api-key"
- value : "ABC"
▿ 7 : 2 elements
- key : "app-name"
- value : "Unit-Tests"
▿ 8 : 2 elements
- key : "x-access-token"
- value : "Secret-A"
▿ 9 : 2 elements
- key : "device-sdk"
- value : "17.0"
▿ 10 : 2 elements
- key : "device-os"
- value : "UIDevice.deviceOS"
▿ 11 : 2 elements
- key : "app-locale"
- value : "self.appLocale"
- httpBody : nil
- httpBodyStream : nil
- httpShouldHandleCookies : true
- httpShouldUsePipelining : false
Headers applied at the NetworkClient
instantiation are replaced with originalRequest
which is bug here.
We should intercept the currentRequest
.
from dd-sdk-ios.
Related Issues (20)
- Adding request-based tags to url session spans HOT 4
- VisionOS Support HOT 8
- [Missing Properties] Privacy Manifest, unable to generate privacy report HOT 1
- Getting Failed to build `Logger` error even though the implementation looks correct HOT 4
- No Batches are uploaded when using SDK version 2.7.0 HOT 7
- [Crash] closure #1 in closure #1 in UIApplicationSwizzler.SendEvent.swizzle() HOT 3
- Metrics SDK - How to send measures and counters using the iOS SDK? HOT 1
- Privacy manifest causing collisions through CocoaPods HOT 1
- Background sessions are reported at SwiftUI project HOT 6
- Mobile Session Replay: "Session replay not available" HOT 3
- `RUM.ResourceAttributesProvider` not providing `data` information in URLSession tracking HOT 3
- Regular Logs not flushable HOT 2
- Crash on widget extension HOT 13
- Provide a boolean flag in configuration that enables batch upload even in low power mode HOT 4
- Missing crashes when tracking consent is pending HOT 6
- Can we use Head-based sampling on iOS? HOT 3
- iOS Kotlin Multiplatform hang after crash when using DatadogCrashReporting as a result of PLCrashReporter HOT 1
- If consent is not granted, I can't send any traces, even those without any user information. HOT 4
- Unable to use swift-api-digester when Datadog is a dependency HOT 4
- crash in KronosNTPPacket.prepareToSend(transmitTime:) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-sdk-ios.