You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2021/07/25 11:29:27 UTC

[GitHub] [incubator-eventmesh] Roc-00 opened a new pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Roc-00 opened a new pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467


   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes ISSUE#<XXX>`.)
   -->
   
   Fixes ISSUE#<340>.
   
   ### Motivation
   
   Export metrics data with open telemetry and use Prometheus for visual observation
   
   
   
   ### Modifications
   
   There is a readme document in the code I submitted. I use idea to run locally. I download Prometheus in the window version of the official website. The operation method of docker written in readme is given by reference to open telemetry. I haven't actually operated it. I was successful in running locally. I'm not sure whether the code I wrote meets the requirements, so I didn't finish all the metrics, but wrote three. If there is anything wrong, please put it forward and I will modify and improve it. When the code is perfect and correct, I will continue to write the rest of the code.
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? yes 
   - If yes, how is the feature documented? README.md
   
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676266207



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporterConfiguration.java
##########
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.exporter.prometheus.PrometheusCollector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.prometheus.client.exporter.HTTPServer;
+
+import java.io.IOException;
+
+//ues openTelemetry to export metrics data
+public class OpenTelemetryExporterConfiguration {
+
+    private  HTTPServer server;//Prometheus server
+
+    int prometheusPort = 19090;//the endpoint to export metrics

Review comment:
       agree




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov-commenter commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886188616


   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#467](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0bc9d50) into [develop](https://codecov.io/gh/apache/incubator-eventmesh/commit/4eaebde2506a582f8c211143b8d22dedf21e4f5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eaebde) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/graphs/tree.svg?width=650&height=150&src=pr&token=IfkrgV55GT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             develop    #467      +/-   ##
   ============================================
   - Coverage       9.84%   9.80%   -0.04%     
     Complexity       283     283              
   ============================================
     Files            228     230       +2     
     Lines          10829   10870      +41     
     Branches         923     923              
   ============================================
     Hits            1066    1066              
   - Misses          9666    9707      +41     
     Partials          97      97              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntmesh/runtime/metrics/http/HTTPMetricsServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3MvaHR0cC9IVFRQTWV0cmljc1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...e/metrics/openTelemetry/OpenTelemetryExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...nTelemetry/OpenTelemetryExporterConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXJDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4eaebde...0bc9d50](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov-commenter edited a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886188616


   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#467](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (33cf1b7) into [develop](https://codecov.io/gh/apache/incubator-eventmesh/commit/4eaebde2506a582f8c211143b8d22dedf21e4f5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eaebde) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/graphs/tree.svg?width=650&height=150&src=pr&token=IfkrgV55GT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             develop    #467      +/-   ##
   ============================================
   - Coverage       9.84%   9.80%   -0.04%     
     Complexity       283     283              
   ============================================
     Files            228     230       +2     
     Lines          10829   10870      +41     
     Branches         923     923              
   ============================================
     Hits            1066    1066              
   - Misses          9666    9707      +41     
     Partials          97      97              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntmesh/runtime/metrics/http/HTTPMetricsServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3MvaHR0cC9IVFRQTWV0cmljc1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...e/metrics/openTelemetry/OpenTelemetryExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...nTelemetry/OpenTelemetryExporterConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXJDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4eaebde...33cf1b7](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887512430


   > @Roc-00 Maybe the metrics about tcp in 'EventMeshTcpMonitor.java' can also be processed in the same way.
   
   I will find out the difference between HTTP and TCP,then complete TCP and HTTP 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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-890357421


   @Roc-00 please re-submit this pr to branch opentelemetry, and add a design doc first like https://github.com/apache/incubator-eventmesh/blob/develop/docs/en/features/eventmesh-stream-design.md.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887250351


   > @qqeasonchen I found there is many metric in eventmesh now. Maybe it is a good opportunity to make them in otel.
   
   yep.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676159373



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporter.java
##########
@@ -0,0 +1,73 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.api.metrics.common.Labels;
+import org.apache.eventmesh.runtime.metrics.http.SummaryMetrics;
+
+/**
+ * test
+ */
+public class OpenTelemetryExporter {
+    OpenTelemetryExporterConfiguration configuration = new OpenTelemetryExporterConfiguration();
+
+    private SummaryMetrics summaryMetrics;
+
+    private Meter meter;
+
+    public OpenTelemetryExporter(SummaryMetrics summaryMetrics) {
+        this.summaryMetrics = summaryMetrics;
+
+        // it is important to initialize the OpenTelemetry SDK as early as possible in your process.
+        MeterProvider meterProvider = configuration.initializeOpenTelemetry();
+
+        meter = meterProvider.get("OpenTelemetryExporter", "0.13.1");
+    }
+
+    public void start(){
+        //maxHTTPTPS
+        meter
+                .doubleValueObserverBuilder("max.HTTP.TPS")
+                .setDescription("max TPS of HTTP")
+                .setUnit("HTTP")
+                .setUpdater(result -> result.observe(summaryMetrics.maxHTTPTPS(),Labels.empty()))
+                .build();
+
+        //maxHTTPCost
+        meter
+                .longValueObserverBuilder("max.HTTPCost")

Review comment:
       get it




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen merged pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
qqeasonchen merged pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467


   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov-commenter edited a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886188616


   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#467](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f5a79c2) into [develop](https://codecov.io/gh/apache/incubator-eventmesh/commit/4eaebde2506a582f8c211143b8d22dedf21e4f5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eaebde) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head f5a79c2 differs from pull request most recent head 16d9bca. Consider uploading reports for the commit 16d9bca to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/graphs/tree.svg?width=650&height=150&src=pr&token=IfkrgV55GT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             develop    #467      +/-   ##
   ============================================
   - Coverage       9.84%   9.80%   -0.04%     
     Complexity       283     283              
   ============================================
     Files            228     230       +2     
     Lines          10829   10870      +41     
     Branches         923     923              
   ============================================
     Hits            1066    1066              
   - Misses          9666    9707      +41     
     Partials          97      97              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntmesh/runtime/metrics/http/HTTPMetricsServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3MvaHR0cC9IVFRQTWV0cmljc1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...e/metrics/openTelemetry/OpenTelemetryExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...nTelemetry/OpenTelemetryExporterConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXJDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4eaebde...16d9bca](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] lrhkobe edited a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
lrhkobe edited a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887430038


   @Roc-00 Maybe the metrics about tcp in 'EventMeshTcpMonitor.java' can also be processed in the same way.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676266170



##########
File path: eventmesh-runtime/build.gradle
##########
@@ -23,14 +23,21 @@ List metrics = [
         "io.dropwizard.metrics:metrics-json:4.1.0"
 ]
 
-
+List open_telemetry = [
+        "io.opentelemetry:opentelemetry-api:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk-metrics:1.3.0-alpha",

Review comment:
       It is ok to use that. Otel's sdk metrics is in alpha although, it is widely used in https://github.com/open-telemetry/opentelemetry-java-instrumentation. This agent has been validated in enough prod environments.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676261173



##########
File path: eventmesh-runtime/build.gradle
##########
@@ -23,14 +23,21 @@ List metrics = [
         "io.dropwizard.metrics:metrics-json:4.1.0"
 ]
 
-
+List open_telemetry = [
+        "io.opentelemetry:opentelemetry-api:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk-metrics:1.3.0-alpha",

Review comment:
       Can we use other stable version? Using alpha does not seem to be a good choice.

##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporterConfiguration.java
##########
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.exporter.prometheus.PrometheusCollector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.prometheus.client.exporter.HTTPServer;
+
+import java.io.IOException;
+
+//ues openTelemetry to export metrics data
+public class OpenTelemetryExporterConfiguration {
+
+    private  HTTPServer server;//Prometheus server
+
+    int prometheusPort = 19090;//the endpoint to export metrics

Review comment:
       It is better to add this to configuration properties.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov-commenter edited a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886188616


   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#467](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02df827) into [develop](https://codecov.io/gh/apache/incubator-eventmesh/commit/4eaebde2506a582f8c211143b8d22dedf21e4f5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eaebde) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/graphs/tree.svg?width=650&height=150&src=pr&token=IfkrgV55GT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             develop    #467      +/-   ##
   ============================================
   - Coverage       9.84%   9.80%   -0.04%     
     Complexity       283     283              
   ============================================
     Files            228     230       +2     
     Lines          10829   10870      +41     
     Branches         923     923              
   ============================================
     Hits            1066    1066              
   - Misses          9666    9707      +41     
     Partials          97      97              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntmesh/runtime/metrics/http/HTTPMetricsServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3MvaHR0cC9IVFRQTWV0cmljc1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...e/metrics/openTelemetry/OpenTelemetryExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...nTelemetry/OpenTelemetryExporterConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXJDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4eaebde...02df827](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-893458642


   I only found the following tcp metrics.Are there any more?
   ![image](https://user-images.githubusercontent.com/84842773/128357447-76f763b6-8a73-422a-8406-e4f47d4fb923.png)
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886352286


   > 顺便说一句,您的文档可以使用一些工具进行格
   
   > btw, your document can be formatted with some tools.
   
   what kind of tools? I have no experience, but I will try my best to do that.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r680676042



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/README.md
##########
@@ -0,0 +1,41 @@
+# Open Telemetry exporter

Review comment:
       Should I delete it,or put it in the design doc




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-890750172


   > @Roc-00 please re-submit this pr to branch opentelemetry, and add a design doc first like https://github.com/apache/incubator-eventmesh/blob/develop/docs/en/features/eventmesh-stream-design.md.
   
   Should I close this PR so that I can re-submit this pr to branch opentelemetry?


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887157922


   @Roc-00 https://doocs.gitee.io/md/#/ 
   you can try this


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676275507



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporterConfiguration.java
##########
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.exporter.prometheus.PrometheusCollector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.prometheus.client.exporter.HTTPServer;
+
+import java.io.IOException;
+
+//ues openTelemetry to export metrics data
+public class OpenTelemetryExporterConfiguration {
+
+    private  HTTPServer server;//Prometheus server
+
+    int prometheusPort = 19090;//the endpoint to export metrics

Review comment:
       I've thought about it, but I'm not very good at it. What language is involved? script?




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886329391


   @qqeasonchen I found there is many metric in eventmesh now. Maybe it is a good opportunity to make them in otel.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676140470



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporter.java
##########
@@ -0,0 +1,73 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.api.metrics.common.Labels;
+import org.apache.eventmesh.runtime.metrics.http.SummaryMetrics;
+
+/**
+ * test
+ */
+public class OpenTelemetryExporter {
+    OpenTelemetryExporterConfiguration configuration = new OpenTelemetryExporterConfiguration();
+
+    private SummaryMetrics summaryMetrics;
+
+    private Meter meter;
+
+    public OpenTelemetryExporter(SummaryMetrics summaryMetrics) {
+        this.summaryMetrics = summaryMetrics;
+
+        // it is important to initialize the OpenTelemetry SDK as early as possible in your process.
+        MeterProvider meterProvider = configuration.initializeOpenTelemetry();
+
+        meter = meterProvider.get("OpenTelemetryExporter", "0.13.1");
+    }
+
+    public void start(){
+        //maxHTTPTPS
+        meter
+                .doubleValueObserverBuilder("max.HTTP.TPS")
+                .setDescription("max TPS of HTTP")
+                .setUnit("HTTP")
+                .setUpdater(result -> result.observe(summaryMetrics.maxHTTPTPS(),Labels.empty()))
+                .build();
+
+        //maxHTTPCost
+        meter
+                .longValueObserverBuilder("max.HTTPCost")

Review comment:
       how should I spell?




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-890462529


   > @Roc-00重请提交这个pr 到分支开放遥测,并首先添加一个设计文档,如[https://github.com/apache/incubator-eventmesh/blob/develop/docs/en/features/eventmesh-stream-design .MD](https://github.com/apache/incubator-eventmesh/blob/develop/docs/en/features/eventmesh-stream-design.md)。
   
   OK.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] lrhkobe commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
lrhkobe commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887430038


   Maybe the metrics about tcp in 'EventMeshTcpMonitor.java' can also be processed in the same way.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 removed a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 removed a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886352286


   > 顺便说一句,您的文档可以使用一些工具进行格
   
   > btw, your document can be formatted with some tools.
   
   what kind of tools? I have no experience, but I will try my best to do that.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676136359



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporter.java
##########
@@ -0,0 +1,73 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.api.metrics.common.Labels;
+import org.apache.eventmesh.runtime.metrics.http.SummaryMetrics;
+
+/**
+ * test
+ */
+public class OpenTelemetryExporter {
+    OpenTelemetryExporterConfiguration configuration = new OpenTelemetryExporterConfiguration();
+
+    private SummaryMetrics summaryMetrics;
+
+    private Meter meter;
+
+    public OpenTelemetryExporter(SummaryMetrics summaryMetrics) {
+        this.summaryMetrics = summaryMetrics;
+
+        // it is important to initialize the OpenTelemetry SDK as early as possible in your process.
+        MeterProvider meterProvider = configuration.initializeOpenTelemetry();
+
+        meter = meterProvider.get("OpenTelemetryExporter", "0.13.1");
+    }
+
+    public void start(){
+        //maxHTTPTPS
+        meter
+                .doubleValueObserverBuilder("max.HTTP.TPS")
+                .setDescription("max TPS of HTTP")
+                .setUnit("HTTP")
+                .setUpdater(result -> result.observe(summaryMetrics.maxHTTPTPS(),Labels.empty()))
+                .build();
+
+        //maxHTTPCost
+        meter
+                .longValueObserverBuilder("max.HTTPCost")

Review comment:
       It's strange to spell metric with hump.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r677445142



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporterConfiguration.java
##########
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.exporter.prometheus.PrometheusCollector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.prometheus.client.exporter.HTTPServer;
+
+import java.io.IOException;
+
+//ues openTelemetry to export metrics data
+public class OpenTelemetryExporterConfiguration {
+
+    private  HTTPServer server;//Prometheus server
+
+    int prometheusPort = 19090;//the endpoint to export metrics

Review comment:
       I will have a try.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-892474710


   ![image](https://user-images.githubusercontent.com/84842773/128149445-4a66f01e-c1f3-4796-b02b-5e25140a14c5.png)
   Is this the tcp metrics?what is the meaning of "s" and "t"?
   ![image](https://user-images.githubusercontent.com/84842773/128149716-cda53259-38b0-4634-a788-df19b36f3544.png)
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-892477012


   ![image](https://user-images.githubusercontent.com/84842773/128150082-53b802ad-7c15-469a-ad99-8f8248785118.png)
   Why the class TcpSummaryMetrics was never used?


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886352450


   > btw, your document can be formatted with some tools.
   
   what kind of tools? I have no experience, but I will try my best to do that.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r680887370



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/prometheus.yml
##########
@@ -0,0 +1,46 @@
+#

Review comment:
       I think is ok.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676300218



##########
File path: eventmesh-runtime/build.gradle
##########
@@ -23,14 +23,21 @@ List metrics = [
         "io.dropwizard.metrics:metrics-json:4.1.0"
 ]
 
-
+List open_telemetry = [
+        "io.opentelemetry:opentelemetry-api:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk:1.3.0",
+        "io.opentelemetry:opentelemetry-sdk-metrics:1.3.0-alpha",

Review comment:
       OK




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-890835116


   > > @Roc-00 please re-submit this pr to branch opentelemetry, and add a design doc first like https://github.com/apache/incubator-eventmesh/blob/develop/docs/en/features/eventmesh-stream-design.md.
   > 
   > Should I close this PR so that I can re-submit this pr to branch opentelemetry?
   
   you can edit this pr in this page, change the branch you want to merge


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886330878


   btw, your document can be formatted with some tools.


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov-commenter edited a comment on pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-886188616


   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#467](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (16d9bca) into [develop](https://codecov.io/gh/apache/incubator-eventmesh/commit/4eaebde2506a582f8c211143b8d22dedf21e4f5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4eaebde) will **decrease** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 16d9bca differs from pull request most recent head 02df827. Consider uploading reports for the commit 02df827 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/graphs/tree.svg?width=650&height=150&src=pr&token=IfkrgV55GT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             develop    #467      +/-   ##
   ============================================
   - Coverage       9.84%   9.80%   -0.04%     
     Complexity       283     283              
   ============================================
     Files            228     230       +2     
     Lines          10829   10870      +41     
     Branches         923     923              
   ============================================
     Hits            1066    1066              
   - Misses          9666    9707      +41     
     Partials          97      97              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntmesh/runtime/metrics/http/HTTPMetricsServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3MvaHR0cC9IVFRQTWV0cmljc1NlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...e/metrics/openTelemetry/OpenTelemetryExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...nTelemetry/OpenTelemetryExporterConfiguration.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/467/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL21ldHJpY3Mvb3BlblRlbGVtZXRyeS9PcGVuVGVsZW1ldHJ5RXhwb3J0ZXJDb25maWd1cmF0aW9uLmphdmE=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4eaebde...02df827](https://codecov.io/gh/apache/incubator-eventmesh/pull/467?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#issuecomment-887510439


   > @Roc-00 https://doocs.gitee.io/md/#/
   > you can try this
   
   Is this similar to typora


-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Roc-00 commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
Roc-00 commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r680676826



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/prometheus.yml
##########
@@ -0,0 +1,46 @@
+#

Review comment:
       Can I put it in conf like this
   ![image](https://user-images.githubusercontent.com/84842773/127811965-d7979822-f8dd-4d7a-800b-d51546e3e931.png)
   




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] tydhot commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
tydhot commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676152661



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporter.java
##########
@@ -0,0 +1,73 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.Meter;
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.api.metrics.common.Labels;
+import org.apache.eventmesh.runtime.metrics.http.SummaryMetrics;
+
+/**
+ * test
+ */
+public class OpenTelemetryExporter {
+    OpenTelemetryExporterConfiguration configuration = new OpenTelemetryExporterConfiguration();
+
+    private SummaryMetrics summaryMetrics;
+
+    private Meter meter;
+
+    public OpenTelemetryExporter(SummaryMetrics summaryMetrics) {
+        this.summaryMetrics = summaryMetrics;
+
+        // it is important to initialize the OpenTelemetry SDK as early as possible in your process.
+        MeterProvider meterProvider = configuration.initializeOpenTelemetry();
+
+        meter = meterProvider.get("OpenTelemetryExporter", "0.13.1");
+    }
+
+    public void start(){
+        //maxHTTPTPS
+        meter
+                .doubleValueObserverBuilder("max.HTTP.TPS")
+                .setDescription("max TPS of HTTP")
+                .setUnit("HTTP")
+                .setUpdater(result -> result.observe(summaryMetrics.maxHTTPTPS(),Labels.empty()))
+                .build();
+
+        //maxHTTPCost
+        meter
+                .longValueObserverBuilder("max.HTTPCost")

Review comment:
       eventmesh.http.request.elapsed.max




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] qqeasonchen commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry for metrics in EventMesh

Posted by GitBox <gi...@apache.org>.
qqeasonchen commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r677233060



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/prometheus.yml
##########
@@ -0,0 +1,46 @@
+#

Review comment:
       yml file should not exist in src

##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/README.md
##########
@@ -0,0 +1,41 @@
+# Open Telemetry exporter

Review comment:
       readme file should not exist in src 




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #467: [ISSUE #340]Integrate With OpenTelemetry

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #467:
URL: https://github.com/apache/incubator-eventmesh/pull/467#discussion_r676300123



##########
File path: eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/openTelemetry/OpenTelemetryExporterConfiguration.java
##########
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.eventmesh.runtime.metrics.openTelemetry;
+
+import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.exporter.prometheus.PrometheusCollector;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.prometheus.client.exporter.HTTPServer;
+
+import java.io.IOException;
+
+//ues openTelemetry to export metrics data
+public class OpenTelemetryExporterConfiguration {
+
+    private  HTTPServer server;//Prometheus server
+
+    int prometheusPort = 19090;//the endpoint to export metrics

Review comment:
       Most configuration is at `eventmesh-runtime/conf/eventmesh.properties`,  in the future, I think it may be split into multiple files, but now you can just add the prometheusPort in this file, and load this config, you can see code in `EventMeshHTTPConfiguration`.




-- 
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@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org