Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15964

OpenTelemetry ratio-based sampler should not accept value bigger than 1.0

XMLWordPrintable

      Based on https://github.com/wildfly/wildfly/blob/26.0.1.Final/observability/opentelemetry/src/main/resources/schema/wildfly-opentelemetry_1_0.xsd#L131-L134, OpenTelemetry ratio-based sampler should not accept value bigger than 1.0

      [standalone@localhost:9990 /] /extension=org.wildfly.extension.opentelemetry:add()
      {"outcome" => "success"}
      [standalone@localhost:9990 /] /subsystem=opentelemetry:add(exporter-type=jaeger, endpoint="http://localhost:14250", span-processor-type=simple, batch-delay="4500", max-queue-size="128", max-export-batch-size="512", export-timeout="4500", sampler-type="on", ratio=1.5)
      {
          "outcome" => "success",
          "response-headers" => {
              "operation-requires-reload" => true,
              "process-state" => "reload-required"
          }
      }
      

      As a result, the ratio value 1.5 is written to subsystem configuration without an error.

              <subsystem xmlns="urn:wildfly:opentelemetry:1.0">
                  <exporter type="jaeger" endpoint="http://localhost:14250"/>
                  <span-processor type="simple" batch-delay="4500" max-queue-size="128" max-export-batch-size="512" export-timeout="4500"/>
                  <sampler type="on" ratio="1.5"/>
              </subsystem>
      

      The problem came from a wrong type used at https://github.com/wildfly/wildfly/blob/26.0.1.Final/observability/opentelemetry/src/main/java/org/wildfly/extension/opentelemetry/OpenTelemetrySubsystemDefinition.java#L149

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: