@blaxel/telemetry 0.2.2-dev.56 → 0.2.2-dev.58

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.
@@ -39,8 +39,10 @@ const spanIdName = core_1.env.BL_LOGGER_SPAN_ID || 'span_id';
39
39
  const labelsName = core_1.env.BL_LOGGER_LABELS || 'labels';
40
40
  const traceIdPrefix = core_1.env.BL_LOGGER_TRACE_ID_PREFIX || '';
41
41
  const spanIdPrefix = core_1.env.BL_LOGGER_SPAN_ID_PREFIX || '';
42
- const taskIndex = core_1.env.BL_EXECUTION_INDEX_KEY || 'TASK_INDEX';
42
+ const taskIndex = core_1.env.BL_TASK_KEY || 'TASK_INDEX';
43
+ const taskPrefix = core_1.env.BL_TASK_PREFIX || '';
43
44
  const executionKey = core_1.env.BL_EXECUTION_KEY || 'BL_EXECUTION_ID';
45
+ const executionPrefix = core_1.env.BL_EXECUTION_PREFIX || '';
44
46
  // Format a log message with appropriate color and prefix
45
47
  function formatLogMessage(severity, message, args) {
46
48
  const messageStr = typeof message === "string" ? message : (0, core_1.stringify)(message, 2);
@@ -59,11 +61,11 @@ function formatLogMessage(severity, message, args) {
59
61
  }
60
62
  const taskId = core_1.env[taskIndex] || null;
61
63
  if (taskId) {
62
- logEntry[labelsName]['blaxel-task'] = taskId;
64
+ logEntry[labelsName]['blaxel-task'] = `${taskPrefix}${taskId}`;
63
65
  }
64
66
  const executionId = core_1.env[executionKey] || null;
65
67
  if (executionId) {
66
- logEntry[labelsName]['blaxel-execution'] = executionId.split('-').pop();
68
+ logEntry[labelsName]['blaxel-execution'] = `${executionPrefix}${executionId.split('-').pop()}`;
67
69
  }
68
70
  return JSON.stringify(logEntry);
69
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/telemetry",
3
- "version": "0.2.2-dev.56",
3
+ "version": "0.2.2-dev.58",
4
4
  "description": "Blaxel SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",
@@ -71,7 +71,7 @@
71
71
  "@opentelemetry/sdk-trace-base": "^2.0.0",
72
72
  "@opentelemetry/sdk-trace-node": "^2.0.0",
73
73
  "ai": "^4.3.13",
74
- "@blaxel/core": "0.2.2-dev.56"
74
+ "@blaxel/core": "0.2.2-dev.58"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@eslint/js": "^9.26.0",