Skip to content

Instantly share code, notes, and snippets.

View xeioex's full-sized avatar

Dmitry Volyntsev xeioex

View GitHub Profile
receivers:
otlp:
protocols:
grpc:
http:
connectors:
spanmetrics:
dimensions:
- name: mcp.name
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_import main from mcp.js;
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;
@xeioex
xeioex / out
Created January 15, 2026 02:39
# HELP traces_span_metrics_calls_total
# TYPE traces_span_metrics_calls_total counter
traces_span_metrics_calls_total{job="unknown_service:nginx",mcp_name="calculate_sum",mcp_status="error",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="unknown_service:nginx",span_kind="SPAN_KIND_SERVER",span_name="/",status_code="STATUS_CODE_UNSET"} 0
traces_span_metrics_calls_total{job="unknown_service:nginx",mcp_name="calculate_sum",mcp_status="ok",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="unknown_service:nginx",span_kind="SPAN_KIND_SERVER",span_name="/",status_code="STATUS_CODE_UNSET"} 0
traces_span_metrics_calls_total{job="unknown_service:nginx",mcp_name="get_forecast",mcp_status="error",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="unknown_service:nginx",span_kind="SPAN_KIND_SERVER",span_name="/",status_code="STATUS_CODE_UNSET"} 0
traces_span_metrics_calls_
package main
import (
"crypto/rand"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"io"
"log"
package main
import (
"crypto/rand"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"io"
"log"
#! /bin/bash
# Generic routines
__source-if-exist() {
if [ -f $1 ]; then
. $1
fi
}
__create-if-not-exist() {
#! /bin/bash
# FIXME: with checkbashisms
# Bash snippets
# for i in {1..500}; do curl 'url' > /dev/null & done
# Generic routines
__source-if-exist() {
if [ -f $1 ]; then
@xeioex
xeioex / help
Created January 14, 2026 05:46
Usage:
otelcol-contrib [flags]
otelcol-contrib [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
components Outputs available components in this collector distribution
featuregate Display feature gates information
help Help about any command
print-config Prints the Collector's configuration in the specified mode
services:
nginx.org:
ports:
- 8001:8080
build:
dockerfile: dev.Dockerfile
develop:
watch:
- path: ./xml
action: rebuild