Skip to content

Instantly share code, notes, and snippets.

@xeioex
Created January 16, 2026 05:39
Show Gist options
  • Select an option

  • Save xeioex/619fcbd387b0d1858ec533088aec0b28 to your computer and use it in GitHub Desktop.

Select an option

Save xeioex/619fcbd387b0d1858ec533088aec0b28 to your computer and use it in GitHub Desktop.
load_module /home/xeioex/workspace/nginx/nginx/objs/ngx_otel_module.so;
error_log /dev/stdout info;
daemon off;
master_process off;
events {
}
http {
js_engine qjs;
js_context_reuse 0;
js_import main from mcp.js;
js_set $mcp_tool main.mcp_tool_name;
js_set $mcp_status main.mcp_tool_status;
otel_exporter {
endpoint localhost:4317;
}
server {
listen 9000;
location / {
otel_trace on;
otel_span_attr "mcp.name" $mcp_tool;
otel_span_attr "mcp.status" $mcp_status;
js_header_filter main.clear_content_length;
js_body_filter main.filter;
proxy_pass http://127.0.0.1:9001;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment