skywalking-java/docs
吴晟 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
..
en Provide Meter(metrics) system (#4694) 2020-04-24 23:33:13 +08:00
README.md Make 8.0.0 Core available. New protocol and register removed. (#4599) 2020-04-10 11:03:24 +08:00
powered-by.md Add sf express to the powered by page. (#4577) 2020-03-27 08:54:33 +08:00

README.md

Welcome

Here are SkyWalking 8 official documents. You're welcome to join us.

From here you can learn all about SkyWalkings architecture, how to deploy and use SkyWalking, and develop based on SkyWalking contributions guidelines.

NOTICE, SkyWalking 8 uses brand new tracing APIs, it is incompatible with all previous releases.

  • Concepts and Designs. You'll find the the most important core ideas about SkyWalking. You can learn from here if you want to understand what is going on under our cool features and visualization.

  • Setup. Guides for installing SkyWalking in different scenarios. As a platform, it provides several ways to provide observability, including monitoring and alarm of course.

  • UI Introduction. Introduce the UI usage and features.

  • Contributing Guides. Guides are for PMC member, committer or new contributor. Here, you can find how to start contributing.

  • Protocols. Protocols show the communication ways between agents/probes and backend. Anyone interested in uplink telemetry data should definitely read this.

  • FAQs. A manifest of already known setup problems, secondary developments experiments. When you are facing a problem, check here first.

In addition, you might find these links interesting:

We're always looking for help improving our documentation and codes, so please dont hesitate to file an issue if you see any problem. Or better yet, submit your own contributions through pull request to help make them better.


Document Catalog

If you are already familiar with SkyWalking, you could use this catalog to find the document chapter directly.