You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ptupitsyn (via GitHub)" <gi...@apache.org> on 2024/01/24 11:56:48 UTC

[PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

ptupitsyn opened a new pull request, #3088:
URL: https://github.com/apache/ignite-3/pull/3088

   (no comment)


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn merged PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465071757


##########
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:
   Fixed.



##########
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:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1466238417


##########
modules/platforms/dotnet/Apache.Ignite/Internal/Metrics.cs:
##########
@@ -44,129 +44,129 @@ internal static class Metrics
     /// Currently active connections.
     /// </summary>
     public static readonly ObservableCounter<int> ConnectionsActive = Meter.CreateObservableCounter(
-        name: "connections-active",
+        name: MetricNames.ConnectionsActive,
         observeValue: () => Interlocked.CompareExchange(ref _connectionsActive, 0, 0),
         unit: "connections",
-        description: "Currently active connections");
+        description: "Total number of currently active connections");
 
     /// <summary>
     /// Total number of connections established.
     /// </summary>
     public static readonly Counter<long> ConnectionsEstablished = Meter.CreateCounter<long>(
-        name: "connections-established",
+        name: MetricNames.ConnectionsEstablished,
         unit: "connections",
         description: "Total number of established connections");
 
     /// <summary>
     /// Total number of connections lost.
     /// </summary>
     public static readonly Counter<long> ConnectionsLost = Meter.CreateCounter<long>(
-        name: "connections-lost",
+        name: MetricNames.ConnectionsLost,
         unit: "connections",
         description: "Total number of lost connections");
 
     /// <summary>
     /// Total number of connections lost due to timeout.
     /// </summary>
     public static readonly Counter<long> ConnectionsLostTimeout = Meter.CreateCounter<long>(
-        name: "connections-lost-timeout",
+        name: MetricNames.ConnectionsLostTimeout,
         unit: "connections",
         description: "Total number of lost connections due to network timeout");
 
     /// <summary>
     /// Handshakes failed.
     /// </summary>
     public static readonly Counter<long> HandshakesFailed = Meter.CreateCounter<long>(
-        name: "handshakes-failed",
+        name: MetricNames.HandshakesFailed,
         unit: "handshakes",
         description: "Total number of failed handshakes (due to version mismatch, auth failure, etc)");

Review Comment:
   Fixed.



##########
modules/platforms/dotnet/Apache.Ignite/Internal/Metrics.cs:
##########
@@ -44,129 +44,129 @@ internal static class Metrics
     /// Currently active connections.
     /// </summary>
     public static readonly ObservableCounter<int> ConnectionsActive = Meter.CreateObservableCounter(
-        name: "connections-active",
+        name: MetricNames.ConnectionsActive,
         observeValue: () => Interlocked.CompareExchange(ref _connectionsActive, 0, 0),
         unit: "connections",
-        description: "Currently active connections");
+        description: "Total number of currently active connections");
 
     /// <summary>
     /// Total number of connections established.
     /// </summary>
     public static readonly Counter<long> ConnectionsEstablished = Meter.CreateCounter<long>(
-        name: "connections-established",
+        name: MetricNames.ConnectionsEstablished,
         unit: "connections",
         description: "Total number of established connections");
 
     /// <summary>
     /// Total number of connections lost.
     /// </summary>
     public static readonly Counter<long> ConnectionsLost = Meter.CreateCounter<long>(
-        name: "connections-lost",
+        name: MetricNames.ConnectionsLost,
         unit: "connections",
         description: "Total number of lost connections");
 
     /// <summary>
     /// Total number of connections lost due to timeout.
     /// </summary>
     public static readonly Counter<long> ConnectionsLostTimeout = Meter.CreateCounter<long>(
-        name: "connections-lost-timeout",
+        name: MetricNames.ConnectionsLostTimeout,
         unit: "connections",
         description: "Total number of lost connections due to network timeout");
 
     /// <summary>
     /// Handshakes failed.
     /// </summary>
     public static readonly Counter<long> HandshakesFailed = Meter.CreateCounter<long>(
-        name: "handshakes-failed",
+        name: MetricNames.HandshakesFailed,
         unit: "handshakes",
         description: "Total number of failed handshakes (due to version mismatch, auth failure, etc)");
 
     /// <summary>
     /// Handshakes failed due to a timeout.
     /// </summary>
     public static readonly Counter<long> HandshakesFailedTimeout = Meter.CreateCounter<long>(
-        name: "handshakes-failed-timeout",
+        name: MetricNames.HandshakesFailedTimeout,
         unit: "handshakes",
-        description: "Total number of failed handshakes due to network timeout");
+        description: "Total number of failed handshakes due to a network timeout");
 
     /// <summary>
     /// Currently active requests (request sent, waiting for response).
     /// </summary>
     public static readonly ObservableCounter<int> RequestsActive = Meter.CreateObservableCounter(
-        name: "requests-active",
+        name: MetricNames.RequestsActive,
         observeValue: () => Interlocked.CompareExchange(ref _requestsActive, 0, 0),
         unit: "requests",
-        description: "Currently active requests (request sent, waiting for response)");
+        description: "Currently active requests (requests being sent to the socket or waiting for response)");
 
     /// <summary>
     /// Requests sent.
     /// </summary>
     public static readonly Counter<long> RequestsSent = Meter.CreateCounter<long>(
-        name: "requests-sent",
+        name: MetricNames.RequestsSent,
         unit: "requests",
         description: "Total number of requests sent");
 
     /// <summary>
     /// Requests completed (response received).
     /// </summary>
     public static readonly Counter<long> RequestsCompleted = Meter.CreateCounter<long>(
-        name: "requests-completed",
+        name: MetricNames.RequestsCompleted,
         unit: "requests",
         description: "Total number of requests completed (response received)");
 
     /// <summary>
-    /// Total number of request retries.
+    /// Total number of retried requests.
     /// </summary>
     public static readonly Counter<long> RequestsRetried = Meter.CreateCounter<long>(
-        name: "requests-retried",
+        name: MetricNames.RequestsRetried,
         unit: "requests",
-        description: "Total number of request retries");
+        description: "Total number of retried requests");
 
     /// <summary>
     /// Requests failed.
     /// </summary>
     public static readonly Counter<long> RequestsFailed = Meter.CreateCounter<long>(
-        name: "requests-failed",
+        name: MetricNames.RequestsFailed,
         unit: "requests",
-        description: "Total number of failed requests (failed to send, or completed with error)");
+        description: "Total number of failed requests (due to failure to send, or completed with error)");

Review Comment:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465074667


##########
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:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "IgGusev (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465077922


##########
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:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "IgGusev (via GitHub)" <gi...@apache.org>.
IgGusev commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465080305


##########
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:
   Lets make it "Total number of retried requests" then. Its a bit ambiguous now.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465074174


##########
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:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465107024


##########
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:
   Fixed.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "gurustron (via GitHub)" <gi...@apache.org>.
gurustron commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465451839


##########
modules/platforms/dotnet/Apache.Ignite/Internal/Metrics.cs:
##########
@@ -44,129 +44,129 @@ internal static class Metrics
     /// Currently active connections.
     /// </summary>
     public static readonly ObservableCounter<int> ConnectionsActive = Meter.CreateObservableCounter(
-        name: "connections-active",
+        name: MetricNames.ConnectionsActive,
         observeValue: () => Interlocked.CompareExchange(ref _connectionsActive, 0, 0),
         unit: "connections",
-        description: "Currently active connections");
+        description: "Total number of currently active connections");
 
     /// <summary>
     /// Total number of connections established.
     /// </summary>
     public static readonly Counter<long> ConnectionsEstablished = Meter.CreateCounter<long>(
-        name: "connections-established",
+        name: MetricNames.ConnectionsEstablished,
         unit: "connections",
         description: "Total number of established connections");
 
     /// <summary>
     /// Total number of connections lost.
     /// </summary>
     public static readonly Counter<long> ConnectionsLost = Meter.CreateCounter<long>(
-        name: "connections-lost",
+        name: MetricNames.ConnectionsLost,
         unit: "connections",
         description: "Total number of lost connections");
 
     /// <summary>
     /// Total number of connections lost due to timeout.
     /// </summary>
     public static readonly Counter<long> ConnectionsLostTimeout = Meter.CreateCounter<long>(
-        name: "connections-lost-timeout",
+        name: MetricNames.ConnectionsLostTimeout,
         unit: "connections",
         description: "Total number of lost connections due to network timeout");
 
     /// <summary>
     /// Handshakes failed.
     /// </summary>
     public static readonly Counter<long> HandshakesFailed = Meter.CreateCounter<long>(
-        name: "handshakes-failed",
+        name: MetricNames.HandshakesFailed,
         unit: "handshakes",
         description: "Total number of failed handshakes (due to version mismatch, auth failure, etc)");

Review Comment:
   `etc` -> `etc.`



