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

Release/1.14.x backport logging changes #10059

Merged
merged 8 commits into from
Jun 21, 2021

Conversation

realvictorprm
Copy link
Contributor

Backports logging changes to 1.14.x as per request from @cocreature

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

realvictorprm and others added 8 commits June 21, 2021 10:49
…e deployment situation (#9938)

* Load the correct logback file for the http json service respecting the deployment situation

changelog_begin

[HTTP-JSON]
- fixed that json log output could not be enabled via cli options except via usage of env vars

changelog_end

* Move import statement, remove some braces and reformat

* Move system prop dependend logic to cliopts Logging.scala

* Remove PathKind type in cliopts Logging.scala as it's not necessary anymore
…log ctx (#9940)

* Log call to submitAndWaitRequest with the command id provided in the log ctx

changelog_begin

- [HTTP-JSON] Calls which trigger a submitAndWaitRequest are logged with the command id provided in the log ctx

changelog_end

* Require the request id to be also in the log ctx

* Log command kind in submitAndWaitRequest of CommandService.scala

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/CommandService.scala

Co-authored-by: Moritz Kiefer <[email protected]>

Co-authored-by: Moritz Kiefer <[email protected]>
…ce specific ones) (#9990)

* Don't duplicate log failed futures in the http json api (commandservice specific)

changelog_begin

- [JSON API] Errors which arise from the CommandService are not logged twice anymore (thus reducing noise)

changelog_end

* Fix duplicate logging of a failed future differently via adding another error case in CommandService.scala

* Restore old formatting

* Improve comment

* Remove the wrong changes I accidentally made, the functions are quite similar xD

* remove the additional type and just make the id optional & remove unecessary comment
…se with info level (#10007)

changelog_begin

- [JSON-API] The source and the path for incoming http requests are now logged
- [JSON-API] The http response for a request is now logged

changelog_end
…ssions in the json API (#10005)

* Log templateId & choice name (if present) on command submissions in the json API

changelog_begin

- [JSON API] The template id & choice name (if present) are now logged on command submissions in the Json API (at trace level)

changelog_end

* Move the template id & the choice into the logging context

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/CommandService.scala

Co-authored-by: Stefano Baghino <[email protected]>

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/CommandService.scala

Co-authored-by: Stefano Baghino <[email protected]>

* Fix compile error due to scala 2.12 collection differences

Co-authored-by: Stefano Baghino <[email protected]>
…#9995)

* Add information from the jwtpayload to the logging context

changelog_begin

- [JSON API] For applicable requests actAs, readAs, applicationId & ledgerId are included in the log context

changelog_end

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

Co-authored-by: Stephen Compall <[email protected]>

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

Co-authored-by: Stephen Compall <[email protected]>

* Revert changes to make the function generic

* Create JwtPayloadG trait from which both payload variants inherit

* Reduce code duplication in Endpoints.scala

* Apply review suggestion

* Update test name to reflect field name changes

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

Co-authored-by: Moritz Kiefer <[email protected]>

Co-authored-by: Stephen Compall <[email protected]>
Co-authored-by: Moritz Kiefer <[email protected]>
changelog_begin

- [JSON API] log statements now include the date next to the time

changelog_end
@realvictorprm realvictorprm added the component/json-api HTTP JSON API label Jun 21, 2021
@realvictorprm
Copy link
Contributor Author

I will merge this now

@realvictorprm realvictorprm merged commit 9f5b33d into release/1.14.x Jun 21, 2021
@realvictorprm realvictorprm deleted the release/1.14.x-backport-logging-changes branch June 21, 2021 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/json-api HTTP JSON API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants