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

test(logging): allow for overriding and enabling logging of caller field #262

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

charliedmcb
Copy link
Collaborator

@charliedmcb charliedmcb commented Apr 11, 2024

Fixes #389

Description
Allow for overriding and enabling the caller field which contains file path, name, and line number of the log. Also, adds a make command to enable it.

How was this change tested?
created a standalone setup in codespaces, and tested both with, and without az-enable-logging-caller to ensure the caller field shows up correctly.
*

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

NONE

@charliedmcb charliedmcb marked this pull request as ready for review April 11, 2024 20:39
@coveralls
Copy link

coveralls commented Apr 11, 2024

Pull Request Test Coverage Report for Build 8726458791

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 97.731%

Files with Coverage Reduction New Missed Lines %
pkg/operator/options/options_validation.go 2 95.92%
Totals Coverage Status
Change from base Build 8696568967: -0.005%
Covered Lines: 35660
Relevant Lines: 36488

💛 - Coveralls

Copy link
Collaborator

@tallaxes tallaxes left a comment

Choose a reason for hiding this comment

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

LGTM; maybe let's queue it after #148, just to make sure it is compatible?

@@ -191,6 +191,9 @@ az-run-sample: ## Deploy sample Provisioner and workload (with 0 replicas, to be
kubectl apply -f examples/v1beta1/general-purpose.yaml
kubectl apply -f examples/workloads/inflate.yaml

az-enable-logging-caller: ## Enable logging the caller field (file path, name, and line number)
yq -i '.manifests.helm.releases[0].overrides.logConfig ."disableCaller" = false' skaffold.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
yq -i '.manifests.helm.releases[0].overrides.logConfig ."disableCaller" = false' skaffold.yaml
yq -i '.manifests.helm.releases[0].overrides.logConfig.disableCaller = false' skaffold.yaml

(not a blocker)

@tallaxes tallaxes added the area/logging Issues or PRs related to logging label Apr 11, 2024
@charliedmcb
Copy link
Collaborator Author

LGTM; maybe let's queue it after #148, just to make sure it is compatible?

SG, yea happy to delay

@tallaxes tallaxes added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 11, 2024
Copy link
Collaborator

@Bryce-Soghigian Bryce-Soghigian left a comment

Choose a reason for hiding this comment

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

All logging improvements are best deferred until we this gets in kubernetes-sigs/karpenter#1050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging Issues or PRs related to logging size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve E2E/self-hosted logging by allowing for the option to have file path and line number within testing
4 participants