Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAD-455 log versioning: make pretty #542

Merged
merged 6 commits into from
Feb 13, 2020
Merged

Conversation

deepfire
Copy link
Contributor

@deepfire deepfire commented Feb 5, 2020

We used to have the following in the structured log:

{"at":"2020-02-05T23:39:27.05Z","env": "fromList [(\"value\",String \"Release-1.0.0\")]:0.1.10.1","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}

This makes it more useful -- by tracking node version & commit id in the env field:

{"at":"2020-02-05T23:39:27.05Z","env":"1.5.0:79a04","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}

Note

This depends on input-output-hk/iohk-monitoring-framework#514 being merged first.

@deepfire deepfire requested a review from CodiePP February 5, 2020 23:47
@deepfire deepfire force-pushed the cad-455-log-versioning branch 2 times, most recently from d94284c to edc0507 Compare February 6, 2020 13:06
Copy link
Contributor

@CodiePP CodiePP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • nice idea about "era", but not necessary.
  • the cabal file "cardano-node.cabal" defines the version of the node
  • this version needs to be added to 'env' from module "Paths_cardano_node"

@deepfire deepfire force-pushed the cad-455-log-versioning branch 3 times, most recently from 111e120 to 10ec4cf Compare February 11, 2020 19:52
@deepfire
Copy link
Contributor Author

@CodiePP, done.

Config.setTextOption logConfig "appversion" ver
Config.setTextOption logConfig "appcommit" gitRev
T.putStrLn $ "ver: " <> ver
T.putStrLn $ "rev: " <> gitRev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this debug output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah gotcha, thank you!

shell.nix Show resolved Hide resolved
stack.yaml Outdated Show resolved Hide resolved
stack.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@CodiePP CodiePP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes/explanations needed

@CodiePP CodiePP added this to the S6 2020-02-13 milestone Feb 12, 2020
@deepfire deepfire force-pushed the cad-455-log-versioning branch 7 times, most recently from 62c1394 to b9cb962 Compare February 12, 2020 23:20
then Cardano.BM.Backend.Editor.plugin logConfig trace switchBoard
>>= loadPlugin switchBoard
else pure ()
when (p > 0) $
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CodiePP
Copy link
Contributor

CodiePP commented Feb 13, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 13, 2020
542: CAD-455 log versioning:  make pretty r=CodiePP a=deepfire

We used to have the following in the structured log:

```
{"at":"2020-02-05T23:39:27.05Z","env": "fromList [(\"value\",String \"Release-1.0.0\")]:0.1.10.1","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}
```

This makes it more useful -- by tracking node version & commit id in the `env` field:
```
{"at":"2020-02-05T23:39:27.05Z","env":"1.5.0:79a04","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}
```
# Note

This depends on input-output-hk/iohk-monitoring-framework#514 being merged first.

Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 13, 2020

Build failed

@CodiePP
Copy link
Contributor

CodiePP commented Feb 13, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 13, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 13, 2020

Merge conflict

@CodiePP
Copy link
Contributor

CodiePP commented Feb 13, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 13, 2020
542: CAD-455 log versioning:  make pretty r=CodiePP a=deepfire

We used to have the following in the structured log:

```
{"at":"2020-02-05T23:39:27.05Z","env": "fromList [(\"value\",String \"Release-1.0.0\")]:0.1.10.1","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}
```

This makes it more useful -- by tracking node version & commit id in the `env` field:
```
{"at":"2020-02-05T23:39:27.05Z","env":"1.5.0:79a04","ns":["cardano","node-metrics"],"data":{},"app":[],"msg":"IO.rchar = 24964 B","...}
```
# Note

This depends on input-output-hk/iohk-monitoring-framework#514 being merged first.

Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 13, 2020

@iohk-bors iohk-bors bot merged commit 5c225e7 into master Feb 13, 2020
@iohk-bors iohk-bors bot deleted the cad-455-log-versioning branch February 13, 2020 20:42
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants