Skip to content

Conversation

@dhurley
Copy link
Collaborator

@dhurley dhurley commented Dec 15, 2025

Proposed changes

  • Refactor what gets logged when log level is set to info.
  • Add RequestType to DataPlaneResponse proto message.
  • Log health requests as debug instead of info.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@dhurley dhurley requested a review from a team as a code owner December 15, 2025 14:43
@github-actions github-actions bot added chore Pull requests for routine tasks documentation Improvements or additions to documentation labels Dec 15, 2025
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 82.38213% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.22%. Comparing base (c162d76) to head (1378268).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
internal/command/command_plugin.go 31.25% 21 Missing and 1 partial ⚠️
internal/bus/message_pipe.go 0.00% 15 Missing ⚠️
internal/resource/resource_service.go 0.00% 9 Missing ⚠️
...ernal/watcher/instance/instance_watcher_service.go 10.00% 8 Missing and 1 partial ⚠️
internal/grpc/grpc.go 16.66% 5 Missing ⚠️
internal/collector/otel_collector_plugin.go 80.95% 2 Missing and 2 partials ⚠️
internal/file/file_plugin.go 90.00% 2 Missing ⚠️
internal/plugin/plugin_manager.go 83.33% 2 Missing ⚠️
internal/resource/nginx_plus_actions.go 98.63% 2 Missing ⚠️
internal/file/file_manager_service.go 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
+ Coverage   85.18%   85.22%   +0.04%     
==========================================
  Files         102      102              
  Lines       12974    13199     +225     
==========================================
+ Hits        11052    11249     +197     
- Misses       1437     1462      +25     
- Partials      485      488       +3     
Files with missing lines Coverage Δ
internal/collector/settings.go 77.14% <100.00%> (ø)
internal/command/command_service.go 79.82% <100.00%> (ø)
internal/datasource/proto/response.go 100.00% <100.00%> (ø)
internal/file/file_service_operator.go 76.82% <100.00%> (+0.52%) ⬆️
internal/resource/nginx_instance_operator.go 91.17% <100.00%> (+0.08%) ⬆️
internal/resource/resource_plugin.go 79.57% <100.00%> (+6.39%) ⬆️
internal/watcher/file/file_watcher_service.go 81.29% <100.00%> (+1.93%) ⬆️
internal/watcher/health/health_watcher_service.go 89.09% <100.00%> (+3.10%) ⬆️
internal/watcher/instance/nginx_process_parser.go 91.04% <ø> (-0.63%) ⬇️
internal/watcher/watcher_plugin.go 72.91% <100.00%> (+1.04%) ⬆️
... and 10 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb30122...1378268. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@aphralG aphralG left a comment

Choose a reason for hiding this comment

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

Could we add more logging around the file actions and the manifest file ?

}

continue
case model.Add, model.Update:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a log for updating and adding for consistency ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The RenameFile function is already logging that

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, just not sure renaming makes it clear that the file is being updated or added the way that its clear a file is being deleted. I wouldn't be able to tell immediately the action being preformed

serverAddr := serverAddress(ctx, commandConfig)

slog.InfoContext(ctx, "Dialing grpc server", "server_addr", serverAddr)
slog.InfoContext(ctx, "Creating connection to management plane server", "server_address", serverAddr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could the type also be logged, auxiliary or command ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I'll add the server type to the context so that it gets logged here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants