Skip to content

Commit

Permalink
[ISSUE apache#696] Add metrics plugin (apache#709)
Browse files Browse the repository at this point in the history
1. Add Metrics plugin module
2. Implement opentelemetry metrics module
related issue apache#696
  • Loading branch information
ruanwenjun authored and xwm1992 committed Feb 16, 2022
1 parent 8442b94 commit 153c52e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package org.apache.eventmesh.metrics.opentelemetry.config;

import org.apache.eventmesh.common.Constants;

import org.apache.eventmesh.common.Constants;
import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
Expand Down Expand Up @@ -56,6 +56,7 @@ private void initializeConfig() {
}
}


/**
* Load properties file from classpath and conf home.
* The properties defined in conf home will override classpath.
Expand All @@ -70,6 +71,7 @@ private void loadProperties() {
}
try {
String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + CONFIG_FILE;

if (new File(configPath).exists()) {
properties.load(new BufferedReader(new FileReader(configPath)));
}
Expand Down
8 changes: 8 additions & 0 deletions eventmesh-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'

<<<<<<< HEAD
=======
// for debug only, can be removed
implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-cloudevents")
implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-meshmessage")
implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-openmessage")

>>>>>>> [ISSUE #696] Add metrics plugin (#709)
implementation project(":eventmesh-metrics-plugin:eventmesh-metrics-api")
implementation project(":eventmesh-metrics-plugin:eventmesh-metrics-opentelemetry")

Expand Down
3 changes: 3 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ include 'eventmesh-metrics-plugin:eventmesh-metrics-opentelemetry'
include 'eventmesh-protocol-plugin:eventmesh-protocol-grpc'
include 'eventmesh-protocol-plugin:eventmesh-protocol-grpcmessage'
findProject(':eventmesh-protocol-plugin:eventmesh-protocol-grpcmessage')?.name = 'eventmesh-protocol-grpcmessage'
include 'eventmesh-metrics-plugin'
include 'eventmesh-metrics-plugin:eventmesh-metrics-api'
include 'eventmesh-metrics-plugin:eventmesh-metrics-opentelemetry'


0 comments on commit 153c52e

Please sign in to comment.