### Examples of Odigos Installation Commands - Shell Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_install.mdx This section provides practical examples of how to use the `odigos install` command for different scenarios, including open-source, cloud, on-premise, and centralized backend integrations. It demonstrates the use of various flags like `--api-key`, `--kubeconfig`, `--onprem-token`, `--profile`, `--cluster-name`, and `--central-backend-url`. ```Shell # Install Odigos open-source in your cluster. odigos install # Install Odigos cloud in your cluster. odigos install --api-key # Install Odigos cloud in a specific cluster odigos install --kubeconfig # Install Odigos onprem tier for enterprise users odigos install --onprem-token ${ODIGOS_TOKEN} --profile ${YOUR_ENTERPRISE_PROFILE_NAME} # Install Odigos and connect the cluster to forward data to the centralized backend odigos install --cluster-name ${YOUR_CLUSTER_NAME} --central-backend-url ${YOUR_CENTRAL_BACKEND_URL} ``` -------------------------------- ### Initial Go Workspace Configuration Example Source: https://github.com/odigos-io/odigos/blob/main/DEVELOPMENT.md This example shows the structure of a `go.work` file generated after initializing the workspace, listing the Odigos modules included from the current repository. ```Go go 1.23.5 use ( ./api ./autoscaler ./cli ) ``` -------------------------------- ### Installing Homebrew Package Manager (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command downloads and executes the official Homebrew installation script from GitHub. It uses `curl` to fetch the script and pipes it to `bash` for execution, initiating the Homebrew setup process. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Installing Odigos Demo Application (DNF) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This snippet installs the Odigos demo frontend application using the DNF package manager on Fedora/RHEL-based systems. It's part of the initial setup for the target application. ```shell sudo dnf install odigos-demo-frontend ``` -------------------------------- ### Installing Odigos Demo Application (APT) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This snippet updates the package list and installs the Odigos demo frontend application using the APT package manager on Debian/Ubuntu-based systems. It's part of the initial setup for the target application. ```shell sudo apt update sudo apt install odigos-demo-frontend ``` -------------------------------- ### Starting Odigos VM Agent Systemd Service Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/installation.mdx This snippet enables and immediately starts the `odigos-vmagent` systemd service, ensuring the Odigos VM Agent runs automatically on system boot and is active immediately. It requires `sudo` privileges to manage system services. ```shell sudo systemctl enable --now odigos-vmagent ``` -------------------------------- ### Starting Odigos UI Server Locally (Bash) Source: https://github.com/odigos-io/odigos/blob/main/frontend/webapp/README.md This command initiates the Odigos UI backend server. Once started, the UI should be accessible via a web browser at the specified localhost address (e.g., localhost:8085). ```bash yarn back:start ``` -------------------------------- ### Installing Odigos with Helm (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation.mdx This snippet provides the shell commands to update the Helm repository and then install or upgrade Odigos using Helm into the 'odigos-system' namespace, creating it if it doesn't exist. These commands are essential for setting up Odigos in a Kubernetes environment. ```Shell helm repo update helm upgrade --install odigos odigos/odigos --namespace odigos-system --create-namespace ``` -------------------------------- ### Verifying Homebrew Installation Post-Setup (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx After installing Homebrew and updating the PATH, this command verifies the successful installation by displaying the Homebrew version. A version number confirms that Homebrew is correctly set up and accessible. ```bash brew --version ``` -------------------------------- ### Installing Odigos in Test Environment (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command initiates the installation of Odigos into the current Kubernetes test environment. It deploys the necessary Odigos components to begin collecting observability data. ```bash odigos install ``` -------------------------------- ### Installing Odigos via Local CLI Source (Make) Source: https://github.com/odigos-io/odigos/blob/main/CONTRIBUTING.md This `make` command automates the process of running the `odigos install` CLI command from the local source. It simplifies the installation of Odigos into a Kubernetes cluster, typically in the `odigos-system` namespace, using the locally built CLI. Users should `odigos uninstall` first if re-running this command for changes to the `install` logic. ```bash make cli-install ``` -------------------------------- ### Install Odigos into Kubernetes Cluster using CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation.mdx This command uses the Odigos CLI to deploy and configure Odigos within the active Kubernetes cluster. It will install all necessary Odigos components into the `odigos-system` namespace. ```shell odigos install ``` -------------------------------- ### Configuring Go Workspace with External Dependencies Source: https://github.com/odigos-io/odigos/blob/main/DEVELOPMENT.md This example demonstrates how to update the `go.work` file to include external Odigos-related repositories like `opentelemetry-go-instrumentation` and `runtime-detector` based on a specific local folder structure, enabling proper dependency resolution. ```Go go 1.23.5 use ( ../../open-telemetry/opentelemetry-go-instrumentation ../runtime-detector ./api ./autoscaler ./cli ) ``` -------------------------------- ### Starting Odigos VM Agent Systemd Service Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/setup/installation.mdx This command enables and immediately starts the Odigos VM Agent as a systemd service. It ensures the agent runs on boot and is active immediately after execution, requiring `sudo` privileges. ```shell sudo systemctl enable --now odigos-vmagent ``` -------------------------------- ### Debugging `cli install` Command in VS Code (JSON) Source: https://github.com/odigos-io/odigos/blob/main/DEVELOPMENT.md This JSON configuration defines a launch profile for debugging the `cli install` command in Visual Studio Code. It specifies the Go debugger type, launch request, debug mode, program path, current working directory, command-line arguments (including a placeholder for `ODIGOS_VERSION`), and build flags for embedding manifests. ```jsonc { "name": "cli install", "type": "go", "request": "launch", "mode": "debug", "program": "${workspaceFolder}/cli", "cwd": "${workspaceFolder}/cli", "args": ["install", "--version", "ODIGOS_VERSION"], "buildFlags": "-tags=embed_manifests" } ``` -------------------------------- ### Starting Odigos UI on Default Port (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_ui.mdx This example demonstrates how to launch the Odigos UI using its default configuration, making it accessible via `http://localhost:3000`. No additional flags are required for this basic startup. ```Shell # Start the Odigos UI on http://localhost:3000 odigos ui ``` -------------------------------- ### Installing Dependencies for Odigos UI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/frontend/webapp/README.md This command installs all necessary project dependencies for the Odigos UI. It is a prerequisite for building and running the application, ensuring all required packages are available. ```bash yarn install ``` -------------------------------- ### Creating Odigos UI Client Build (Bash) Source: https://github.com/odigos-io/odigos/blob/main/frontend/webapp/README.md This command compiles the Odigos UI client-side assets into a production-ready build. This step is essential before starting the server to ensure the UI can be served correctly. ```bash yarn build ``` -------------------------------- ### Install Odigos CLI via Homebrew on macOS Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation.mdx This command installs the Odigos Command Line Interface (CLI) on macOS systems using Homebrew. It first taps the `odigos-io/homebrew-odigos-cli` repository to make the `odigos` formula available, then proceeds with the installation. ```bash brew install odigos-io/homebrew-odigos-cli/odigos ``` -------------------------------- ### Installing Odigos Central CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_pro_central_install.mdx This command initiates the installation of Odigos Central backend and UI components using the Odigos CLI. It serves as the primary entry point for deploying the enterprise-tier Odigos Central. ```bash odigos pro central install [flags] ``` -------------------------------- ### Installing Docker Desktop via Homebrew Cask (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command uses Homebrew Cask to install Docker Desktop, a complete containerization platform for macOS. Homebrew Cask handles the download and installation of macOS applications, simplifying the process. ```bash brew install --cask docker ``` -------------------------------- ### Basic Odigos Installation Command Syntax - Shell Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_install.mdx This snippet shows the basic syntax for the `odigos install` command, indicating that it accepts various flags to customize the installation process. ```Shell odigos install [flags] ``` -------------------------------- ### Starting Odigos UI Client in Development Mode (Bash) Source: https://github.com/odigos-io/odigos/blob/main/frontend/webapp/README.md This command starts the Odigos UI client in development mode, enabling real-time code updates. This is useful for active development, allowing changes to be reflected immediately in the browser at a different localhost port (e.g., localhost:3000). ```bash yarn dev ``` -------------------------------- ### Add Odigos Helm Chart Repository Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation.mdx This command adds the official Odigos Helm chart repository to your local Helm configuration. This step is a prerequisite for installing Odigos using its Helm charts, allowing Helm to fetch chart definitions from the Odigos GitHub Pages. ```shell helm repo add odigos https://odigos-io.github.io/odigos/ ``` -------------------------------- ### Installing Odigos CLI with Homebrew (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command uses Homebrew, a package manager for macOS, to install the Odigos Command Line Interface (CLI) tool. The CLI is essential for managing Odigos installations and operations. ```bash brew install odigos-io/homebrew-odigos-cli/odigos ``` -------------------------------- ### Managing Odigos Cloud Connections Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_cloud.mdx Demonstrates various commands for interacting with the Odigos cloud service, including initial installation, connecting an existing setup, updating the API key, and logging out. These commands facilitate the lifecycle management of Odigos cloud integration. ```Shell # Install Odigos cloud odigos install -k ``` ```Shell # Connect existing Odigos installation to Odigos cloud odigos cloud login -k ``` ```Shell # Update the api key for an existing Odigos cloud installation odigos cloud update -k ``` ```Shell # Logout from Odigos cloud odigos cloud logout ``` -------------------------------- ### Installing Chainsaw with Go (Bash) Source: https://github.com/odigos-io/odigos/blob/main/tests/e2e/README.md This command installs the latest version of Chainsaw using the Go toolchain. It fetches the Chainsaw executable from its GitHub repository and places it in the Go binary path. ```bash go install github.com/kyverno/chainsaw@latest ``` -------------------------------- ### Adding Odigos Repository to APT Package Manager (Debian) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/preparation.mdx This snippet provides shell commands to add the Odigos package repository and its GPG key to Debian-based systems (e.g., Ubuntu, Debian). This setup allows users to install Odigos packages using the `apt` package manager, ensuring secure and authenticated package downloads. ```shell sudo mkdir -p /etc/apt/keyrings/ wget -q -O - https://apt.fury.io/odigos/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/odigos.gpg > /dev/null echo "deb [signed-by=/etc/apt/keyrings/odigos.gpg] https://apt.fury.io/odigos/ * *" | sudo tee /etc/apt/sources.list.d/odigos.list ``` -------------------------------- ### Installing KinD (Kubernetes in Docker) via Homebrew (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command installs KinD (Kubernetes in Docker) using Homebrew. KinD is a tool for running local Kubernetes clusters using Docker containers, essential for setting up a test environment for Odigos. ```bash brew install kind ``` -------------------------------- ### Accessing Odigos UI Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation.mdx This command launches the Odigos user interface, typically making it accessible via a web browser. By default, the UI is forwarded to `http://localhost:3000` for local access. ```bash odigos ui ``` -------------------------------- ### Installing Chainsaw with Homebrew (Bash) Source: https://github.com/odigos-io/odigos/blob/main/tests/e2e/README.md This snippet demonstrates how to install Chainsaw, an orchestration tool for Kubernetes actions, using Homebrew. It first taps the official Kyverno Chainsaw repository and then proceeds with the installation. ```bash brew tap kyverno/chainsaw https://github.com/kyverno/chainsaw brew install kyverno/chainsaw/chainsaw ``` -------------------------------- ### Accessing Odigos UI via CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/awss3.mdx This command launches the Odigos user interface, providing a graphical way to manage and configure Odigos components, including adding new destinations. ```bash odigos ui ``` -------------------------------- ### Starting Odigos UI via CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/pipeline/sources/create.mdx This command launches the Odigos user interface, providing a graphical way to manage telemetry sources. It requires the Odigos CLI to be installed and configured. The UI allows users to select specific workloads or entire namespaces for telemetry collection. ```shell odigos ui ``` -------------------------------- ### Installing OpenTelemetry Go Dependencies Source: https://github.com/odigos-io/odigos/blob/main/docs/instrumentations/golang/enrichment.mdx Instructions to add the necessary OpenTelemetry Go modules (go.opentelemetry.io/otel and go.opentelemetry.io/otel/trace) to a Go project using the `go get` command. These modules are fundamental for instrumenting applications with OpenTelemetry. ```Bash go get go.opentelemetry.io/otel \ go.opentelemetry.io/otel/trace ``` -------------------------------- ### Configuring Odigos VM Agent License Key Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/setup/installation.mdx This YAML snippet shows how to add your Odigos Pro license key to the `/etc/odigos-vmagent/service.yaml` configuration file. Replace `` with your actual license token to enable Odigos Pro features. ```yaml on_prem: token: "" ``` -------------------------------- ### Installing yq and jq with Homebrew (Bash) Source: https://github.com/odigos-io/odigos/blob/main/tests/e2e/README.md This snippet shows how to install `yq` (a lightweight and portable command-line YAML processor) and `jq` (a lightweight and flexible command-line JSON processor) using Homebrew, essential tools for processing configuration files. ```bash brew install yq brew install jq ``` -------------------------------- ### Starting Odigos UI with Kubeconfig (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_ui.mdx This example shows how to configure the Odigos UI to manage and configure a specific Kubernetes cluster by providing the absolute path to a kubeconfig file. This allows the UI to interact with the designated cluster's resources. ```Shell # Start the Odigos UI and have it manage and configure a specific cluster odigos ui --kubeconfig ``` -------------------------------- ### Installing Odigos on Kubernetes Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation.mdx This command initiates the installation of Odigos onto your Kubernetes cluster using the Odigos CLI. It deploys the necessary components and configurations for Odigos to operate within the cluster. ```bash odigos install ``` -------------------------------- ### Setting Custom Container Runtime Socket Path with Odigos Helm Chart Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation-options.mdx This snippet illustrates how to specify a custom container runtime socket path when installing Odigos via the Helm chart. The `odiglet.customContainerRuntimeSocketPath` parameter ensures Odiglet can access the necessary Unix socket for environment variable analysis, especially in non-default setups. ```shell helm install odigos odigos/odigos --set odiglet.customContainerRuntimeSocketPath= ``` -------------------------------- ### Installing Odigos CLI Source: https://github.com/odigos-io/odigos/blob/main/README.md This command is used to install Odigos via its command-line interface. It provides a quick and simple way to set up the distributed tracing solution, emphasizing that no code changes are required for the applications being observed. ```bash odigos install ``` -------------------------------- ### Installing Odigos Helm Chart Source: https://github.com/odigos-io/odigos/blob/main/helm/README.md This sequence of commands first updates your local Helm chart repositories to fetch the latest chart information, then installs or upgrades the Odigos release. It creates the `odigos-system` namespace if it doesn't exist and deploys Odigos within it. For Openshift or GKE clusters, specific flags (`openshift.enabled=true` or `gke.enabled=true`) should be set. ```Shell helm repo update helm upgrade --install odigos odigos/odigos --namespace odigos-system --create-namespace ``` -------------------------------- ### Configuring Odigos Central Installation Options Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_pro_central_install.mdx These options allow customization of the Odigos Central installation, including specifying the target Kubernetes namespace, providing an on-prem token for enterprise features, and selecting a specific version to install. ```bash -h, --help help for install -n, --namespace string Target namespace for Odigos Central installation (default "odigos-central") --onprem-token string On-prem token for Odigos --version string Specify version to install ``` -------------------------------- ### Installing Jaeger in Kubernetes (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command applies a Kubernetes configuration file to deploy a lightweight Jaeger instance into the cluster. Jaeger is used as an open-source tracing tool for distributed systems. ```bash kubectl apply -f https://raw.githubusercontent.com/odigos-io/simple-demo/main/kubernetes/jaeger.yaml ``` -------------------------------- ### Examples for Updating and Reverting Odiglet Offsets Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_pro_update-offsets.mdx These examples demonstrate practical uses of the `odigos pro update-offsets` command. The first example shows how to pull the latest Go instrumentation offsets and trigger an Odiglet restart. The second example illustrates how to revert Odiglet to use the default offsets data that shipped with the current Odigos version. ```Shell # Pull the latest offsets and restart Odiglet odigos pro update-offsets ``` ```Shell # Revert to using the default offsets data shipped with Odigos odigos pro update-offsets --default ``` -------------------------------- ### Examples for Odigos Uninstall Command (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_uninstall.mdx These examples demonstrate common use cases for uninstalling Odigos, including uninstallation without confirmation, skipping wait times, specifying a kubeconfig, and performing a fresh reinstallation. ```Shell # Uninstall Odigos open-source or cloud from the cluster in your kubeconfig active context. odigos uninstall ``` ```Shell # Uninstall Odigos without confirmation odigos uninstall --yes ``` ```Shell # Uninstall Odigos without waiting for pods to rollout without instrumentation odigos uninstall --no-wait ``` ```Shell # Uninstall Odigos cloud from a specific cluster odigos uninstall --kubeconfig ``` ```Shell # Install a fresh setup of Odigos odigos uninstall odigos install ``` -------------------------------- ### Creating AWS S3 Bucket using AWS CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/awss3.mdx This command creates a new S3 bucket named `otel-data` in the `us-east-1` region. It's a prerequisite for storing OpenTelemetry data. ```bash aws s3api create-bucket --bucket otel-data --region us-east-1 ``` -------------------------------- ### Starting Odigos UI (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/pipeline/sources/update.mdx This shell command launches the Odigos User Interface, providing a graphical way to manage and update Odigos Source configurations, including the `service.name` attribute. ```shell odigos ui ``` -------------------------------- ### Creating Odigos UI Server Build (Bash) Source: https://github.com/odigos-io/odigos/blob/main/frontend/webapp/README.md This command compiles the Odigos UI server-side components. A successful server build is required to run the backend services that power the UI. ```bash yarn back:build ``` -------------------------------- ### Checking Homebrew Installation (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command checks if Homebrew is already installed on the system by attempting to display its version. If a version number is returned, Homebrew is present; otherwise, it needs to be installed. ```bash brew --version ``` -------------------------------- ### Running Odigos CLI from Source Code (Go) Source: https://github.com/odigos-io/odigos/blob/main/CONTRIBUTING.md This command executes the Odigos CLI tool directly from its source code in the `cli` directory. It uses the `embed_manifests` build tag, which is likely for embedding Kubernetes manifests directly into the binary. This is useful for testing local changes to the CLI without building and installing the full binary. ```go go run -tags=embed_manifests ./cli ``` -------------------------------- ### Installing Odigos VM Agent using APT Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/setup/installation.mdx This snippet updates the package list and installs the Odigos VM Agent package using the APT package manager. It requires `sudo` privileges to execute system-wide commands. ```shell sudo apt update sudo apt install odigos ``` -------------------------------- ### Applying Odigos Operator Installer YAML (kubectl) Source: https://github.com/odigos-io/odigos/blob/main/operator/README.md This command applies the generated 'install.yaml' bundle directly from a URL to install the Odigos Operator. This is the recommended method for users to install the project, simplifying deployment by directly applying the bundled resources. ```sh kubectl apply -f https://raw.githubusercontent.com//odigos-operator//dist/install.yaml ``` -------------------------------- ### Deploying Microservices Demo Application (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/introduction.mdx This command uses kubectl apply to deploy a multi-language microservices demo application to the Kubernetes cluster. The application's deployment manifest is fetched directly from a GitHub raw URL. ```bash kubectl apply -f https://raw.githubusercontent.com/odigos-io/simple-demo/main/kubernetes/deployment.yaml ``` -------------------------------- ### Adding Odigos Repository to DNF Package Manager (RHEL) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/preparation.mdx This snippet provides shell commands to create a repository configuration file for Odigos on RHEL-based systems (e.g., CentOS, Fedora, Rocky Linux). This enables the `dnf` (or `yum`) package manager to locate and install Odigos packages from the specified URL, simplifying future installations. ```shell sudo tee /etc/yum.repos.d/odigos-fury-io.repo < /dev/null [odigos-fury-io] name=Odigos baseurl=https://yum.fury.io/odigos/ gpgcheck=0 EOF ``` -------------------------------- ### Installing Odigos VM Agent using DNF Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/setup/installation.mdx This snippet installs the Odigos VM Agent package using the DNF package manager. It requires `sudo` privileges to execute system-wide commands. ```shell sudo dnf install odigos ``` -------------------------------- ### Setting up Local Development Environment for Odigos Documentation (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/README.md These shell commands are used to prepare and run the Odigos documentation locally for development. `yarn install` fetches all project dependencies, and `yarn dev` initiates the local development server, allowing real-time preview of documentation changes. It is essential to execute these commands from within the `/docs` directory where the `mint.json` and `package.json` files reside. ```Shell # make sure you're in `/docs` folder, where `mint.json` and `package.json` files are yarn install yarn dev ``` -------------------------------- ### Example: Printing Odigos CLI and Cluster Version (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_version.mdx This example demonstrates the most common use case of the `odigos version` command, showing how to execute it without any flags to simultaneously display both the Odigos CLI version and the version of Odigos components running in the Kubernetes cluster. ```Shell # Print the version of odigos CLI and Odigos deployment in your cluster odigos version ``` -------------------------------- ### Creating Kubernetes Cluster with Kind (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/introduction.mdx This command initializes a new local Kubernetes cluster using Kind, a tool for running Kubernetes in Docker containers. It's recommended for local development and testing environments. ```bash kind create cluster ``` -------------------------------- ### Example OpenTelemetry Protocol (OTLP) JSON Span Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/awss3.mdx This JSON string illustrates a single OpenTelemetry span in `otlp_json` format, originating from an Odigos demo application. It demonstrates the structure of collected telemetry data, including resource attributes, scope information, and span details like trace ID, span ID, name, kind, timestamps, and HTTP attributes. ```json {"resourceSpans":[{"resource":{"attributes":[{"key":"telemetry.sdk.language","value":{"stringValue":"python"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.19.0"}},{"key":"service.name","value":{"stringValue":"inventory"}},{"key":"odigos.device","value":{"stringValue":"python"}},{"key":"telemetry.auto.version","value":{"stringValue":"0.40b0"}},{"key":"k8s.namespace.name","value":{"stringValue":"default"}},{"key":"k8s.deployment.name","value":{"stringValue":"inventory"}},{"key":"k8s.pod.name","value":{"stringValue":"inventory-7b87f7566c-2d6fq"}},{"key":"container.name","value":{"stringValue":"inventory"}},{"key":"k8s.node.name","value":{"stringValue":"ip-192-168-4-178.ec2.internal"}}]},"scopeSpans":[{"scope":{"name":"opentelemetry.instrumentation.flask","version":"0.40b0"},"spans":[{"traceId":"9ee5a0de5802d3f1e7f93440f892509c","spanId":"88a4bfb5bfcaf297","parentSpanId":"f9d7bb9e9243df06","name":"/buy","kind":2,"startTimeUnixNano":"1707600957298456744","endTimeUnixNano":"1707600958303042894","attributes":[{"key":"http.method","value":{"stringValue":"POST"}},{"key":"http.server_name","value":{"stringValue":"0.0.0.0"}},{"key":"http.scheme","value":{"stringValue":"http"}},{"key":"net.host.port","value":{"intValue":"8080"}},{"key":"http.host","value":{"stringValue":"inventory:8080"}},{"key":"http.target","value":{"stringValue":"/buy?id=10"}},{"key":"net.peer.ip","value":{"stringValue":"192.168.13.194"}},{"key":"http.user_agent","value":{"stringValue":"Java/17.0.9"}},{"key":"net.peer.port","value":{"intValue":"49420"}},{"key":"http.flavor","value":{"stringValue":"1.1"}},{"key":"http.route","value":{"stringValue":"/buy"}},{"key":"http.status_code","value":{"intValue":"200"}}],"status":{}}]}]}]} ``` -------------------------------- ### Creating Kubernetes Cluster with Minikube (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/introduction.mdx This command starts a local Kubernetes cluster using Minikube, a tool that runs a single-node Kubernetes cluster inside a VM or directly on your machine. It's suitable for local development and experimentation. ```bash minikube start ``` -------------------------------- ### Installing Odigos VM Agent with APT Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/installation.mdx This snippet updates the package list and installs the Odigos VM Agent package using the APT package manager, commonly found on Debian/Ubuntu-based systems. It requires `sudo` privileges to execute system-level commands. ```shell sudo apt update sudo apt install odigos ``` -------------------------------- ### Checking Odigos Demo Application Status Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This command checks the status of the `odigos-demo-frontend` service using `systemctl`. It verifies if the application is running correctly after installation, expecting an 'active (running)' state. ```shell sudo systemctl status odigos-demo-frontend ``` -------------------------------- ### Deploying Demo Application Kubernetes Configuration (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command applies a Kubernetes configuration file from a URL to deploy a multi-microservice demo application. It defines the necessary resources for the application to run within the Kubernetes cluster. ```bash kubectl apply -f https://raw.githubusercontent.com/odigos-io/simple-demo/main/kubernetes/deployment.yaml ``` -------------------------------- ### Building Odigos Operator Installer (sh) Source: https://github.com/odigos-io/odigos/blob/main/operator/README.md This command builds the Odigos Operator installer, generating an 'install.yaml' file in the 'dist' directory. This file contains all necessary resources built with Kustomize to install the project without its dependencies, using the specified Docker image. ```sh make build-installer IMG=/odigos-operator:tag ``` -------------------------------- ### Custom Path Templatization Rule Example Source: https://github.com/odigos-io/odigos/blob/main/collector/processors/odigosurltemplateprocessor/README.md This example demonstrates how to define a custom templatization rule for URL paths using bracketed placeholders. When applied, it transforms specific path segments into generic, low-cardinality templates, improving observability data. ```Configuration /user/{user-name}/friends/{friend-id} ``` -------------------------------- ### Example of Upgrading Odigos Version (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_upgrade.mdx This example demonstrates a simple execution of the `odigos upgrade` command. It shows how to perform a standard upgrade of the Odigos version in the cluster without specifying any additional flags, relying on default behavior. ```Shell # Upgrade Odigos version odigos upgrade ``` -------------------------------- ### Downloading and Extracting Jaeger (amd64) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This snippet downloads the Jaeger All-in-One binary for `amd64` architecture, extracts the archive, and navigates into the extracted directory. This is a prerequisite for running Jaeger locally for demonstration purposes. ```bash wget https://github.com/jaegertracing/jaeger/releases/download/v1.59.0/jaeger-1.59.0-linux-amd64.tar.gz tar -xvf jaeger-1.59.0-linux-amd64.tar.gz cd jaeger-1.59.0-linux-amd64 ``` -------------------------------- ### Deploying All Odigos Services (Make) Source: https://github.com/odigos-io/odigos/blob/main/CONTRIBUTING.md This `make` command deploys all Odigos services and components into the `odigos-system` Kubernetes namespace. It's a comprehensive deployment option for local development, useful for testing the entire Odigos ecosystem. ```bash make deploy ``` -------------------------------- ### Accessing Odigos UI via CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/openobserve.mdx This command launches the Odigos user interface, allowing for graphical configuration of destinations and other Odigos settings. It requires the Odigos CLI to be installed and configured. ```bash odigos ui ``` -------------------------------- ### Setting Custom Container Runtime Socket Path Post-Installation with Odigos CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/installation-options.mdx This snippet demonstrates how to configure a custom container runtime socket path after Odigos has been installed, using the `odigos config set` command. This allows Odiglet to correctly query application environment variables in environments with non-standard socket locations. ```shell odigos config set custom-container-runtime-socket-path ``` -------------------------------- ### Installing Odigos CLI via Brew (Shell) Source: https://github.com/odigos-io/odigos/blob/main/MIGRATION.md This command installs the latest version of the Odigos CLI on macOS using Homebrew. It leverages a custom tap `keyval-dev/homebrew-odigos-cli` to fetch the `odigos` executable. ```sh brew install keyval-dev/homebrew-odigos-cli/odigos ``` -------------------------------- ### Configuring Odigos Pro License Key Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/installation.mdx This snippet illustrates how to add your Odigos Pro license key to the `service.yaml` configuration file for the Odigos VM Agent. The placeholder `` must be replaced with your actual license token under the `on_prem` section. ```shell on_prem: token: "" ``` -------------------------------- ### Installing CLI Tools (yq, jq, Helm) via Homebrew Source: https://github.com/odigos-io/odigos/blob/main/tests/chaos/README.md This snippet shows how to install essential command-line tools—`yq` for YAML processing, `jq` for JSON processing, and `helm` for Kubernetes package management—using Homebrew on macOS. ```bash brew install yq brew install jq brew install helm ``` -------------------------------- ### Starting Odigos UI on Specific Port (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/cli/odigos_ui.mdx This example illustrates how to start the Odigos UI on a custom port, such as 3456, which is useful if the default port 3000 is already in use. The `--port` flag is used to specify the desired listening port. ```Shell # Start the Odigos UI on specific port if 3000 is already in use odigos ui --port 3456 ``` -------------------------------- ### Downloading and Extracting Jaeger (arm64) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This snippet downloads the Jaeger All-in-One binary for `arm64` architecture, extracts the archive, and navigates into the extracted directory. This is a prerequisite for running Jaeger locally for demonstration purposes. ```bash wget https://github.com/jaegertracing/jaeger/releases/download/v1.59.0/jaeger-1.59.0-linux-arm64.tar.gz tar -xvf jaeger-1.59.0-linux-arm64.tar.gz cd jaeger-1.59.0-linux-arm64 ``` -------------------------------- ### Accessing Odigos UI using CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/tingyun.mdx This command launches the Odigos user interface, allowing users to configure destinations and other settings. It requires the Odigos CLI to be installed and configured on the system where the command is executed. ```bash odigos ui ``` -------------------------------- ### Accessing Odigos UI using CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/sumologic.mdx This command launches the Odigos user interface, allowing users to configure destinations and other settings through a web browser. It requires the Odigos CLI to be installed and configured on the system. ```bash odigos ui ``` -------------------------------- ### Accessing Odigos UI using CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/logzio.mdx This command launches the Odigos user interface, allowing users to configure destinations and other settings through a web browser. It requires the Odigos CLI to be installed and configured. ```bash odigos ui ``` -------------------------------- ### Listing Kubernetes Services (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command retrieves and displays a list of all services running in the Kubernetes cluster. It's used to confirm that the demo application's services (frontend, inventory, etc.) are successfully created and accessible. ```bash kubectl get services ``` -------------------------------- ### Accessing Odigos UI using CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/checkly.mdx This command launches the Odigos user interface, allowing users to configure destinations and other settings through a web browser. It requires the Odigos CLI to be installed and configured. ```bash odigos ui ``` -------------------------------- ### Checking Odigos Version with CLI Source: https://github.com/odigos-io/odigos/blob/main/docs/setup/upgrade.mdx This command displays the version of the Odigos CLI tool and the version of the Odigos installation currently deployed in the active Kubernetes cluster. It's useful for verifying your current setup before an upgrade. ```shell odigos version ``` -------------------------------- ### Accessing Odigos UI via CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/alibabacloud.mdx This snippet demonstrates how to launch the Odigos UI locally using the `odigos ui` command-line interface. This is the initial step for users who prefer to configure destinations through the graphical user interface. ```bash odigos ui ``` -------------------------------- ### Upgrading Odigos in Cluster with CLI (Shell) Source: https://github.com/odigos-io/odigos/blob/main/MIGRATION.md This command initiates an upgrade of the Odigos deployment within the Kubernetes cluster. It synchronizes the cluster's Odigos version with the version of the currently installed Odigos CLI. ```sh odigos upgrade ``` -------------------------------- ### Debugging Odiglet with Make Command Source: https://github.com/odigos-io/odigos/blob/main/docs/debugging.mdx This command replaces the running Odiglet binary on a local Kind cluster and runs it in a container, preparing it for a remote debug session. It requires a running Odigos installation on a local Kind cluster and will not start until a debugger is attached. ```bash TAG= make debug-odiglet ``` -------------------------------- ### Starting Local PyPI Server (Shell) Source: https://github.com/odigos-io/odigos/blob/main/agents/python/README.md This command builds a Docker image for a local PyPI server using `debug.Dockerfile` and then runs a container from that image, mapping port 8080. This server hosts the `odigos-opentelemetry-python` package for local development and requires rebuilding after code changes. ```sh docker build -t local-pypi-server -f debug.Dockerfile . && docker run --rm --name pypi-server -p 8080:8080 local-pypi-server ``` -------------------------------- ### Checking Odigos Versions with CLI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/MIGRATION.md This snippet demonstrates how to use the `odigos version` command to check both the Odigos CLI version and the version of Odigos deployed within the Kubernetes cluster. It helps verify the installed components' versions. ```bash odigos version ``` -------------------------------- ### Collecting Historical Memory Allocation Profile for Odigos Collector Source: https://github.com/odigos-io/odigos/blob/main/DEVELOPMENT.md This `curl` command collects data on all memory allocations made by the Odigos collector since its start, including freed memory. The output is saved to `allocs.out` and is useful for understanding memory allocation patterns. ```Bash curl -o allocs.out http://localhost:1777/debug/pprof/allocs ``` -------------------------------- ### Configuring Odigos Agent with Jaeger Destination (Shell) Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/building-a-pipeline.mdx This shell command creates or overwrites the Odigos agent configuration file (`/etc/odigos-vmagent/agent.yaml`). It defines systemd services to be instrumented (Go, Java, Python) and configures a Jaeger destination for traces, specifying the Jaeger URL. This setup enables Odigos to automatically collect traces from the specified demo services and forward them to a local Jaeger instance. ```shell sudo bash -c 'cat > /etc/odigos-vmagent/agent.yaml <` with your actual bucket name. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:GetObjectAcl", "s3:DeleteObject" ], "Resource": ["arn:aws:s3:::", "arn:aws:s3:::/*"] } ] } ``` -------------------------------- ### Initializing Go Workspace for Odigos Source: https://github.com/odigos-io/odigos/blob/main/DEVELOPMENT.md This command initializes a Go workspace in the current directory and adds all Odigos modules within the repository to it. This helps IDEs like VSCode resolve local dependencies without complex `go mod replace` statements. ```Bash go work init go work use -r . ``` -------------------------------- ### Creating a New KinD Kubernetes Cluster Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command creates a new local Kubernetes cluster named 'odigos-demo' using KinD. This cluster will serve as the environment for deploying and testing Odigos components. ```bash kind create cluster --name odigos-demo ``` -------------------------------- ### Installing Odigos VM Agent with DNF Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/installation.mdx This snippet installs the Odigos VM Agent package using the DNF package manager, which is prevalent on Fedora/RHEL-based systems. It requires `sudo` privileges for system-wide package installation. ```shell sudo dnf install odigos ``` -------------------------------- ### Installing Odigos CLI with Homebrew (macOS) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation.mdx This snippet demonstrates how to install the Odigos CLI on macOS using the Homebrew package manager. It adds the Odigos tap and then installs the `odigos` binary, making it available system-wide. ```bash brew install odigos-io/homebrew-odigos-cli/odigos ``` -------------------------------- ### Launching Odigos Control Panel UI (Bash) Source: https://github.com/odigos-io/odigos/blob/main/docs/quickstart/installation-guide-for-beginners.mdx This command launches the Odigos control panel user interface, typically accessible via a web browser on http://localhost:3000. It runs a background program to serve the UI. ```bash odigos ui ``` -------------------------------- ### Configuring Nop Destination for Odigos Collector (Bash) Source: https://github.com/odigos-io/odigos/blob/main/CONTRIBUTING.md This `make` command configures the Odigos collector to use a 'nop' (no operation) destination. This setup allows the telemetry pipeline to process data without sending it to any external endpoint, which is useful for testing the pipeline's internal logic and structure without actual data transmission. ```bash make dev-nop-destination ``` -------------------------------- ### Running Jaeger All-in-One with OTLP Ports Source: https://github.com/odigos-io/odigos/blob/main/docs/vmagent/quickstart/introduction.mdx This command starts the Jaeger All-in-One binary, configuring its OTLP gRPC and HTTP collector endpoints to listen on specific ports (44317 and 44318). These ports are chosen to avoid conflicts with the Odigos collector, allowing Jaeger to receive traces. ```shell ./jaeger-all-in-one --collector.otlp.grpc.host-port 0.0.0.0:44317 --collector.otlp.http.host-port 0.0.0.0:44318 ``` -------------------------------- ### Defining AWS S3 Destination with Kubernetes Manifest Source: https://github.com/odigos-io/odigos/blob/main/docs/backends/awss3.mdx This YAML manifest defines an Odigos Destination custom resource for AWS S3. It specifies the S3 bucket details, data marshalling format, time granularity for partitioning, and the AWS region, enabling Odigos to send traces, metrics, and logs to the configured S3 bucket. ```yaml apiVersion: odigos.io/v1alpha1 kind: Destination metadata: name: s3-example namespace: odigos-system spec: data: S3_BUCKET: S3_MARSHALER: '' S3_PARTITION: '