Agent Integration
Background
ShardingSphere-Agent is an independent and independently designed project based on ByteBuddy bytecode increase. Based on plugin design, it can integrate seamlessly with ShardingSphere. There are currently Log, metrics, APM and other observability capabilities available.
Usage
Local build
> cd shardingsphere/shardingsphere-agent
> mvn clean install
Remote download(No release)
> weget http://xxxxx/shardingsphere-agent.tar.gz
> tar -zxvcf shardingsphere-agent.tar.gz
Add startup arguments
-javaagent:\absolute path\shardingsphere-agent.jar
Agent Configuration
It is found under the local package directory and unzip directory : agent.yaml
applicationName: shardingsphere-agent # application name
ignoredPluginNames: # A collection of ignored plugins, indicating that the plugins in the collection are not active
- Opentracing
- Jaeger
- Zipkin
- Prometheus
- OpenTelemetry
- Logging
plugins:
Prometheus:
host: "localhost" #prometheus host
port: 9090 #prometheus port
props:
JVM_INFORMATION_COLLECTOR_ENABLED : "true"
Jaeger:
host: "localhost" #jaeger host
port: 5775 #jaeger prot
props:
SERVICE_NAME: "shardingsphere-agent"
JAEGER_SAMPLER_TYPE: "const"
JAEGER_SAMPLER_PARAM: "1"
JAEGER_REPORTER_LOG_SPANS: "true"
JAEGER_REPORTER_FLUSH_INTERVAL: "1"
Zipkin:
host: "localhost" #zipkin host
port: 9411 #zipkin prot
props:
SERVICE_NAME: "shardingsphere-agent"
URL_VERSION: "/api/v2/spans" #zipkin uri
Opentracing:
props:
OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer"
OpenTelemetry:
props:
otel.resource.attributes: "service.name=shardingsphere-agent" #Resource information of opentelemetry, multiple configurations can be separated by ','
otel.traces.exporter: "zipkin" #the exporter of traces
Logging:
props:
LEVEL: "INFO" #log level
When ignoredPluginNames is configured, plugins in the collection are ignored!
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .