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

feat: add an access logger for the router #2771

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

Conversation

saltbo
Copy link
Contributor

@saltbo saltbo commented Apr 4, 2023

Description

Which issue(s) this PR fixes:

Fixes #2770

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

@saltbo saltbo changed the title feat: add a access logger for the router feat: add an access logger for the router Apr 4, 2023
@saltbo saltbo force-pushed the feature/router-accesslog branch 2 times, most recently from 796b1d7 to eb0b4ae Compare April 4, 2023 09:05
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #2771 (60af3ba) into main (a5f3402) will increase coverage by 0.15%.
The diff coverage is 40.67%.

@@            Coverage Diff             @@
##             main    #2771      +/-   ##
==========================================
+ Coverage   20.87%   21.02%   +0.15%     
==========================================
  Files          68       70       +2     
  Lines        7339     7399      +60     
==========================================
+ Hits         1532     1556      +24     
- Misses       5693     5727      +34     
- Partials      114      116       +2     
Flag Coverage Δ
unittests 21.02% <40.67%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/router/httpTriggers.go 0.72% <0.00%> (-0.02%) ⬇️
pkg/router/router.go 0.00% <0.00%> (ø)
pkg/router/accesslog/upstream.go 17.24% <17.24%> (ø)
pkg/router/accesslog/logger.go 86.36% <86.36%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@saltbo saltbo force-pushed the feature/router-accesslog branch from 61d11b1 to d2a2743 Compare May 8, 2023 09:58
@shubham-bansal96
Copy link
Contributor

@saltbo I was trying to verify your changes but somehow I am not able to see the logs as mentioned by you in this PR.
I have enabled DISPLAY_ACCESS_LOG env variable in using helm chart and i can see this env variable is being set inside container.
I created a new function and test it, but i can't see the logs for router as you mentioned.

Please let me know if i miss anything in order to get the logs.

@saltbo
Copy link
Contributor Author

saltbo commented May 17, 2023

part fixed. it can output the log, but not contains upstream info. @shubham-bansal96

My current implementation is not very feasible. I haven't thought of a better way to get upstream info. If you have any ideas, please let me know.

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.

Invalid env DISPLAY_ACCESS_LOG
2 participants