Class DefaultEndpointLocator
java.lang.Object
org.springframework.cloud.sleuth.zipkin2.DefaultEndpointLocator
- All Implemented Interfaces:
EventListener,EndpointLocator,org.springframework.context.ApplicationListener<org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent>
public class DefaultEndpointLocator
extends Object
implements EndpointLocator, org.springframework.context.ApplicationListener<org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent>
EndpointLocator implementation that. serviceName - from
ServerProperties or Registration ip - from
ServerProperties port - from lazily assigned port or
ServerProperties
You can override the name using ZipkinProperties.Service.setName(String)- Since:
- 3.0.0
- Author:
- Dave Syer
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEndpointLocator(org.springframework.cloud.client.serviceregistry.Registration registration, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, org.springframework.core.env.Environment environment, ZipkinProperties zipkinProperties, org.springframework.cloud.commons.util.InetUtils inetUtils) -
Method Summary
Modifier and TypeMethodDescriptionzipkin2.Endpointlocal()voidonApplicationEvent(org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent event)
-
Constructor Details
-
DefaultEndpointLocator
public DefaultEndpointLocator(org.springframework.cloud.client.serviceregistry.Registration registration, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, org.springframework.core.env.Environment environment, ZipkinProperties zipkinProperties, org.springframework.cloud.commons.util.InetUtils inetUtils)
-
-
Method Details
-
local
public zipkin2.Endpoint local()- Specified by:
localin interfaceEndpointLocator
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent>
-