diff --git a/.github/ci-env.template b/.github/ci-env.template index d5b45e05..0527e498 100644 --- a/.github/ci-env.template +++ b/.github/ci-env.template @@ -1,6 +1,5 @@ export BUTTERCUP_K8S_VALUES_TEMPLATE=./k8s/values-upstream-minikube.template export DEPLOY_CLUSTER=true -export DEPLOY_SIGNOZ=false export CLUSTER_TYPE=minikube export TAILSCALE_ENABLED=false export COMPETITION_API_ENABLED=false diff --git a/Makefile b/Makefile index 9c14db05..87e8d63b 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ help: @echo " status - Check the status of the deployment" @echo " crs-instance-id - Get the CRS instance ID" @echo " download-artifacts - Download submitted artifacts from the CRS" - @echo " signoz-ui - Open the SigNoz UI" @echo "" @echo "Testing:" @echo " send-integration-task - Run integration-test task" @@ -203,28 +202,5 @@ clean-local: install-cscope: cd external/buttercup-cscope/ && autoreconf -i -s && ./configure && make && sudo make install -signoz-ui: - @echo "Opening SigNoz UI..." - @echo "" - @echo "NOTE: If you plan to redeploy and access SigNoz, clear your browser cookies for http://localhost:33301 to avoid login issues." - @echo "" - @if ! kubectl get namespace $${BUTTERCUP_NAMESPACE:-crs} >/dev/null 2>&1; then \ - echo "Error: CRS namespace not found. Deploy first with 'make deploy'."; \ - exit 1; \ - fi - @if ! kubectl get service/buttercup-signoz-frontend -n $${BUTTERCUP_NAMESPACE:-crs} >/dev/null 2>&1; then \ - echo "Error: SigNoz is not deployed. Set DEPLOY_SIGNOZ=true in deployment/env and redeploy."; \ - exit 1; \ - fi - kubectl port-forward -n $${BUTTERCUP_NAMESPACE:-crs} service/buttercup-signoz-frontend 33301:3301 & - @sleep 3 - @if command -v xdg-open >/dev/null 2>&1; then \ - xdg-open http://localhost:33301; \ - elif command -v open >/dev/null 2>&1; then \ - open http://localhost:33301; \ - else \ - echo "Please open http://localhost:33301 in your browser."; \ - fi - web-ui: @./scripts/web_ui.sh diff --git a/README.md b/README.md index a283188e..91d7ea2d 100644 --- a/README.md +++ b/README.md @@ -119,22 +119,27 @@ In the GUI you can monitor active tasks and see when Buttercup finds bugs and ge make undeploy ``` -## Accessing Logs +## Accessing Logs and Observability -Buttercup includes local SigNoz deployment by default for comprehensive system observability. You can access logs, traces, and metrics through the SigNoz UI: +Buttercup supports OpenTelemetry for comprehensive system observability. To view distributed traces, metrics, and logs, you need to deploy an observability backend separately: +- **SigNoz**: [Kubernetes deployment guide](https://signoz.io/docs/install/kubernetes/) +- **LangFuse** (for LLM observability): [Self-hosting guide](https://langfuse.com/self-hosting) + +Configure the OTEL endpoint in your `deployment/env` file: ```bash -make signoz-ui +export OTEL_ENDPOINT="" +export OTEL_TOKEN="" +export OTEL_PROTOCOL=grpc ``` -Then navigate to `http://localhost:33301` in your web browser to view: - -- Distributed traces -- Application metrics -- Error monitoring -- Performance insights - -If you configured LangFuse during setup, you can also monitor LLM usage and costs there. +For LangFuse integration, configure: +```bash +export LANGFUSE_ENABLED=true +export LANGFUSE_HOST="" +export LANGFUSE_PUBLIC_KEY="" +export LANGFUSE_SECRET_KEY="" +``` For additional log access methods, see the [Quick Reference Guide](guides/QUICK_REFERENCE.md). diff --git a/deployment/crs-architecture.sh b/deployment/crs-architecture.sh index f3149a84..c099368f 100755 --- a/deployment/crs-architecture.sh +++ b/deployment/crs-architecture.sh @@ -38,7 +38,6 @@ fi BUTTERCUP_NAMESPACE=${BUTTERCUP_NAMESPACE:-crs} DEPLOY_CLUSTER=${DEPLOY_CLUSTER:-true} -DEPLOY_SIGNOZ=${DEPLOY_SIGNOZ:-false} CLUSTER_TYPE=${CLUSTER_TYPE:-minikube} if [ "$DEPLOY_CLUSTER" = "true" ] && [ "$CLUSTER_TYPE" = "aks" ]; then @@ -270,9 +269,6 @@ down-k8s() { set -x kubectl delete -k k8s/base/tailscale-connections/ helm uninstall --wait --namespace "$BUTTERCUP_NAMESPACE" buttercup - # Remove finalizers from clickhouse installation as stated in https://signoz.io/docs/operate/kubernetes/#uninstall-signoz - # Without this, the namespace would not be deleted - kubectl -n "$BUTTERCUP_NAMESPACE" patch clickhouseinstallations.clickhouse.altinity.com/buttercup-clickhouse -p '{"metadata":{"finalizers":[]}}' --type=merge kubectl delete -k k8s/base/tailscale-coredns/ kubectl delete -k k8s/base/tailscale-dns/ kubectl delete -k k8s/base/tailscale-operator/ @@ -280,7 +276,6 @@ down-k8s() { kubectl delete namespace "$BUTTERCUP_NAMESPACE" set +x echo -e "${GRN}Cleanup complete.${NC}" - echo -e "${BLU}Note: If you plan to redeploy and access SigNoz, clear your browser cookies for http://localhost:33301 to avoid login issues.${NC}" set -e } diff --git a/deployment/env.template b/deployment/env.template index 43fe5aa7..9d177826 100644 --- a/deployment/env.template +++ b/deployment/env.template @@ -68,18 +68,17 @@ export OPENAI_API_KEY="" export ANTHROPIC_API_KEY="" # export GEMINI_API_KEY="" -# LangFuse settings, instructing LLM-applications to log their LLM traces +# Optional LangFuse settings, instructing LLM-applications to log their LLM traces +# See https://langfuse.com/self-hosting for self-hosting documentation # export LANGFUSE_ENABLED=true # export LANGFUSE_HOST="" # export LANGFUSE_PUBLIC_KEY="" # export LANGFUSE_SECRET_KEY="" -# OpenTelemetry endpoint settings (e.g. SigNoz) -export DEPLOY_SIGNOZ=false -# Your otel endpoint +# Optional OpenTelemetry endpoint settings for observability (e.g. SigNoz) +# See https://signoz.io/docs/install/kubernetes/ for SigNoz configuration # export OTEL_ENDPOINT="" -# Your otel token, including basic or bearer -# export OTEL_TOKEN="dXNlcm5hbWU6cGFzc3dvcmQ=" +# export OTEL_TOKEN="" # Include Basic or Bearer prefix # export OTEL_PROTOCOL=grpc # Docker Hub credentials for doing logged requests while getting Container diff --git a/deployment/k8s/Chart.lock b/deployment/k8s/Chart.lock index 9b28fbc5..de8fa20a 100644 --- a/deployment/k8s/Chart.lock +++ b/deployment/k8s/Chart.lock @@ -53,8 +53,5 @@ dependencies: - name: ui repository: file://charts/ui version: 0.1.0 -- name: signoz - repository: https://charts.signoz.io - version: 0.71.0 -digest: sha256:d406395eef32321d26f3dee82bd5ab91e80f476dc8f271bac7edbcd04790cc34 -generated: "2025-09-29T12:14:43.37270009Z" +digest: sha256:127f211095649787969caa6ac55652a0fda0d2be8e532510de584f4d3e8fc20a +generated: "2025-12-04T14:47:04.214674+01:00" diff --git a/deployment/k8s/Chart.yaml b/deployment/k8s/Chart.yaml index f1053f61..acca1442 100644 --- a/deployment/k8s/Chart.yaml +++ b/deployment/k8s/Chart.yaml @@ -58,7 +58,3 @@ dependencies: - name: ui version: "0.1.0" repository: "file://charts/ui" - - name: signoz - version: "0.71.0" - repository: "https://charts.signoz.io" - condition: signoz.enabled diff --git a/deployment/k8s/README.md b/deployment/k8s/README.md index 559117f4..82e1b0ee 100644 --- a/deployment/k8s/README.md +++ b/deployment/k8s/README.md @@ -91,6 +91,33 @@ If Langfuse integration is enabled: - **LANGFUSE_PUBLIC_KEY**: Langfuse public key - **LANGFUSE_SECRET_KEY**: Langfuse secret key +## Observability Configuration + +Buttercup uses OpenTelemetry for distributed tracing and observability. You must deploy an observability backend separately (e.g., SigNoz) and configure the system to send telemetry data to it. + +### OpenTelemetry Configuration + +Configure the following in your `values-override.yaml`: + +```yaml +global: + otel: + endpoint: "https://your-signoz-otel-collector:4317" + token: "Basic " + protocol: "grpc" +``` + +### Deploying SigNoz + +For Kubernetes deployment of SigNoz, see: +- [SigNoz Kubernetes Installation](https://signoz.io/docs/install/kubernetes/) +- [SigNoz Helm Deployment](https://signoz.io/docs/install/kubernetes/others/) + +### Deploying LangFuse + +For self-hosting LangFuse for LLM observability: +- [LangFuse Self-Hosting Guide](https://langfuse.com/self-hosting) + ### 3. Container Registry Auth For pulling private container images, create a Kubernetes secret named `ghcr-auth`: diff --git a/deployment/k8s/charts/signoz-0.71.0.tgz b/deployment/k8s/charts/signoz-0.71.0.tgz deleted file mode 100644 index 6e60b240..00000000 Binary files a/deployment/k8s/charts/signoz-0.71.0.tgz and /dev/null differ diff --git a/deployment/k8s/templates/common-env.yaml b/deployment/k8s/templates/common-env.yaml index b4cbfe23..2388d340 100644 --- a/deployment/k8s/templates/common-env.yaml +++ b/deployment/k8s/templates/common-env.yaml @@ -85,21 +85,12 @@ Define Docker Host environment variable for Unix socket {{- end }} {{- define "buttercup.env.telemetry" }} -{{- if .Values.global.signoz.deployed }} -- name: OTEL_EXPORTER_OTLP_ENDPOINT - value: "http://{{ .Release.Name }}-signoz-otel-collector:4317" -- name: OTEL_EXPORTER_OTLP_HEADERS - value: "Authorization=Basic dXNlcm5hbWU6cGFzc3dvcmQ=" -- name: OTEL_EXPORTER_OTLP_PROTOCOL - value: "grpc" -{{- else }} - name: OTEL_EXPORTER_OTLP_ENDPOINT value: "{{ .Values.global.otel.endpoint }}" - name: OTEL_EXPORTER_OTLP_HEADERS value: "Authorization={{ .Values.global.otel.token }}" - name: OTEL_EXPORTER_OTLP_PROTOCOL value: "{{ .Values.global.otel.protocol | default "grpc" }}" -{{- end }} - name: CRS_INSTANCE_ID valueFrom: configMapKeyRef: diff --git a/deployment/k8s/values-upstream-aks.template b/deployment/k8s/values-upstream-aks.template index 356c7092..19692694 100644 --- a/deployment/k8s/values-upstream-aks.template +++ b/deployment/k8s/values-upstream-aks.template @@ -17,9 +17,6 @@ global: publicKey: "${LANGFUSE_PUBLIC_KEY}" secretKey: "${LANGFUSE_SECRET_KEY}" - signoz: - deployed: ${DEPLOY_SIGNOZ} - crs: api_key_id: ${CRS_KEY_ID} api_key_token: ${CRS_KEY_TOKEN} @@ -133,9 +130,6 @@ image-preloader: versions: - latest -signoz: - enabled: ${DEPLOY_SIGNOZ} - registry-cache: enabled: true persistence: diff --git a/deployment/k8s/values-upstream-minikube.template b/deployment/k8s/values-upstream-minikube.template index 44b17657..2ffdf99b 100644 --- a/deployment/k8s/values-upstream-minikube.template +++ b/deployment/k8s/values-upstream-minikube.template @@ -27,9 +27,6 @@ global: publicKey: "${LANGFUSE_PUBLIC_KEY}" secretKey: "${LANGFUSE_SECRET_KEY}" - signoz: - deployed: ${DEPLOY_SIGNOZ} - crs: api_key_id: ${CRS_KEY_ID} api_key_token: ${CRS_KEY_TOKEN} @@ -86,6 +83,3 @@ image-preloader: - gcr.io/oss-fuzz-base/base-builder-rust versions: - latest - -signoz: - enabled: ${DEPLOY_SIGNOZ} diff --git a/deployment/k8s/values.yaml b/deployment/k8s/values.yaml index 4995b478..f4f140ad 100644 --- a/deployment/k8s/values.yaml +++ b/deployment/k8s/values.yaml @@ -47,8 +47,6 @@ global: host: "https://cloud.langfuse.com" publicKey: "pk-lf-..." # Replace with your actual public key secretKey: "sk-lf-..." # Replace with your actual secret key - signoz: - deployed: false crs: api_key_id: 515cc8a0-3019-4c9f-8c1c-72d0b54ae561 api_key_token: VGuAC8axfOnFXKBB7irpNDOKcDjOlnyB @@ -403,11 +401,3 @@ litellm-helm: # store_prompts_in_spend_logs: true restartPolicy: Always - -# SigNoz observability platform -signoz: - enabled: false - clickhouse: - zookeeper: - image: - repository: bitnamilegacy/zookeeper diff --git a/guides/MANUAL_SETUP.md b/guides/MANUAL_SETUP.md index 053e1ed7..deafa948 100644 --- a/guides/MANUAL_SETUP.md +++ b/guides/MANUAL_SETUP.md @@ -69,22 +69,16 @@ cp deployment/env.template deployment/env Look at the comments in the `deployment/env.template` for how to set variables. -### External SigNoz Configuration +### OpenTelemetry Configuration (Optional) -If you want to use an external SigNoz instance instead of the default local deployment, you can configure custom OpenTelemetry settings: +Buttercup supports sending telemetry data to an external observability platform like SigNoz. You must deploy SigNoz separately - see the [SigNoz Kubernetes deployment guide](https://signoz.io/docs/install/kubernetes/). -1. **Disable local SigNoz deployment:** +To configure the OTEL endpoint: ```bash # In deployment/env -export DEPLOY_SIGNOZ=false -``` - -2. **Configure external OTEL endpoint:** -```bash -# In deployment/env -export OTEL_ENDPOINT="https://your-signoz-instance.com" -export OTEL_PROTOCOL="http" # or "grpc" -export OTEL_TOKEN="your-otel-token" # optional +export OTEL_ENDPOINT="https://your-signoz-otel-collector:4317" +export OTEL_PROTOCOL="grpc" # or "http" +export OTEL_TOKEN="your-otel-auth-token" # Include Basic or Bearer prefix ``` ## Start Services Manually diff --git a/guides/QUICK_REFERENCE.md b/guides/QUICK_REFERENCE.md index 872400e7..beca0f74 100644 --- a/guides/QUICK_REFERENCE.md +++ b/guides/QUICK_REFERENCE.md @@ -43,7 +43,7 @@ kubectl get services -n crs # Port forwarding kubectl port-forward -n crs service/buttercup-competition-api 31323:1323 -# View logs (alternative to SigNoz UI) +# View logs kubectl get pods -n crs kubectl logs -n crs kubectl logs -n crs -f # Follow logs in real-time diff --git a/scripts/common.sh b/scripts/common.sh index 00e36776..925761ff 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -644,29 +644,27 @@ configure_llm_budget() { } -# Function to configure OTEL telemetry (simplified for local deployment) +# Function to configure OTEL telemetry configure_otel() { print_linebreak - print_status "Configuring SigNoz for local observability..." - + print_status "Configuring OpenTelemetry / SigNoz (optional observability)..." + # Source the env file to check current values if [ -f "deployment/env" ]; then source deployment/env fi - - print_status "SigNoz: Local observability platform for distributed tracing and metrics." - print_status "Provides detailed performance monitoring and system observability for debugging." - # Check if already configured and user wants to keep it - if [ "$DEPLOY_SIGNOZ" = "true" ]; then - if ! prompt_for_update "DEPLOY_SIGNOZ" "SigNoz deployment" "local" "" false; then - return 0 # User chose to keep existing value, exit early - fi + print_status "OpenTelemetry: Optional distributed tracing and observability platform." + print_status "Sends traces and metrics to an external backend like SigNoz for debugging and monitoring." + print_status "Deploy SigNoz separately: https://signoz.io/docs/install/kubernetes/" + + # Use a meaningful current value for the check + local current_otel_config="" + if [ -n "$OTEL_ENDPOINT" ] && [ "$OTEL_ENDPOINT" != "" ] && [ "$OTEL_ENDPOINT" != "" ]; then + current_otel_config="$OTEL_ENDPOINT" fi - # Enable local SigNoz deployment by default for quickstart - portable_sed "s|.*export DEPLOY_SIGNOZ=.*|export DEPLOY_SIGNOZ=true|" deployment/env - print_success "Local SigNoz deployment enabled for observability" + configure_service "OTEL" "OpenTelemetry/SigNoz configuration" "$current_otel_config" "" false "configure_otel_wrapper" } # Function to check configuration file @@ -772,10 +770,9 @@ check_aks_config() { done fi - # Check optional SigNoz/OTEL configuration - if [ "$DEPLOY_SIGNOZ" = "true" ]; then - print_status "SigNoz local deployment is enabled" - elif [ -n "$OTEL_ENDPOINT" ] && [ "$OTEL_ENDPOINT" != "" ]; then + # Check optional OTEL configuration + if [ -n "$OTEL_ENDPOINT" ] && [ "$OTEL_ENDPOINT" != "" ]; then + print_status "External OTEL endpoint is configured" if [ -z "$OTEL_PROTOCOL" ] || [ "$OTEL_PROTOCOL" = "" ]; then print_error "OTEL_PROTOCOL is not set when OTEL_ENDPOINT is configured" errors=$((errors + 1)) diff --git a/scripts/setup-azure.sh b/scripts/setup-azure.sh index 40a396db..ab1b43e7 100755 --- a/scripts/setup-azure.sh +++ b/scripts/setup-azure.sh @@ -151,12 +151,12 @@ setup_config() { # Configure LLM Budget configure_llm_budget - + # Configure LangFuse (optional) configure_langfuse - - # TODO: For production, we don't deploy SigNoz, as it needs to be done properly - # Just allow to configure access to an existing SigNoz instance + + # Configure OpenTelemetry / SigNoz (optional) + configure_otel } # Function to validate configuration diff --git a/scripts/setup-local.sh b/scripts/setup-local.sh index c5f07000..45694014 100755 --- a/scripts/setup-local.sh +++ b/scripts/setup-local.sh @@ -32,8 +32,8 @@ setup_config() { # Configure LangFuse (optional) configure_langfuse - - # Configure SigNoz deployment (optional) + + # Configure OpenTelemetry (optional) configure_otel }