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<long>((instrument, measurement, tags, state) => +/// Console.WriteLine($"{instrument.Name}: {measurement}")); +/// +/// meterListener.SetMeasurementEventCallback<int>((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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
