6464from json import dumps
6565from os import environ
6666from types import ModuleType
67- from typing import List , Optional
67+ from typing import List , Optional , Sequence , Union
6868from urllib import parse
6969
7070from opentelemetry .attributes import BoundedAttributes
@@ -211,11 +211,11 @@ def create(
211211
212212 if not resource .attributes .get (SERVICE_NAME , None ):
213213 default_service_name = "unknown_service"
214- process_executable_name : Optional [str ] = resource .attributes .get (
214+ process_executable_name : Optional [Union [ int , float , Sequence [ str ], Sequence [ int ], Sequence [ float ] ] ] = resource .attributes .get (
215215 PROCESS_EXECUTABLE_NAME , None
216216 )
217217 if process_executable_name :
218- default_service_name += ":" + process_executable_name
218+ default_service_name += ":" + str ( process_executable_name )
219219 resource = resource .merge (
220220 Resource ({SERVICE_NAME : default_service_name }, schema_url )
221221 )
@@ -250,8 +250,8 @@ def merge(self, other: "Resource") -> "Resource":
250250 Returns:
251251 The newly-created Resource.
252252 """
253- merged_attributes = self .attributes .copy ()
254- merged_attributes .update (other .attributes )
253+ merged_attributes = self .attributes .copy () # type: ignore
254+ merged_attributes .update (other .attributes ) # type: ignore
255255
256256 if self .schema_url == "" :
257257 schema_url = other .schema_url
@@ -266,7 +266,7 @@ def merge(self, other: "Resource") -> "Resource":
266266 other .schema_url ,
267267 )
268268 return self
269- return Resource (merged_attributes , schema_url )
269+ return Resource (merged_attributes , schema_url ) # type: ignore
270270
271271 def __eq__ (self , other : object ) -> bool :
272272 if not isinstance (other , Resource ):
0 commit comments