dubbo MonitorService 源码

  • 2022-10-20
  • 浏览 (242)

dubbo MonitorService 代码


 * 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,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.apache.dubbo.monitor;

import org.apache.dubbo.common.URL;

import java.util.List;

 * MonitorService. (SPI, Prototype, ThreadSafe)
public interface MonitorService {

     * Collect monitor data
     * 1. support invocation count: count://host/interface?application=foo&method=foo&provider=
     * 1.1 host,application,interface,group,version,method: record source host/application/interface/method
     * 1.2 add provider address parameter if it's data sent from consumer, otherwise, add source consumer's address in parameters
     * 1.3 success,failure,elapsed: record success count, failure count, and total cost for success invocations, average cost (total cost/success calls)
     * @param statistics
    void collect(URL statistics);

     * Lookup monitor data
     * 1. support lookup by day: count://host/interface?application=foo&method=foo&side=provider&view=chart&date=2012-07-03
     * 1.1 host,application,interface,group,version,method: query criteria for looking up by host, application, interface, method. When one criterion is not present, it means ALL will be accepted, but is ALL for host
     * 1.2 side=consumer,provider: decide the data from which side, both provider and consumer are returned by default
     * 1.3 default value is view=summary, to return the summarized data for the whole day. view=chart will return the URL address showing the whole day trend which is convenient for embedding in other web page
     * 1.4 date=2012-07-03: specify the date to collect the data, today is the default value
     * @param query
     * @return statistics
    List<URL> lookup(URL query);



dubbo 源码目录


dubbo Constants 源码

dubbo MetricsService 源码

dubbo Monitor 源码

dubbo MonitorFactory 源码

0  赞