Class OutputStreamSnippetInjectionHelper

java.lang.Object
io.opentelemetry.javaagent.instrumentation.servlet.snippet.OutputStreamSnippetInjectionHelper

public class OutputStreamSnippetInjectionHelper extends Object
  • Constructor Details

    • OutputStreamSnippetInjectionHelper

      public OutputStreamSnippetInjectionHelper(Supplier<String> snippetSupplier)
  • Method Details

    • getSnippet

      public String getSnippet()
    • handleWrite

      public boolean handleWrite(io.opentelemetry.javaagent.bootstrap.servlet.InjectionState state, OutputStream out, byte[] original, int off, int length) throws IOException
      return true means this method performed the injection, return false means it didn't inject anything Servlet3OutputStreamWriteAdvice would skip the write method when the return value is true, and would write the original bytes when the return value is false.
      Throws:
      IOException
    • handleWrite

      public boolean handleWrite(io.opentelemetry.javaagent.bootstrap.servlet.InjectionState state, OutputStream out, int b) throws IOException
      Throws:
      IOException