aws / aws/aws-xray-sdk-java

UDP Emitter should refresh daemon address periodically and should not throw communication errors

Aperta
#33 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Java
Stelle
100
Fork
100
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We have the XRay daemon running in an ECS container with awsvpc network mode and Route53 Auto Naming Service Discovery enabled. The XRay address is set via the AWS_XRAY_DAEMON_ADDRESS system property as fqdn. Due to some shortcomings in the UDPEmitter, this causes some problems.

1. Sometimes the XRay container is not started at the moment the UDPEmitter on the 'to be traced' server is constructed. The java InetAddress could not resolve the hostname and sets a flag 'unknown host'. This flag will never be reset.
2. The IP address of the XRay container could change when it is restarted. The UDPEmitter keeps throwing its data to the first found IP.
3. The communication errors which occurs as result of cause 1, is not catched.

I think it will be easy to implement a polling thread which periodically re-resolves the daemon address and pass the new InetAddress to the UDPEmitter.
And add some try/catch wrappers around the UDPEmitter data transfer methods.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando i punti di ingresso di UDPEmitter e come viene risolto AWS_XRAY_DAEMON_ADDRESS. Riproduci l’avvio con il daemon non disponibile e con un indirizzo del hostname modificato, quindi verifica che la risoluzione venga ritentata, che vengano utilizzati i nuovi indirizzi e che gli errori di comunicazione non escano dall’emitter.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend, networking
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.