@tryghost/metrics 1.0.4 → 1.0.5

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.
@@ -13,7 +13,7 @@ try {
13
13
  class GhostMetrics {
14
14
  /**
15
15
  * Properties in the options bag:
16
- *
16
+ *
17
17
  * domain: Metadata for metrics in shared databases.
18
18
  * mode: Is used to print short or long log - used for stdout shipper.
19
19
  * metrics.transports: An array of transports for metric shipping (e.g. ['stdout', 'elasticsearch'])
@@ -97,7 +97,10 @@ class GhostMetrics {
97
97
  value = {value};
98
98
  }
99
99
 
100
- value['@timestamp'] = Date.now();
100
+ if (!('@timestamp' in value)) {
101
+ value['@timestamp'] = Date.now();
102
+ }
103
+
101
104
  if (this.metadata) {
102
105
  value.metadata = this.metadata;
103
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/metrics",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "repository": "https://github.com/TryGhost/framework/tree/main/packages/metrics",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -34,5 +34,5 @@
34
34
  "optionalDependencies": {
35
35
  "promise.allsettled": "^1.0.5"
36
36
  },
37
- "gitHead": "45777c4b5a010293f529f88aea19a81a896ba266"
37
+ "gitHead": "6886d270eb4d959245657c0b4c593e7b1b8000eb"
38
38
  }