Skip to content
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

Enable datadog_otel_components_ocb_build #34348

Open
wants to merge 1 commit into
base: main
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
52 changes: 26 additions & 26 deletions .gitlab/integration_test/otel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,29 @@ docker_image_build_otel:
- when: always


# datadog_otel_components_ocb_build:
# stage: integration_test
# image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
# tags: ["arch:amd64"]
# needs: ["go_deps"]
# artifacts:
# paths:
# - ocb-output.log
# - otelcol-custom.log
# - flare-info.log
# when: always
# before_script:
# - !reference [.retrieve_linux_go_deps]
# script:
# - echo "Building custom collector with datadog components"
# - test/otel/testdata/ocb_build_script.sh
# - echo "see artifacts for job logs"
# rules:
# - if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
# when: never
# - if: $CI_COMMIT_MESSAGE =~ /.*\[skip cancel\].*/
# when: never
# - if: $CI_COMMIT_REF_NAME =~ /.*-skip-cancel$/
# when: never
# - when: always
# timeout: 15 minutes
datadog_otel_components_ocb_build:
stage: integration_test
image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
needs: ["go_deps"]
artifacts:
paths:
- ocb-output.log
- otelcol-custom.log
- flare-info.log
when: always
before_script:
- !reference [.retrieve_linux_go_deps]
script:
- echo "Building custom collector with datadog components"
- test/otel/testdata/ocb_build_script.sh
- echo "see artifacts for job logs"
rules:
- if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
when: never
- if: $CI_COMMIT_MESSAGE =~ /.*\[skip cancel\].*/
when: never
- if: $CI_COMMIT_REF_NAME =~ /.*-skip-cancel$/
when: never
- when: always
timeout: 15 minutes
2 changes: 2 additions & 0 deletions comp/otelcol/ddflareextension/impl/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ func (ext *ddExtension) NotifyConfig(_ context.Context, conf *confmap.Conf) erro
}

ext.configStore.set(string(envBytes), string(enhancedBytes))
} else {
ext.configStore.set("", string(enhancedBytes))
}

extensionConfs, err := conf.Sub("extensions")
Expand Down
17 changes: 17 additions & 0 deletions test/otel/testdata/ocb_build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ dd_mods=$(find . -type f -name "go.mod" -exec dirname {} \; | sort | sed 's/.//'
for mod in $dd_mods; do
echo "- github.com/DataDog/datadog-agent$mod => $current_dir$mod"
done



# Use a forked version of the Datadog exporter
#
# This change adds a replace directive for the datadog exporter to point to a forked version: GitHub Comparison: https://github.com/open-telemetry/opentelemetry-collector-contrib/compare/main...ogaca-dd:opentelemetry-collector-contrib:olivierg/tmp-fix-ocb
#
# Issues Fixed:
# 1. Dependency Mismatch:
# - connector/datadogconnector/go.mod does not reference the latest version of exporter/datadogexporter.
# - This adjustment is necessary until opentelemetry-collector-contrib v0.121.0 is officially released.
# 2. Compatibility Issue:
# - opentelemetry-collector-contrib fails to compile due to recent changes in the Datadog Agent.
# - The pkgconfigmodel package was renamed to viperconfig, breaking compatibility with the latest updates.
echo "- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter => github.com/ogaca-dd/opentelemetry-collector-contrib/exporter/datadogexporter v0.0.0-20250220150909-786462df4eca" >> /tmp/otel-ci/builder-config.yaml
Copy link
Contributor

@jade-guiton-dd jade-guiton-dd Feb 25, 2025

Choose a reason for hiding this comment

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

Is the idea that this would be removed after the next contrib release?

Copy link
Member

Choose a reason for hiding this comment

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



} >>"$WORK_DIR/builder-config.yaml"

# Install and configure OCB
Expand Down