Skip to content

Commit

Permalink
Merge branch 'main' into otelgrpc-use-statshandler
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyuancheung committed Mar 5, 2023
2 parents a89aaea + de302a1 commit 9cac2f9
Show file tree
Hide file tree
Showing 218 changed files with 2,262 additions and 1,932 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ on:
env:
# path to where test results will be saved
TEST_RESULTS: /tmp/test-results
# Default minimum version of Go to support.
DEFAULT_GO_VERSION: 1.19
# Default version of Go to use by CI workflows. This should be the latest
# release of Go; developers likely use the latest release in development and
# we want to catch any bugs (e.g. lint errors, race detection) with this
# release before they are merged. The Go compatibility guarantees ensure
# backwards compatibility with the previous two minor releases and we
# explicitly test our code for these versions so keeping this at prior
# versions does not add value.
DEFAULT_GO_VERSION: "1.20"
jobs:
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,7 +115,7 @@ jobs:
compatibility-test:
strategy:
matrix:
go-version: [1.19, 1.18]
go-version: ["1.20", 1.19]
os: [ubuntu-latest, macos-latest, windows-latest]
# GitHub Actions does not support arm* architectures on default
# runners. It is possible to acomplish this with a self-hosted runner
Expand Down Expand Up @@ -145,6 +151,15 @@ jobs:
GOARCH: ${{ matrix.arch }}
run: make test-short

test-compatibility:
runs-on: ubuntu-latest
needs: [compatibility-test]
steps:
- name: Test if compatibility-test workflow passed
run: |
echo ${{ needs.compatibility-test.result }}
test ${{ needs.compatibility-test.result }} == "success"
integration:
strategy:
matrix:
Expand Down Expand Up @@ -191,3 +206,13 @@ jobs:
with:
name: opentelemetry-go-contrib-test-output
path: ${{ env.TEST_RESULTS }}

test-integration:
runs-on: ubuntu-latest
needs: [integration]
steps:
- name: Test if integration workflow passed
run: |
echo ${{ needs.integration.result }}
test ${{ needs.integration.result }} == "success"
2 changes: 1 addition & 1 deletion .github/workflows/create-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20

- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v3
with:
go-version: '^1.14.0'
go-version: '^1.20.0'
- uses: evantorrie/mott-the-tidier@v1-beta
id: modtidy
with:
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ linters-settings:
- name: constant-logical-expr
disabled: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
# TODO (#2877) reenable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
- name: context-as-argument
disabled: false
disabled: true
arguments:
allowTypesBefore: "*testing.T"
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
Expand Down
46 changes: 37 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,33 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Add the new `go.opentelemetry.io/contrib/instrgen` package to provide auto-generated source code instrumentation. (#3068)
- [otelgrpc] refactor otelgrpc to use grpc.StatsHandler. (#3002)

## [1.16.0-rc.1/0.41.0-rc.1/0.9.0-rc.1] - 2023-03-02

### Changed

- `samplers/jaegerremote`: change to use protobuf parser instead of encoding/json to accept enums as strings. (#3183)
- Dropped compatibility testing for [Go 1.18].
The project no longer guarantees support for this version of Go. (#3516)

## [1.14.0/0.39.0/0.8.0] - 2023-02-07
## [1.15.0/0.40.0/0.9.0] - 2023-02-27

This release is the last to support [Go 1.18].
The next release will require at least [Go 1.19].

### Added

- Support [Go 1.20]. (#3372)
- Add `SpanNameFormatter` option to package `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`. (#3343)

### Changed

- Change `runtime.uptime` instrument in `go.opentelemetry.io/contrib/instrumentation/runtime` from `Int64ObservableUpDownCounter` to `Int64ObservableCounter`,
since the value is monotonic. (#3347)
- `samplers/jaegerremote`: change to use protobuf parser instead of encoding/json to accept enums as strings. (#3183)
- Change to use protobuf parser instead of encoding/json to accept enums as strings in `go.opentelemetry.io/contrib/samplers/jaegerremote`. (#3183)

### Fixed

- The GCE detector in `go.opentelemetry.io/contrib/detectors/gcp` includes the "cloud.region" attribute when appropriate. (#3367)
- The span name of producer spans from `go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama` is corrected to use `publish` instead of `send`. (#3396)
- Attribute types are corrected in `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`. (#3396)
- Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama/example/producer`. (#3396)
- Do not assume "aws" partition in ecs detector to prevent panic in `go.opentelemetry.io/contrib/detectors/aws/ecs`. (#3167)
- The span name of producer spans from `go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama` is corrected to use `publish` instead of `send`. (#3369)
- Attribute types are corrected in `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`. (#3369)
- `aws.dynamodb.table_names` is now a string slice value.
- `aws.dynamodb.global_secondary_indexes` is now a string slice value.
- `aws.dynamodb.local_secondary_indexes` is now a string slice value.
Expand All @@ -38,6 +48,18 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `aws.dynamodb.provisioned_read_capacity` is now a `float64` value.
- `aws.dynamodb.provisioned_write_capacity` is now a `float64` value.

## [1.14.0/0.39.0/0.8.0] - 2023-02-07

### Changed

- Change `runtime.uptime` instrument in `go.opentelemetry.io/contrib/instrumentation/runtime` from `Int64ObservableUpDownCounter` to `Int64ObservableCounter`,
since the value is monotonic. (#3347)
- `samplers/jaegerremote`: change to use protobuf parser instead of encoding/json to accept enums as strings. (#3183)

### Fixed

- The GCE detector in `go.opentelemetry.io/contrib/detectors/gcp` includes the "cloud.region" attribute when appropriate. (#3367)

## [1.13.0/0.38.0/0.7.0] - 2023-01-30

### Added
Expand Down Expand Up @@ -653,7 +675,9 @@ First official tagged release of `contrib` repository.
- Prefix support for dogstatsd (#34)
- Update Go Runtime package to use batch observer (#44)

[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.14.0...HEAD
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v1.16.0-rc.1...HEAD
[1.16.0-rc.1/0.41.0-rc.1/0.9.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.16.0-rc.1
[1.15.0/0.40.0/0.9.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.15.0
[1.14.0/0.39.0/0.8.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.14.0
[1.13.0/0.38.0/0.7.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.13.0
[1.12.0/0.37.0/0.6.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.12.0
Expand Down Expand Up @@ -695,3 +719,7 @@ First official tagged release of `contrib` repository.
[0.8.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.8.0
[0.7.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.7.0
[0.6.1]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.6.1

[Go 1.20]: https://go.dev/doc/go1.20
[Go 1.19]: https://go.dev/doc/go1.19
[Go 1.18]: https://go.dev/doc/go1.18
47 changes: 44 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,52 @@
#
#
# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
# https://help.github.com/en/articles/about-code-owners
#
# NOTE: Lines should be entered in the following format:
# <component_path_relative_from_project_root>/<min_1_space><owner_1><space><owner_2><space>..<owner_n>
# instrumentation/net/http/otelhttp/ @open-telemetry/collector-go-approvers @madvikinggod @mralias
# Path separator and minimum of 1 space between component path and owners is
# important for validation steps
#

* @jmacd @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu
* @open-telemetry/go-approvers

CODEOWNERS @MrAlias @Aneurysm9 @MadVikingGod

instrgen/ @open-telemetry/go-approvers @MrAlias @pdelewski
detectors/aws/ @open-telemetry/go-approvers @Aneurysm9
detectors/gcp/ @open-telemetry/go-approvers @dashpole

instrumentation/github.com/astaxie/beego/otelbeego/ @open-telemetry/go-approvers
instrumentation/github.com/aws/aws-lambda-go/otellambda/ @open-telemetry/go-approvers @Aneurysm9
instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/ @open-telemetry/go-approvers @Aneurysm9
instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/ @open-telemetry/go-approvers
instrumentation/github.com/emicklei/go-restful/otelrestful/ @open-telemetry/go-approvers
instrumentation/github.com/gin-gonic/gin/otelgin/ @open-telemetry/go-approvers @hanyuancheung
instrumentation/github.com/go-kit/kit/otelkit/ @open-telemetry/go-approvers
instrumentation/github.com/gocql/gocql/otelgocql/ @open-telemetry/go-approvers
instrumentation/github.com/gorilla/mux/otelmux/ @open-telemetry/go-approvers
instrumentation/github.com/labstack/echo/otelecho/ @open-telemetry/go-approvers
instrumentation/github.com/Shopify/sarama/otelsarama/ @open-telemetry/go-approvers @pellared @hanyuancheung
instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/ @open-telemetry/go-approvers
instrumentation/google.golang.org/grpc/otelgrpc/ @open-telemetry/go-approvers @dashpole @hanyuancheung
instrumentation/gopkg.in/macaron.v1/otelmacaron/ @open-telemetry/go-approvers

instrumentation/host/ @open-telemetry/go-approvers @MadVikingGod
instrumentation/net/http/httptrace/otelhttptrace/ @open-telemetry/go-approvers @Aneurysm9 @dmathieu
instrumentation/net/http/otelhttp/ @open-telemetry/go-approvers @Aneurysm9 @dmathieu
instrumentation/runtime/ @open-telemetry/go-approvers @MadVikingGod

propagators/autoprop/ @open-telemetry/go-approvers @MrAlias
propagators/aws/ @open-telemetry/go-approvers @Aneurysm9
propagators/b3/ @open-telemetry/go-approvers @pellared
propagators/jaeger/ @open-telemetry/go-approvers
propagators/opencensus/ @open-telemetry/go-approvers @dashpole
propagators/ot/ @open-telemetry/go-approvers

samplers/aws/xray/ @open-telemetry/go-approvers @Aneurysm9
samplers/jaegerremote/ @open-telemetry/go-approvers
samplers/probability/consistent/ @open-telemetry/go-approvers @MadVikingGod

zpages/ @open-telemetry/go-approvers
instrgen/ @open-telemetry/go-approvers @MrAlias @pdelewski
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Approvers:
- [David Ashpole](https://github.com/dashpole), Google
- [Robert Pająk](https://github.com/pellared), Splunk
- [Chester Cheung](https://github.com/hanyuancheung), Tencent
- [Damien Mathieu](https://github.com/dmathieu), Auth0/Okta
- [Damien Mathieu](https://github.com/dmathieu), Elastic

Maintainers:

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ This project is tested on the following systems.

| OS | Go Version | Architecture |
| ------- | ---------- | ------------ |
| Ubuntu | 1.20 | amd64 |
| Ubuntu | 1.19 | amd64 |
| Ubuntu | 1.18 | amd64 |
| Ubuntu | 1.20 | 386 |
| Ubuntu | 1.19 | 386 |
| Ubuntu | 1.18 | 386 |
| MacOS | 1.20 | amd64 |
| MacOS | 1.19 | amd64 |
| MacOS | 1.18 | amd64 |
| Windows | 1.20 | amd64 |
| Windows | 1.19 | amd64 |
| Windows | 1.18 | amd64 |
| Windows | 1.20 | 386 |
| Windows | 1.19 | 386 |
| Windows | 1.18 | 386 |

While this project should work for other systems, no compatibility guarantees
are made for those systems currently.
Expand Down
13 changes: 7 additions & 6 deletions detectors/aws/ec2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module go.opentelemetry.io/contrib/detectors/aws/ec2
go 1.18

require (
github.com/aws/aws-sdk-go v1.44.194
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.13.0
go.opentelemetry.io/otel/sdk v1.13.0
github.com/aws/aws-sdk-go v1.44.210
github.com/stretchr/testify v1.8.2
go.opentelemetry.io/otel v1.15.0-rc.1
go.opentelemetry.io/otel/sdk v1.15.0-rc.1
)

require (
Expand All @@ -15,7 +15,8 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel/trace v1.13.0 // indirect
golang.org/x/sys v0.1.0 // indirect
go.opentelemetry.io/otel/metric v1.15.0-rc.1 // indirect
go.opentelemetry.io/otel/trace v1.15.0-rc.1 // indirect
golang.org/x/sys v0.5.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
25 changes: 14 additions & 11 deletions detectors/aws/ec2/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/aws/aws-sdk-go v1.44.194 h1:1ZDK+QDcc5oRbZGgRZSz561eR8XVizXCeGpoZKo33NU=
github.com/aws/aws-sdk-go v1.44.194/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.44.210 h1:/cqRMHSSgzLEKILIDGwhaX2hiIpyRurw7MRy6aaSufg=
github.com/aws/aws-sdk-go v1.44.210/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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=
Expand All @@ -21,15 +21,17 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y=
go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg=
go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM=
go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I=
go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY=
go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds=
go.opentelemetry.io/otel v1.15.0-rc.1 h1:KgZyVIfe3rPjWZHAZE0A9sH5U4tjyh1VeP+BFIgq944=
go.opentelemetry.io/otel v1.15.0-rc.1/go.mod h1:IZXh/uN07z/0si8lWvFW2FkwzAmSGE4DhF4quJIsLnY=
go.opentelemetry.io/otel/metric v1.15.0-rc.1 h1:ueivGgoyP2c58JZvmJriF35k238mVyRtlODD6BRgowU=
go.opentelemetry.io/otel/metric v1.15.0-rc.1/go.mod h1:bpPBxLwoWWmiK+Hmb6ZaG0zDLIi59lK7M+GjgZ5PN+4=
go.opentelemetry.io/otel/sdk v1.15.0-rc.1 h1:WtWiH5l19vwpdGIx9/Wou9l7a/butFoAOuJktWnlOro=
go.opentelemetry.io/otel/sdk v1.15.0-rc.1/go.mod h1:93NwQ8NqCb/QSUF7URdJur5Fvfm9rztE+2eJLpsKdWc=
go.opentelemetry.io/otel/trace v1.15.0-rc.1 h1:xK6jLm8h2KFhdItNvzAuNvnoWjRPU9u7whXNNBMxjtc=
go.opentelemetry.io/otel/trace v1.15.0-rc.1/go.mod h1:2cLx8hBNS4rUWB+JA9PuCGggQl+KJioCaoV2CKewY4s=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand All @@ -44,8 +46,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ec2/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package ec2 // import "go.opentelemetry.io/contrib/detectors/aws/ec2"

// Version is the current release version of the EC2 resource detector.
func Version() string {
return "1.14.0"
return "1.16.0-rc.1"
// This string is updated by the pre_release.sh script during release
}

Expand Down

0 comments on commit 9cac2f9

Please sign in to comment.