Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: align process command arguments to spec defenition #4032

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def detect(self) -> "Resource":
_process_executable_path = os.path.dirname(_process_executable_name)
_process_command = sys.argv[0]
_process_command_line = " ".join(sys.argv)
_process_command_args = sys.argv[1:]
_process_command_args = sys.argv
resource_info = {
PROCESS_RUNTIME_DESCRIPTION: sys.version,
PROCESS_RUNTIME_NAME: sys.implementation.name,
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def test_process_detector(self):
)
self.assertEqual(
aggregated_resource.attributes[PROCESS_COMMAND_ARGS],
tuple(sys.argv[1:]),
tuple(sys.argv),
)

def test_resource_detector_entry_points_default(self):
Expand Down