@atrim/instrument-node 0.7.1-dev.764c183.20260110203528 → 0.7.2-dev.41ebd10.20260110210129

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atrim/instrument-node",
3
- "version": "0.7.1-dev.764c183.20260110203528",
3
+ "version": "0.7.2-dev.41ebd10.20260110210129",
4
4
  "description": "OpenTelemetry instrumentation for Node.js with centralized YAML configuration",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -721,10 +721,15 @@ function findMatchingRule(sourceInfo, config) {
721
721
  return void 0;
722
722
  }
723
723
  function inferSpanName(fiberId, sourceInfo, config) {
724
+ let functionName = sourceInfo?.function || "anonymous";
725
+ const moduleName = sourceInfo?.file ? extractModuleName(sourceInfo.file) : "unknown";
726
+ if (functionName === "anonymous" && sourceInfo?.file && sourceInfo?.line) {
727
+ functionName = `${moduleName}:${sourceInfo.line}`;
728
+ }
724
729
  const variables = {
725
730
  fiber_id: String(fiberId),
726
- function: sourceInfo?.function || "anonymous",
727
- module: sourceInfo?.file ? extractModuleName(sourceInfo.file) : "unknown",
731
+ function: functionName,
732
+ module: moduleName,
728
733
  file: sourceInfo?.file || "unknown",
729
734
  line: sourceInfo?.line ? String(sourceInfo.line) : "0",
730
735
  operator: "gen"