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

Make logger an explicit dependency and log errors through APM #941

Merged
merged 9 commits into from
Dec 14, 2022

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Dec 13, 2022

This PR contains several related changes:

  • Wrap logger so logged errors are captured by APM too.
  • Configure APM logger for APM.
  • Make logger a explicit dependency instead of being a global object, so we ensure that the expected logger is used in each case.
  • Move util package to internal, in the context of Reduce scope of the package registry as library #938.

It also adds static analysis with staticcheck.

@jsoriano jsoriano requested a review from a team December 13, 2022 14:08
@jsoriano jsoriano self-assigned this Dec 13, 2022
@elasticmachine
Copy link

elasticmachine commented Dec 13, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-12-14T12:46:20.058+0000

  • Duration: 5 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 244
Skipped 0
Total 244

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

internal/util/logging.go Outdated Show resolved Hide resolved
main_test.go Outdated Show resolved Hide resolved
@jsoriano
Copy link
Member Author

/test

@jsoriano jsoriano requested a review from mrodm December 14, 2022 09:59
magefile.go Outdated Show resolved Hide resolved
@jsoriano jsoriano merged commit a17e0cf into elastic:main Dec 14, 2022
@jsoriano jsoriano deleted the explicit-logger-dependency branch December 14, 2022 13:02
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.

3 participants