You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "ev1lQuark (via GitHub)" <gi...@apache.org> on 2023/04/26 10:46:08 UTC
[GitHub] [dubbo-go] ev1lQuark opened a new pull request, #2310: refactor: split metrics module into multiple files
ev1lQuark opened a new pull request, #2310:
URL: https://github.com/apache/dubbo-go/pull/2310
I have read the code related to the metrics module and plan to refactor the existing code before adding new metric instrumentation. This will make it easier for future development work. Could you please review the current file structure design to see if it conforms to community standards?
我阅读了 metrics 模块相关的代码,在添加新的指标埋点之前,先对已有的代码进行重构,便于后续的开发工作。请查看目前的文件结构设计是否符合社区规范?
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] chickenlj merged pull request #2310: refactor: split metrics module into multiple files
Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj merged PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] ev1lQuark commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "ev1lQuark (via GitHub)" <gi...@apache.org>.
ev1lQuark commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1535779836
> > What happend in CI? How should I modify it? @FinalT @justxuewei
>
> I reran those CI tests.
Thank you. But it still went wrong.
```
2023-05-05T06:26:35.213Z ERROR polaris/service_discovery.go:193 Could not query the instances for service: myApp . It happened err Polaris-1004(ErrCodeAPITimeoutError): retry times exceed 1 in SyncGetResources, serviceKey: {namespace: "dubbogo", service: "myApp"}, timeout is 1s
dubbo.apache.org/dubbo-go/v3/registry/polaris.(*polarisServiceDiscovery).GetInstances
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/polaris/service_discovery.go:193
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).LoadSubscribeInstances
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/servicediscovery/service_discovery_registry.go:256
dubbo.apache.org/dubbo-go/v3/registry/directory.NewRegistryDirectory
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/directory/directory.go:97
dubbo.apache.org/dubbo-go/v3/common/extension.GetDefaultRegistryDirectory
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/common/extension/registry_directory.go:40
dubbo.apache.org/dubbo-go/v3/registry/protocol.(*registryProtocol).Refer
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/protocol/protocol.go:152
dubbo.apache.org/dubbo-go/v3/config.(*ReferenceConfig).Refer
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/reference_config.go:238
dubbo.apache.org/dubbo-go/v3/config.(*ConsumerConfig).Load
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/consumer_config.go:132
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start.func1
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/root_config.go:212
sync.(*Once).doSlow
/opt/hostedtoolcache/go/1.17.13/x64/src/sync/once.go:68
sync.(*Once).Do
/opt/hostedtoolcache/go/1.17.13/x64/src/sync/once.go:59
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/root_config.go:210
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Init
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/root_config.go:205
dubbo.apache.org/dubbo-go/v3/config.Load
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/config/config_loader.go:59
github.com/apache/dubbo-go-samples/integrate_test/polaris/registry/tests/integration.TestMain
/home/runner/work/dubbo-go/dubbo-go/samples/integrate_test/polaris/registry/tests/integration/main_test.go:60
main.main
_testmain.go:45
runtime.main
/opt/hostedtoolcache/go/1.17.13/x64/src/runtime/proc.go:255
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x12a8695]
goroutine 84 [running]:
dubbo.apache.org/dubbo-go/v3/metadata/mapping/metadata.(*MetadataServiceNameMapping).Get(0x30, 0x30, {0x1eda438, 0xc0008c9740})
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/metadata/mapping/metadata/service_name_mapping.go:83 +0x75
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).findMappedServices(0xc000295d40, 0xc0007fa000, {0x1eda438, 0xc0008c9740})
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/servicediscovery/service_discovery_registry.go:343 +0x5f
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).getServices(0xc000295d40, 0xc00061beb8, {0x1eda438, 0xc0008c9740})
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/servicediscovery/service_discovery_registry.go:334 +0xc5
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).Subscribe(0xc000295d40, 0xc0007fa000, {0x1eda2f8, 0xc0007fa780})
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/servicediscovery/service_discovery_registry.go:210 +0x250
dubbo.apache.org/dubbo-go/v3/registry/directory.(*RegistryDirectory).Subscribe(0xc0007fa780, 0xc0007fa000)
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/directory/directory.go:107 +0xbe
created by dubbo.apache.org/dubbo-go/v3/registry/protocol.(*registryProtocol).Refer
/home/runner/go/pkg/mod/github.com/ev1l!quark/dubbo-go/v3@v3.0.0-20230427052823-322a9cdbded9/registry/protocol/protocol.go:164 +0x21d
FAIL github.com/apache/dubbo-go-samples/integrate_test/polaris/registry/tests/integration 4.553s
FAIL
```
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] sonarcloud[bot] commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1567101654
Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=2310)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310) No Coverage information
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310&metric=new_duplicated_lines_density&view=list)
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] justxuewei commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "justxuewei (via GitHub)" <gi...@apache.org>.
justxuewei commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1535806628
> 2023-05-05T06:26:35.213Z ERROR polaris/service_discovery.go:193 Could not query the instances for service: myApp . It happened err Polaris-1004(ErrCodeAPITimeoutError): retry times exceed 1 in SyncGetResources, serviceKey: {namespace: "dubbogo", service: "myApp"}, timeout is 1s
@chuntaojun Could you take a look?
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] justxuewei commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "justxuewei (via GitHub)" <gi...@apache.org>.
justxuewei commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1535760250
> What happend in CI? How should I modify it? @FinalT @justxuewei
I rerun those CI tests.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] ev1lQuark commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "ev1lQuark (via GitHub)" <gi...@apache.org>.
ev1lQuark commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1535756035
What happend in CI? How should I modify it? @FinalT @justxuewei
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] sonarcloud[bot] commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1524724671
Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=2310)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310) No Coverage information
[![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310&metric=duplicated_lines_density&view=list) No Duplication information
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] sonarcloud[bot] commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1523210245
Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=2310)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=2310&resolved=false&types=CODE_SMELL)
[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310) No Coverage information
[![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=2310&metric=duplicated_lines_density&view=list) No Duplication information
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] FinalT commented on a diff in pull request #2310: refactor: split metrics module into multiple files
Posted by "FinalT (via GitHub)" <gi...@apache.org>.
FinalT commented on code in PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#discussion_r1178586967
##########
metrics/prometheus/metric_set.go:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package prometheus
+
+import (
+ "strings"
+
+ "dubbo.apache.org/dubbo-go/v3/metrics"
+ "github.com/prometheus/client_golang/prometheus"
+)
+
+// metricSet is a set of metrics that are reported to prometheus in dubbo go
+type metricSet struct {
+ // report the consumer-side's rt gauge data
+ consumerRTSummaryVec *prometheus.SummaryVec
+ // report the provider-side's rt gauge data
+ providerRTSummaryVec *prometheus.SummaryVec
+ // report the provider-side's request total counter data
+ providerRequestTotalCounterVec *prometheus.CounterVec
+ // report the consumer-side's request total counter data
+ consumerRequestTotalCounterVec *prometheus.CounterVec
+ // report the provider-side's processing request counter data
+ // providerRequestProcessingGaugeVec *prometheus.GaugeVec
+ // report the consumer-side's processing request counter data
+ // consumerRequestProcessingGaugeVec *prometheus.GaugeVec
+}
+
+var labelNames = []string{applicationNameKey, groupKey, hostnameKey, interfaceKey, ipKey, methodKey, versionKey}
+
+// init metric set and register to prometheus
+func (ms *metricSet) initAndRegister(reporterConfig *metrics.ReporterConfig) {
+ ms.consumerRTSummaryVec = newSummaryVec(buildMetricsName(consumerField, rtField, milliSecondsField, summaryField), reporterConfig.Namespace, labelNames, reporterConfig.SummaryMaxAge)
+ ms.providerRTSummaryVec = newSummaryVec(buildMetricsName(providerField, rtField, milliSecondsField, summaryField), reporterConfig.Namespace, labelNames, reporterConfig.SummaryMaxAge)
+ ms.consumerRequestTotalCounterVec = newCounterVec(buildMetricsName(consumerField, requestsField, totalField), reporterConfig.Namespace, labelNames)
+ ms.providerRequestTotalCounterVec = newCounterVec(buildMetricsName(providerField, requestsField, totalField), reporterConfig.Namespace, labelNames)
+
+ prometheus.DefaultRegisterer.MustRegister(ms.consumerRTSummaryVec, ms.providerRTSummaryVec, ms.consumerRequestTotalCounterVec, ms.providerRequestTotalCounterVec)
+}
+
+func buildMetricsName(args ...string) string {
+ sb := strings.Builder{}
+ for _, arg := range args {
+ sb.WriteString("_")
+ sb.WriteString(arg)
+ }
+ res, _ := strings.CutPrefix(sb.String(), "_")
Review Comment:
```suggestion
res := strings.TrimPrefix(sb.String(), "_")
```
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] jasondeng1997 commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "jasondeng1997 (via GitHub)" <gi...@apache.org>.
jasondeng1997 commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1567996184
有设计文档吗
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] chickenlj commented on pull request #2310: refactor: split metrics module into multiple files
Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on PR #2310:
URL: https://github.com/apache/dubbo-go/pull/2310#issuecomment-1568057650
>
https://cn.dubbo.apache.org/zh-cn/overview/reference/metrics/standard_metrics/
https://cn.dubbo.apache.org/zh-cn/overview/core-features/observability/#metrics
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org