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

chore: default deployment with collect_metric=true and DEBUG level #1148

Closed
wants to merge 5 commits into from

Conversation

DvirYo-starkware
Copy link
Contributor

@DvirYo-starkware DvirYo-starkware commented Sep 7, 2023

…level.

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information


This change is Reviewable

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #1148 (744cfab) into main (422099c) will not change coverage.
Report is 2 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1148   +/-   ##
=======================================
  Coverage   74.08%   74.08%           
=======================================
  Files          74       74           
  Lines        6636     6636           
  Branches     6636     6636           
=======================================
  Hits         4916     4916           
  Misses        873      873           
  Partials      847      847           

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

Comment on lines 13 to 14
# If true, metrics will be collected and exposed on the monitoring port.
collect_metrics: true
Copy link
Collaborator

@eranreshef-starkware eranreshef-starkware Sep 10, 2023

Choose a reason for hiding this comment

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

  1. An application that runs inside a cluster (papyrus in this case) can't guarantee that its metrics would be collected by some other app.
  2. I don't see anywhere in the helm chart which reference this condition.

Comment on lines 60 to 62
env:
- name: RUST_LOG
value: papyrus=DEBUG
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be easier to place this key-value pair in the configmap which it's content is exported as env-vars

@DvirYo-starkware DvirYo-starkware changed the title chore: default helm deployment with colect_metric=true and DEBUG log … chore: default deployment with collect_metric=true and DEBUG level Sep 11, 2023
Comment on lines 13 to 15
# If true, metrics will be collected and exposed on the monitoring port.
# Note: this is not a guarantee the metrics will be collected. To see where
# they collected see the deployment.yaml file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The original phrasing was fine, just remove the collected and part.

deployments/helm/values.yaml Show resolved Hide resolved
@@ -1,7 +1,7 @@
# Default values for a papyrus deployment.

# The verbosity level of logs ("debug", "info", "error", etc.)
rustLogLevel: "info"
rustLogLevel: "debug"
Copy link
Collaborator

Choose a reason for hiding this comment

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

default log level should be "info"

Copy link
Contributor Author

@DvirYo-starkware DvirYo-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @dan-starkware and @eranreshef-starkware)


deployments/helm/values.yaml line 14 at r1 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…
  1. An application that runs inside a cluster (papyrus in this case) can't guarantee that its metrics would be collected by some other app.
  2. I don't see anywhere in the helm chart which reference this condition.

Done.


deployments/helm/values.yaml line 4 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

default log level should be "info"

Why? We want the default value in the deployment to be "debug".


deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

The original phrasing was fine, just remove the collected and part.

Done.


deployments/helm/values.yaml line 16 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

I don't see where this value is being used

See the deployment file line 68.


deployments/helm/templates/deployment.yaml line 62 at r1 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

It would be easier to place this key-value pair in the configmap which it's content is exported as env-vars

I decided to use the already existing RUST_LOG value from the config map.

Copy link
Collaborator

@eranreshef-starkware eranreshef-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @dan-starkware and @DvirYo-starkware)


deployments/helm/values.yaml line 4 at r2 (raw file):

Previously, DvirYo-starkware wrote…

Why? We want the default value in the deployment to be "debug".

who wants it and why?


deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, DvirYo-starkware wrote…

Done.

you removed the wrong part. metrics are not being collected automatically.


deployments/helm/values.yaml line 16 at r2 (raw file):

Previously, DvirYo-starkware wrote…

See the deployment file line 68.

missed it, sorry.

Copy link
Contributor Author

@DvirYo-starkware DvirYo-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @dan-starkware and @eranreshef-starkware)


deployments/helm/values.yaml line 4 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

who wants it and why?

I changed it back to info. This is not so important.


deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

you removed the wrong part. metrics are not being collected automatically.

There is a need to collect the metrics in the node itself; without this collection, the node will not have the statics to return.
I rephrased the comment to emphasize this difference.

@eranreshef-starkware
Copy link
Collaborator

deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, DvirYo-starkware wrote…

There is a need to collect the metrics in the node itself; without this collection, the node will not have the statics to return.
I rephrased the comment to emphasize this difference.

The helm chart and it's documentation shouldn't expose any information regarding the internal implementation. even if papyrus is open source and everyone can see its internal logic, the helm chart "doesn't care" about it. here you just need to explain that this boolean value is enabling or disabling the metrics endpoint.

Copy link
Collaborator

@eranreshef-starkware eranreshef-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r2, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dan-starkware and @DvirYo-starkware)

Copy link
Contributor Author

@DvirYo-starkware DvirYo-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dan-starkware and @eranreshef-starkware)


deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, eranreshef-starkware (Eran Reshef) wrote…

The helm chart and it's documentation shouldn't expose any information regarding the internal implementation. even if papyrus is open source and everyone can see its internal logic, the helm chart "doesn't care" about it. here you just need to explain that this boolean value is enabling or disabling the metrics endpoint.

Just write here precisely what you think should be here.

@eranreshef-starkware
Copy link
Collaborator

deployments/helm/values.yaml line 15 at r2 (raw file):

Previously, DvirYo-starkware wrote…

Just write here precisely what you think should be here.

if it was me implementing this feature, I would have added a new section to the values file for metrics related configuration. something like:

metrics:
  enabled: false

This way we can later add more parameters to this domain (like the metrics_port and scrape annotations for example).
It will also save you the documentation phrasing headache since the naming pretty much explains what this value is responsible for.

@github-actions
Copy link

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale No activity for quite some time. label Oct 14, 2023
@github-actions github-actions bot closed this Oct 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale No activity for quite some time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants