skywalking-java/docs/en/setup/backend
吴晟 Wu Sheng b635e254c4
Provide Meter(metrics) system (#4694)
Here are the basic and simple usages of the MeterSystem APIs.

## Meter Creation
New meter could be created based on metrics name, function, scope and data type. 
1. Metrics name is still the storage entity name.
2. Functions are every similar with the OAL function, just accepting different input.
```java
final MeterSystem meterSystem = MeterSystem.meterSystem(getManager());
meterSystem.create("test_long_metrics", "avg", ScopeType.SERVICE, Long.class);
```
NOTICE, this creation should only be called in the `module#prepare` stage, otherwise, `Can't create new metrics anymore` exception will be raised after the **CORE** module `start` stage finished. You may find out, there is a chance `create` could be executed successfully in your own `module#start` stage, but it it just because of the sequence of provider loaded by the class loader, **no guarantee, so please don't do that**.

## Runtime Calculation
`AcceptableValue` is the object created at the runtime to accept new metrics value.
```java
         final MeterSystem service = getManager().find(CoreModule.NAME).provider().getService(MeterSystem.class);
        Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new Runnable() {
            @Override
            public void run() {
                final AcceptableValue<Long> value = service.buildMetrics("test_long_metrics", Long.class);
                value.accept(MeterEntity.newService("abc"), 5L);
                value.setTimeBucket(TimeBucket.getMinuteTimeBucket(System.currentTimeMillis()));
                service.doStreamingCalculation(value);
            }
        }, 2, 2, TimeUnit.SECONDS);
```

## Meter Functions
Right now, only `avg` function has been implemented. I submit this PR as soon as possible to get your feedback. I will add more functions.

## Notice
1. Make slow trace query available in the sampled record. Logically, they are the same thing. The UI doesn't need to concern about the trace as a special case.
2. Endpoint dependency will be removed from the dashboard. Because no query available for it. We will provide a new page for that in 8.1
3. Comparison page will be removed due to dashboard is powerful enough to replace it.
2020-04-24 23:33:13 +08:00
..
advanced-deployment.md New architecture graph, new documents. (#2345) 2019-03-11 18:12:59 +08:00
apdex-threshold.md Add apdex function to OAL (#3855) 2019-11-29 12:54:33 +08:00
backend-alarm.md [Inventory Design Change] Remove endpoint register and endpoint inventory (#4570) 2020-03-28 22:51:41 +08:00
backend-cluster.md Add selector property in application.yml (#4514) 2020-03-15 23:28:14 +08:00
backend-fetcher.md Provide Meter(metrics) system (#4694) 2020-04-24 23:33:13 +08:00
backend-init-mode.md Support init mode and document with it. (#1900) 2018-11-15 21:50:00 +08:00
backend-ip-port.md Prepare new doc for v6 (#1695) 2018-10-07 09:51:29 +08:00
backend-k8s.md use chart deploy sw docs (#3573) 2019-10-08 15:59:49 +08:00
backend-receivers.md Provide Meter(metrics) system (#4694) 2020-04-24 23:33:13 +08:00
backend-setting-override.md fix gRPCHost (#2194) 2019-01-23 00:03:06 +08:00
backend-setup.md Provide Meter(metrics) system (#4694) 2020-04-24 23:33:13 +08:00
backend-start-up-mode.md Provide two start up modes and documents. (#2116) 2019-01-03 15:19:45 +08:00
backend-storage.md Make 8.0.0 Core available. New protocol and register removed. (#4599) 2020-04-10 11:03:24 +08:00
backend-telemetry.md Make 8.0.0 Core available. New protocol and register removed. (#4599) 2020-04-10 11:03:24 +08:00
backend-token-auth.md add token authentication between agent and oap receiver. (#4197) 2020-01-12 23:08:39 +08:00
backend-ui-setup.md Documentation proofreading (#3999) 2019-12-13 11:08:36 +08:00
dynamic-config.md Add selector property in application.yml (#4514) 2020-03-15 23:28:14 +08:00
grafana.json Make 8.0.0 Core available. New protocol and register removed. (#4599) 2020-04-10 11:03:24 +08:00
grpc-ssl.md Enable OAP gRPC SSL transportation (#4470) 2020-03-15 08:15:28 +08:00
metrics-exporter.md Support multiple linear values and merging p50/75/90/95/99 into percentile (#4214) 2020-01-12 22:10:50 +08:00
slow-db-statement.md Provide slow database rule document. (#2253) 2019-02-18 21:23:36 +08:00
trace-sampling.md Rename metric and indicator to metrics. (#2643) 2019-05-10 08:05:37 +08:00
ttl.md Make 8.0.0 Core available. New protocol and register removed. (#4599) 2020-04-10 11:03:24 +08:00
ui-setup.md Remove login permanently. (#2912) 2019-06-20 11:04:14 +08:00
uninstrumented-gateways.md Support gateway without agent (#3308) 2019-08-30 16:17:41 +08:00