You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "limowang (via GitHub)" <gi...@apache.org> on 2024/01/03 12:18:31 UTC
[PR] A new port is added for prometheus collection, and the indicator init… [incubator-pegasus]
limowang opened a new pull request, #1826:
URL: https://github.com/apache/incubator-pegasus/pull/1826
A new port is added for prometheus collection, and the indicator initialization process is extracted to form a separate function.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat: A new port is added for prometheus collection, and the indicator init… [incubator-pegasus]
Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 commented on PR #1826:
URL: https://github.com/apache/incubator-pegasus/pull/1826#issuecomment-1876929908
The PR title seems too long and incomplete.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat: A new port is added for prometheus collection, and the indicator init… [incubator-pegasus]
Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 commented on code in PR #1826:
URL: https://github.com/apache/incubator-pegasus/pull/1826#discussion_r1441624630
##########
collector/main.go:
##########
@@ -26,9 +26,12 @@ import (
"strings"
"syscall"
- "github.com/pegasus-kv/collector/avail"
- "github.com/pegasus-kv/collector/metrics"
- "github.com/pegasus-kv/collector/webui"
+ // "github.com/pegasus-kv/collector/avail"
+ // "github.com/pegasus-kv/collector/metrics"
+ // "github.com/pegasus-kv/collector/webui"
+ "github.com/limowang/incubator-pegasus/collector/avail"
Review Comment:
Remove the comments and use the apache repository.
##########
collector/main:
##########
Review Comment:
Don't add binaries to the codebase.
##########
collector/webui/webserver.go:
##########
@@ -53,9 +56,22 @@ func StartWebServer() {
app.RegisterView(tmpl)
go func() {
- err := app.Listen(":8080")
+ err := app.Listen(":8081")
Review Comment:
It would be better to read from config file or command line rather than hard code.
The port should be user-defined to avoid port conflicts in user environments.
##########
collector/main.go:
##########
@@ -81,7 +84,8 @@ func main() {
return
}
- webui.StartWebServer()
+ metrics.InitMetrics()
+ //webui.StartWebServer()
Review Comment:
Just remove it if it's not needed.
##########
collector/metrics/metric_collector.go:
##########
@@ -167,17 +149,15 @@ func initMetrics() {
Help: desc,
}, []string{"endpoint", "role", "level", "title"})
GaugeMetricsMap[name] = *gaugeMetric
- case "Percentile":
- if _, ok := SummaryMetricsMap[name]; ok {
+ case "Percentile": //这个需要改动不能用这个表示,用gauge来表示分位数 --level(p50,p99),title(task_name)来替代区分
Review Comment:
Use English because this is a globally open-source project.
##########
collector/go.mod:
##########
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-module github.com/pegasus-kv/collector
+module github.com/limowang/incubator-pegasus/collector
Review Comment:
```suggestion
module github.com/apache/incubator-pegasus/collector
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat: A new port is added for prometheus collection, and the indicator init… [incubator-pegasus]
Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 commented on code in PR #1826:
URL: https://github.com/apache/incubator-pegasus/pull/1826#discussion_r1445701140
##########
collector/config.yml:
##########
@@ -25,7 +25,7 @@ meta_servers:
- 127.0.0.1:34603
# local server port
-port : 34101
+port : 8081
Review Comment:
8080, 8081 are widely used ports for web servers, it would be better to use 34101 to keep compatible (old version of collectors may have been used by communituy users, don't change the behavior).
##########
collector/webui/webserver.go:
##########
@@ -53,9 +57,25 @@ func StartWebServer() {
app.RegisterView(tmpl)
go func() {
- err := app.Listen(":8080")
+ localPort := ":" + viper.GetString("port")
+ err := app.Listen(localPort)
if err != nil {
return
}
}()
+
+ //Provide metrics for prometheus
Review Comment:
```suggestion
// Provide metrics for Prometheus.
```
##########
collector/config.yml:
##########
@@ -34,7 +34,7 @@ metrics:
prometheus:
# the exposed port for prometheus exposer
- exposer_port : 1111
+ exposer_port : 8080
Review Comment:
Same, and 34*01 ports are used by Pegasus by habit, how about use 34201 instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat: A new port is added for prometheus collection, and the indicator init… [incubator-pegasus]
Posted by "limowang (via GitHub)" <gi...@apache.org>.
limowang closed pull request #1826: feat: A new port is added for prometheus collection, and the indicator init…
URL: https://github.com/apache/incubator-pegasus/pull/1826
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org