infront-logger 1.1.23 → 1.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2714,7 +2714,7 @@ function redact$3(value, seen = /* @__PURE__ */ new WeakSet()) {
2714
2714
  const transportCache = /* @__PURE__ */ new Map();
2715
2715
  class CoralogixTransport extends Transport {
2716
2716
  static getOrCreate(opts = {}) {
2717
- const key = `${opts.applicationName}|${opts.subsystemName}|${opts.apiKey}|${opts.domain || "us2.coralogix.com"}`;
2717
+ const key = `${opts.applicationName}|${opts.subsystemName}|${opts.apiKey}|${opts.domain || "us2.coralogix.com"}|${JSON.stringify(opts.labels || {})}`;
2718
2718
  let instance = transportCache.get(key);
2719
2719
  if (!instance) {
2720
2720
  instance = new CoralogixTransport(opts);
@@ -2727,6 +2727,7 @@ class CoralogixTransport extends Transport {
2727
2727
  this.applicationName = opts.applicationName;
2728
2728
  this.subsystemName = opts.subsystemName;
2729
2729
  this.apiKey = opts.apiKey;
2730
+ this.labels = opts.labels || {};
2730
2731
  this.cxDomain = opts.domain || "us2.coralogix.com";
2731
2732
  this.host = `ingress.${this.cxDomain}`;
2732
2733
  this.path = opts.path || "/logs/v1/bulk";
@@ -2745,7 +2746,7 @@ class CoralogixTransport extends Transport {
2745
2746
  this.queue.push({
2746
2747
  severity: SEVERITY[info.level] || SEVERITY.info,
2747
2748
  timestamp: Date.now(),
2748
- text: JSON.stringify(sanitized)
2749
+ text: JSON.stringify({ ...sanitized, ...this.labels })
2749
2750
  });
2750
2751
  if (this.queue.length >= this.batchCount) this.flush();
2751
2752
  } catch (err) {
package/dist/index.umd.js CHANGED
@@ -2715,7 +2715,7 @@
2715
2715
  const transportCache = /* @__PURE__ */ new Map();
2716
2716
  class CoralogixTransport extends Transport {
2717
2717
  static getOrCreate(opts = {}) {
2718
- const key = `${opts.applicationName}|${opts.subsystemName}|${opts.apiKey}|${opts.domain || "us2.coralogix.com"}`;
2718
+ const key = `${opts.applicationName}|${opts.subsystemName}|${opts.apiKey}|${opts.domain || "us2.coralogix.com"}|${JSON.stringify(opts.labels || {})}`;
2719
2719
  let instance = transportCache.get(key);
2720
2720
  if (!instance) {
2721
2721
  instance = new CoralogixTransport(opts);
@@ -2728,6 +2728,7 @@
2728
2728
  this.applicationName = opts.applicationName;
2729
2729
  this.subsystemName = opts.subsystemName;
2730
2730
  this.apiKey = opts.apiKey;
2731
+ this.labels = opts.labels || {};
2731
2732
  this.cxDomain = opts.domain || "us2.coralogix.com";
2732
2733
  this.host = `ingress.${this.cxDomain}`;
2733
2734
  this.path = opts.path || "/logs/v1/bulk";
@@ -2746,7 +2747,7 @@
2746
2747
  this.queue.push({
2747
2748
  severity: SEVERITY[info.level] || SEVERITY.info,
2748
2749
  timestamp: Date.now(),
2749
- text: JSON.stringify(sanitized)
2750
+ text: JSON.stringify({ ...sanitized, ...this.labels })
2750
2751
  });
2751
2752
  if (this.queue.length >= this.batchCount) this.flush();
2752
2753
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infront-logger",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist"