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

[KYUUBI #5381] Change the default metrics reporter to Prometheus #5344

Closed
wants to merge 6 commits into from

Conversation

zhaohehuhu
Copy link
Contributor

@zhaohehuhu zhaohehuhu commented Sep 28, 2023

Why are the changes needed?

Close #5381

change default metrics reporter to prometheus since Kyuubi 1.8

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

@github-actions github-actions bot added kind:documentation Documentation is a feature! module:metrics labels Sep 28, 2023
@pan3793
Copy link
Member

pan3793 commented Sep 28, 2023

Could you please mention this change in docs/deployment/migration-guide.md too?

@pan3793 pan3793 changed the title change default metrics reporter to prometheus Change default metrics reporter to prometheus Sep 28, 2023
@zhaohehuhu
Copy link
Contributor Author

Could you please mention this change in docs/deployment/migration-guide.md too?

got it

Both Derby and SQLite are mainly for testing purposes, and they're not supposed to be used in production.
To restore previous behavior, set `kyuubi.metadata.store.jdbc.database.type=DERBY` and
`kyuubi.metadata.store.jdbc.url=jdbc:derby:memory:kyuubi_state_store_db;create=true`.

* Since Kyuubi 1.8, PROMETHEUS is changed as the default metrics reporter, because PROMETHEUS is a popular and widely
Copy link
Member

Choose a reason for hiding this comment

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

we don't need to mention "because ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it

| kyuubi.metrics.json.location | metrics | Where the JSON metrics file located | string | 1.2.0 |
| kyuubi.metrics.prometheus.path | /metrics | URI context path of prometheus metrics HTTP server | string | 1.2.0 |
| kyuubi.metrics.prometheus.port | 10019 | Prometheus metrics HTTP server port | int | 1.2.0 |
| kyuubi.metrics.reporters | PROMETHEUS | A comma-separated list for all metrics reporters<ul> <li>CONSOLE - ConsoleReporter which outputs measurements to CONSOLE periodically.</li> <li>JMX - JmxReporter which listens for new metrics and exposes them as MBeans.</li> <li>JSON - JsonReporter which outputs measurements to json file periodically.</li> <li>PROMETHEUS - PrometheusReporter which exposes metrics in Prometheus format.</li> <li>SLF4J - Slf4jReporter which outputs measurements to system log periodically.</li></ul> | set | 1.8.0 |
Copy link
Member

Choose a reason for hiding this comment

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

the version seems incorrect, have you regenerated it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. already corrected to right version.

@pan3793 pan3793 added this to the v1.8.0 milestone Sep 28, 2023
@pan3793
Copy link
Member

pan3793 commented Sep 28, 2023

The test failure is related, could you fix it?

@zhaohehuhu
Copy link
Contributor Author

The test failure is related, could you fix it?

looks like the default port 10019 for prometheus was already in use.

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2023

Codecov Report

Merging #5344 (84f4c82) into master (99789a8) will not change coverage.
Report is 12 commits behind head on master.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master   #5344   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         590     588    -2     
  Lines       33493   33427   -66     
  Branches     4424    4393   -31     
======================================
+ Misses      33493   33427   -66     
Files Coverage Δ
.../scala/org/apache/kyuubi/metrics/MetricsConf.scala 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

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

@pan3793
Copy link
Member

pan3793 commented Oct 4, 2023

The test failure is related, could you fix it?

looks like the default port 10019 for prometheus was already in use.

check if there is leaked resorces in test, or change the binding port by overriding confs in test

@zhaohehuhu
Copy link
Contributor Author

zhaohehuhu commented Oct 7, 2023

The test failure is related, could you fix it?

looks like the default port 10019 for prometheus was already in use.

check if there is leaked resorces in test, or change the binding port by overriding confs in test

I already changed the port to 0 but got another Flink issue then. I'm not sure if it's related to prometheus port as the error message is not showing the binding port was used anymore.

@pan3793 pan3793 changed the title Change default metrics reporter to prometheus [KYUUBI #5381] Change default metrics reporter to prometheus Oct 8, 2023
@pan3793
Copy link
Member

pan3793 commented Oct 8, 2023

@zhaohehuhu the flink test failure is irrelevant, the fix takes effect.

@zhaohehuhu
Copy link
Contributor Author

@zhaohehuhu the flink test failure is irrelevant, the fix takes effect.

got it. Thanks.

@bowenliang123 bowenliang123 changed the title [KYUUBI #5381] Change default metrics reporter to prometheus [KYUUBI #5381] Change the default metrics reporter to Prometheus Oct 12, 2023
Copy link
Contributor

@bowenliang123 bowenliang123 left a comment

Choose a reason for hiding this comment

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

LGTM.

@pan3793 pan3793 closed this in 4bb67bd Oct 16, 2023
pan3793 added a commit that referenced this pull request Oct 16, 2023
### _Why are the changes needed?_

Close #5381

change default metrics reporter to prometheus since Kyuubi 1.8

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

Closes #5344 from zhaohehuhu/Improvement-0928.

Closes #5381

84f4c82 [hezhao2] reset METRICS_REPORTERS for test case
b9ee5f7 [Cheng Pan] Update kyuubi-server/src/test/scala/org/apache/kyuubi/events/handler/ServerJsonLoggingEventHandlerSuite.scala
86165a6 [Cheng Pan] Update kyuubi-server/src/test/scala/org/apache/kyuubi/events/handler/ServerJsonLoggingEventHandlerSuite.scala
a3605b6 [hezhao2] set METRICS_PROMETHEUS_PORT to 0 for test cases
f1a4d28 [hezhao2] restore version number for kyuubi.metrics.reporters in doc
dae40e1 [hezhao2] change default metrics reporter to prometheus

Lead-authored-by: hezhao2 <[email protected]>
Co-authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 4bb67bd)
Signed-off-by: Cheng Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK][EASY] Change default metrics reporter to prometheus
4 participants