| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338 |
- /*
- * Copyright The OpenTelemetry Authors
- * SPDX-License-Identifier: Apache-2.0
- */
- /*
- * DO NOT EDIT, this is an Auto-generated file from:
- * buildscripts/semantic-convention/templates/registry/semantic_metrics-h.j2
- */
- #pragma once
- #include "opentelemetry/common/macros.h"
- #include "opentelemetry/metrics/meter.h"
- #include "opentelemetry/version.h"
- OPENTELEMETRY_BEGIN_NAMESPACE
- namespace semconv
- {
- namespace system
- {
- /**
- Deprecated. Use @code cpu.frequency @endcode instead.
- @deprecated
- {"note": "Replaced by @code cpu.frequency @endcode.", "reason": "renamed", "renamed_to":
- "cpu.frequency"} <p> gauge
- */
- OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricSystemCpuFrequency =
- "system.cpu.frequency";
- OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricSystemCpuFrequency =
- "Deprecated. Use `cpu.frequency` instead.";
- OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricSystemCpuFrequency = "{Hz}";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Gauge<int64_t>>
- CreateSyncInt64MetricSystemCpuFrequency(metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency,
- unitMetricSystemCpuFrequency);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Gauge<double>>
- CreateSyncDoubleMetricSystemCpuFrequency(metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency,
- unitMetricSystemCpuFrequency);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemCpuFrequency(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency,
- unitMetricSystemCpuFrequency);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemCpuFrequency(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(
- kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency, unitMetricSystemCpuFrequency);
- }
- /**
- Reports the number of logical (virtual) processor cores created by the operating system to manage
- multitasking <p> Calculated by multiplying the number of sockets by the number of cores per
- socket, and then by the number of threads per core <p> updowncounter
- */
- static constexpr const char *kMetricSystemCpuLogicalCount = "system.cpu.logical.count";
- static constexpr const char *descrMetricSystemCpuLogicalCount =
- "Reports the number of logical (virtual) processor cores created by the operating system to "
- "manage multitasking";
- static constexpr const char *unitMetricSystemCpuLogicalCount = "{cpu}";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemCpuLogicalCount(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemCpuLogicalCount,
- descrMetricSystemCpuLogicalCount,
- unitMetricSystemCpuLogicalCount);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemCpuLogicalCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemCpuLogicalCount,
- descrMetricSystemCpuLogicalCount,
- unitMetricSystemCpuLogicalCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemCpuLogicalCount(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemCpuLogicalCount,
- descrMetricSystemCpuLogicalCount,
- unitMetricSystemCpuLogicalCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemCpuLogicalCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemCpuLogicalCount,
- descrMetricSystemCpuLogicalCount,
- unitMetricSystemCpuLogicalCount);
- }
- /**
- Reports the number of actual physical processor cores on the hardware
- <p>
- Calculated by multiplying the number of sockets by the number of cores per socket
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemCpuPhysicalCount = "system.cpu.physical.count";
- static constexpr const char *descrMetricSystemCpuPhysicalCount =
- "Reports the number of actual physical processor cores on the hardware";
- static constexpr const char *unitMetricSystemCpuPhysicalCount = "{cpu}";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemCpuPhysicalCount(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemCpuPhysicalCount,
- descrMetricSystemCpuPhysicalCount,
- unitMetricSystemCpuPhysicalCount);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemCpuPhysicalCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemCpuPhysicalCount,
- descrMetricSystemCpuPhysicalCount,
- unitMetricSystemCpuPhysicalCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemCpuPhysicalCount(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemCpuPhysicalCount,
- descrMetricSystemCpuPhysicalCount,
- unitMetricSystemCpuPhysicalCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemCpuPhysicalCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemCpuPhysicalCount,
- descrMetricSystemCpuPhysicalCount,
- unitMetricSystemCpuPhysicalCount);
- }
- /**
- Deprecated. Use @code cpu.time @endcode instead.
- @deprecated
- {"note": "Replaced by @code cpu.time @endcode.", "reason": "renamed", "renamed_to": "cpu.time"}
- <p>
- counter
- */
- OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricSystemCpuTime = "system.cpu.time";
- OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricSystemCpuTime =
- "Deprecated. Use `cpu.time` instead.";
- OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricSystemCpuTime = "s";
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemCpuTime(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemCpuTime, descrMetricSystemCpuTime,
- unitMetricSystemCpuTime);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemCpuTime(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemCpuTime, descrMetricSystemCpuTime,
- unitMetricSystemCpuTime);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemCpuTime(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemCpuTime, descrMetricSystemCpuTime,
- unitMetricSystemCpuTime);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemCpuTime(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemCpuTime, descrMetricSystemCpuTime,
- unitMetricSystemCpuTime);
- }
- /**
- Deprecated. Use @code cpu.utilization @endcode instead.
- @deprecated
- {"note": "Replaced by @code cpu.utilization @endcode.", "reason": "renamed", "renamed_to":
- "cpu.utilization"} <p> gauge
- */
- OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricSystemCpuUtilization =
- "system.cpu.utilization";
- OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricSystemCpuUtilization =
- "Deprecated. Use `cpu.utilization` instead.";
- OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricSystemCpuUtilization = "1";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Gauge<int64_t>>
- CreateSyncInt64MetricSystemCpuUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemCpuUtilization, descrMetricSystemCpuUtilization,
- unitMetricSystemCpuUtilization);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Gauge<double>>
- CreateSyncDoubleMetricSystemCpuUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemCpuUtilization, descrMetricSystemCpuUtilization,
- unitMetricSystemCpuUtilization);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemCpuUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(
- kMetricSystemCpuUtilization, descrMetricSystemCpuUtilization, unitMetricSystemCpuUtilization);
- }
- OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemCpuUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(
- kMetricSystemCpuUtilization, descrMetricSystemCpuUtilization, unitMetricSystemCpuUtilization);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemDiskIo = "system.disk.io";
- static constexpr const char *descrMetricSystemDiskIo = "";
- static constexpr const char *unitMetricSystemDiskIo = "By";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricSystemDiskIo(
- metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemDiskIo, descrMetricSystemDiskIo,
- unitMetricSystemDiskIo);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemDiskIo(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemDiskIo, descrMetricSystemDiskIo,
- unitMetricSystemDiskIo);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument> CreateAsyncInt64MetricSystemDiskIo(
- metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemDiskIo, descrMetricSystemDiskIo,
- unitMetricSystemDiskIo);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument> CreateAsyncDoubleMetricSystemDiskIo(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemDiskIo, descrMetricSystemDiskIo,
- unitMetricSystemDiskIo);
- }
- /**
- Time disk spent activated
- <p>
- The real elapsed time ("wall clock") used in the I/O path (time from operations running in
- parallel are not counted). Measured as: <ul> <li>Linux: Field 13 from <a
- href="https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats">procfs-diskstats</a></li>
- <li>Windows: The complement of
- <a
- href="https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained">"Disk%
- Idle Time"</a> performance counter: @code uptime * (100 - "Disk\% Idle Time") / 100 @endcode</li>
- </ul>
- <p>
- counter
- */
- static constexpr const char *kMetricSystemDiskIoTime = "system.disk.io_time";
- static constexpr const char *descrMetricSystemDiskIoTime = "Time disk spent activated";
- static constexpr const char *unitMetricSystemDiskIoTime = "s";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricSystemDiskIoTime(
- metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemDiskIoTime, descrMetricSystemDiskIoTime,
- unitMetricSystemDiskIoTime);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemDiskIoTime(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemDiskIoTime, descrMetricSystemDiskIoTime,
- unitMetricSystemDiskIoTime);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemDiskIoTime(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemDiskIoTime, descrMetricSystemDiskIoTime,
- unitMetricSystemDiskIoTime);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemDiskIoTime(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemDiskIoTime, descrMetricSystemDiskIoTime,
- unitMetricSystemDiskIoTime);
- }
- /**
- The total storage capacity of the disk
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemDiskLimit = "system.disk.limit";
- static constexpr const char *descrMetricSystemDiskLimit = "The total storage capacity of the disk";
- static constexpr const char *unitMetricSystemDiskLimit = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemDiskLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemDiskLimit, descrMetricSystemDiskLimit,
- unitMetricSystemDiskLimit);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemDiskLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemDiskLimit, descrMetricSystemDiskLimit,
- unitMetricSystemDiskLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemDiskLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemDiskLimit, descrMetricSystemDiskLimit, unitMetricSystemDiskLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemDiskLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemDiskLimit, descrMetricSystemDiskLimit, unitMetricSystemDiskLimit);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemDiskMerged = "system.disk.merged";
- static constexpr const char *descrMetricSystemDiskMerged = "";
- static constexpr const char *unitMetricSystemDiskMerged = "{operation}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricSystemDiskMerged(
- metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemDiskMerged, descrMetricSystemDiskMerged,
- unitMetricSystemDiskMerged);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemDiskMerged(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemDiskMerged, descrMetricSystemDiskMerged,
- unitMetricSystemDiskMerged);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemDiskMerged(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemDiskMerged, descrMetricSystemDiskMerged,
- unitMetricSystemDiskMerged);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemDiskMerged(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemDiskMerged, descrMetricSystemDiskMerged,
- unitMetricSystemDiskMerged);
- }
- /**
- Sum of the time each operation took to complete
- <p>
- Because it is the sum of time each request took, parallel-issued requests each contribute to make
- the count grow. Measured as: <ul> <li>Linux: Fields 7 & 11 from <a
- href="https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats">procfs-diskstats</a></li>
- <li>Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter
- (similar for Writes)</li>
- </ul>
- <p>
- counter
- */
- static constexpr const char *kMetricSystemDiskOperationTime = "system.disk.operation_time";
- static constexpr const char *descrMetricSystemDiskOperationTime =
- "Sum of the time each operation took to complete";
- static constexpr const char *unitMetricSystemDiskOperationTime = "s";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemDiskOperationTime(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemDiskOperationTime,
- descrMetricSystemDiskOperationTime,
- unitMetricSystemDiskOperationTime);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemDiskOperationTime(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemDiskOperationTime,
- descrMetricSystemDiskOperationTime,
- unitMetricSystemDiskOperationTime);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemDiskOperationTime(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemDiskOperationTime,
- descrMetricSystemDiskOperationTime,
- unitMetricSystemDiskOperationTime);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemDiskOperationTime(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemDiskOperationTime,
- descrMetricSystemDiskOperationTime,
- unitMetricSystemDiskOperationTime);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemDiskOperations = "system.disk.operations";
- static constexpr const char *descrMetricSystemDiskOperations = "";
- static constexpr const char *unitMetricSystemDiskOperations = "{operation}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemDiskOperations(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemDiskOperations, descrMetricSystemDiskOperations,
- unitMetricSystemDiskOperations);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemDiskOperations(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemDiskOperations, descrMetricSystemDiskOperations,
- unitMetricSystemDiskOperations);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemDiskOperations(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemDiskOperations, descrMetricSystemDiskOperations, unitMetricSystemDiskOperations);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemDiskOperations(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemDiskOperations, descrMetricSystemDiskOperations, unitMetricSystemDiskOperations);
- }
- /**
- The total storage capacity of the filesystem
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemFilesystemLimit = "system.filesystem.limit";
- static constexpr const char *descrMetricSystemFilesystemLimit =
- "The total storage capacity of the filesystem";
- static constexpr const char *unitMetricSystemFilesystemLimit = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemFilesystemLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemFilesystemLimit,
- descrMetricSystemFilesystemLimit,
- unitMetricSystemFilesystemLimit);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemFilesystemLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemFilesystemLimit,
- descrMetricSystemFilesystemLimit,
- unitMetricSystemFilesystemLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemFilesystemLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemFilesystemLimit,
- descrMetricSystemFilesystemLimit,
- unitMetricSystemFilesystemLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemFilesystemLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemFilesystemLimit,
- descrMetricSystemFilesystemLimit,
- unitMetricSystemFilesystemLimit);
- }
- /**
- Reports a filesystem's space usage across different states.
- <p>
- The sum of all @code system.filesystem.usage @endcode values over the different @code
- system.filesystem.state @endcode attributes SHOULD equal the total storage capacity of the
- filesystem, that is @code system.filesystem.limit @endcode. <p> updowncounter
- */
- static constexpr const char *kMetricSystemFilesystemUsage = "system.filesystem.usage";
- static constexpr const char *descrMetricSystemFilesystemUsage =
- "Reports a filesystem's space usage across different states.";
- static constexpr const char *unitMetricSystemFilesystemUsage = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemFilesystemUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemFilesystemUsage,
- descrMetricSystemFilesystemUsage,
- unitMetricSystemFilesystemUsage);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemFilesystemUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemFilesystemUsage,
- descrMetricSystemFilesystemUsage,
- unitMetricSystemFilesystemUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemFilesystemUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemFilesystemUsage,
- descrMetricSystemFilesystemUsage,
- unitMetricSystemFilesystemUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemFilesystemUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemFilesystemUsage,
- descrMetricSystemFilesystemUsage,
- unitMetricSystemFilesystemUsage);
- }
- /**
- gauge
- */
- static constexpr const char *kMetricSystemFilesystemUtilization = "system.filesystem.utilization";
- static constexpr const char *descrMetricSystemFilesystemUtilization = "";
- static constexpr const char *unitMetricSystemFilesystemUtilization = "1";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- static inline nostd::unique_ptr<metrics::Gauge<int64_t>>
- CreateSyncInt64MetricSystemFilesystemUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemFilesystemUtilization,
- descrMetricSystemFilesystemUtilization,
- unitMetricSystemFilesystemUtilization);
- }
- static inline nostd::unique_ptr<metrics::Gauge<double>>
- CreateSyncDoubleMetricSystemFilesystemUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemFilesystemUtilization,
- descrMetricSystemFilesystemUtilization,
- unitMetricSystemFilesystemUtilization);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemFilesystemUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(kMetricSystemFilesystemUtilization,
- descrMetricSystemFilesystemUtilization,
- unitMetricSystemFilesystemUtilization);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemFilesystemUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(kMetricSystemFilesystemUtilization,
- descrMetricSystemFilesystemUtilization,
- unitMetricSystemFilesystemUtilization);
- }
- /**
- An estimate of how much memory is available for starting new applications, without causing
- swapping <p> This is an alternative to @code system.memory.usage @endcode metric with @code
- state=free @endcode. Linux starting from 3.14 exports "available" memory. It takes "free" memory
- as a baseline, and then factors in kernel-specific values. This is supposed to be more accurate
- than just "free" memory. For reference, see the calculations <a
- href="https://superuser.com/a/980821">here</a>. See also @code MemAvailable @endcode in <a
- href="https://man7.org/linux/man-pages/man5/proc.5.html">/proc/meminfo</a>. <p> updowncounter
- */
- static constexpr const char *kMetricSystemLinuxMemoryAvailable = "system.linux.memory.available";
- static constexpr const char *descrMetricSystemLinuxMemoryAvailable =
- "An estimate of how much memory is available for starting new applications, without causing "
- "swapping";
- static constexpr const char *unitMetricSystemLinuxMemoryAvailable = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemLinuxMemoryAvailable(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemLinuxMemoryAvailable,
- descrMetricSystemLinuxMemoryAvailable,
- unitMetricSystemLinuxMemoryAvailable);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemLinuxMemoryAvailable(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemLinuxMemoryAvailable,
- descrMetricSystemLinuxMemoryAvailable,
- unitMetricSystemLinuxMemoryAvailable);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemLinuxMemoryAvailable(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemLinuxMemoryAvailable,
- descrMetricSystemLinuxMemoryAvailable,
- unitMetricSystemLinuxMemoryAvailable);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemLinuxMemoryAvailable(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemLinuxMemoryAvailable,
- descrMetricSystemLinuxMemoryAvailable,
- unitMetricSystemLinuxMemoryAvailable);
- }
- /**
- Reports the memory used by the Linux kernel for managing caches of frequently used objects.
- <p>
- The sum over the @code reclaimable @endcode and @code unreclaimable @endcode state values in @code
- linux.memory.slab.usage @endcode SHOULD be equal to the total slab memory available on the system.
- Note that the total slab memory is not constant and may vary over time.
- See also the <a
- href="https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics">Slab
- allocator</a> and @code Slab @endcode in <a
- href="https://man7.org/linux/man-pages/man5/proc.5.html">/proc/meminfo</a>. <p> updowncounter
- */
- static constexpr const char *kMetricSystemLinuxMemorySlabUsage = "system.linux.memory.slab.usage";
- static constexpr const char *descrMetricSystemLinuxMemorySlabUsage =
- "Reports the memory used by the Linux kernel for managing caches of frequently used objects.";
- static constexpr const char *unitMetricSystemLinuxMemorySlabUsage = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemLinuxMemorySlabUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemLinuxMemorySlabUsage,
- descrMetricSystemLinuxMemorySlabUsage,
- unitMetricSystemLinuxMemorySlabUsage);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemLinuxMemorySlabUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemLinuxMemorySlabUsage,
- descrMetricSystemLinuxMemorySlabUsage,
- unitMetricSystemLinuxMemorySlabUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemLinuxMemorySlabUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemLinuxMemorySlabUsage,
- descrMetricSystemLinuxMemorySlabUsage,
- unitMetricSystemLinuxMemorySlabUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemLinuxMemorySlabUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemLinuxMemorySlabUsage,
- descrMetricSystemLinuxMemorySlabUsage,
- unitMetricSystemLinuxMemorySlabUsage);
- }
- /**
- Total memory available in the system.
- <p>
- Its value SHOULD equal the sum of @code system.memory.state @endcode over all states.
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemMemoryLimit = "system.memory.limit";
- static constexpr const char *descrMetricSystemMemoryLimit = "Total memory available in the system.";
- static constexpr const char *unitMetricSystemMemoryLimit = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemMemoryLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemMemoryLimit, descrMetricSystemMemoryLimit,
- unitMetricSystemMemoryLimit);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemMemoryLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemMemoryLimit, descrMetricSystemMemoryLimit,
- unitMetricSystemMemoryLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemMemoryLimit(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemMemoryLimit, descrMetricSystemMemoryLimit, unitMetricSystemMemoryLimit);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemMemoryLimit(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemMemoryLimit, descrMetricSystemMemoryLimit, unitMetricSystemMemoryLimit);
- }
- /**
- Shared memory used (mostly by tmpfs).
- <p>
- Equivalent of @code shared @endcode from <a
- href="https://man7.org/linux/man-pages/man1/free.1.html">@code free @endcode command</a> or
- @code Shmem @endcode from <a href="https://man7.org/linux/man-pages/man5/proc.5.html">@code
- /proc/meminfo @endcode</a>" <p> updowncounter
- */
- static constexpr const char *kMetricSystemMemoryShared = "system.memory.shared";
- static constexpr const char *descrMetricSystemMemoryShared =
- "Shared memory used (mostly by tmpfs).";
- static constexpr const char *unitMetricSystemMemoryShared = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemMemoryShared(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemMemoryShared, descrMetricSystemMemoryShared,
- unitMetricSystemMemoryShared);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemMemoryShared(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemMemoryShared, descrMetricSystemMemoryShared,
- unitMetricSystemMemoryShared);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemMemoryShared(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemMemoryShared, descrMetricSystemMemoryShared, unitMetricSystemMemoryShared);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemMemoryShared(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemMemoryShared, descrMetricSystemMemoryShared, unitMetricSystemMemoryShared);
- }
- /**
- Reports memory in use by state.
- <p>
- The sum over all @code system.memory.state @endcode values SHOULD equal the total memory
- available on the system, that is @code system.memory.limit @endcode.
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemMemoryUsage = "system.memory.usage";
- static constexpr const char *descrMetricSystemMemoryUsage = "Reports memory in use by state.";
- static constexpr const char *unitMetricSystemMemoryUsage = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemMemoryUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemMemoryUsage, descrMetricSystemMemoryUsage,
- unitMetricSystemMemoryUsage);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemMemoryUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemMemoryUsage, descrMetricSystemMemoryUsage,
- unitMetricSystemMemoryUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemMemoryUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemMemoryUsage, descrMetricSystemMemoryUsage, unitMetricSystemMemoryUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemMemoryUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemMemoryUsage, descrMetricSystemMemoryUsage, unitMetricSystemMemoryUsage);
- }
- /**
- gauge
- */
- static constexpr const char *kMetricSystemMemoryUtilization = "system.memory.utilization";
- static constexpr const char *descrMetricSystemMemoryUtilization = "";
- static constexpr const char *unitMetricSystemMemoryUtilization = "1";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- static inline nostd::unique_ptr<metrics::Gauge<int64_t>>
- CreateSyncInt64MetricSystemMemoryUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemMemoryUtilization, descrMetricSystemMemoryUtilization,
- unitMetricSystemMemoryUtilization);
- }
- static inline nostd::unique_ptr<metrics::Gauge<double>>
- CreateSyncDoubleMetricSystemMemoryUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemMemoryUtilization,
- descrMetricSystemMemoryUtilization,
- unitMetricSystemMemoryUtilization);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemMemoryUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(kMetricSystemMemoryUtilization,
- descrMetricSystemMemoryUtilization,
- unitMetricSystemMemoryUtilization);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemMemoryUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(kMetricSystemMemoryUtilization,
- descrMetricSystemMemoryUtilization,
- unitMetricSystemMemoryUtilization);
- }
- /**
- updowncounter
- */
- static constexpr const char *kMetricSystemNetworkConnections = "system.network.connections";
- static constexpr const char *descrMetricSystemNetworkConnections = "";
- static constexpr const char *unitMetricSystemNetworkConnections = "{connection}";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemNetworkConnections(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemNetworkConnections,
- descrMetricSystemNetworkConnections,
- unitMetricSystemNetworkConnections);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemNetworkConnections(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemNetworkConnections,
- descrMetricSystemNetworkConnections,
- unitMetricSystemNetworkConnections);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemNetworkConnections(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(kMetricSystemNetworkConnections,
- descrMetricSystemNetworkConnections,
- unitMetricSystemNetworkConnections);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemNetworkConnections(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(kMetricSystemNetworkConnections,
- descrMetricSystemNetworkConnections,
- unitMetricSystemNetworkConnections);
- }
- /**
- Count of packets that are dropped or discarded even though there was no error
- <p>
- Measured as:
- <ul>
- <li>Linux: the @code drop @endcode column in @code /proc/dev/net @endcode (<a
- href="https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html">source</a>)</li>
- <li>Windows: <a
- href="https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2">@code
- InDiscards @endcode/@code OutDiscards @endcode</a> from <a
- href="https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2">@code
- GetIfEntry2 @endcode</a></li>
- </ul>
- <p>
- counter
- */
- static constexpr const char *kMetricSystemNetworkDropped = "system.network.dropped";
- static constexpr const char *descrMetricSystemNetworkDropped =
- "Count of packets that are dropped or discarded even though there was no error";
- static constexpr const char *unitMetricSystemNetworkDropped = "{packet}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemNetworkDropped(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemNetworkDropped, descrMetricSystemNetworkDropped,
- unitMetricSystemNetworkDropped);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemNetworkDropped(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemNetworkDropped, descrMetricSystemNetworkDropped,
- unitMetricSystemNetworkDropped);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemNetworkDropped(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemNetworkDropped, descrMetricSystemNetworkDropped, unitMetricSystemNetworkDropped);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemNetworkDropped(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemNetworkDropped, descrMetricSystemNetworkDropped, unitMetricSystemNetworkDropped);
- }
- /**
- Count of network errors detected
- <p>
- Measured as:
- <ul>
- <li>Linux: the @code errs @endcode column in @code /proc/dev/net @endcode (<a
- href="https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html">source</a>).</li>
- <li>Windows: <a
- href="https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2">@code
- InErrors @endcode/@code OutErrors @endcode</a> from <a
- href="https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2">@code
- GetIfEntry2 @endcode</a>.</li>
- </ul>
- <p>
- counter
- */
- static constexpr const char *kMetricSystemNetworkErrors = "system.network.errors";
- static constexpr const char *descrMetricSystemNetworkErrors = "Count of network errors detected";
- static constexpr const char *unitMetricSystemNetworkErrors = "{error}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemNetworkErrors(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemNetworkErrors, descrMetricSystemNetworkErrors,
- unitMetricSystemNetworkErrors);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemNetworkErrors(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemNetworkErrors, descrMetricSystemNetworkErrors,
- unitMetricSystemNetworkErrors);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemNetworkErrors(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemNetworkErrors, descrMetricSystemNetworkErrors, unitMetricSystemNetworkErrors);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemNetworkErrors(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemNetworkErrors, descrMetricSystemNetworkErrors, unitMetricSystemNetworkErrors);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemNetworkIo = "system.network.io";
- static constexpr const char *descrMetricSystemNetworkIo = "";
- static constexpr const char *unitMetricSystemNetworkIo = "By";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricSystemNetworkIo(
- metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemNetworkIo, descrMetricSystemNetworkIo,
- unitMetricSystemNetworkIo);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemNetworkIo(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemNetworkIo, descrMetricSystemNetworkIo,
- unitMetricSystemNetworkIo);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemNetworkIo(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemNetworkIo, descrMetricSystemNetworkIo,
- unitMetricSystemNetworkIo);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemNetworkIo(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemNetworkIo, descrMetricSystemNetworkIo,
- unitMetricSystemNetworkIo);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemNetworkPackets = "system.network.packets";
- static constexpr const char *descrMetricSystemNetworkPackets = "";
- static constexpr const char *unitMetricSystemNetworkPackets = "{packet}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemNetworkPackets(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemNetworkPackets, descrMetricSystemNetworkPackets,
- unitMetricSystemNetworkPackets);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemNetworkPackets(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemNetworkPackets, descrMetricSystemNetworkPackets,
- unitMetricSystemNetworkPackets);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemNetworkPackets(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemNetworkPackets, descrMetricSystemNetworkPackets, unitMetricSystemNetworkPackets);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemNetworkPackets(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemNetworkPackets, descrMetricSystemNetworkPackets, unitMetricSystemNetworkPackets);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemPagingFaults = "system.paging.faults";
- static constexpr const char *descrMetricSystemPagingFaults = "";
- static constexpr const char *unitMetricSystemPagingFaults = "{fault}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricSystemPagingFaults(
- metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemPagingFaults, descrMetricSystemPagingFaults,
- unitMetricSystemPagingFaults);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricSystemPagingFaults(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemPagingFaults, descrMetricSystemPagingFaults,
- unitMetricSystemPagingFaults);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemPagingFaults(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemPagingFaults, descrMetricSystemPagingFaults, unitMetricSystemPagingFaults);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemPagingFaults(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemPagingFaults, descrMetricSystemPagingFaults, unitMetricSystemPagingFaults);
- }
- /**
- counter
- */
- static constexpr const char *kMetricSystemPagingOperations = "system.paging.operations";
- static constexpr const char *descrMetricSystemPagingOperations = "";
- static constexpr const char *unitMetricSystemPagingOperations = "{operation}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemPagingOperations(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemPagingOperations,
- descrMetricSystemPagingOperations,
- unitMetricSystemPagingOperations);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemPagingOperations(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemPagingOperations,
- descrMetricSystemPagingOperations,
- unitMetricSystemPagingOperations);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemPagingOperations(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(kMetricSystemPagingOperations,
- descrMetricSystemPagingOperations,
- unitMetricSystemPagingOperations);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemPagingOperations(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(kMetricSystemPagingOperations,
- descrMetricSystemPagingOperations,
- unitMetricSystemPagingOperations);
- }
- /**
- Unix swap or windows pagefile usage
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemPagingUsage = "system.paging.usage";
- static constexpr const char *descrMetricSystemPagingUsage = "Unix swap or windows pagefile usage";
- static constexpr const char *unitMetricSystemPagingUsage = "By";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemPagingUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemPagingUsage, descrMetricSystemPagingUsage,
- unitMetricSystemPagingUsage);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemPagingUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemPagingUsage, descrMetricSystemPagingUsage,
- unitMetricSystemPagingUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemPagingUsage(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemPagingUsage, descrMetricSystemPagingUsage, unitMetricSystemPagingUsage);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemPagingUsage(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemPagingUsage, descrMetricSystemPagingUsage, unitMetricSystemPagingUsage);
- }
- /**
- gauge
- */
- static constexpr const char *kMetricSystemPagingUtilization = "system.paging.utilization";
- static constexpr const char *descrMetricSystemPagingUtilization = "";
- static constexpr const char *unitMetricSystemPagingUtilization = "1";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- static inline nostd::unique_ptr<metrics::Gauge<int64_t>>
- CreateSyncInt64MetricSystemPagingUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemPagingUtilization, descrMetricSystemPagingUtilization,
- unitMetricSystemPagingUtilization);
- }
- static inline nostd::unique_ptr<metrics::Gauge<double>>
- CreateSyncDoubleMetricSystemPagingUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemPagingUtilization,
- descrMetricSystemPagingUtilization,
- unitMetricSystemPagingUtilization);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemPagingUtilization(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(kMetricSystemPagingUtilization,
- descrMetricSystemPagingUtilization,
- unitMetricSystemPagingUtilization);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemPagingUtilization(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(kMetricSystemPagingUtilization,
- descrMetricSystemPagingUtilization,
- unitMetricSystemPagingUtilization);
- }
- /**
- Total number of processes in each state
- <p>
- updowncounter
- */
- static constexpr const char *kMetricSystemProcessCount = "system.process.count";
- static constexpr const char *descrMetricSystemProcessCount =
- "Total number of processes in each state";
- static constexpr const char *unitMetricSystemProcessCount = "{process}";
- static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
- CreateSyncInt64MetricSystemProcessCount(metrics::Meter *meter)
- {
- return meter->CreateInt64UpDownCounter(kMetricSystemProcessCount, descrMetricSystemProcessCount,
- unitMetricSystemProcessCount);
- }
- static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
- CreateSyncDoubleMetricSystemProcessCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleUpDownCounter(kMetricSystemProcessCount, descrMetricSystemProcessCount,
- unitMetricSystemProcessCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemProcessCount(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableUpDownCounter(
- kMetricSystemProcessCount, descrMetricSystemProcessCount, unitMetricSystemProcessCount);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemProcessCount(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableUpDownCounter(
- kMetricSystemProcessCount, descrMetricSystemProcessCount, unitMetricSystemProcessCount);
- }
- /**
- Total number of processes created over uptime of the host
- <p>
- counter
- */
- static constexpr const char *kMetricSystemProcessCreated = "system.process.created";
- static constexpr const char *descrMetricSystemProcessCreated =
- "Total number of processes created over uptime of the host";
- static constexpr const char *unitMetricSystemProcessCreated = "{process}";
- static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
- CreateSyncInt64MetricSystemProcessCreated(metrics::Meter *meter)
- {
- return meter->CreateUInt64Counter(kMetricSystemProcessCreated, descrMetricSystemProcessCreated,
- unitMetricSystemProcessCreated);
- }
- static inline nostd::unique_ptr<metrics::Counter<double>>
- CreateSyncDoubleMetricSystemProcessCreated(metrics::Meter *meter)
- {
- return meter->CreateDoubleCounter(kMetricSystemProcessCreated, descrMetricSystemProcessCreated,
- unitMetricSystemProcessCreated);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncInt64MetricSystemProcessCreated(metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableCounter(
- kMetricSystemProcessCreated, descrMetricSystemProcessCreated, unitMetricSystemProcessCreated);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument>
- CreateAsyncDoubleMetricSystemProcessCreated(metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableCounter(
- kMetricSystemProcessCreated, descrMetricSystemProcessCreated, unitMetricSystemProcessCreated);
- }
- /**
- The time the system has been running
- <p>
- Instrumentations SHOULD use a gauge with type @code double @endcode and measure uptime in seconds
- as a floating point number with the highest precision available. The actual accuracy would depend
- on the instrumentation and operating system. <p> gauge
- */
- static constexpr const char *kMetricSystemUptime = "system.uptime";
- static constexpr const char *descrMetricSystemUptime = "The time the system has been running";
- static constexpr const char *unitMetricSystemUptime = "s";
- #if OPENTELEMETRY_ABI_VERSION_NO >= 2
- static inline nostd::unique_ptr<metrics::Gauge<int64_t>> CreateSyncInt64MetricSystemUptime(
- metrics::Meter *meter)
- {
- return meter->CreateInt64Gauge(kMetricSystemUptime, descrMetricSystemUptime,
- unitMetricSystemUptime);
- }
- static inline nostd::unique_ptr<metrics::Gauge<double>> CreateSyncDoubleMetricSystemUptime(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleGauge(kMetricSystemUptime, descrMetricSystemUptime,
- unitMetricSystemUptime);
- }
- #endif /* OPENTELEMETRY_ABI_VERSION_NO */
- static inline nostd::shared_ptr<metrics::ObservableInstrument> CreateAsyncInt64MetricSystemUptime(
- metrics::Meter *meter)
- {
- return meter->CreateInt64ObservableGauge(kMetricSystemUptime, descrMetricSystemUptime,
- unitMetricSystemUptime);
- }
- static inline nostd::shared_ptr<metrics::ObservableInstrument> CreateAsyncDoubleMetricSystemUptime(
- metrics::Meter *meter)
- {
- return meter->CreateDoubleObservableGauge(kMetricSystemUptime, descrMetricSystemUptime,
- unitMetricSystemUptime);
- }
- } // namespace system
- } // namespace semconv
- OPENTELEMETRY_END_NAMESPACE
|