Skip to content

Commit

Permalink
Add DogStatsD Package (#606)
Browse files Browse the repository at this point in the history
* feat: upstream dogstatsd from datadog lambda extension

* add: stand alone dogstatsd binary as example

* fix: imports

* fix: make test utils public

* fix: more test utils public

* fix: make entry public

* fix: clippy

* fix: make test config public

* Revert "fix: make test config public"

This reverts commit 7dc9799.

* fix: make fields public for tests and assertions

* use reqwest 0.12.4 in Cargo.lock

* add copyright headers

* apply formatting

* update license

* upgrade rust to 1.77.2

* install protoc binary for lint, test, and miri workflows

* install protoc binary for cross on centos7

* add dogstatsd to alpine build and upgrade alpine version

* install protoc binary for coverage

* use rust 1.76.0 and forked saluki-backport repo

* remove package specific toolchain

* refactor protoc install script to pass install path as an argument

* install protoc for benchmark ci job

* remove unzip install since it is now part of base image

* add dogstatsd integration test

* fix license

* fix merge

* fix lint error

* use localhost address for dogstatsd test

* use port 18125 for dogstatsd test

* disable dogstatsd test for miri

* dogstatsd cleanup

* fix license

* fix merge conflicts

* update alpine base image to 3.19.3

---------

Co-authored-by: alexgallotta <5581237+alexgallotta@users.noreply.github.com>
  • Loading branch information
duncanpharvey and alexgallotta committed Sep 9, 2024
1 parent 00cf6dc commit 40ca981
Show file tree
Hide file tree
Showing 22 changed files with 3,558 additions and 260 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup install nightly && rustup default nightly
- name: Install Protoc Binary
shell: bash
run: chmod +x ./scripts/install-protoc.sh && ./scripts/install-protoc.sh $HOME
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
rust_version: ${{ matrix.rust_version }}
- name: Install ${{ matrix.rust_version }} toolchain and clippy
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }} && rustup component add clippy
- name: Install Protoc Binary
shell: bash
run: chmod +x ./scripts/install-protoc.sh && ./scripts/install-protoc.sh $HOME
- name: Run clippy on ${{ matrix.platform }} ${{ matrix.rust_version }}
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
rustup set profile minimal
rustup toolchain install nightly --component miri
rustup default nightly
- name: Install Protoc Binary
shell: bash
run: chmod +x ./scripts/install-protoc.sh && ./scripts/install-protoc.sh $HOME
- uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.68
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- id: rust-version
# On Windows run happens in a PowerShell, so start bash explicitly
run: bash -c 'echo "version=$(rustc --version)" >> $GITHUB_OUTPUT'
- name: Install Protoc Binary
shell: bash
run: chmod +x ./scripts/install-protoc.sh && ./scripts/install-protoc.sh $HOME
- name: Install cargo nextest
uses: taiki-e/install-action@v2
with:
Expand All @@ -49,18 +52,22 @@ jobs:
shell: bash
run: rm -rf target/nextest/ci/junit.xml
- name: "[${{ steps.rust-version.outputs.version}}] cargo build --workspace --exclude builder --verbose"
shell: bash
run: cargo build --workspace --exclude builder --verbose
- name: "[${{ steps.rust-version.outputs.version}}] cargo nextest run --workspace --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'"
shell: bash
# Run doc tests with cargo test and run tests with nextest and generate junit.xml
run: cargo test --workspace --exclude builder --doc --verbose && cargo nextest run --workspace --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'
env:
RUST_BACKTRACE: 1
- name: "[${{ steps.rust-version.outputs.version}}] Tracing integration tests: cargo nextest run --workspace --exclude builder --profile ci --verbose -E 'test(tracing_integration_tests::)'"
if: runner.os == 'Linux'
shell: bash
run: cargo nextest run --workspace --exclude builder --profile ci --verbose -E 'test(tracing_integration_tests::)'
env:
RUST_BACKTRACE: 1
- name: "[${{ steps.rust-version.outputs.version}}] RUSTFLAGS=\"-C prefer-dynamic\" cargo nextest run --package test_spawn_from_lib --features prefer-dynamic -E '!test(tracing_integration_tests::)'"
shell: bash
run: cargo nextest run --package test_spawn_from_lib --features prefer-dynamic -E '!test(tracing_integration_tests::)'
env:
RUSTFLAGS: "-C prefer-dynamic"
Expand Down
1 change: 1 addition & 0 deletions .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ benchmarks:
interruptible: true
timeout: 1h
script:
- chmod +x ./scripts/install-protoc.sh && . ./scripts/install-protoc.sh $HOME/usr/local
- export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :)
- git clone --branch libdatadog/benchmarks https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform /platform && cd /platform
- ./steps/capture-hardware-software-info.sh
Expand Down
Loading

0 comments on commit 40ca981

Please sign in to comment.