Skip to content

Commit d1d97f4

Browse files
asasvarixrmx
andcommitted
Update opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent c81cb51 commit d1d97f4

File tree

1 file changed

+4
-4
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/resources

1 file changed

+4
-4
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def detect(self) -> "Resource":
354354
),
355355
)
356356
)
357-
_process_pid = str(os.getpid())
357+
_process_pid = os.getpid()
358358
_process_executable_name = sys.executable
359359
_process_executable_path = os.path.dirname(_process_executable_name)
360360
_process_command = sys.argv[0]
@@ -369,18 +369,18 @@ def detect(self) -> "Resource":
369369
PROCESS_EXECUTABLE_PATH: _process_executable_path,
370370
PROCESS_COMMAND: _process_command,
371371
PROCESS_COMMAND_LINE: _process_command_line,
372-
PROCESS_COMMAND_ARGS: "".join(_process_command_args),
372+
PROCESS_COMMAND_ARGS: _process_command_args,
373373
}
374374
if hasattr(os, "getppid"):
375375
# pypy3 does not have getppid()
376-
resource_info[PROCESS_PARENT_PID] = str(os.getppid())
376+
resource_info[PROCESS_PARENT_PID] = os.getppid()
377377

378378
if psutil is not None:
379379
process: pustil_module.Process = psutil.Process()
380380
username = process.username()
381381
resource_info[PROCESS_OWNER] = username
382382

383-
return Resource(resource_info)
383+
return Resource(resource_info) # type: ignore
384384

385385

386386
def get_aggregated_resources(

0 commit comments

Comments
 (0)