SofiaSedova commented on code in PR #11331: URL: https://github.com/apache/ignite/pull/11331#discussion_r1580697117
########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. Review Comment: You can create custom metric registries via the `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. Review Comment: provides a new or existing custom metric registry. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. + + +=== Custom metric creation. + +To register new own metric, use `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. Review Comment: To register a new custom metric, use the `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on Review Comment: Users can design and publish their own, custom metrics. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. Review Comment: To register a custom metric, you need to add a new link:monitoring-metrics/new-metrics-system#registry[registry] first. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: Review Comment: `IgniteMetric` interface has two methods: ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. Review Comment: removes the entire custom metric registry. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. + + +=== Custom metric creation. + +To register new own metric, use `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. + +`MetricRegistry` has several methods to put or remove metrics like: + +* `void register(String metricName, IntSupplier valueSupplier, @Nullable String description);` registers an integer-value metric. +* `void register(String metricName, DoubleSupplier valueSupplier, @Nullable String description);` registers a double-value metric. +* `void remove(String name);` removes metric. + + +== Naming convention. +Names of a custom metrics (and its registries) are similar to names of the internal metrics. The name can have dot-separated Review Comment: Names of the custom metrics ########## docs/_docs/monitoring-metrics/new-metrics-system.adoc: ########## @@ -41,15 +41,15 @@ Ignite includes the following exporters: You can create a custom exporter by implementing the javadoc:org.apache.ignite.spi.metric.MetricExporterSpi[] interface. -== Metric Registers +== Metric Registries [[registry]] -Metrics are grouped into categories (called _registers_). -Each register has a name. -The full name of a specific metric within the register consists of the register name followed by a dot, followed by the name of the metric: `<register_name>.<metric_name>`. -For example, the register for data storage metrics is called `io.datastorage`. +Metrics are grouped into categories (called _registries_). +Each registry has a name. +The full name of a specific metric within the registry consists of the registry name followed by a dot, followed by the name of the metric: `<registry_name>.<metric_name>`. +For example, the registry for data storage metrics is called `io.datastorage`. The metric that return the storage size is called `io.datastorage.StorageSize`. -The list of all registers and the metrics they contain are described link:monitoring-metrics/new-metrics[here]. +The list of all registries and the metrics they contain are described link:monitoring-metrics/new-metrics[here]. Review Comment: Double space between `metrics` and `they` ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. + + +=== Custom metric creation. + +To register new own metric, use `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. + +`MetricRegistry` has several methods to put or remove metrics like: + +* `void register(String metricName, IntSupplier valueSupplier, @Nullable String description);` registers an integer-value metric. +* `void register(String metricName, DoubleSupplier valueSupplier, @Nullable String description);` registers a double-value metric. +* `void remove(String name);` removes metric. Review Comment: removes a metric. ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. + + +=== Custom metric creation. + +To register new own metric, use `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. + +`MetricRegistry` has several methods to put or remove metrics like: + +* `void register(String metricName, IntSupplier valueSupplier, @Nullable String description);` registers an integer-value metric. +* `void register(String metricName, DoubleSupplier valueSupplier, @Nullable String description);` registers a double-value metric. +* `void remove(String name);` removes metric. + + +== Naming convention. +Names of a custom metrics (and its registries) are similar to names of the internal metrics. The name can have dot-separated +parts like 'process.status.suspended'. + +Prefix 'custom.' is always added to the custom registry name in `IgniteMetrics`. For instance, if the passed registry name is +'process.status.suspended', it is automatically extended to 'custom.process.status.suspended'. Review Comment: Double space between `to` and 'custom.process.status.suspended' ########## docs/_docs/monitoring-metrics/custom-metrics.adoc: ########## @@ -0,0 +1,66 @@ +// 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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. += Custom Metrics + +WARNING: This feature is experimental and may change in future releases. + +Ignite provides various internal link:monitoring-metrics/new-metrics.adoc[metrics]. However, these metrics might +not be enough. User can design and publish own, custom metrics. Custom Metrics base on +link:monitoring-metrics/new-metrics-system.adoc[Metric System]. + +[NOTE] +==== +Custom Metrics are local and are bound only to the local node. +==== + +== Custom metric creation. + +To register a custom metric, you need to add new link:monitoring-metrics/new-metrics-system#registry[registry] first. +After that, metrics can be added to this registry. + +=== Custom metric registry. + +You can create custom metric registries via `IgniteMetrics` interface which is obtained by `Ignite.metrics()`. + +`IgniteMetric` interface has only a couple of methods: + +* `MetricRegistry getOrCreate(String registryName)` provides new or existing custom metric registry. +* `void remove(String registryName)` removes entire custom metric registry. + + +=== Custom metric creation. + +To register new own metric, use `MetricRegistry` interface which is obtained by `IgniteMetrics.getOrCreate(...)`. + +`MetricRegistry` has several methods to put or remove metrics like: + +* `void register(String metricName, IntSupplier valueSupplier, @Nullable String description);` registers an integer-value metric. +* `void register(String metricName, DoubleSupplier valueSupplier, @Nullable String description);` registers a double-value metric. +* `void remove(String name);` removes metric. + + +== Naming convention. +Names of a custom metrics (and its registries) are similar to names of the internal metrics. The name can have dot-separated +parts like 'process.status.suspended'. + +Prefix 'custom.' is always added to the custom registry name in `IgniteMetrics`. For instance, if the passed registry name is +'process.status.suspended', it is automatically extended to 'custom.process.status.suspended'. + + +== Limitations +* It is impossible to affect the internal metrics. +* Custom metrics are registered on-demand and aren't persistent. After node restarts, they have to be registered anew. Review Comment: After the node restarts or After a node's restart -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
