@comprehend/telemetry-node 0.2.2 → 0.2.3

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.
@@ -174,9 +174,9 @@ class ComprehendDevSpanProcessor {
174
174
  : {
175
175
  scrubbed: '',
176
176
  user: undefined,
177
- host: (attrs['net.peer.name'] ?? attrs['net.peer.ip']),
178
- port: attrs['net.peer.port']?.toString(),
179
- name: attrs['db.name'],
177
+ host: (attrs['server.address'] ?? attrs['net.peer.name'] ?? attrs['net.peer.ip']),
178
+ port: (attrs['server.port'] ?? attrs['net.peer.port'])?.toString(),
179
+ name: (attrs['db.namespace'] ?? attrs['db.name']),
180
180
  };
181
181
  const hash = hashIdString(`database:${system}:${parsed.host ?? ''}:${parsed.port ?? ''}:${parsed.name ?? ''}`);
182
182
  let observedDatabase = this.observedDatabases.find(db => db.hash === hash);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comprehend/telemetry-node",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Integration of comprehend.dev with OpenTelemetry in Node.js and similar environemnts.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -257,9 +257,9 @@ export class ComprehendDevSpanProcessor implements SpanProcessor {
257
257
  : {
258
258
  scrubbed: '',
259
259
  user: undefined,
260
- host: (attrs['net.peer.name'] ?? attrs['net.peer.ip']) as string | undefined,
261
- port: (attrs['net.peer.port'] as number | undefined)?.toString(),
262
- name: attrs['db.name'] as string | undefined,
260
+ host: (attrs['server.address'] ?? attrs['net.peer.name'] ?? attrs['net.peer.ip']) as string | undefined,
261
+ port: (attrs['server.port'] ?? attrs['net.peer.port'] as number | undefined)?.toString(),
262
+ name: (attrs['db.namespace'] ?? attrs['db.name']) as string | undefined,
263
263
  };
264
264
 
265
265
  const hash = hashIdString(`database:${system}:${parsed.host ?? ''}:${parsed.port ?? ''}:${parsed.name ?? ''}`);