This repository was archived by the owner on Apr 7, 2022. It is now read-only.
File tree 3 files changed +8
-4
lines changed 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ 0.5.1:
2
+ * Trace and span ids are now random instead of timestamps
3
+
1
4
0.5.0:
2
5
* Introduce getEnvConfig
3
6
* [Highlevel.IO] Auto-tag root spans with a thread id
Original file line number Diff line number Diff line change 1
1
cabal-version : 2.4
2
2
3
3
name : lightstep-haskell
4
- version : 0.5.0
4
+ version : 0.5.1
5
5
synopsis : LightStep OpenTracing client library
6
6
description : LightStep OpenTracing client library . Uses GRPC transport via proto-lens.
7
7
category : Tools
@@ -83,6 +83,7 @@ library
83
83
, proto-lens >= 0.5.1.0
84
84
, proto-lens-protobuf-types >= 0.5.0.0
85
85
, proto-lens-runtime >= 0.5.0.0
86
+ , random
86
87
, safe-exceptions
87
88
, stm
88
89
, text
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import Paths_lightstep_haskell (version)
24
24
import Proto.Collector
25
25
import Proto.Collector_Fields
26
26
import Proto.Google.Protobuf.Timestamp_Fields
27
+ import System.Random
27
28
import System.Timeout
28
29
29
30
data LightStepClient
@@ -123,9 +124,8 @@ startSpan :: T.Text -> IO Span
123
124
startSpan op = do
124
125
inc 1 startedSpanCountVar
125
126
nanosSinceEpoch <- getTime <$> now
126
- -- FIXME: make those ids randomer
127
- let sid = fromIntegral nanosSinceEpoch
128
- tid = fromIntegral nanosSinceEpoch
127
+ sid <- randomIO
128
+ let tid = sid
129
129
pure $
130
130
defMessage
131
131
& operationName .~ op
You can’t perform that action at this time.
0 commit comments