Skip to content

Prepare agent_with_custom_components.md for ddot. #28672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions content/en/opentelemetry/agent/agent_with_custom_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ Download the Dockerfile template:
```
2. Download the Dockerfile
```shell
curl -o Dockerfile https://raw.githubusercontent.com/DataDog/datadog-agent/refs/tags/{{< version key="agent_version" >}}/Dockerfiles/agent-ot/Dockerfile.agent-otel
curl -o Dockerfile https://raw.githubusercontent.com/DataDog/datadog-agent/refs/tags/{{< version key="agent_version" >}}/Dockerfiles/agent-ddot/Dockerfile.agent-otel
```

The Dockerfile:

- Creates a [multi-stage build][6] with Ubuntu 24.04 and `datadog/agent:{{% version key="agent_tag_jmx" %}}`.
- Creates a [multi-stage build][6] with Ubuntu 24.04 and `datadog/agent:{{% version key="agent_tag" %}}`.
- Installs Go, Python, and necessary dependencies.
- Downloads and unpacks the Datadog Agent source code.
- Creates a virtual environment and installs required Python packages.
- Builds the OpenTelemetry agent and copies the resulting binary to the final image.

<div class="alert alert-info">The <code>main</code> branch has the most up-to-date version of the <a href="https://github.com/DataDog/datadog-agent/blob/main/Dockerfiles/agent-ot/Dockerfile.agent-otel">Dockerfile</a>. However, it is a development branch that is subject to frequent changes and is less stable than the release tags. For production and other stable use cases, use the tagged versions as listed in this guide.</div>
<div class="alert alert-info">The <code>main</code> branch has the most up-to-date version of the <a href="https://github.com/DataDog/datadog-agent/blob/main/Dockerfiles/agent-ddot/Dockerfile.agent-otel">Dockerfile</a>. However, it is a development branch that is subject to frequent changes and is less stable than the release tags. For production and other stable use cases, use the tagged versions as listed in this guide.</div>

## Create an OpenTelemetry Collector Builder manifest

Expand Down Expand Up @@ -105,8 +105,9 @@ Build your custom Datadog Agent image and push it to a container registry.
1. Build the image with Docker:
```shell
docker build . -t agent-otel --no-cache \
--build-arg AGENT_VERSION="{{< version key="agent_tag_jmx" >}}" \
--build-arg AGENT_BRANCH="{{< version key="agent_branch" >}}"
--build-arg AGENT_VERSION="{{< version key="agent_tag" >}}" \
--build-arg AGENT_BRANCH="{{< version key="agent_branch" >}}" \
--build-arg AGENT_REPO="datadog/agent"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned, since customers should use the release branch, I would maybe change the docs to indicate at step 0 to switch to the corresponding release branch/tag. We can use the agent_version or agent_branch variables for this, I think agent_version is better.

I would then remove the AGENT_REPO build arg, because it would be properly set in the Dockerfile, and should be transparent to the customer. I'd like to keep AGENT_REPO as a bit of a hidden feature.

Copy link
Contributor Author

@ogaca-dd ogaca-dd Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR, AGENT_REPO=datadog/agent-dev. We have to set AGENT_REPO to datadog/agent when using tag, like 7.65.0-full because tags are defined in repo datadog/agent . Did I miss something?

```
2. Tag and push the image:
```shell
Expand All @@ -116,6 +117,10 @@ Build your custom Datadog Agent image and push it to a container registry.
Replace `<IMAGE-NAME>` and `<IMAGE-TAG>` with your image name and desired tag. If the target repository is not Docker Hub, you need to include the repository name.
3. For a Helm chart installation, set the image tag in your values file:
{{< code-block lang="yaml" filename="datadog-values.yaml" collapsible="true" >}}
datadog:
env:
- name: DD_OTELCOLLECTOR_ENABLED
value: true
agents:
image:
repository: <YOUR-REPO>
Expand Down Expand Up @@ -189,6 +194,7 @@ Create a sample configuration file and run your custom Agent to ensure everythin
-e DD_API_KEY=XX \
-e DD_SITE=datadoghq.com \
-e DD_HOSTNAME=datadog \
-e DD_OTELCOLLECTOR_ENABLED=true \
-v $(pwd)/config.yaml:/config.yaml \
-p 4317:4317 \
-p 4318:4318 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Set `<DATADOG_SITE>` to your [Datadog site][2]. Otherwise, it defaults to `datad
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true
...
{{< /code-block >}}
Expand Down Expand Up @@ -345,7 +345,7 @@ Your `datadog-values.yaml` file should look something like this:
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true

datadog:
Expand Down
4 changes: 2 additions & 2 deletions content/en/opentelemetry/agent/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ datadog:
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true
...
{{< /code-block >}}
Expand Down Expand Up @@ -257,7 +257,7 @@ Your `datadog-values.yaml` file should look something like this:
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true

datadog:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Descargue la plantilla del archivo Docker:

El archivo Docker:

- Crea una [compilación multietapa][6] con Ubuntu 24.04 y `datadog/agent:{{% version key="agent_tag_jmx" %}}`.
- Crea una [compilación multietapa][6] con Ubuntu 24.04 y `datadog/agent:{{% version key="agent_tag" %}}`.
- Instala Go, Python y las dependencias necesarias.
- Descarga y descomprime el código fuente del Datadog Agent.
- Crea un entorno virtual e instala los paquetes Python necesarios.
Expand Down Expand Up @@ -105,7 +105,7 @@ Crea tu imagen personalizada del Datadog Agent y envíala a un registro de conte
1. Crea la imagen con Docker:
```shell
docker build . -t agent-otel --no-cache \
--build-arg AGENT_VERSION="{{< version key="agent_tag_jmx" >}}" \
--build-arg AGENT_VERSION="{{< version key="agent_tag" >}}" \
--build-arg AGENT_BRANCH="{{< version key="agent_branch" >}}"
```
2. Etiquetar y enviar la imagen:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Configura `<DATADOG_SITE>` como tu [sitio Datadog][2]. De lo contrario, por defe
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true
...
{{< /code-block >}}
Expand Down Expand Up @@ -341,7 +341,7 @@ Your `datadog-values.yaml` file should look something like this:
agents:
image:
repository: gcr.io/datadoghq/agent
tag: {{< version key="agent_tag_jmx" >}}
tag: {{< version key="agent_tag" >}}
doNotCheckTag: true

datadog:
Expand Down
9 changes: 4 additions & 5 deletions data/versions.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Core versions
agent_version: "7.62.2"
agent_branch: "7.62.x"
collector_version: "0.115.0"
agent_version: "7.65.0"
agent_branch: "7.65.x"
collector_version: "0.122.0"

# Tags
agent_tag: "7.62.2-ot-beta"
agent_tag_jmx: "7.62.2-ot-beta-jmx"
agent_tag: "7.65.0-full"
Loading