<commit_before># (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datadog_checks.base import OpenMetricsBaseCheck

COUNTERS = {
    'authenticated_user_requests': 'authenticated_user.requests',
    'metrics_server_kubelet_summary_scrapes_total': 'kubelet_summary_scrapes_total',
}

HISTOGRAMS = {
    'metrics_server_manager_tick_duration_seconds': 'manager_tick_duration',
    'metrics_server_scraper_duration_seconds': 'scraper_duration',
}

SUMMARIES = {'metrics_server_kubelet_summary_request_duration_seconds': 'kubelet_summary_request_duration'}

GAUGES = {
    'metrics_server_scraper_last_time_seconds': 'scraper_last_time',
    'process_max_fds': 'process.max_fds',
    'process_open_fds': 'process.open_fds',
}

GO_METRICS = {'go_gc_duration_seconds': 'go.gc_duration_seconds', 'go_goroutines': 'go.goroutines'}

IGNORED_METRICS = [
    # Should be reported via API Server Check
    'http_requests_total',
    'http_request_size_bytes',
    'http_response_size_bytes',
    'http_request_duration_microseconds',
    'apiserver_audit_event_total',
    'apiserver_client_certificate_expiration_seconds',
    'apiserver_current_inflight_requests',
    'apiserver_storage_data_key_generation_failures_total',
    'apiserver_storage_data_key_generation_latencies_microseconds',
    'apiserver_storage_envelope_transformation_cache_misses_total',
    # Should be reported via ETCD Check<commit_msg>Support 0.4.0 metrics server renamed metric names (#9202)<commit_after># (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

from datadog_checks.base import OpenMetricsBaseCheck

COUNTERS = {
    'authenticated_user_requests': 'authenticated_user.requests',
    'metrics_server_kubelet_summary_scrapes_total': 'kubelet_summary_scrapes_total',
    'metrics_server_kubelet_request_total': 'kubelet_summary_scrapes_total',
}

HISTOGRAMS = {
    'metrics_server_manager_tick_duration_seconds': 'manager_tick_duration',
    'metrics_server_scraper_duration_seconds': 'scraper_duration',
}

SUMMARIES = {
    'metrics_server_kubelet_summary_request_duration_seconds': 'kubelet_summary_request_duration',
    'metrics_server_kubelet_request_duration_seconds': 'kubelet_summary_request_duration',
}

GAUGES = {
    'metrics_server_scraper_last_time_seconds': 'scraper_last_time',
    'metrics_server_kubelet_last_request_time_seconds': 'scraper_last_time',
    'process_max_fds': 'process.max_fds',
    'process_open_fds': 'process.open_fds',
}

GO_METRICS = {'go_gc_duration_seconds': 'go.gc_duration_seconds', 'go_goroutines': 'go.goroutines'}

IGNORED_METRICS = [
    # Should be reported via API Server Check
    'http_requests_total',
    'http_request_size_bytes',
    'http_response_size_bytes',
    'http_request_duration_microseconds',
    'apiserver_audit_event_total',
    'apiserver_client_certificate_expiration_seconds',
    'apiserver_current_inflight_requests',
    'apiserver_storage_data_key_generation_failures_total',
    'apiserver_storage_data_key_generation_latencies_microseconds',
    'apiserver_storage_envelope_transformation_cache_misses_total',
    # Should be reported via ETCD Check
{'fraction_non_alphanumeric': 0.08585546633724521, 'fraction_numerical': 0.005250154416306362, 'mean_word_length': 7.305128205128205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5014878', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1112, 'n_words': 152}