openzipkin / zipkin-reporter-java

Shared library for reporting zipkin spans on transports such as http or kafka
Apache License 2.0
126 stars 70 forks source link

Adds HttpEndpointSupplier to allow generic discovery of HTTP endpoints #249

Closed codefromthecrypt closed 9 months ago

codefromthecrypt commented 9 months ago

Before, users could only use spring-cloud-sleuth to integrate HTTP senders with dynamic endpoint suppliers such as consul, eureka or zookeeper. Since sleuth is discontinued, this adds a lightweight generic functionality via a new type HttpEndpointSupplier which can do the same sort of translation as sleuth did (e.g. substituting a placeholder URI for a real one).

This will allow those upgrading to Spring Boot 3 to continue using service discovery such as Eureka. As an additional benefit, it also allows the non-spring ecosystem the same.

There is no current plan to introduce Eureka or any other built-in endpoint discovery mechanics to this repo. However, tests will prove they can be integrated, and the types will be validated in config scenarios including Spring Boot and raw Armeria prior to merge. If users request specific discovery providers, they can raise issues and demand for them.

codefromthecrypt commented 9 months ago

TODO: actually integrate

codefromthecrypt commented 9 months ago

ok done except 3rd-party integration tests which I'll report back in brave-example.

codefromthecrypt commented 9 months ago

thanks for the review @reta! since jitpack doesn't work anymore, I'm going to merge and address anything else post-commit. This significantly reduces work for integration because for example, to try this in micrometer requires their snapshots, too!

codefromthecrypt commented 9 months ago

Thanks for the review @anuraaga #251 for follow-up