mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
* feat(exporters): replace opencensus with opentelemetry * feat(exporters): replace opencensus with opentelemetry * fix(stackdriver_exporter): use metrics util constants * chore: use global meter and init * feat(exporters): add resource info, use global meter * chore: update deps * fix: use a gauge directly, narrow scope info * cleanup: deps * fix: try initOnce pattern for global problem metrics * fix(problemmetrics): init is being called too late * fix(gauge): remove _ratio suffix * fix: clean up after rebase * fix: cleanup after rebase * fix: cleanup after rebase * fix: cleanup after rebase * fix: remove nodename * fix(test): remove instance id check * fix(test): add attr values * fix(test): unexported resources * fix(test): initialize global problem metrics manager * fix(lint): make the linter happy * fix(test): allow for summary and histogram types to be emit * fix(otel): remove otel_scope labels * fix(stackdriver_exporter): filter resource attributes for gcp * fix(metrics): retain early nil return with no name * chore(exporters): remove deprecated prometheus opts, use otel translator * feat(metric): use metricdata for unit tests * fix(metrics/test): test our New() funcs * feat(stackdriver_exporter/test): add cloudmock and use it to test metrics export * chore(lint): make the linter happy by not returning some errs * fix(stackdriver): restore gce_instance resource, instance_name and apiEndpoint * fix(prometheus): serve metrics from a dedicated registry * fix(metrics): error on unsupported aggregation and undeclared labels * refactor(metrics): dedupe int64/float64 metric implementations * chore: remove dead code from metrics, otel and cloudmock * refactor(metrics): simplify otelMetric internals * fix(prometheus): drop target_info from scrape output * fix(systemstatsmonitor): key disk_percent_used by device_name only disk_percent_used declared only device_name but recorded four labels (device_name, fs_type, mount_option, state). With per-metric label validation, Record now rejects the undeclared labels and the metric is dropped from the export (caught by the metriconly e2e). Record only device_name, preserving the schema NPD has exported since the metric was introduced: the OpenCensus view aggregated by device_name and dropped the other tags, so on the wire this metric has always had a single label. It also maps to the Google-owned compute.googleapis.com/guest/disk/percent_used descriptor, which can reject writes carrying undeclared label keys. Add a regression test pinning the schema. * fix(prometheus): preserve legacy metric names * fix(stackdriver): disable client telemetry * fix(metrics): preserve legacy metric names * fix(metrics): preserve declared labels * fix(stackdriver): skip descriptor management * chore(deps): update module metadata * fix(metrics): align fake label handling * fix(metrics): reject normalized name collisions * fix(stackdriver): preserve custom metric names * fix(stackdriver): use portable metric paths * fix(otel): shut down meter provider on exit and reject late registrations Address review comments from #1297: - Shut down the OTel meter provider when npdMain exits so push readers flush pending metrics. - Return an error from AddMetricReader/AddResourceAttributes when the meter provider is already initialized, instead of silently ignoring the registration. * chore(deps): tidy go.sum after rebase * chore(deps): remove OTel migration scaffold * refactor(metrics): consolidate metric mappings --------- Co-authored-by: Dave Young <dave.andrew.young@gmail.com> Co-authored-by: Dave Young <dyoung@coreweave.com>