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.
Here are the list of changes we made in this pull request. Top 3 are the principle changes, others are following these principles.
1. New agent and mesh report protocol.
2. New agent header protocol.
3. Service register, instance register and network address register have been removed permanently.
4. Service traffic, instance traffic and network alias metrics are added to replace the service, instance and network address inventory.
5. Register process has been removed.
6. Metrics stream process supports insert only mode, especially for traffic entities.
7. Metrics stream process supports no-downsampling mode for traffic entities and network alias.
8. Remove all register mechanism and cache in the java agent.
9. Remove MONTH step in GraphQL query.
10. Update UI to remove MONTH step query, the max query range is 60 days now.
11. Simplify the TTL to metrics and record. And the unit has been formatted in Day unit. No specific TTL for ElasticSearch storage.
12. Buffer mechanism of trace receiver and mesh receiver has been removed due to no register.
13. New service id, instance id and endpoint id rules, including service relation, instance relation and endpoint relation id rules.
14. Java agent support `keep tracing` mode, meaning, agent generating tracing context even the backend is unconnected/unavailable.
15. Plugin test tool up to date, in order to support new protocol.
16. Plugin tests expected data files updated.
17. E2E tests updated.
18. Telemetry of Grafana config has been merged into one.
19. Documentation updates.
20. [TBD] InfluxDB storage implementation is not available, need @dmsolr to fix later, in order to reduce the master change block by this PR.
* Add more users and typical enterprises.
* Adjust some descriptions.
* Add more companies into powered-by page and root readme.
* Fix typo.
* Add one more bank.
* Make Jaeger receiver works in 12450 as default.
* Finish compile and codebase.
* Make codes runnable.
* Finish Jaeger query tests.
* Add document for jaeger receiver.
* Add readme.
* Fix a break link.
* Finish doc.
* Add envoy metrics service protos
This patch imports protos from envoyproxy/data-plane-api and
prometheus/client_model to enable metrics service service feature in
SkyWalking OAP.
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Add Envoy related docs
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Update the LICENSE to include new protos license
From:
- envoyproxy/data-plane-api
- prometheus/client_model
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Add a complete config.yaml example
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Add note on Envoy dynamic config
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Add protoc-gen-validate license
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Add samples
Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
* Make CI and license right.
* Update README.md
@dhi typo :P
* Update README.md
Another typo :P
* Delete metrics.json
metrics.json is included in identify.json and not be linked in document.
* Replace v5 changes by a link to 5.x branch. New v6 changelog.
* Finish query doc and fix a missing field in alarm doc.
* Add link to official oal in alarm doc.
* Fix words.
* Fix some doc
* Update README.md
* Update README.md
* Update README.md
* Update README.md