### Example of MSI installation log output Source: https://github.com/datadog/datadog-agent/blob/main/tools/windows/DatadogAgentInstaller/QA/README.md This is an example output from analyzing MSI installation logs, showing detailed steps, custom actions, and context around specific events. ```text [09/28/23 13:46:14] == datadog-agent-7.49.0-1.x86_64.msi with args [09/28/23 13:47:15] == Running scenario 'test case 1' [09/28/23 13:47:15] == Installing datadog-agent-7.49.0-1.x86_64.msi with args Action start 13:47:16: WixSharp_InitRuntime_Action. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSIE0A5.tmp- SFXCA: Binding to CLR version v4.0.30319 > Calling custom action WixSharp!WixSharp.ManagedProjectActions.WixSharp_InitRuntime_Action Action ended 13:47:17: WixSharp_InitRuntime_Action. Return value 1. Action start 13:47:17: AppSearch. Action ended 13:47:17: AppSearch. Return value 1. Action start 13:47:17: ReadInstallState. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSIE3A4.tmp- SFXCA: Binding to CLR version v4.0.30319 > Calling custom action CustomActions!Datadog.CustomActions.InstallStateCustomActions.ReadInstallState CA: 13:47:18: RegistryProperty. Found DDAGENTUSER_NAME in registry win-3f423u4i7ug\ddagentuser CA: 13:47:18: RegistryProperty. Found PROJECTLOCATION in registry C:\Program Files\Datadog\Datadog Agent\ CA: 13:47:18: RegistryProperty. Found APPLICATIONDATADIRECTORY in registry C:\ProgramData\Datadog\ Action start 13:47:25: ReadConfig. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI1EC.tmp- SFXCA: Binding to CLR version v4.0.30319 > Calling custom action CustomActions!Datadog.CustomActions.ConfigCustomActions.ReadConfig Action ended 13:47:27: ReadConfig. Return value 1. Action start 13:47:27: MigrateFeatureStates. Action ended 13:47:27: MigrateFeatureStates. Return value 1. Action start 13:47:31: ProcessDdAgentUserCredentials. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI190F.tmp- SFXCA: Binding to CLR version v4.0.30319 > Calling custom action CustomActions!Datadog.CustomActions.ProcessUserCustomActions.ProcessDdAgentUserCredentials CA: 13:47:32: ProcessDdAgentUserCredentials. Found ddagentuser in WIN-3F423U4I7UG as SidTypeUser CA: 13:47:32: ProcessDdAgentUserCredentials. "WIN-3F423U4I7UG\ddagentuser" (S-1-5-21-2624507216-3994333568-3321347143-1000, SidTypeUser) is a local account CA: 13:47:32: ProcessDdAgentUserCredentials. Installing with DDAGENTUSER_PROCESSED_NAME=ddagentuser and DDAGENTUSER_PROCESSED_DOMAIN=WIN-3F423U4I7UG Action start 13:48:33: PrepareDecompressPythonDistributions. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSIBC7.tmp- SFXCA: Binding to CLR version v4.0.30319 > Calling custom action CustomActions!Datadog.CustomActions.PythonDistributionCustomAction.PrepareDecompressPythonDistributions CA: 13:48:34: PrepareDecompressPythonDistributions. Could not set the progress bar size ``` -------------------------------- ### Virtualenv Setup for Python Check Dependencies Source: https://github.com/datadog/datadog-agent/blob/main/docs/dev/checks/README.md This example demonstrates setting up a virtual environment and installing necessary dependencies, including datadog-checks-base, to run Python checks. ```bash python3 -m pip install virtualenv python3 -m pip install '/path/to/integrations-core/datadog_checks_base[deps]' PYTHONPATH="$PWD/venv/lib/python3.10/site-packages:$PYTHONPATH" dda inv agent.run ``` -------------------------------- ### Analyze Datadog Agent installation logs Source: https://github.com/datadog/datadog-agent/blob/main/tools/windows/DatadogAgentInstaller/QA/README.md This example shows how to parse installation logs to find specific patterns, like 'Running CustomAction', and display them with surrounding context lines for detailed analysis. ```powershell Suite "My new test suite" { Case "test case 1" { Require @( "datadog-agent-7.49.0-1.x86_64.msi" ) Test { $installResult = Install-MSI -installerName datadog-agent-7.49.0-1.x86_64.msi Assert_InstallSuccess $installResult $installResult.InstallLogs | Selec-String -Pattern "Running CustomAction" -Context 3 | Write-Host } } } ``` -------------------------------- ### User Install Setup for Python Check Dependencies Source: https://github.com/datadog/datadog-agent/blob/main/docs/dev/checks/README.md This example shows how to install Python check dependencies using a user-level pip install and setting the PYTHONPATH environment variable. ```bash python3 -m pip install --user '/path/to//integrations-core/datadog_checks_base[deps]' PYTHONPATH="$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH" dda inv agent.run ``` -------------------------------- ### Run Datadog Agent Installer QA Script Source: https://github.com/datadog/datadog-agent/blob/main/tools/windows/DatadogAgentInstaller/QA/README.md Example command to execute the QA test suite for the Datadog Agent Windows installer. Ensure all required parameters are provided. ```powershell PS C:\dev\datadog-agent> & .\tools\windows\DatadogAgentInstaller\QA\qa_installer.ps1 -vmName "Windows Server 2022 FR" -vmUserName "win-3f423u4i7ug\administrateur" -vmUserPassword "********" -vmInitialSnapshotName "Windows Server 2022 FR - (27/07/2023 - 12:06:27)" -qaSessionname "Non-canonical permission issue QA" -qaArtifactsPath "C:\dev\QA\artifacts" ``` -------------------------------- ### Full build-ddot-byoc Example Source: https://github.com/datadog/datadog-agent/blob/main/tools/build-ddot-byoc/README.md An example demonstrating how to use `build-ddot-byoc` with specific OCI URLs, local binary path, and target OS/architecture. ```bash ./build-ddot-byoc \ --agent-oci registry.datadoghq.com/agent:7.78.0 \ --otel-agent ./bin/otel-agent/otel-agent \ --output-oci my-registry/my-project/ddot-byoc/agent:custom \ --os linux \ --arch amd64 ``` -------------------------------- ### Start DogStatsD with Configuration File Source: https://github.com/datadog/datadog-agent/blob/main/cmd/dogstatsd/README.md Use this command to start DogStatsD with a specified configuration file. ```bash dogstatsd start -f datadog.yaml ``` -------------------------------- ### Install Development Tools Source: https://github.com/datadog/datadog-agent/blob/main/AGENTS.md Run this command to install any missing development tools required for the project. ```bash dda inv install-tools ``` -------------------------------- ### Start Developer Environment with Local Checkout Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/tutorials/dev/env.md Start a developer environment using your existing local clone of the Datadog Agent repository. ```bash dda env dev start ``` -------------------------------- ### Changelog Upgrade Example Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/guidelines/contributing.md List actions or limitations upon upgrading the Agent. This example shows how to document upgrade-related information. ```yaml upgrade: - | If you run a Nomad agent older than 0.6.0, the `nomad_group` tag will be absent until you upgrade your orchestrator. ``` -------------------------------- ### SECL args_flags and args_options examples Source: https://github.com/datadog/datadog-agent/blob/main/CHANGELOG.rst Examples demonstrating the usage of \"args_flags\" and \"args_options\" in SECL for runtime security rules based on command line arguments. ```plaintext Examples: - ``version`` is part of ``args_flags`` for the command ``cat --version`` - ``l`` and ``n`` both are in ``args_flags`` for the command ``netstat -ln`` - ``T=8`` and ``width=8`` both are in ``args_options`` for the command ``ls -T 8 --width=8``. ``` -------------------------------- ### Install Pre-commit Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/setup/optional.md Install the `pre-commit` tool using the Datadog Agent's development utility. This is a prerequisite for setting up local pre-commit hooks. ```shell dda self pip install pre-commit ``` -------------------------------- ### Configure Kubernetes Resources as Tags Source: https://github.com/datadog/datadog-agent/blob/main/CHANGELOG.rst Associate group resources with annotations-to-tags or labels-to-tags maps. For example, 'pods' can be associated with an annotations-to-tags map to configure annotations as tags for pods. ```json {"pods": {"annotationKey1": "tag1", "annotationKey2": "tag2"}} ``` -------------------------------- ### Configure check_tag_cardinality for Redis Source: https://github.com/datadog/datadog-agent/blob/main/CHANGELOG.rst Example of how to set the `check_tag_cardinality` parameter in annotations for a Redis check. This overrides the base agent configuration for cardinality. ```yaml ad.datadoghq.com/redis.checks: | { "redisdb": { "check_tag_cardinality": "high", "instances": [ { "host": "%%host%%", "port": "6379" } ] } } ``` -------------------------------- ### Initialize and Use Forwarder Source: https://github.com/datadog/datadog-agent/blob/main/comp/forwarder/defaultforwarder/README.md Demonstrates how to initialize a new forwarder with multiple API keys per domain, start it, submit payloads, and stop it. ```go KeysPerDomains := map[string][]string{ "http://api.datadog.com": {"my_secret_key_1", "my_secret_key_2"}, "http://debug.api.com": {"secret_api"}, } forwarder := forwarder.NewForwarder(KeysPerDomains) forwarder.NumberOfWorkers = 1 // default: config.GetInt("forwarder_num_workers") forwarder.Start() // ... payload1 := []byte("some payload") payload2 := []byte("another payload") forwarder.SubmitSeries(Payloads{&payload1, &payload2}, ...) // ... forwarder.Stop() ``` -------------------------------- ### Initialize KMT with All VM Images Source: https://github.com/datadog/datadog-agent/blob/main/tasks/kernel_matrix_testing/README.md Initializes the KMT environment by downloading all available VM images for the current architecture. This process can be time-consuming. ```bash dda inv -e kmt.init --all-images ``` -------------------------------- ### Initialize KMT for Full Setup (Local & Remote) Source: https://github.com/datadog/datadog-agent/blob/main/tasks/kernel_matrix_testing/README.md Initializes KMT for both local and remote VMs, downloading necessary VM images and configuring SSH keys. Use `kmt.update-resources` and `kmt.config-ssh-key` for existing setups. ```bash # This will download the Ubuntu 22.04 image and start the SSH key setup wizard dda inv -e kmt.init --images=ubuntu_22.04 ``` -------------------------------- ### Create a package file for the new module Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/how-to/go/modules.md Create a doc.go file with the necessary package declaration and license information for your new module. ```go // Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2025-present Datadog, Inc. package mymodule ``` -------------------------------- ### Fakeintake API Get Payloads Curl Example Source: https://github.com/datadog/datadog-agent/blob/main/test/fakeintake/docs/README.md Example using curl to fetch payloads from a specific POST endpoint on the fake intake server. Replace SERVICE_IP and post_endpoint_path with actual values. ```bash curl ${SERVICE_IP}/fakeintake/payloads?endpoint={post_endpoint_path} ``` ```bash curl ${SERVICE_IP}/fakeintake/payloads?endpoint=/api/V2/series ``` -------------------------------- ### PowerShell Error Reporting Example Source: https://github.com/datadog/datadog-agent/blob/main/tools/windows/DatadogAgentInstaller/QA/README.md Illustrates how PowerShell reports errors during script execution, including custom action failures. This output is useful for debugging installation issues. ```powershell [09/28/23 13:52:21] ❌ Expected installation to succeed, but it failed with code 1603 + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,report_err + PSComputerName : Windows Server 2022 FR ``` -------------------------------- ### Default OpenTelemetry Collector Configuration Source: https://github.com/datadog/datadog-agent/blob/main/comp/otelcol/README.md This is the default pipeline configuration provided with DDOT, including extensions, receivers, exporters, processors, and service pipelines. It can be used as a starting point for your OpenTelemetry Collector setup. ```yaml extensions: health_check: endpoint: localhost:13133 pprof: endpoint: localhost:1777 zpages: endpoint: localhost:55679 ddflare: endpoint: localhost:7777 receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 # Collect own metrics prometheus: config: scrape_configs: - job_name: 'otel-collector' fallback_scrape_protocol: PrometheusText0.0.4 metric_name_validation_scheme: legacy scrape_interval: 60s scrape_protocols: - PrometheusText0.0.4 static_configs: - targets: ['0.0.0.0:8888'] metric_relabel_configs: - source_labels: [__name__] regex: ".*grpc_io.*" action: drop exporters: datadog: hostname: "otelcol-docker" api: key: ${env:DD_API_KEY} site: ${env:DD_SITE} sending_queue: batch: processors: infraattributes: # using the sampler probabilistic_sampler: sampling_percentage: 30 connectors: # Use datadog connector to compute stats for pre-sampled traces datadog/connector: traces: compute_stats_by_span_kind: true peer_tags_aggregation: true service: extensions: [health_check, pprof, zpages, ddflare] pipelines: traces: # this pipeline computes APM stats receivers: [otlp] exporters: [datadog/connector] traces/sampling: # this pipeline uses sampling and sends traces receivers: [otlp] processors: [probabilistic_sampler, infraattributes] exporters: [datadog] metrics: receivers: [otlp, datadog/connector, prometheus] processors: [infraattributes] exporters: [datadog] logs: receivers: [otlp] processors: [infraattributes] exporters: [datadog] ``` -------------------------------- ### Create a Simple Fx App Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/components/fx.md Demonstrates the basic structure of an Fx application using fx.New, fx.Provide, and fx.Invoke. ```go someValue = "my password is hunter2" app := fx.New( fx.Provide(scrubber.NewScrubber), fx.Invoke(func(sc scrubber.Component) { fmt.Printf("scrubbed: %s", sc.ScrubString(somevalue)) })) app.Run() // Output: scrubbed: my password is ******* ``` -------------------------------- ### Chain Instrumentation Targets Source: https://github.com/datadog/datadog-agent/blob/main/CHANGELOG-DCA.rst Chain instrumentation targets where the first matching rule takes precedence. This example installs the Python tracer for pods labeled `language=python` and the Java tracer for pods in a namespace labeled `language=java`. ```yaml instrumentation: enabled: true targets: - name: "Python Services" podSelector: matchLabels: language: "python" ddTraceVersions: python: "default" - name: "Java Namespaces" namespaceSelector: matchLabels: language: "java" ddTraceVersions: python: "default" ``` -------------------------------- ### Build and Deploy Local Datadog Agent Image Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/tutorials/dev/lab/kind.md Build a custom Datadog Agent image locally using a specified build command, then load and install it into the Kind cluster. Ensure the developer environment is started first. ```bash dda env dev start ``` ```bash # Example: build an image tagged datadog/agent-dev:local, then load+install it dda lab local kind --id dev \ --build-command "dda inv agent.hacky-dev-image-build --target-image datadog/agent-dev:local" ``` -------------------------------- ### Query expvar for collector check names Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/how-to/debug-agents/index.md Use curl and jq to query the Agent's expvar endpoint to get the names of checks that the collector's check runner has executed. This example retrieves the keys from the 'runner.Checks' object. ```shell curl -s http://localhost:5000/debug/vars | jq '.runner.Checks | keys' ``` -------------------------------- ### Module Configuration Example Source: https://github.com/datadog/datadog-agent/blob/main/cmd/system-probe/modules/AGENTS.md Illustrates how to configure system-probe modules using a namespace pattern and environment variables. ```APIDOC ## Configuration Module configuration follows the namespace pattern: ```go // In pkg/config/setup/system_probe.go const myModuleNS = "my_module" cfg.BindEnvAndSetDefault(join(myModuleNS, "enabled"), false) cfg.BindEnvAndSetDefault(join(myModuleNS, "option1"), "default") ``` Access in module: ```go enabled := cfg.GetBool("my_module.enabled") ``` ``` -------------------------------- ### Installing datadog-checks-base as a Pre-requisite Source: https://github.com/datadog/datadog-agent/blob/main/docs/dev/checks/README.md Installs the core datadog-checks-base library, which is a prerequisite for running custom Python checks. Use this command when installing to the Python user install directory. ```bash python3 -m pip install --user './datadog_checks_base[deps]' ``` -------------------------------- ### Import and Use Core Bundle Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/components/using-components.md Shows how to import the 'core' bundle and use its components, such as 'config'. Only the explicitly requested components are instantiated by Fx. ```go import ( // We import the core bundle core "github.com/DataDog/datadog-agent/comp/core" // Then the interfaces we want to use config "github.com/DataDog/datadog-agent/comp/core/config/def" ) // [...] return fxutil.OneShot( myTestCallback, // The function to call from fxutil.OneShot core.Bundle(core.WithSecrets()), // This will tell FX how to create the all the components included in the bundle ) // [...] func myTestCallback(conf config.Component) { api_key := conf.GetString("api_key") // [...] } ``` -------------------------------- ### Install and Verify Bazel-Built Debian Package Source: https://github.com/datadog/datadog-agent/blob/main/packages/installer/MIGRATION_PLAN.md Commands to install a Bazel-built Debian package and verify its installation and version. ```bash dpkg -i datadog-installer_*.deb ls -la /usr/bin/datadog-bootstrap /usr/bin/datadog-bootstrap version ``` -------------------------------- ### Build Instructions Source: https://github.com/datadog/datadog-agent/blob/main/cmd/ai_prompt_logger/README.md Instructions for building the AI prompt logger native host binary using Cargo or Bazel. ```APIDOC ## Build From the **repository root** (workspace member): ```bash cargo build -p ai-prompt-logger-native-host --release ``` Binary: `target/release/ai-prompt-logger-native-host` (`.exe` on Windows). With Bazel (same as CI / omnibus for macOS): ```bash bazelisk build --config=release //cmd/ai_prompt_logger:ai-prompt-logger-native-host ``` ``` -------------------------------- ### Installing a Specific Standard Check (redisdb) Source: https://github.com/datadog/datadog-agent/blob/main/docs/dev/checks/README.md Installs the 'redisdb' check and its dependencies from the integrations-core repository to the Python user install directory. ```bash python3 -m pip install --user ./redisdb ``` -------------------------------- ### Install Datadog Agent CLI Source: https://github.com/datadog/datadog-agent/blob/main/AGENTS.md Installs the Datadog Agent CLI using Homebrew on macOS. This is the recommended way to install the agent for development. ```bash # install dda on mac OS brew install --cask dda ``` -------------------------------- ### Start Vagrant Development VM Source: https://github.com/datadog/datadog-agent/blob/main/devenv/README.md Use this command to start a Vagrant VM. The 'Vagrantfile' must be in the same directory as the box file. Specify the provider if it's not the default. ```bash vagrant up win-10-prl --provider=parallels ``` -------------------------------- ### Install Customized Datadog Agent Source: https://github.com/datadog/datadog-agent/blob/main/tools/build-ddot-byoc/README.md Install the Datadog Agent with the custom OpenTelemetry Collector using the standard Datadog installer, pointing to the OCI URL of the customized package. ```bash sudo datadog-installer install oci://my-registry/my-project/ddot-byoc/agent:custom ``` -------------------------------- ### Fx Dependency Injection with fx.In and fx.Out Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/components/fx.md Shows how to use fx.In and fx.Out to structure constructor dependencies and return values, improving readability and documentation. ```go type dependencies struct { fx.In Config config.Component Log log.Component Status status.Component } type provides struct { fx.Out Component // ... (we'll see why this is useful below) } func newScrubber(deps dependencies) (provides, error) { // can return an fx.Out struct and other types, such as error // .. return provides { Component: scrubber, // .. }, nil } ``` -------------------------------- ### Datadog Installer Assertion Utilities Source: https://github.com/datadog/datadog-agent/blob/main/tools/windows/DatadogAgentInstaller/QA/README.md Provides a set of assertion functions for testing Datadog Agent installations. These functions check for directory existence, ACL properties, and installation success/failure codes. ```powershell - `Assert_DaclAutoInherited_Flag_Set`: Asserts that a directory exists and it has the auto-inherited flag set. - `Assert_DaclAutoInherited_Flag_NotSet`: The opposite of the previous assertion. Provided for convenience. The directory must still exist. - `Assert_DirectoryExists`: Asserts that the directory exist. - `Assert_DirectoryNotExists`: Asserts that the directory doesn't exist. - `Assert_InstallSuccess`: Checks that the result of `Install-MSI` or `Uninstall-MSI` is 0, and if not, reports an error and prints the logs in the console. - `Assert_InstallFinishedWithCode`: Asserts that the install finished with a specific error code (typically `1603`). ``` -------------------------------- ### Install Linux Dependencies Source: https://github.com/datadog/datadog-agent/blob/main/test/e2e-framework/README.md Installs necessary Linux dependencies for the testing framework. ```bash sudo apt install libnotify-bin ``` -------------------------------- ### Install rtloader Targets Source: https://github.com/datadog/datadog-agent/blob/main/rtloader/rtloader/CMakeLists.txt Defines installation destinations for the rtloader library and headers. ```cmake install(TARGETS datadog-agent-rtloader RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION include ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) ``` -------------------------------- ### Initialize Component Dependencies for Testing Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/components/testing.md Sets up the necessary mock dependencies (config and log components) required to instantiate a component for testing. Use mocks to isolate the component under test. ```go package implzstd import ( "testing" configmock "github.com/DataDog/datadog-agent/comp/core/config/mock" logmock "github.com/DataDog/datadog-agent/comp/core/log/mock" ) func TestCompress(t *testing.T) { logComponent := configmock.New(t) configComponent := logmock.New(t) requires := Requires{ Conf: configComponent, Log: logComponent, } // [...] ``` -------------------------------- ### Initialize KMT with Specific VM Images Source: https://github.com/datadog/datadog-agent/blob/main/tasks/kernel_matrix_testing/README.md Initializes the KMT environment by downloading specified VM images and tools, and installing system dependencies. Running this command overwrites previous configurations and downloaded resources. ```bash dda inv -e kmt.init --images=ubuntu_22.04,debian_10 ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/datadog/datadog-agent/blob/main/test/e2e-framework/README.md Installs Python dependencies for the E2E framework using the dda tool. ```bash cd ~/dd/datadog-agent/test/e2e-framework && dda -v self dep sync -f legacy-e2e -f legacy-github ``` -------------------------------- ### One-time Setup Task Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/how-to/test/e2e.md Run this setup task once on a new machine to configure the E2E testing environment. It handles AWS keypair creation and Pulumi passphrase generation. ```bash dda inv e2e.setup ``` ```bash dda inv e2e.setup --with-azure --with-gcp ``` -------------------------------- ### Install Reno Source: https://github.com/datadog/datadog-agent/blob/main/docs/public/guidelines/contributing.md Install the Reno tool using pip. This is required for creating release notes. ```bash pip install reno ``` -------------------------------- ### Basic Filtering Example Source: https://github.com/datadog/datadog-agent/blob/main/comp/core/workloadfilter/README.md Demonstrates how to create a filterable container, define filter groups with precedence, generate a filter bundle, and check if a container should be excluded. ```go import ( workloadfilter "github.com/DataDog/datadog-agent/comp/core/workloadfilter/def" workloadmetafilter "github.com/DataDog/datadog-agent/comp/core/workloadfilter/util/workloadmeta" ) // Create a filterable container object filterableContainer := workloadmetafilter.CreateContainer(wmetaContainer) // Define filter groups example (in order of precedence) selectedFilterGroups := [][]workloadfilter.ContainerFilter{ // High precedence: Check autodiscovery annotations first {workloadfilter.ContainerADAnnotations}, // Medium precedence: Check legacy AC filters {workloadfilter.LegacyContainerACInclude, workloadfilter.LegacyContainerACExclude}, // Low precedence: Check global filters {workloadfilter.LegacyContainerGlobal}, } filterBundle := filterStore.GetContainerFilters(selectedFilterGroups) // Check if container should be excluded if filterBundle.IsExcluded(filterableContainer) { // Container is excluded, skip processing return } // Container is included, proceed with processing ``` -------------------------------- ### Build and Run GPU Event Viewer Source: https://github.com/datadog/datadog-agent/blob/main/pkg/gpu/testutil/event-viewer/README.md Build the GPU event viewer using the provided command and then run it with the path to the recorded events file. ```bash dda inv system-probe.build-gpu-event-viewer pkg/gpu/testutil/event-viewer/event-viewer path-to-events-file ``` -------------------------------- ### Start Process-Agent with s6-svc Source: https://github.com/datadog/datadog-agent/blob/main/Dockerfiles/agent/SUPERVISION.md Use `s6-svc -u` to re-enable and start the process-agent service after it has been disabled. ```bash root@95c063fac5c4:/# s6-svc -u /var/run/s6/services/process/ root@95c063fac5c4:/# s6-svstat /var/run/s6/services/process/ up (pid 2597) 5 seconds ```