Skip to content

Commit

Permalink
Apply lint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rydzykje committed Sep 15, 2020
1 parent a215f13 commit aac2612
Showing 1 changed file with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@

logger = logging.getLogger(__name__)


OTEL_ENVS = {
'agent_host': "OTEL_EXPORTER_JAEGER_AGENT_HOST",
'agent_port': "OTEL_EXPORTER_JAEGER_AGENT_PORT",
'collector_endpoint': "OTEL_EXPORTER_JAEGER_ENDPOINT",
'username': "OTEL_EXPORTER_JAEGER_USER",
'password': "OTEL_EXPORTER_JAEGER_PASSWORD"
"agent_host": "OTEL_EXPORTER_JAEGER_AGENT_HOST",
"agent_port": "OTEL_EXPORTER_JAEGER_AGENT_PORT",
"collector_endpoint": "OTEL_EXPORTER_JAEGER_ENDPOINT",
"username": "OTEL_EXPORTER_JAEGER_USER",
"password": "OTEL_EXPORTER_JAEGER_PASSWORD",
}


Expand Down Expand Up @@ -115,11 +114,19 @@ def __init__(
password=None,
):
self.service_name = service_name
self.agent_host_name = os.environ.get(OTEL_ENVS["agent_host"]) or agent_host_name
self.agent_port = int(os.environ.get(OTEL_ENVS["agent_port"])) \
if os.environ.get(OTEL_ENVS["agent_port"]) else agent_port
self.agent_host_name = (
os.environ.get(OTEL_ENVS["agent_host"]) or agent_host_name
)
self.agent_port = (
int(os.environ.get(OTEL_ENVS["agent_port"]))
if os.environ.get(OTEL_ENVS["agent_port"])
else agent_port
)
self._agent_client = None
self.collector_endpoint = os.environ.get(OTEL_ENVS["collector_endpoint"]) or collector_endpoint
self.collector_endpoint = (
os.environ.get(OTEL_ENVS["collector_endpoint"])
or collector_endpoint
)
self.username = os.environ.get(OTEL_ENVS["username"]) or username
self.password = os.environ.get(OTEL_ENVS["password"]) or password
self._collector = None
Expand Down Expand Up @@ -341,11 +348,11 @@ class AgentClientUDP:
"""

def __init__(
self,
host_name,
port,
max_packet_size=UDP_PACKET_MAX_LENGTH,
client=agent.Client,
self,
host_name,
port,
max_packet_size=UDP_PACKET_MAX_LENGTH,
client=agent.Client,
):
self.address = (host_name, port)
self.max_packet_size = max_packet_size
Expand Down

0 comments on commit aac2612

Please sign in to comment.