Annotation Type TraceLambda


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface TraceLambda
    If you annotate a class with the TraceLambda annotation the New Relic agent will automatically annotate matched methods within the class with a Trace annotation. The TraceLambda annotation uses a regex pattern to match against method names. By default the TraceLambda annotation regex pattern matches Java and Scala lambda method names. The default regex pattern includes a named group called name that is used as the trace metric name. By default the TraceLambda annotation does not include non-static methods.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean includeNonstatic
      Tells the agent to try matching the marked classes non-static methods against the pattern.
      java.lang.String pattern
      Tells the agent the pattern to try matching against the marked classes method names.
    • Element Detail

      • pattern

        java.lang.String pattern
        Tells the agent the pattern to try matching against the marked classes method names.
        Returns:
        The pattern.
        Default:
        ""
      • includeNonstatic

        boolean includeNonstatic
        Tells the agent to try matching the marked classes non-static methods against the pattern.
        Returns:
        true if non-static methods are to be included for matching
        Default:
        false