@saidsef/tracing-node 3.13.0 → 3.13.1

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.
Files changed (2) hide show
  1. package/libs/index.mjs +8 -0
  2. package/package.json +1 -1
package/libs/index.mjs CHANGED
@@ -245,6 +245,13 @@ export function setupTracing(options = {}) {
245
245
  // Set peer.service for service graph visualization - CRITICAL for Tempo
246
246
  span.setAttribute('peer.service', 'redis');
247
247
  span.setAttribute('db.system', 'redis');
248
+
249
+ // CRITICAL: Ensure span kind is CLIENT for service graph
250
+ span.setAttribute('span.kind', 'CLIENT');
251
+
252
+ // Add network peer attributes (helps Tempo identify the service)
253
+ span.setAttribute('net.peer.name', 'redis');
254
+ span.setAttribute('db.connection_string', 'redis');
248
255
 
249
256
  // Add command details for better observability
250
257
  if (cmdName) {
@@ -265,6 +272,7 @@ export function setupTracing(options = {}) {
265
272
  responseHook: (span, cmdName, cmdArgs, response) => {
266
273
  // Ensure peer.service persists through response
267
274
  span.setAttribute('peer.service', 'redis');
275
+ span.setAttribute('db.system', 'redis');
268
276
 
269
277
  // Add command details for better observability
270
278
  if (cmdName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saidsef/tracing-node",
3
- "version": "3.13.0",
3
+ "version": "3.13.1",
4
4
  "description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
5
5
  "main": "libs/index.mjs",
6
6
  "scripts": {