Class MethodsConfigurationParser

java.lang.Object
io.opentelemetry.javaagent.tooling.config.internal.MethodsConfigurationParser

public final class MethodsConfigurationParser extends Object
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Method Details

    • parseExcludeMethods

      public static Map<String, Set<String>> parseExcludeMethods(io.opentelemetry.api.incubator.config.DeclarativeConfigProperties config)
      Parse exclude methods configuration from declarative config.

      First tries structured declarative config (YAML format), then falls back to old string/list property format for backward compatibility.

      Example YAML structure:

      exclude_methods:
        - class: com.example.MyClass
          methods: [method1, method2]
        - class: com.example.AnotherClass
          methods: [someMethod]
      
    • parse

      public static Map<String, Set<String>> parse(String configString)
      This method takes a string in a form of "io.package.ClassName[method1,method2];my.example[someMethodName];" and returns a map where keys are class names and corresponding value is a set of methods for that class.

      Strings of such format are used e.g. to configure TraceConfigInstrumentation