Use Agent

Build

Local Build

  1. > cd shardingsphere/shardingsphere-agent
  2. > mvn clean install

Download(Not Released Yet)

  1. > weget http://xxxxx/shardingsphere-agent.tar.gz
  2. > tar -zxvcf shardingsphere-agent.tar.gz

Configuration

Found agent.yaml file:

  1. applicationName: shardingsphere-agent
  2. ignoredPluginNames: # A collection of ignored plugins
  3. - Opentracing
  4. - Jaeger
  5. - Zipkin
  6. - Prometheus
  7. - OpenTelemetry
  8. - Logging
  9. plugins:
  10. Prometheus:
  11. host: "localhost"
  12. port: 9090
  13. props:
  14. JVM_INFORMATION_COLLECTOR_ENABLED : "true"
  15. Jaeger:
  16. host: "localhost"
  17. port: 5775
  18. props:
  19. SERVICE_NAME: "shardingsphere-agent"
  20. JAEGER_SAMPLER_TYPE: "const"
  21. JAEGER_SAMPLER_PARAM: "1"
  22. JAEGER_REPORTER_LOG_SPANS: "true"
  23. JAEGER_REPORTER_FLUSH_INTERVAL: "1"
  24. Zipkin:
  25. host: "localhost"
  26. port: 9411
  27. props:
  28. SERVICE_NAME: "shardingsphere-agent"
  29. URL_VERSION: "/api/v2/spans"
  30. Opentracing:
  31. props:
  32. OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer"
  33. OpenTelemetry:
  34. props:
  35. otel.resource.attributes: "service.name=shardingsphere-agent" # Multiple configurations can be split by ','
  36. otel.traces.exporter: "zipkin"
  37. Logging:
  38. props:
  39. LEVEL: "INFO"

Startup

Add arguments in startup script.

  1. -javaagent:\absolute path\shardingsphere-agent.jar