diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d85cc85b3..d92180cef04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm This can be reverted by setting `github.com/prometheus/common/model.NameValidationScheme` to `LegacyValidation` in `github.com/prometheus/common/model`. (#6433) - Initialize map with `len(keys)` in `NewAllowKeysFilter` and `NewDenyKeysFilter` to avoid unnecessary allocations in `go.opentelemetry.io/otel/attribute`. (#6455) - `go.opentelemetry.io/otel/log/logtest` is now a separate Go module. (#6465) +- `go.opentelemetry.io/otel/sdk/log/logtest` is now a separate Go module. (#6466) ### Fixes diff --git a/exporters/otlp/otlplog/otlploggrpc/go.mod b/exporters/otlp/otlplog/otlploggrpc/go.mod index b0ffcbaea0e..bf6a0314754 100644 --- a/exporters/otlp/otlplog/otlploggrpc/go.mod +++ b/exporters/otlp/otlplog/otlploggrpc/go.mod @@ -10,6 +10,7 @@ require ( go.opentelemetry.io/otel/log v0.11.0 go.opentelemetry.io/otel/sdk v1.35.0 go.opentelemetry.io/otel/sdk/log v0.11.0 + go.opentelemetry.io/otel/sdk/log/logtest v0.0.0-00000000000000-000000000000 go.opentelemetry.io/otel/trace v1.35.0 go.opentelemetry.io/proto/otlp v1.5.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 @@ -37,6 +38,8 @@ replace go.opentelemetry.io/otel => ../../../.. replace go.opentelemetry.io/otel/sdk/log => ../../../../sdk/log +replace go.opentelemetry.io/otel/sdk/log/logtest => ../../../../sdk/log/logtest + replace go.opentelemetry.io/otel/sdk => ../../../../sdk replace go.opentelemetry.io/otel/log => ../../../../log diff --git a/exporters/otlp/otlplog/otlploghttp/go.mod b/exporters/otlp/otlplog/otlploghttp/go.mod index 6336d765297..3688823ee3e 100644 --- a/exporters/otlp/otlplog/otlploghttp/go.mod +++ b/exporters/otlp/otlplog/otlploghttp/go.mod @@ -10,6 +10,7 @@ require ( go.opentelemetry.io/otel/log v0.11.0 go.opentelemetry.io/otel/sdk v1.35.0 go.opentelemetry.io/otel/sdk/log v0.11.0 + go.opentelemetry.io/otel/sdk/log/logtest v0.0.0-00000000000000-000000000000 go.opentelemetry.io/otel/trace v1.35.0 go.opentelemetry.io/proto/otlp v1.5.0 google.golang.org/protobuf v1.36.5 @@ -37,6 +38,8 @@ replace go.opentelemetry.io/otel => ../../../.. replace go.opentelemetry.io/otel/sdk/log => ../../../../sdk/log +replace go.opentelemetry.io/otel/sdk/log/logtest => ../../../../sdk/log/logtest + replace go.opentelemetry.io/otel/trace => ../../../../trace replace go.opentelemetry.io/otel/sdk => ../../../../sdk diff --git a/exporters/stdout/stdoutlog/go.mod b/exporters/stdout/stdoutlog/go.mod index cfcad9619dc..2e648c2df2f 100644 --- a/exporters/stdout/stdoutlog/go.mod +++ b/exporters/stdout/stdoutlog/go.mod @@ -8,6 +8,7 @@ require ( go.opentelemetry.io/otel/log v0.11.0 go.opentelemetry.io/otel/sdk v1.35.0 go.opentelemetry.io/otel/sdk/log v0.11.0 + go.opentelemetry.io/otel/sdk/log/logtest v0.0.0-00000000000000-000000000000 go.opentelemetry.io/otel/trace v1.35.0 ) @@ -25,6 +26,8 @@ require ( replace go.opentelemetry.io/otel/sdk/log => ../../../sdk/log +replace go.opentelemetry.io/otel/sdk/log/logtest => ../../../sdk/log/logtest + replace go.opentelemetry.io/otel/log => ../../../log replace go.opentelemetry.io/otel => ../../.. diff --git a/sdk/log/logtest/go.mod b/sdk/log/logtest/go.mod new file mode 100644 index 00000000000..de7ce99da75 --- /dev/null +++ b/sdk/log/logtest/go.mod @@ -0,0 +1,36 @@ +module go.opentelemetry.io/otel/sdk/log/logtest + +go 1.23.0 + +require ( + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/otel v1.35.0 + go.opentelemetry.io/otel/log v0.11.0 + go.opentelemetry.io/otel/sdk v1.35.0 + go.opentelemetry.io/otel/sdk/log v0.11.0 + go.opentelemetry.io/otel/trace v1.35.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + golang.org/x/sys v0.31.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/otel/metric => ../../../metric + +replace go.opentelemetry.io/otel/trace => ../../../trace + +replace go.opentelemetry.io/otel/sdk => ../../ + +replace go.opentelemetry.io/otel/sdk/log => ../ + +replace go.opentelemetry.io/otel/log => ../../../log + +replace go.opentelemetry.io/otel => ../../.. diff --git a/sdk/log/logtest/go.sum b/sdk/log/logtest/go.sum new file mode 100644 index 00000000000..fd4d26c2ba2 --- /dev/null +++ b/sdk/log/logtest/go.sum @@ -0,0 +1,30 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/versions.yaml b/versions.yaml index 39cda1ab496..57e09badbb1 100644 --- a/versions.yaml +++ b/versions.yaml @@ -41,4 +41,5 @@ module-sets: excluded-modules: - go.opentelemetry.io/otel/internal/tools - go.opentelemetry.io/otel/log/logtest + - go.opentelemetry.io/otel/sdk/log/logtest - go.opentelemetry.io/otel/trace/internal/telemetry/test