Package codes.grow.packages.skywalking
Class SkyWalkingClient.Builder
java.lang.Object
codes.grow.packages.skywalking.SkyWalkingClient.Builder
- Enclosing class:
SkyWalkingClient
Builder that configures and creates a client in one chain.
-
Method Summary
Modifier and TypeMethodDescriptionauthentication(Secret token) Sets the OAP gRPC token.authentication(String token) Sets the OAP gRPC token.build()Builds the configuration and the client.Sets the connect timeout.Fills unset fields from an environment reader.graphqlPath(String path) Sets the GraphQL path.Adds a header.Sets hooks.Sets the logger.otlpEndpoint(String endpoint) Sets the OTLP endpoint.otlpHeader(String name, String value) Adds an OTLP exporter header.otlpProtocol(OtlpProtocol protocol) Sets the OTLP protocol.Sets the proxy URL.Sets the per-attempt timeout.retry(RetryPolicy retry) Sets the retry policy.tls(TlsOptions tls) Sets the TLS options.Sets the total timeout.traceBackend(TraceBackend backend) Sets the trace backend.Sets the REST/GraphQL base URL.userAgentSuffix(String suffix) Sets the user agent suffix.Sets the Zipkin query API base.
-
Method Details
-
fromEnv
Fills unset fields from an environment reader.- Parameters:
env- reader, e.g.EnvReader.system()- Returns:
- this builder
-
url
Sets the REST/GraphQL base URL.- Parameters:
url- URL- Returns:
- this builder
-
graphqlPath
Sets the GraphQL path.- Parameters:
path- path- Returns:
- this builder
-
otlpEndpoint
Sets the OTLP endpoint.- Parameters:
endpoint- URL- Returns:
- this builder
-
otlpProtocol
Sets the OTLP protocol.- Parameters:
protocol- protocol- Returns:
- this builder
-
otlpHeader
Adds an OTLP exporter header.- Parameters:
name- namevalue- value- Returns:
- this builder
-
zipkinUrl
Sets the Zipkin query API base.- Parameters:
url- URL- Returns:
- this builder
-
authentication
Sets the OAP gRPC token.- Parameters:
token- token- Returns:
- this builder
-
authentication
Sets the OAP gRPC token.- Parameters:
token- token- Returns:
- this builder
-
traceBackend
Sets the trace backend.- Parameters:
backend- backend- Returns:
- this builder
-
connectTimeout
Sets the connect timeout.- Parameters:
d- duration- Returns:
- this builder
-
requestTimeout
Sets the per-attempt timeout.- Parameters:
d- duration- Returns:
- this builder
-
totalTimeout
Sets the total timeout.- Parameters:
d- duration- Returns:
- this builder
-
retry
Sets the retry policy.- Parameters:
retry- policy- Returns:
- this builder
-
tls
Sets the TLS options.- Parameters:
tls- options- Returns:
- this builder
-
proxy
Sets the proxy URL.- Parameters:
proxy- URL- Returns:
- this builder
-
header
Adds a header.- Parameters:
name- namevalue- value- Returns:
- this builder
-
userAgentSuffix
Sets the user agent suffix.- Parameters:
suffix- suffix- Returns:
- this builder
-
hooks
Sets hooks.- Parameters:
hooks- hooks- Returns:
- this builder
-
logger
Sets the logger.- Parameters:
logger- logger- Returns:
- this builder
-
build
Builds the configuration and the client.- Returns:
- a new client
- Throws:
ConfigException- when the configuration is invalid
-