Skip to content

Commit 970c9f8

Browse files
fix: use 3 package components for tracer instrumentation scope (TODO-39)
Changed detect_packages_from_source() from min(2, len) to min(3, len) so com.aerospike.client.util produces prefix com.aerospike.client instead of com.aerospike. This reduces instrumentation to the actual source package instead of the entire organization namespace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1292144 commit 970c9f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codeflash/languages/java/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def detect_packages_from_source(module_root: Path) -> list[str]:
165165
if stripped.startswith("package "):
166166
pkg = stripped[8:].rstrip(";").strip()
167167
parts = pkg.split(".")
168-
prefix = ".".join(parts[: min(2, len(parts))])
168+
prefix = ".".join(parts[: min(3, len(parts))])
169169
packages.add(prefix)
170170
break
171171
if stripped and not stripped.startswith("//"):

0 commit comments

Comments
 (0)