Update __init__.py (#537)

This commit is contained in:
kamalhussain
2021-06-09 11:20:06 -05:00
committed by GitHub
parent 9695bcfed3
commit e347fa7541

View File

@ -118,7 +118,7 @@ def collect_request_attributes(environ):
}
host_port = environ.get("SERVER_PORT")
if host_port is not None:
if host_port is not None and not host_port == "":
result.update({SpanAttributes.NET_HOST_PORT: int(host_port)})
setifnotnone(result, SpanAttributes.HTTP_HOST, environ.get("HTTP_HOST"))