IgGusev commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465065688


##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.
+    /// </summary>
+    public const string MeterName = "Apache.Ignite";
+
+    /// <summary>
+    /// Meter version.
+    /// </summary>
+    public const string MeterVersion = "3.0.0";
+
+    /// <summary>
+    /// Currently active connections.
+    /// </summary>
+    public const string ConnectionsActive = "connections-active";
+
+    /// <summary>
+    /// Total number of connections established (unlike <see 
cref="ConnectionsActive"/>, this metric only goes up).
+    /// </summary>
+    public const string ConnectionsEstablished = "connections-established";
+
+    /// <summary>
+    /// Total number of connections lost.
+    /// </summary>
+    public const string ConnectionsLost = "connections-lost";
+
+    /// <summary>
+    /// Total number of connections lost due to a timeout.
+    /// </summary>
+    public const string ConnectionsLostTimeout = "connections-lost-timeout";
+
+    /// <summary>
+    /// Total number of failed handshakes (due to version mismatch, auth 
failure, or other problems).
+    /// </summary>
+    public const string HandshakesFailed = "handshakes-failed";
+
+    /// <summary>
+    /// Total number of failed handshakes due to network timeout.
+    /// </summary>
+    public const string HandshakesFailedTimeout = "handshakes-failed-timeout";
+
+    /// <summary>
+    /// Currently active requests (being sent to the socket or waiting for 
response).

Review Comment:
   Currently active requests (requests being sent to the socket or waiting for 
response)



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.
+    /// </summary>
+    public const string MeterName = "Apache.Ignite";
+
+    /// <summary>
+    /// Meter version.
+    /// </summary>
+    public const string MeterVersion = "3.0.0";
+
+    /// <summary>
+    /// Currently active connections.

Review Comment:
   Are there names of connections here? Or the number of connections?



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.
+    /// </summary>
+    public const string MeterName = "Apache.Ignite";
+
+    /// <summary>
+    /// Meter version.
+    /// </summary>
+    public const string MeterVersion = "3.0.0";
+
+    /// <summary>
+    /// Currently active connections.
+    /// </summary>
+    public const string ConnectionsActive = "connections-active";
+
+    /// <summary>
+    /// Total number of connections established (unlike <see 
cref="ConnectionsActive"/>, this metric only goes up).
+    /// </summary>
+    public const string ConnectionsEstablished = "connections-established";
+
+    /// <summary>
+    /// Total number of connections lost.
+    /// </summary>
+    public const string ConnectionsLost = "connections-lost";
+
+    /// <summary>
+    /// Total number of connections lost due to a timeout.
+    /// </summary>
+    public const string ConnectionsLostTimeout = "connections-lost-timeout";
+
+    /// <summary>
+    /// Total number of failed handshakes (due to version mismatch, auth 
failure, or other problems).
+    /// </summary>
+    public const string HandshakesFailed = "handshakes-failed";
+
+    /// <summary>
+    /// Total number of failed handshakes due to network timeout.
+    /// </summary>
+    public const string HandshakesFailedTimeout = "handshakes-failed-timeout";
+
+    /// <summary>
+    /// Currently active requests (being sent to the socket or waiting for 
response).
+    /// </summary>
+    public const string RequestsActive = "requests-active";
+
+    /// <summary>
+    /// Total number of requests sent.
+    /// </summary>
+    public const string RequestsSent = "requests-sent";
+
+    /// <summary>
+    /// Total number of requests completed (response received).
+    /// </summary>
+    public const string RequestsCompleted = "requests-completed";
+
+    /// <summary>
+    /// Total number of request retries.
+    /// </summary>
+    public const string RequestsRetried = "requests-retried";
+
+    /// <summary>
+    /// Total number of failed requests (failed to send, or completed with 
error).

