metric package structure optimization (#11576)

* move observation filter to default

* simple import

---------

Co-authored-by: wangxiaobin <wangxiaobin@cai-inc.com>
Co-authored-by: x-shadow-man <1494445739@qq.com>
This commit is contained in:
wxbty 2023-02-16 16:25:30 +08:00 committed by GitHub
parent 976dc25bb9
commit 186fd5c13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 21 deletions

View File

@ -54,15 +54,5 @@
<groupId>com.tdunning</groupId>
<artifactId>t-digest</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-integration-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -24,7 +24,7 @@ import io.micrometer.observation.docs.ObservationDocumentation;
/**
* Documentation of Dubbo observations.
*/
enum DubboObservation implements ObservationDocumentation {
public enum DubboObservation implements ObservationDocumentation {
/**
* Server side Dubbo RPC Observation.

View File

@ -1 +0,0 @@
observationreceiver=org.apache.dubbo.metrics.filter.observation.ObservationReceiverFilter

View File

@ -36,5 +36,15 @@
<artifactId>dubbo-metrics-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-integration-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -14,11 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
package org.apache.dubbo.metrics.observation;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.metrics.filter.observation.DefaultDubboServerObservationConvention;
import org.apache.dubbo.metrics.filter.observation.DubboObservation;
import org.apache.dubbo.metrics.filter.observation.DubboServerContext;
import org.apache.dubbo.metrics.filter.observation.DubboServerObservationConvention;
import org.apache.dubbo.rpc.BaseFilter;
import org.apache.dubbo.rpc.Filter;
import org.apache.dubbo.rpc.Invocation;

View File

@ -14,11 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
package org.apache.dubbo.metrics.observation;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.metrics.filter.observation.DefaultDubboClientObservationConvention;
import org.apache.dubbo.metrics.filter.observation.DubboClientContext;
import org.apache.dubbo.metrics.filter.observation.DubboClientObservationConvention;
import org.apache.dubbo.metrics.filter.observation.DubboObservation;
import org.apache.dubbo.rpc.BaseFilter;
import org.apache.dubbo.rpc.Filter;
import org.apache.dubbo.rpc.Invocation;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
package org.apache.dubbo.metrics.observation;
import io.micrometer.tracing.test.SampleTestRunner;
import org.apache.dubbo.config.ApplicationConfig;

View File

@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
import java.util.HashMap;
import java.util.Map;
package org.apache.dubbo.metrics.observation;
import org.apache.dubbo.rpc.AttachmentsAdapter;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.model.ServiceModel;
import java.util.HashMap;
import java.util.Map;
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO_VERSION_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
package org.apache.dubbo.metrics.observation;
import io.micrometer.common.KeyValues;
import io.micrometer.core.tck.MeterRegistryAssert;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.dubbo.metrics.filter.observation;
package org.apache.dubbo.metrics.observation;
import io.micrometer.common.KeyValues;
import io.micrometer.core.tck.MeterRegistryAssert;