-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLORA-214] Implement tracing with zipkin (#564)
- Loading branch information
Showing
13 changed files
with
376 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
synopsis: Implement tracing with zipkin | ||
prs: #564 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Flora.Tracing where | ||
|
||
import Data.Text (Text) | ||
import Data.Text qualified as Text | ||
import Monitor.Tracing.Zipkin (Zipkin) | ||
import Monitor.Tracing.Zipkin qualified as ZPK | ||
|
||
newZipkin | ||
:: Text | ||
-- ^ Zipkin server URL | ||
-> Text | ||
-- ^ Flora instance identifier | ||
-> IO Zipkin | ||
newZipkin serverURL serviceName = do | ||
let settings = | ||
ZPK.defaultSettings | ||
{ ZPK.settingsEndpoint = | ||
Just $ | ||
ZPK.defaultEndpoint | ||
{ ZPK.endpointService = Just serviceName | ||
} | ||
, ZPK.settingsHostname = Just $ Text.unpack serverURL | ||
, ZPK.settingsPublishPeriod = 1 | ||
} | ||
ZPK.new settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.