Logo
Observability

Observability #

The SphereEx-DBPlusEngine has a built-in observability plugin SphereEx-Agent, which provides users with functions such as extended logs, monitoring indicators, and link tracking.

Agent Configuration #

Directory structure #

Agent related files are located in the sphereex-dbplusengine-proxy/sphereex-agent directory.

.
├── conf
│   └── agent.yaml
├── lib
│   ├── ...
├── plugins
│   ├── ...
├── template
│   └── dbplusengine-grafana-template.json
└── tool
    └── ...

Configuration Description #

  • conf/agent.yaml is used to manage Agent configuration.
  • Built-in plugins include Jaeger, OpenTracing, Zipkin, OpenTelemetry, BaseLogging and Prometheus.
  • The BaseLogging plug-in is enabled by default, and the slow log query function is enabled.

agent.yaml the default configuration contents are as follows:

plugins:
  logging:
    BaseLogging:
      props:
        slow-query-log: true
        long-query-time: 5000
        general-query-log: false
#  metrics:
#    Prometheus:
#      host: "0.0.0.0"
#      port: 9090
#      props:
#        jvm-information-collector-enabled: "true"
#  tracing:
#    Jaeger:
#      host: "localhost"
#      port: 5775
#      props:
#        service-name: "dbplusengine"
#        jaeger-sampler-type: "const"
#        jaeger-sampler-param: "1"
#    Zipkin:
#      host: "localhost"
#      port: 9411
#      props:
#        service-name: "dbplusengine"
#        url-version: "/api/v2/spans"
#        sampler-type: "const"
#        sampler-param: "1"
#    SkyWalking:
#      props:
#        opentracing-tracer-class-name: "org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer"
#    OpenTelemetry:
#      props:
#        otel-resource-attributes: "service.name=dbplusengine"
#        otel-traces-exporter: "zipkin"

Parameter Description #

NameDescriptionValue rangeDefault value
jvm-information-collector-enabledStart JVM collectortrue, falsetrue
service-nameTracking service nameCustomdbplusengine
jaeger-sampler-typeJaeger sample rate typeconst, probabilistic, ratelimiting, remoteconst
jaeger-sampler-paramJaeger sample rate parameterconst:0, 1, probabilistic:0.0 - 1.0, ratelimiting: > 0, Customize the number of acquisitions per second, remote:need to customize the remote service addres,JAEGER_SAMPLER_MANAGER_HOST_PORT1 (const type)
url-versionZipkin url addressCustom/api/v2/spans
sampler-typeZipkin sample rate typeconst、counting、ratelimiting、boundaryconst
sampler-paramZipkin sampling rate parameterconst: 0, 1, counting:0.01 - 1.0, ratelimiting: > 0, customize the number of collections per second, boundary: 0.0001 - 1.01 (const type)
otel-resource-attributesopentelemetry propertiesString key value pair (, split)service.name=dbplusengine-agent
otel-traces-exporterTracing expoterzipkin, jaegerzipkin
otel-traces-samplerOpentelemetry sample rate typealways_on, always_off, traceidratioalways_on
otel-traces-sampler-argOpentelemetry sample rate parametertraceidratio:0.0 - 1.01.0

Used in DBPlusEngine-Proxy #

In the sphereex-dbplusengine-proxy/bin/ directory, two startup scripts are provided for users:

  • start.sh
  • start-with-agent.sh

When the user needs the Agent function, execute start-with-agent.sh to start DBPlusEngine-Proxy.

bin/start-with-agent.sh

After successful startup, you can find the loading information of the plugin in the DBPlusEngine-Proxy log.

If the ‘metrics’ or ‘tracing’ configuration is enabled, relevant data can be viewed through the configured monitoring address after accessing the proxy.