Skip to content

Commit

Permalink
opentelemetry-go-contrib: initial integration (#13006)
Browse files Browse the repository at this point in the history
Towards
open-telemetry/opentelemetry-go-contrib#6605

OpenTelemetry is a collection of APIs, SDKs, and tools to instrument,
generate, collect, and export telemetry data (metrics, logs, and
traces). It is a CNCF-hosted project that is adopted by companies like
eBay, GitHub, Shopify, Skyscanner [and many
others](https://opentelemetry.io/ecosystem/adopters/).

This is adding fuzz tests for
https://github.com/open-telemetry/opentelemetry-go-contrib repository.
Here are the current fuzz tests:
https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/config/v0.3.0/fuzz_test.go
 
I think it would be good to add
https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/config/testdata
as corpus, but I would rather do it in a separate PR.
  • Loading branch information
pellared authored Feb 18, 2025
1 parent 11c68ac commit 26fc679
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
20 changes: 20 additions & 0 deletions projects/opentelemetry-go-contrib/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN go install github.com/AdamKorcz/go-118-fuzz-build@latest
RUN git clone --depth 1 https://github.com/open-telemetry/opentelemetry-go-contrib
COPY build.sh $SRC/
24 changes: 24 additions & 0 deletions projects/opentelemetry-go-contrib/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash -eu
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

cd $SRC/opentelemetry-go-contrib

pushd config/v0.3.0
go get github.com/AdamKorcz/go-118-fuzz-build/testing
compile_native_go_fuzzer $(go list) FuzzJSON FuzzJSON
compile_native_go_fuzzer $(go list) FuzzYAML FuzzYAML
popd
10 changes: 10 additions & 0 deletions projects/opentelemetry-go-contrib/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
homepage: "https://opentelemetry.io/"
language: go
primary_contact: "[email protected]"
main_repo: "https://github.com/open-telemetry/opentelemetry-go-contrib/"
auto_ccs:
- "[email protected]"
fuzzing_engines:
- libfuzzer
sanitizers:
- address

0 comments on commit 26fc679

Please sign in to comment.