<commit_before>const request = require('request');
const indiaUrl = process.env.DRUID_URL || "http://10.4.0.50:8200/v1/post/metrics?async=true";
const esURL = process.env.ELASTICSEARCH_URL ? process.env.ELASTICSEARCH_URL.split(",") : ["http://elastic:DowDF5qPpu6WOOGvr48q@es-node-0:9200",
    "http://elastic:DowDF5qPpu6WOOGvr48q@es-node-1:9200", "http://elastic:DowDF5qPpu6WOOGvr48q@es-node-2:9200"];
const dataServiceUrl = process.env.DATA_SERVICE_URL || 'http://data-service.services:3000';

console.log('[ DRUID_METRICS_INFO ] Druid url : ', indiaUrl);
console.log('[ DRUID_METRICS_INFO ] Elastic search url : ', esURL);
console.log('[ DRUID_METRICS_INFO ] Data service url : ', dataServiceUrl);

const {Client} = require('@elastic/elasticsearch');
const esClient = new Client({node: esURL});

let sendData = function (metric, tags, value) {
    if (Object.keys(tags).length === 0) {
        return;
    }
    if (process.env.NODE_ENV === "deployment") {
        let metricData = {
            "@timestamp": (new Date()).toISOString(),<commit_msg>updated URL<commit_after>const request = require('request');
const indiaUrl = process.env.DRUID_URL || "http://10.4.0.50:8200/v1/post/metrics?async=true";
const esURL = process.env.ELASTICSEARCH_URL ? process.env.ELASTICSEARCH_URL.split(",") : ["http://@es-master-0:9200",
    "http://@es-master-1:9200", "http://es-master-2:9200"];
const dataServiceUrl = process.env.DATA_SERVICE_URL || 'http://data-service.services:3000';

console.log('[ DRUID_METRICS_INFO ] Druid url : ', indiaUrl);
console.log('[ DRUID_METRICS_INFO ] Elastic search url : ', esURL);
console.log('[ DRUID_METRICS_INFO ] Data service url : ', dataServiceUrl);

const {Client} = require('@elastic/elasticsearch');
const esClient = new Client({node: esURL});

let sendData = function (metric, tags, value) {
    if (Object.keys(tags).length === 0) {
        return;
    }
    if (process.env.NODE_ENV === "deployment") {
        let metricData = {
            "@timestamp": (new Date()).toISOString(),
{'fraction_non_alphanumeric': 0.17615042058386937, 'fraction_numerical': 0.03661553686293914, 'mean_word_length': 4.679775280898877, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2089407', 'n_tokens_mistral': 745, 'n_tokens_neox': 716, 'n_words': 122}