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

metrics-apiserver json logs #4049

Closed
naseemkullah opened this issue Dec 30, 2022 · 15 comments · Fixed by #4952
Closed

metrics-apiserver json logs #4049

naseemkullah opened this issue Dec 30, 2022 · 15 comments · Fixed by #4952
Labels
stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@naseemkullah
Copy link

    > I'm very sorry @JorTurFer - I was looking at logs from the `keda-operator-metrics-apiserver` deployment. It seems that only has a level setting as opposed to the operator having level, format, and timeEncoding.

Our logs for keda-operator are correctly being emitted as JSON 🤦

That said, I'd like to have the metrics-apiserver log in json format as well, primarily because all info logs are emitted to stderr and those show up as error logs in our logging system. Could this functionality please be added?

Originally posted by @naseemkullah in #3655 (comment)

@naseemkullah naseemkullah changed the title > I'm very sorry @JorTurFer - I was looking at logs from the keda-operator-metrics-apiserver deployment. It seems that only has a level setting as opposed to the operator having level, format, and timeEncoding. metrics-apiserver json logs Dec 30, 2022
@JorTurFer
Copy link
Member

Hi,
What KEDA version are you using?

@naseemkullah
Copy link
Author

Hi Jorge, 2.9.1

@JorTurFer
Copy link
Member

JorTurFer commented Dec 30, 2022

I have reviewed and you are right, all the logs are sent to stderr :( You can disable this behaviour removing the -logtostderr=true from the deployment arguments.
Maybe we should review this in the future @kedacore/keda-core-contributors , something like -stderrthreshold=ERROR could be enough

@JorTurFer JorTurFer self-assigned this Jan 17, 2023
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 18, 2023
@JorTurFer JorTurFer removed their assignment Mar 21, 2023
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Mar 21, 2023
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label May 21, 2023
@stale
Copy link

stale bot commented May 31, 2023

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed May 31, 2023
@zroubalik zroubalik reopened this May 31, 2023
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label May 31, 2023
@icco
Copy link

icco commented Jun 1, 2023

Hi there, this is still an issue in 2.10.1. metrics server has a different logging settings than the other two binaries, as visible in the docs of helm: https://github.com/kedacore/charts/blob/main/keda/README.md. This doesn't allow users to enable json logs or set a logging level using words (like debug or info).

Are there any plans to change this? It's hard to tell from the issue history.

@JorTurFer
Copy link
Member

AFAIK, there isn't work in progress in this direction, but if you have an idea and you are willing to contribute, you can do it :)

@stale
Copy link

stale bot commented Jul 31, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jul 31, 2023
@stale
Copy link

stale bot commented Aug 8, 2023

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Aug 8, 2023
@zroubalik zroubalik reopened this Aug 8, 2023
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Aug 8, 2023
@JorTurFer JorTurFer added the stale-bot-ignore All issues that should not be automatically closed by our stale bot label Aug 8, 2023
@Adarsh-verma-14
Copy link
Contributor

I have reviewed and you are right, all the logs are sent to stderr :( You can disable this behaviour removing the -logtostderr=true from the deployment arguments. Maybe we should review this in the future @kedacore/keda-core-contributors , something like -stderrthreshold=ERROR could be enough

Hi @JorTurFer , is there any plan to add this(-stderrthreshold=ERROR) deployment arguments ?
I just want to contribute .

@JorTurFer
Copy link
Member

There isn't any wip about this, so the stage is yours 😄

@lucasfcnunes
Copy link

lucasfcnunes commented Jun 28, 2024

json logging would be great!

BTW Why is this issue closed?

@omBratteng
Copy link

Would love JSON logs so that they can be properly parsed in places like Google Cloud Logs Explorer.

@ademar59
Copy link

same need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Archived in project
8 participants