shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Refactor the agent configuration file

Open jiangML opened this issue 2 years ago • 1 comments

Feature Request

Is your feature request related to a problem?

no

Describe the feature you would like.

  1. The agent configuration file does not correspond to the module structure.
  2. 'ignoredPluginNames' is difficult for users to understand.

Current agent.yml

applicationName: shardingsphere
ignoredPluginNames:
  - Jaeger
  - OpenTracing
  - Zipkin
  - OpenTelemetry
  - Logging
  - Prometheus

plugins:
  Prometheus:
    host:  "localhost"
    port: 9090
    props:
      JVM_INFORMATION_COLLECTOR_ENABLED : "true"
  Jaeger:
    host: "localhost"
    port: 5775
    props:
      SERVICE_NAME: "shardingsphere"
      JAEGER_SAMPLER_TYPE: "const"
      JAEGER_SAMPLER_PARAM: "1"
  Zipkin:
    host: "localhost"
    port: 9411
    props:
      SERVICE_NAME: "shardingsphere"
      URL_VERSION: "/api/v2/spans"
      SAMPLER_TYPE: "const"
      SAMPLER_PARAM: "1"
  OpenTracing:
    props:
      OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer"
  OpenTelemetry:
    props:
      otel.resource.attributes: "service.name=shardingsphere"
      otel.traces.exporter: "zipkin"
  Logging:
    props:
      LEVEL: "INFO"

Expected agent.yml

plugins:
    Logging:
      BaseLogging:
        props:
          xxx-xxx: xxx
    Metrics:
      Prometheus:
        host: "0.0.0.0"
        port: 9090
        props:
          xxx: xxx
    Tracing:
      Jaeger:
        host: "0.0.0.0"
        port: 5775
        props:
          xxx-xxx: xxx
      Zipkin:
        host: "0.0.0.0"
        port: 9411
        props:
          xxx-xxx: xxx
      OpenTracing:
        props:
          xxx-xxx: xxx
      OpenTelemetry:
        props:
          xxx-xxx: xxx

jiangML avatar Sep 19 '22 09:09 jiangML

Good suggestion.

RaigorJiang avatar Sep 19 '22 09:09 RaigorJiang