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 #
Name | Description | Value range | Default value |
---|---|---|---|
jvm-information-collector-enabled | Start JVM collector | true, false | true |
service-name | Tracking service name | Custom | dbplusengine |
jaeger-sampler-type | Jaeger sample rate type | const, probabilistic, ratelimiting, remote | const |
jaeger-sampler-param | Jaeger sample rate parameter | const: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_PORT | 1 (const type) |
url-version | Zipkin url address | Custom | /api/v2/spans |
sampler-type | Zipkin sample rate type | const、counting、ratelimiting、boundary | const |
sampler-param | Zipkin sampling rate parameter | const: 0, 1, counting:0.01 - 1.0, ratelimiting: > 0, customize the number of collections per second, boundary: 0.0001 - 1.0 | 1 (const type) |
otel-resource-attributes | opentelemetry properties | String key value pair (, split) | service.name=dbplusengine-agent |
otel-traces-exporter | Tracing expoter | zipkin, jaeger | zipkin |
otel-traces-sampler | Opentelemetry sample rate type | always_on, always_off, traceidratio | always_on |
otel-traces-sampler-arg | Opentelemetry sample rate parameter | traceidratio:0.0 - 1.0 | 1.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.