Class AttributeSelectors

java.lang.Object
io.opentelemetry.instrumentation.logback.appender.v1_0.internal.AttributeSelectors

public final class AttributeSelectors extends Object
Factories for the attribute key selectors used by the OpenTelemetry Logback appender.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Summary

    Modifier and Type
    Method
    Description
    create(io.opentelemetry.instrumentation.api.config.IncludeExclude selector)
    Returns a selector that matches the keys selected by selector, or null when selector selects nothing because it is absent or empty.
    createDeprecated(Boolean captureEveryKey)
    Returns a selector with the semantics of a deprecated boolean capture setting, which either matches every key or, when it is absent or false, selects nothing.
    createDeprecated(List<String> capturedKeys)
    Returns a selector with the semantics of the deprecated comma-separated capture list, or null when capturedKeys is empty and therefore selects nothing.
    static List<String>
    split(String value)
    Splits a comma-separated configuration value, dropping blank entries.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      @Nullable public static Predicate<String> create(@Nullable io.opentelemetry.instrumentation.api.config.IncludeExclude selector)
      Returns a selector that matches the keys selected by selector, or null when selector selects nothing because it is absent or empty.

      Keys and selector patterns are matched case-sensitively. ? matches any single character and * matches any number of characters, including none. Excluded patterns take precedence over included patterns, and a selector with only excluded patterns matches every key that it does not exclude.

    • createDeprecated

      @Nullable public static Predicate<String> createDeprecated(@Nullable Boolean captureEveryKey)
      Returns a selector with the semantics of a deprecated boolean capture setting, which either matches every key or, when it is absent or false, selects nothing.
    • createDeprecated

      @Nullable public static Predicate<String> createDeprecated(List<String> capturedKeys)
      Returns a selector with the semantics of the deprecated comma-separated capture list, or null when capturedKeys is empty and therefore selects nothing.

      A list whose only entry is * matches every key. In every other list each entry matches only the key that it equals, including an entry that contains * or ?, because the deprecated setting never supported patterns.

    • split

      public static List<String> split(@Nullable String value)
      Splits a comma-separated configuration value, dropping blank entries.