Describe your environment
Ubuntu 24.04, default gcc, main at 37a57da
Steps to reproduce
build the examples that use the metrics_foo_library
What is the expected behavior?
no deprecation warnings should be reported.
What is the actual behavior?
The following warnings from deprecated semantic conventions are reported.
In file included from /home/runner/work/opentelemetry-cpp/opentelemetry-cpp/examples/common/metrics_foo_library/foo_library.cc:27:
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h: In function ‘opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::metrics::ObservableInstrument> opentelemetry::v1::semconv::system::CreateAsyncInt64MetricSystemCpuFrequency(opentelemetry::v1::metrics::Meter*)’:
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:57:44: warning: ‘opentelemetry::v1::semconv::system::kMetricSystemCpuFrequency’ is deprecated [-Wdeprecated-declarations]
57 | return meter->CreateInt64ObservableGauge(kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:31:55: note: declared here
31 | OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricSystemCpuFrequency =
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:57:71: warning: ‘opentelemetry::v1::semconv::system::descrMetricSystemCpuFrequency’ is deprecated [-Wdeprecated-declarations]
57 | return meter->CreateInt64ObservableGauge(kMetricSystemCpuFrequency, descrMetricSystemCpuFrequency,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:33:55: note: declared here
33 | OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricSystemCpuFrequency =
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:58:44: warning: ‘opentelemetry::v1::semconv::system::unitMetricSystemCpuFrequency’ is deprecated [-Wdeprecated-declarations]
58 | unitMetricSystemCpuFrequency);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/opentelemetry-cpp/opentelemetry-cpp/api/include/opentelemetry/semconv/system_metrics.h:35:55: note: declared here
35 | OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricSystemCpuFrequency = "{Hz}";
Additional context
The CreateAsyncInt64MetricSystemCpuFrequency method is not called by the example and the warning appears to come from simplying including the semconv/system_metrics.h header.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Describe your environment
Ubuntu 24.04, default gcc, main at 37a57da
Steps to reproduce
build the examples that use the
metrics_foo_libraryWhat is the expected behavior?
no deprecation warnings should be reported.
What is the actual behavior?
The following warnings from deprecated semantic conventions are reported.
Additional context
The
CreateAsyncInt64MetricSystemCpuFrequencymethod is not called by the example and the warning appears to come from simplying including thesemconv/system_metrics.hheader.Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.