Class McpTelemetryFilter

java.lang.Object
org.nasdanika.ai.mcp.McpTelemetryFilter

public class McpTelemetryFilter extends Object
Filters (wraps) Mcp features for collecting telemetry
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected io.opentelemetry.api.trace.Tracer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    McpTelemetryFilter(io.opentelemetry.api.trace.Tracer tracer, BiConsumer<String,Long> durationConsumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification asyncPromptSpecification)
     
    io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification asyncResourceSpecification)
     
    io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification asyncToolSpecification)
     
    io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification syncPromptSpecification)
     
    io.modelcontextprotocol.server.McpServerFeatures.SyncResourceSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.SyncResourceSpecification syncResourceSpecification)
     
    io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification
    filter(io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification syncToolSpecification)
     

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification syncToolSpecification)
    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification asyncToolSpecification)
    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.SyncResourceSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.SyncResourceSpecification syncResourceSpecification)
    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification asyncResourceSpecification)
    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification syncPromptSpecification)
    • filter

      public io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification filter(io.modelcontextprotocol.server.McpServerFeatures.AsyncPromptSpecification asyncPromptSpecification)