From 65ba06d071e428ed1236a21690fc1c8d5c202df7 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Thu, 20 Jun 2024 15:01:56 -0700 Subject: [PATCH 1/6] Add internal/grpcutil package with utilities to encode and decode timeout in the syntax of gRPC --- .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/feature_request.yaml | 1 + .github/ISSUE_TEMPLATE/other.yaml | 1 + .github/ISSUE_TEMPLATE/unmaintained.yaml | 1 + NOTICE | 18 +++- internal/grpcutil/go.mod | 3 + internal/grpcutil/metadata.yaml | 3 + internal/grpcutil/timeout.go | 108 ++++++++++++++++++++ internal/grpcutil/timeout_test.go | 54 ++++++++++ versions.yaml | 1 + 11 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 internal/grpcutil/go.mod create mode 100644 internal/grpcutil/metadata.yaml create mode 100644 internal/grpcutil/timeout.go create mode 100644 internal/grpcutil/timeout_test.go diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b3c6de1d8e67..bec5f0bacd4b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -125,6 +125,7 @@ internal/coreinternal/ @open-teleme internal/docker/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis internal/exp/metrics/ @open-telemetry/collector-contrib-approvers @sh0rez @RichieSams internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +internal/grpcutil/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b3e4845bf4ee..b4195f87c176 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -123,6 +123,7 @@ body: - internal/docker - internal/exp/metrics - internal/filter + - internal/grpcutil - internal/k8sconfig - internal/k8stest - internal/kafka diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 1cb027e98ac2..0d0933764fcc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -117,6 +117,7 @@ body: - internal/docker - internal/exp/metrics - internal/filter + - internal/grpcutil - internal/k8sconfig - internal/k8stest - internal/kafka diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 04ebdfa20a03..cb4d6d8c25df 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -117,6 +117,7 @@ body: - internal/docker - internal/exp/metrics - internal/filter + - internal/grpcutil - internal/k8sconfig - internal/k8stest - internal/kafka diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 4d41898357f0..e75bf33a5605 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -122,6 +122,7 @@ body: - internal/docker - internal/exp/metrics - internal/filter + - internal/grpcutil - internal/k8sconfig - internal/k8stest - internal/kafka diff --git a/NOTICE b/NOTICE index 72a751368a46..c3c924e79ce6 100644 --- a/NOTICE +++ b/NOTICE @@ -24,4 +24,20 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +internal/grpcutil contains code derived from gRPC-Go + +Copyright 2014 gRPC authors. + +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. diff --git a/internal/grpcutil/go.mod b/internal/grpcutil/go.mod new file mode 100644 index 000000000000..a01c7a6e23ea --- /dev/null +++ b/internal/grpcutil/go.mod @@ -0,0 +1,3 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil + +go 1.21.0 diff --git a/internal/grpcutil/metadata.yaml b/internal/grpcutil/metadata.yaml new file mode 100644 index 000000000000..0bd31377fc0d --- /dev/null +++ b/internal/grpcutil/metadata.yaml @@ -0,0 +1,3 @@ +status: + codeowners: + active: [jmacd, moh-osman3] diff --git a/internal/grpcutil/timeout.go b/internal/grpcutil/timeout.go new file mode 100644 index 000000000000..2b28739ebac6 --- /dev/null +++ b/internal/grpcutil/timeout.go @@ -0,0 +1,108 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grpcutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil" + +import ( + "fmt" + "math" + "strconv" + "time" +) + +const maxTimeoutValue int64 = 100000000 - 1 + +// div does integer division and round-up the result. Note that this is +// equivalent to (d+r-1)/r but has less chance to overflow. +func div(d, r time.Duration) int64 { + if d%r > 0 { + return int64(d/r + 1) + } + return int64(d / r) +} + +type timeoutUnit uint8 + +const ( + hour timeoutUnit = 'H' + minute timeoutUnit = 'M' + second timeoutUnit = 'S' + millisecond timeoutUnit = 'm' + microsecond timeoutUnit = 'u' + nanosecond timeoutUnit = 'n' +) + +// EncodeTimeout encodes the duration to the format grpc-timeout +// header accepts. This is copied from the gRPC-Go implementation, +// with two branches of the original six branches removed, leaving the +// four you see for milliseconds, seconds, minutes, and hours. This +// code will not encode timeouts less than one millisecond. See: +// +// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests +func EncodeTimeout(t time.Duration) string { + if t < time.Millisecond { + return "0m" + } + if d := div(t, time.Millisecond); d <= maxTimeoutValue { + return fmt.Sprintf("%d%c", d, millisecond) + } + if d := div(t, time.Second); d <= maxTimeoutValue { + return fmt.Sprintf("%d%c", d, second) + } + if d := div(t, time.Minute); d <= maxTimeoutValue { + return fmt.Sprintf("%d%c", d, minute) + } + // Note that maxTimeoutValue * time.Hour > MaxInt64. + return fmt.Sprintf("%d%c", div(t, time.Hour), hour) +} + +func timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) { + switch u { + case hour: + return time.Hour, true + case minute: + return time.Minute, true + case second: + return time.Second, true + case millisecond: + return time.Millisecond, true + case microsecond: + return time.Microsecond, true + case nanosecond: + return time.Nanosecond, true + default: + } + return +} + +// DecodeTimeout parses a string associated with the "grpc-timeout" +// header. Note this will accept all valid gRPC units including +// microseconds and nanoseconds, which EncodeTimeout avoids. This is +// specified in: +// +// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests +func DecodeTimeout(s string) (time.Duration, error) { + size := len(s) + if size < 2 { + return 0, fmt.Errorf("transport: timeout string is too short: %q", s) + } + if size > 9 { + // Spec allows for 8 digits plus the unit. + return 0, fmt.Errorf("transport: timeout string is too long: %q", s) + } + unit := timeoutUnit(s[size-1]) + d, ok := timeoutUnitToDuration(unit) + if !ok { + return 0, fmt.Errorf("transport: timeout unit is not recognized: %q", s) + } + t, err := strconv.ParseInt(s[:size-1], 10, 64) + if err != nil { + return 0, err + } + const maxHours = math.MaxInt64 / int64(time.Hour) + if d == time.Hour && t > maxHours { + // This timeout would overflow math.MaxInt64; clamp it. + return time.Duration(math.MaxInt64), nil + } + return d * time.Duration(t), nil +} diff --git a/internal/grpcutil/timeout_test.go b/internal/grpcutil/timeout_test.go new file mode 100644 index 000000000000..4697d17e1242 --- /dev/null +++ b/internal/grpcutil/timeout_test.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package grpcutil + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" +) + +func TestTimeoutEncode(t *testing.T) { + // Note the gRPC specification limits durations to 8 digits, + // so the use of 123456789 as a multiplier below forces the + // next-larger unit to be used. + require.Equal(t, "0m", EncodeTimeout(-time.Second)) + require.Equal(t, "1000m", EncodeTimeout(time.Second)) + require.Equal(t, "123m", EncodeTimeout(123*time.Millisecond)) + require.Equal(t, "123457S", EncodeTimeout(123456789*time.Millisecond)) + require.Equal(t, "2057614M", EncodeTimeout(123456789*time.Second)) + require.Equal(t, "2057614H", EncodeTimeout(123456789*time.Minute)) +} + +func mustDecode(t *testing.T, s string) time.Duration { + d, err := DecodeTimeout(s) + require.NoError(t, err, "must parse a timeout") + return d +} + +func TestTimeoutDecode(t *testing.T) { + // Note the gRPC specification limits durations to 8 digits, + // so the use of 123456789 as a multiplier below forces the + // next-larger unit to be used. + require.Equal(t, time.Duration(0), mustDecode(t, "0m")) + require.Equal(t, time.Second, mustDecode(t, "1000m")) + require.Equal(t, 123*time.Millisecond, mustDecode(t, "123m")) + require.Equal(t, 123*time.Second, mustDecode(t, "123S")) + require.Equal(t, 123*time.Minute, mustDecode(t, "123M")) + require.Equal(t, 123*time.Hour, mustDecode(t, "123H")) + + // these are not encoded by EncodeTimeout, but will be decoded + require.Equal(t, 123*time.Microsecond, mustDecode(t, "123u")) + require.Equal(t, 123*time.Nanosecond, mustDecode(t, "123n")) + + // error cases + testError := func(s string) { + _, err := DecodeTimeout("123x") + require.Error(t, err) + } + testError("123x") + testError("x") + testError("") +} diff --git a/versions.yaml b/versions.yaml index 69d6ddabd7e4..89b8b201a68c 100644 --- a/versions.yaml +++ b/versions.yaml @@ -122,6 +122,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker - github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka From c8526767eaf8422b53f0a7bef7308eefcd247644 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Thu, 20 Jun 2024 15:20:40 -0700 Subject: [PATCH 2/6] chlog --- .chloggen/add-grpcutil.yaml | 27 +++++++++++++++++++++++++++ internal/grpcutil/Makefile | 1 + 2 files changed, 28 insertions(+) create mode 100644 .chloggen/add-grpcutil.yaml create mode 100644 internal/grpcutil/Makefile diff --git a/.chloggen/add-grpcutil.yaml b/.chloggen/add-grpcutil.yaml new file mode 100644 index 000000000000..77bf5ad1be60 --- /dev/null +++ b/.chloggen/add-grpcutil.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: internal/grpcutil + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add internal/grpcutil package with gRPC-specified timeout parsing + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [33688] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/internal/grpcutil/Makefile b/internal/grpcutil/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/internal/grpcutil/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common From d0fe8145b39ea3c25bb52c95d6d75bef86b3d554 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 21 Jun 2024 09:20:10 -0700 Subject: [PATCH 3/6] lint --- internal/grpcutil/go.mod | 8 ++++++++ internal/grpcutil/timeout_test.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/grpcutil/go.mod b/internal/grpcutil/go.mod index a01c7a6e23ea..31590bdebf24 100644 --- a/internal/grpcutil/go.mod +++ b/internal/grpcutil/go.mod @@ -1,3 +1,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil go 1.21.0 + +require github.com/stretchr/testify v1.9.0 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/internal/grpcutil/timeout_test.go b/internal/grpcutil/timeout_test.go index 4697d17e1242..9554b6dd35cf 100644 --- a/internal/grpcutil/timeout_test.go +++ b/internal/grpcutil/timeout_test.go @@ -45,7 +45,7 @@ func TestTimeoutDecode(t *testing.T) { // error cases testError := func(s string) { - _, err := DecodeTimeout("123x") + _, err := DecodeTimeout(s) require.Error(t, err) } testError("123x") From 6648670f527058d0ab1b2775a664b3de7297b2be Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 21 Jun 2024 09:25:08 -0700 Subject: [PATCH 4/6] missing go.sum --- internal/grpcutil/go.sum | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 internal/grpcutil/go.sum diff --git a/internal/grpcutil/go.sum b/internal/grpcutil/go.sum new file mode 100644 index 000000000000..60ce688a0410 --- /dev/null +++ b/internal/grpcutil/go.sum @@ -0,0 +1,10 @@ +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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 655e0fb793f0c769a724707a68e89389891685d4 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 15 Jul 2024 15:32:32 -0700 Subject: [PATCH 5/6] add lquerel --- .github/CODEOWNERS | 2 +- internal/grpcutil/metadata.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bf5be52dd64c..79fde202747f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -127,7 +127,7 @@ internal/coreinternal/ @open-teleme internal/docker/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @jamesmoessis internal/exp/metrics/ @open-telemetry/collector-contrib-approvers @sh0rez @RichieSams internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers -internal/grpcutil/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 +internal/grpcutil/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @lquerel internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy diff --git a/internal/grpcutil/metadata.yaml b/internal/grpcutil/metadata.yaml index 0bd31377fc0d..92ebf80067ec 100644 --- a/internal/grpcutil/metadata.yaml +++ b/internal/grpcutil/metadata.yaml @@ -1,3 +1,3 @@ status: codeowners: - active: [jmacd, moh-osman3] + active: [jmacd, moh-osman3, lquerel] From 21d6d8d39544c584828f4cfd976359339ac4f659 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 2 Aug 2024 12:59:31 -0700 Subject: [PATCH 6/6] Generate, comment on the origin. --- exporter/otelarrowexporter/README.md | 4 ++-- .../otelarrowexporter/internal/metadata/generated_status.go | 6 +++--- exporter/otelarrowexporter/metadata.yaml | 2 +- internal/grpcutil/timeout.go | 6 ++++++ receiver/otelarrowreceiver/README.md | 4 ++-- .../otelarrowreceiver/internal/metadata/generated_status.go | 6 +++--- receiver/otelarrowreceiver/metadata.yaml | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/exporter/otelarrowexporter/README.md b/exporter/otelarrowexporter/README.md index 06b5341d8e59..7fa7cdd3b904 100644 --- a/exporter/otelarrowexporter/README.md +++ b/exporter/otelarrowexporter/README.md @@ -3,12 +3,12 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: traces, metrics, logs | +| Stability | [beta]: traces, metrics, logs | | Distributions | [] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotelarrow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotelarrow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotelarrow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotelarrow) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jmacd](https://www.github.com/jmacd), [@moh-osman3](https://www.github.com/moh-osman3), [@lquerel](https://www.github.com/lquerel) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta Exports telemetry data using [OpenTelemetry Protocol with Apache diff --git a/exporter/otelarrowexporter/internal/metadata/generated_status.go b/exporter/otelarrowexporter/internal/metadata/generated_status.go index ddc3bb4626d0..77afb34752e6 100644 --- a/exporter/otelarrowexporter/internal/metadata/generated_status.go +++ b/exporter/otelarrowexporter/internal/metadata/generated_status.go @@ -11,7 +11,7 @@ var ( ) const ( - TracesStability = component.StabilityLevelAlpha - MetricsStability = component.StabilityLevelAlpha - LogsStability = component.StabilityLevelAlpha + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta ) diff --git a/exporter/otelarrowexporter/metadata.yaml b/exporter/otelarrowexporter/metadata.yaml index 10ac536a37ca..c2447398adcb 100644 --- a/exporter/otelarrowexporter/metadata.yaml +++ b/exporter/otelarrowexporter/metadata.yaml @@ -4,7 +4,7 @@ scope_name: otelcol/otelarrow status: class: exporter stability: - alpha: [traces, metrics, logs] + beta: [traces, metrics, logs] distributions: [] codeowners: active: [jmacd, moh-osman3, lquerel] diff --git a/internal/grpcutil/timeout.go b/internal/grpcutil/timeout.go index 2b28739ebac6..88620f1f0f44 100644 --- a/internal/grpcutil/timeout.go +++ b/internal/grpcutil/timeout.go @@ -1,6 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// The EncodeTimeout function is forked and modified from the original +// https://github.com/grpc/grpc-go/blob/master/internal/grpcutil/encode_duration.go + +// This DecodeTimeout function is forked and modified from the original +// https://github.com/grpc/grpc-go/blob/master/internal/transport/http_util.go + package grpcutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil" import ( diff --git a/receiver/otelarrowreceiver/README.md b/receiver/otelarrowreceiver/README.md index 61b837ccc317..b3451502c968 100644 --- a/receiver/otelarrowreceiver/README.md +++ b/receiver/otelarrowreceiver/README.md @@ -3,12 +3,12 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: traces, metrics, logs | +| Stability | [beta]: traces, metrics, logs | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fotelarrow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fotelarrow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fotelarrow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fotelarrow) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jmacd](https://www.github.com/jmacd), [@moh-osman3](https://www.github.com/moh-osman3) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/otelarrowreceiver/internal/metadata/generated_status.go b/receiver/otelarrowreceiver/internal/metadata/generated_status.go index ddc3bb4626d0..77afb34752e6 100644 --- a/receiver/otelarrowreceiver/internal/metadata/generated_status.go +++ b/receiver/otelarrowreceiver/internal/metadata/generated_status.go @@ -11,7 +11,7 @@ var ( ) const ( - TracesStability = component.StabilityLevelAlpha - MetricsStability = component.StabilityLevelAlpha - LogsStability = component.StabilityLevelAlpha + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta ) diff --git a/receiver/otelarrowreceiver/metadata.yaml b/receiver/otelarrowreceiver/metadata.yaml index d90cd4c0bed5..b04d5b09f589 100644 --- a/receiver/otelarrowreceiver/metadata.yaml +++ b/receiver/otelarrowreceiver/metadata.yaml @@ -4,7 +4,7 @@ scope_name: otelcol/otelarrowreceiver status: class: receiver stability: - alpha: [traces, metrics, logs] + beta: [traces, metrics, logs] distributions: [contrib] codeowners: active: [jmacd, moh-osman3]