##########
modules/platforms/dotnet/Apache.Ignite/Internal/Metrics.cs:
##########
@@ -44,129 +44,129 @@ internal static class Metrics
     /// Currently active connections.
     /// </summary>
     public static readonly ObservableCounter<int> ConnectionsActive = Meter.CreateObservableCounter(
-        name: "connections-active",
+        name: MetricNames.ConnectionsActive,
         observeValue: () => Interlocked.CompareExchange(ref _connectionsActive, 0, 0),
         unit: "connections",
-        description: "Currently active connections");
+        description: "Total number of currently active connections");
 
     /// <summary>
     /// Total number of connections established.
     /// </summary>
     public static readonly Counter<long> ConnectionsEstablished = Meter.CreateCounter<long>(
-        name: "connections-established",
+        name: MetricNames.ConnectionsEstablished,
         unit: "connections",
         description: "Total number of established connections");
 
     /// <summary>
     /// Total number of connections lost.
     /// </summary>
     public static readonly Counter<long> ConnectionsLost = Meter.CreateCounter<long>(
-        name: "connections-lost",
+        name: MetricNames.ConnectionsLost,
         unit: "connections",
         description: "Total number of lost connections");
 
     /// <summary>
     /// Total number of connections lost due to timeout.
     /// </summary>
     public static readonly Counter<long> ConnectionsLostTimeout = Meter.CreateCounter<long>(
-        name: "connections-lost-timeout",
+        name: MetricNames.ConnectionsLostTimeout,
         unit: "connections",
         description: "Total number of lost connections due to network timeout");
 
     /// <summary>
     /// Handshakes failed.
     /// </summary>
     public static readonly Counter<long> HandshakesFailed = Meter.CreateCounter<long>(
-        name: "handshakes-failed",
+        name: MetricNames.HandshakesFailed,
         unit: "handshakes",
         description: "Total number of failed handshakes (due to version mismatch, auth failure, etc)");
 
     /// <summary>
     /// Handshakes failed due to a timeout.
     /// </summary>
     public static readonly Counter<long> HandshakesFailedTimeout = Meter.CreateCounter<long>(
-        name: "handshakes-failed-timeout",
+        name: MetricNames.HandshakesFailedTimeout,
         unit: "handshakes",
-        description: "Total number of failed handshakes due to network timeout");
+        description: "Total number of failed handshakes due to a network timeout");
 
     /// <summary>
     /// Currently active requests (request sent, waiting for response).
     /// </summary>
     public static readonly ObservableCounter<int> RequestsActive = Meter.CreateObservableCounter(
-        name: "requests-active",
+        name: MetricNames.RequestsActive,
         observeValue: () => Interlocked.CompareExchange(ref _requestsActive, 0, 0),
         unit: "requests",
-        description: "Currently active requests (request sent, waiting for response)");
+        description: "Currently active requests (requests being sent to the socket or waiting for response)");
 
     /// <summary>
     /// Requests sent.
     /// </summary>
     public static readonly Counter<long> RequestsSent = Meter.CreateCounter<long>(
-        name: "requests-sent",
+        name: MetricNames.RequestsSent,
         unit: "requests",
         description: "Total number of requests sent");
 
     /// <summary>
     /// Requests completed (response received).
     /// </summary>
     public static readonly Counter<long> RequestsCompleted = Meter.CreateCounter<long>(
-        name: "requests-completed",
+        name: MetricNames.RequestsCompleted,
         unit: "requests",
         description: "Total number of requests completed (response received)");
 
     /// <summary>
-    /// Total number of request retries.
+    /// Total number of retried requests.
     /// </summary>
     public static readonly Counter<long> RequestsRetried = Meter.CreateCounter<long>(
-        name: "requests-retried",
+        name: MetricNames.RequestsRetried,
         unit: "requests",
-        description: "Total number of request retries");
+        description: "Total number of retried requests");
 
     /// <summary>
     /// Requests failed.
     /// </summary>
     public static readonly Counter<long> RequestsFailed = Meter.CreateCounter<long>(
-        name: "requests-failed",
+        name: MetricNames.RequestsFailed,
         unit: "requests",
-        description: "Total number of failed requests (failed to send, or completed with error)");
+        description: "Total number of failed requests (due to failure to send, or completed with error)");

Review Comment:
   is comma required here?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465073562


##########
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:
   It is a term from the standard library: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.meter?view=net-8.0



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-21268 .NET: Expose metric names as public constants [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #3088:
URL: https://github.com/apache/ignite-3/pull/3088#discussion_r1465077059


##########
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:
   It is a number of retry attempts. For example, a given request failed 3 times and then succeeded:
   * Total number of retried requests = 1
   * Total number of retries = 3



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org