File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ PODS:
497497 - RCT-Folly (= 2021.07.22.00)
498498 - React-Core
499499 - SocketRocket (0.6.1)
500- - splunk-otel-react-native (0.3.0 ):
500+ - splunk-otel-react-native (0.3.1 ):
501501 - DeviceKit (~> 4.0)
502502 - PLCrashReporter (~> 1.11)
503503 - React-Core
@@ -739,10 +739,10 @@ SPEC CHECKSUMS:
739739 ReactCommon: 91ece8350ebb3dd2be9cef662abd78b6948233c0
740740 RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
741741 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
742- splunk-otel-react-native: a9aa98bc64460b78fb470365cc465cdd7feba82b
742+ splunk-otel-react-native: 1e84229010d68b5e9ca1f7e48414a7c678444fa3
743743 Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6
744744 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
745745
746- PODFILE CHECKSUM: 43525f2fc52f01068fed659b4b70dfe433901dd5
746+ PODFILE CHECKSUM: 5009b8cc36e00dbdd65a448c2f8e5dfab9669070
747747
748748COCOAPODS: 1.11.3
Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ struct ZipkinTransform {
111111 let spanId = otelSpan [ " id " ] as? String ?? " 0000000000000000 "
112112 let name = otelSpan [ " name " ] as? String ?? " unknown "
113113 let jsTags = otelSpan [ " tags " ] as? Dictionary < String , Any > ?? [ : ]
114+ let timestamp = anyToUInt64 ( otelSpan [ " timestamp " ] )
115+ let duration = anyToUInt64 ( otelSpan [ " duration " ] )
114116
115117 var tags : Dictionary < String , String > = [ : ]
116118
@@ -134,8 +136,8 @@ struct ZipkinTransform {
134136 id: spanId,
135137 kind: otelSpan [ " kind " ] as? String ,
136138 name: name,
137- timestamp: otelSpan [ " timestamp " ] as? UInt64 ?? 0 ,
138- duration: otelSpan [ " duration " ] as? UInt64 ?? 0 ,
139+ timestamp: timestamp,
140+ duration: duration,
139141 remoteEndpoint: nil ,
140142 annotations: [ ] ,
141143 tags: tags)
@@ -155,3 +157,26 @@ extension ZipkinSpan {
155157 self . annotations. append ( ZipkinAnnotation ( timestamp: UInt64 ( timestamp. timeIntervalSince1970 * 1e6 ) , value: name) )
156158 }
157159}
160+
161+ fileprivate func anyToUInt64( _ v: Any ? ) -> UInt64 {
162+ if v == nil {
163+ return 0
164+ }
165+
166+ switch v {
167+ case is Double :
168+ let doubleValue = v as! Double
169+ if ( doubleValue >= 0.0 ) {
170+ return UInt64 ( doubleValue)
171+ }
172+ return 0
173+ case is Int :
174+ let intValue = v as! Int
175+ if ( intValue >= 0 ) {
176+ return UInt64 ( intValue)
177+ }
178+ return 0
179+ default :
180+ return 0
181+ }
182+ }
Original file line number Diff line number Diff line change 101101 ]
102102 },
103103 "dependencies" : {
104- "@opentelemetry/api" : " ^1.4.1 " ,
105- "@opentelemetry/core" : " ^1.14 .0" ,
106- "@opentelemetry/resources" : " ^1.14 .0" ,
107- "@opentelemetry/sdk-trace-base" : " ^1.14 .0" ,
108- "@opentelemetry/sdk-trace-web" : " ^1.14 .0" ,
109- "@opentelemetry/semantic-conventions" : " ^1.14 .0"
104+ "@opentelemetry/api" : " ^1.7.0 " ,
105+ "@opentelemetry/core" : " 1.20 .0" ,
106+ "@opentelemetry/resources" : " 1.20 .0" ,
107+ "@opentelemetry/sdk-trace-base" : " 1.20 .0" ,
108+ "@opentelemetry/sdk-trace-web" : " 1.20 .0" ,
109+ "@opentelemetry/semantic-conventions" : " 1.20 .0"
110110 },
111111 "publishConfig" : {
112112 "access" : " public"
You can’t perform that action at this time.
0 commit comments