Review Comment:
   Total number of failed requests (due to failure to send, or completed with 
error)



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.
+    /// </summary>
+    public const string MeterName = "Apache.Ignite";
+
+    /// <summary>
+    /// Meter version.
+    /// </summary>
+    public const string MeterVersion = "3.0.0";
+
+    /// <summary>
+    /// Currently active connections.
+    /// </summary>
+    public const string ConnectionsActive = "connections-active";
+
+    /// <summary>
+    /// Total number of connections established (unlike <see 
cref="ConnectionsActive"/>, this metric only goes up).
+    /// </summary>
+    public const string ConnectionsEstablished = "connections-established";
+
+    /// <summary>
+    /// Total number of connections lost.
+    /// </summary>
+    public const string ConnectionsLost = "connections-lost";
+
+    /// <summary>
+    /// Total number of connections lost due to a timeout.
+    /// </summary>
+    public const string ConnectionsLostTimeout = "connections-lost-timeout";
+
+    /// <summary>
+    /// Total number of failed handshakes (due to version mismatch, auth 
failure, or other problems).
+    /// </summary>
+    public const string HandshakesFailed = "handshakes-failed";
+
+    /// <summary>
+    /// Total number of failed handshakes due to network timeout.

Review Comment:
   due to a network timeout



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.

Review Comment:
   Generally its better to say "for details" or "for more information".



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.

Review Comment:
   Are users collecting meters in this case? I have not seen it named meter, 
meters were usually objects.



##########
modules/platforms/dotnet/Apache.Ignite/MetricNames.cs:
##########
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+namespace Apache.Ignite;
+
+using System.Collections.Generic;
+
+/// <summary>
+/// Ignite.NET client metrics.
+/// <para />
+/// CLI usage example:
+/// <code>
+/// dotnet-counters monitor --counters Apache.Ignite,System.Runtime 
--process-id PID
+/// </code>
+/// See 
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters for 
more details.
+/// <para />
+/// Code usage example:
+/// <code>
+/// var meterListener = new MeterListener();
+///
+/// meterListener.InstrumentPublished = (instrument, listener) =>
+/// {
+///     if (instrument.Meter.Name == MetricNames.MeterName)
+///     {
+///         listener.EnableMeasurementEvents(instrument);
+///         Console.WriteLine($"Instrument enabled: {instrument.Name}");
+///     }
+/// };
+///
+/// meterListener.SetMeasurementEventCallback&lt;long&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.SetMeasurementEventCallback&lt;int&gt;((instrument, 
measurement, tags, state) =>
+///     Console.WriteLine($"{instrument.Name}: {measurement}"));
+///
+/// meterListener.Start();
+/// </code>
+/// See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics for 
more details.
+/// </summary>
+public static class MetricNames
+{
+    /// <summary>
+    /// Meter name.
+    /// </summary>
+    public const string MeterName = "Apache.Ignite";
+
+    /// <summary>
+    /// Meter version.
+    /// </summary>
+    public const string MeterVersion = "3.0.0";
+
+    /// <summary>
+    /// Currently active connections.
+    /// </summary>
+    public const string ConnectionsActive = "connections-active";
+
+    /// <summary>
+    /// Total number of connections established (unlike <see 
cref="ConnectionsActive"/>, this metric only goes up).
+    /// </summary>
+    public const string ConnectionsEstablished = "connections-established";
+
+    /// <summary>
+    /// Total number of connections lost.
+    /// </summary>
+    public const string ConnectionsLost = "connections-lost";
+
+    /// <summary>
+    /// Total number of connections lost due to a timeout.
+    /// </summary>
+    public const string ConnectionsLostTimeout = "connections-lost-timeout";
+
+    /// <summary>
+    /// Total number of failed handshakes (due to version mismatch, auth 
failure, or other problems).
+    /// </summary>
+    public const string HandshakesFailed = "handshakes-failed";
+
+    /// <summary>
+    /// Total number of failed handshakes due to network timeout.
+    /// </summary>
+    public const string HandshakesFailedTimeout = "handshakes-failed-timeout";
+
+    /// <summary>
+    /// Currently active requests (being sent to the socket or waiting for 
response).
+    /// </summary>
+    public const string RequestsActive = "requests-active";
+
+    /// <summary>
+    /// Total number of requests sent.
+    /// </summary>
+    public const string RequestsSent = "requests-sent";
+
+    /// <summary>
+    /// Total number of requests completed (response received).
+    /// </summary>
+    public const string RequestsCompleted = "requests-completed";
+
+    /// <summary>
+    /// Total number of request retries.

Review Comment:
   Is this across all requests? Maybe:
   Total number of retried requests.



-- 
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]

Reply via email to