Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
asasvari committed Jul 14, 2024
1 parent 33e35c2 commit 102328b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-api/src/opentelemetry/attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _clean_attribute(
cleaned_seq.append(element)

# Freeze mutable sequences defensively
return tuple(cleaned_seq) # type: ignore
return tuple(cleaned_seq)

_logger.warning(
"Invalid type %s for attribute '%s' value. Expected one of %s or a "
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ def create(

if not resource.attributes.get(SERVICE_NAME, None):
default_service_name = "unknown_service"
process_executable_name = resource.attributes.get(
process_executable_name: Optional[str] = resource.attributes.get(
PROCESS_EXECUTABLE_NAME, None
)
if process_executable_name:
default_service_name += ":" + str(process_executable_name)
default_service_name += ":" + process_executable_name
resource = resource.merge(
Resource({SERVICE_NAME: default_service_name}, schema_url)
)
Expand Down

0 comments on commit 102328b

Please sign in to comment.